> Is there a way to pass data back from the menu event
> handler, other than the true/false handled boolean,
> without resorting to using a global?
> ...
> Is this generally how it's done, or is there a
better
> way to pass data between event handlers?
> 


>You could use a global variable, an app preference, a
>feature, a file
>stream, a database record, a system preference, etc.
.  Since a menu event handler is called by your form
event>
>handler, you could even use a variable that is local
>to the form event
>handler and the menu event handler could modify that.

Yes modifying say a static declared in the form event
handler, that called the menu event handler would be
ideal.

But if one can't pass the menu handler any data I have
no way to pass it a pointer to the static or some
such.  

>However, why do you need to do this?  Your form
>handler gets a
>menuEvent (and the id of the menu item) when a menu
>item is selected. 
>At that point, you should know all you need to know
to >handle the menu
>event.

Well no.  Not if I say display a yes/no dialog with
some options that does something, it gets handled by
some_function, but on return to the caller I also want
to know what occured.  All the menu handler is going
to tell me is  handled = true.

So some_function could modify a global structure or
whatever so the caller knows, but again one is forced
to use a global, database write or whatever, when if I
could have just passed the function a paramter the
additional overhead or messiness wouldn't be needed.

I was hoping there's a way to sneak a pointer in the
way one can with LstSetListChoices when using a custom
draw function..

thanks for the reply,
Phil
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com


-- For information on using the Palm Developer Forums,
or to unsubscribe, please see



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to