But there's no place to assign your own data to the data member of EventType, is 
there? I've known about creating your own events, that's not a problem. I want the 
event to carry data with it, though. I suppose I could use the "generic" members of 
the data struct, but I haven't seen any documentation that says this is OK.  The 
problem there, though, is that you're limited to the eight members defined by it. 

Basically I'm looking for the most flexible way to include data with an event.

-JP-

>>> [EMAIL PROTECTED] 12/07/00 09:26AM >>>
Hi, I do it like this, not sure its the best way, buts it neat and it works.

typedef enum {                                  /* User defined events */
userReadPort = firstUserEvent,
userValidMsg,
userRadioBattLow,
userVectorRedraw,
userModeChange
} user_eventsEnum;


EventType user_event;
/* Post our own event to the queue */
user_event.eType = (eventsEnum)userRadioBattLow;
/* Add other paremeters here */
EvtAddEventToQueue (&user_event);


Get the event as any other palm event.

Rik
> -----Original Message-----

> From: Jason Partyka [SMTP:[EMAIL PROTECTED]] 
> Sent: 07 December 2000 15:10
> To:   Palm Developer Forum
> Subject:      RE: [W]  Multiple Threads under Codewarrior
> 
> By user defined messages you mean user-defined events, right? I haven't
> figured out a way to include data with user-defined events, although that
> may be due to limited experience in C. Is such a thing possible on the
> Palm, and if so, can someone point me to documentation on how to do so?
> 
> -jp-
> 
> >>> [EMAIL PROTECTED] 12/07/00 08:41AM >>>
> As the OS is message based, you can sort of have psuedo threads, activated
> by messages, although they will have to run to completion. I think a lot
> of
> people dont use the message based stuff to its full potential. User
> defined
> messages are very usefull. A Windows 3.1 programming background is usefull
> here.
> 
> Rik
> 
> > -----Original Message-----
> > From:       Steve Stover [SMTP:[EMAIL PROTECTED]] 
> > Sent:       07 December 2000 16:23
> > To: Palm Developer Forum
> > Subject:    RE: [W]  Multiple Threads under Codewarrior
> > 
> > Thanks, Rik,
> > 
> > That's what I figured.  It will make this data log timing loop much more
> > convoluted, but doable.  Oh well...   :(
> > 
> > -----Original Message-----
> > From:       [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED]] On Behalf Of
> Richard
> > Anderson
> > Sent:       Thursday, December 07, 2000 6:13 AM
> > To: Palm Developer Forum
> > Subject:    RE: [W]  Multiple Threads under Codewarrior
> > 
> > Your not allowed/supposed to used multiple threads in Palm apps full
> stop.
> > 
> > Rik
> > 
> > > -----Original Message-----
> > > From:     Steve Stover [SMTP:[EMAIL PROTECTED]] 
> > > Sent:     07 December 2000 15:58
> > > To:       Palm Developer Forum
> > > Subject:  [W]  Multiple Threads under Codewarrior
> > >
> > > Hello Palmreaders,
> > >
> > > I don't remember any mention or discussion of multiple "Thread"
> > > programming
> > > under Codewarrior.  Are multiple threaded programs possible under
> > > Codewarrior, and where do I find information about it if it is
> possible?
> > >
> > > Thanks,
> > > Steve Stover
> > > SRC
> > 
> > 
> > -- 
> > 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/

Reply via email to