03-05-2012 05:30 PM
With respect to the Geolocation Example I have a few questions:
dialog_set_html_title_text(main_dialog, "<h1 style=\"color:blue\"><b>Geolocation Example</b></h1>");
seems to work okay except colour isn't changed, it remains black but the bold works.
What are the html limitations in dialogs?
dialog_set_alert_message_text(main_dialog, "Geolocation getting first fix");
Works fine with results printing each second regardless the validity of the geo information.
However,
dialog_set_alert_html_message_text(main_dialog,"<h
seems to print okay but it appears to hang since no geo information is printed afterwards.
Is this a bug?
Roger
03-05-2012 05:54 PM
03-05-2012 06:09 PM
Hi Peter,
Thank you for your quick reply.
I am fairly confident the problem is related to the dialog. If I print to dialog without using ...html_text there is no problem if I print to dialog using ...html_text then the application appears to hang.
The dialog works and geolocation_info works but not when I use message_html_text when geolocation_info hangs. Interestingly, using title_html_text poses no such problem.
Roger
03-05-2012 06:11 PM
03-05-2012 06:31 PM
Sure, I think I can do that for tomorrow.
03-05-2012 10:53 PM
This may not be exactly what you wanted but I think it clearly shows the problem. I am using the example GeolocationSampleManaged.
Around line 203 in main.c I have these two lines:
Case #1: This works.
dialog_set_alert_message_text(main_dialog, "Geolocation getting first fix");
// dialog_set_alert_html_message_text(main_dialog,"<b
Case #2 This doesn't work.
// dialog_set_alert_message_text(main_dialog, "Geolocation getting first fix");
dialog_set_alert_html_message_text(main_dialog,"<b
Around line 423 I modified as follows:
char buf[200];
snprintf(buf,sizeof buf, "Count: %u\n",++count);
if (bps_event_get_domain(event) == geolocation_get_domain())
{
// handle_geolocation_response(event);
dialog_set_alert_message_text(main_dialog, buf); // Only works for Case #1 above
dialog_update(main_dialog);
fprintf(stderr,"Count: %u Event: %d \n",count,bps_event_get_domain(event)); // This works in both cases
It is interesting to note the following does work for both cases above.
// snprintf(buf,sizeof buf, "Count: %u\n",++count);
snprintf(buf,sizeof buf, "<b><i>Count: %u</i></b>\n",++count);
if (bps_event_get_domain(event) == geolocation_get_domain())
{
// handle_geolocation_response(event);
// dialog_set_alert_message_text(main_dialog, buf);
dialog_set_alert_html_message_text(main_dialog, buf);
dialog_update(main_dialog);
fprintf(stderr,"Count: %u Event: %d \n",count,bps_event_get_domain(event));
It may be that once the dialog message has been used with html it doesn't process plain text afterwards?
Would you please tell me what html commands are allowed? I tried tables but they don't seem to work and neither does font and colour attributes.
Hope this helps,
Roger