For my app this would not work. I'm creating several gadgets for two of
"my" windows (not Palm windows) on the screen. Each window has its own
gadget, but share the same Form/PalmWindow. I may delete one of my windows
which had gadgets created before the other - of course knowing what I know
now I might have done things differently.
Using your "bug" knowledge, I tried to go in and modify the Object list
directly, puting the deleted object at the end of the list and trying to
move things around to keep things as Palm expects. Could not make this work
as the lower level structures not described seem to require a LIFO order of
removal too.
I think I will need the code of FrmRemoveObject & then write my own.
Joel
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Nesse,
Rustin
Sent: Thursday, October 05, 2000 10:39 AM
To: Palm Developer Forum
Subject: RE: FrmRemoveObject runtime error
You know, I was thinking about this last week, and I got this kind
of intresting idea for installing and removing dynamically installed
gadget objects using a couple of stacks or pointer arrays. You could
basically store the gadget's pointer onto a stack when you're installing
each gadget, then pop the pointer off the top to uninstall it. To give
it a random flavor, you could pop the pointer off and store it in another
stack, and keep "shuffling" the pointers over (deleting the gadget objects
as you go) to that one until you got to the pointer to the gadget you
wanted, pop that and remove it, then "reshuffle" everything back (and
redraw the gadget objects) onto the original stack. To make this seem
more smooth with a large number of objects, you could redraw them in an
offscreen buffer and when you're redrawing, you'd just reinstall each that
way.
It's a bit overheady, and I haven't tried it, but it sounds like it might
work well.
-Rus
>-----Original Message-----
>From: Joel Kamerman [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, October 05, 2000 9:56 AM
>To: Palm Developer Forum
>Subject: RE: FrmRemoveObject runtime error
>
>
>Is this just in the emulator or in the device too? The
>runtime error did
>not show up on the device.
>
>If some of the objects stay and therefore the removal order is
>random is
>there a workaround? Another words, could I take the Palm OS
>code (I don't
>have) & rewrite FrmRemoveObect? Bottom line is the removal
>order is not
>deterministic!
>
>Joel
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Nesse,
>Rustin
>Sent: Thursday, October 05, 2000 9:47 AM
>To: Palm Developer Forum
>Subject: RE: FrmRemoveObject runtime error
>
>
>
>Are you removing them in reverse order of installation? It's
>a little "feature/bug" type deal where you have to remove each
>object in reverse of the order in which you dynamically installed
>the objects.
>
>-Rus
>
>>-----Original Message-----
>>From: Joel Kamerman [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, October 05, 2000 9:43 AM
>>To: Palm Developer Forum
>>Subject: FrmRemoveObject runtime error
>>
>>
>>I'm creating dynamic gadgets not in the resource and when I
>>try to remove
>>them I get a runtime error in the emulator? Anyone know how
>>to fix this?
>>I'm using Palm OS 3.5, checking the frm, removing the handler
>and data,
>>nothing seems to work...
>>
>>Thanks, Joel
>>
>>
>>--
>>For information on using the Palm Developer Forums, or to
>>unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palmos.com/dev/tech/support/forums/
>
>
>--
>For information on using the Palm Developer Forums, or to
>unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/