Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Alerts, POSE and color debug 3.5 rom

Alerts, POSE and color debug 3.5 rom

Discuss PocketC for Palm OS (including Desktop Edition)

Postby cable_guy_67 on Fri Jan 30, 2004 7:12 pm

I remember reading a topic about this in the past but I can't for the life of me find it. The problem is on the POSE with the palmos35-en-colordbg.rom loaded.

When an alert pops up : alert("string"); and is dismissed with the ok button the section of the screen under the alert is lost.

I seem to remember the past topic pointing at low memory problems being the culprit. I don't believe this is my problem. The problem does not show up on the actual device (PalmOS 3.5.2) or the palmos35-en-color.rom. To workaround I merely redraw my screen after an alert during testing but this is a pain all around. Has anyone else had a problem with this debug rom and found a way to avoid it? I use it for most of my testing as it is the best test setup for the device I use for real world testing.

Mark
cable_guy_67
 
Posts: 92
Joined: Mon Mar 31, 2003 2:28 am
Location: USA

Postby jstadolnik on Fri Jan 30, 2004 8:53 pm

This is not a bug in the emulator... it's intentional.

If a device is low on dynamic heap memory to the point where it can't save the screen image when popping an alert or dialog, it will issue FrmUpdateEvent event when the alert/dialog closes. The application must then trap this event and redraw the screen.

So that developers don't forget about this functionality, the emulator will always force a "low heap" scenario when a alert/dialog is popped. Thus the previous image is not saved.

The solution: You can trap these FrmUpdateEvents with the PToolboxLib's Fevent() function. When you trap them, just redraw your screen. :)

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby cable_guy_67 on Fri Jan 30, 2004 10:58 pm

Thanks Joe, I needed the long story on the why. So the emulator just acts as if any alert could be popped while low on heap space and acts accordingly. I was essentially solving this by calling my main draw routine which would end up as excess redraws on the actual device. Looking at the fevent_demo.c shows it in action. Additional reading on page 263 PalmOS Bible 2nd edition. :)

more reading can be found at http://www.escribe.com/computing/pcpef/m1360.html

So now I understand what I am trying to trap but am not sure which way to go from there. Should I call Fevent(0) and catch the event code? Looking at the PtoolBox Docs it seems that I should use EHAND in some way. But how do I recognize that the OS has set a frmUpdateEvent? It sounds like I check for this after any dialog has been called and redraw my screen if there was a frmUpdateEvent. The EHAND would then call my redraw routine. Am I on the right track or have I over-thought it? :D

Mark
cable_guy_67
 
Posts: 92
Joined: Mon Mar 31, 2003 2:28 am
Location: USA

Postby jstadolnik on Fri Jan 30, 2004 11:37 pm

Ah, I forgot to document the return code. When Fevent() returns 20 when it traps a FrmUpdateEvent.

Doing a Fevent(0) imediately after an alert/dialog pop will not necessarily catch the event because there may be many events in the event queue. It's best to always be running an event loop in your app and to have this loop always look for and handle frmUpdateEvents.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron