> "Richard Burmeister" wrote:
> >
> > Hey, that's what C programming is all about!
>
>
> From: George Aslanis
>
> I have to disagree.  C programming is primarily the manipulation
> of pointers
> not switch statements.  Yes, all compilers have to handle
> pointers, but "C"
> allows the programmer to decide at what level they wish to develop.
>
> If events were treated as indexes into a jump table, would it not greatly
> reduce the processing of switch or if statements?
>

You're right about that one statement.  I should have really said, "Hey,
that's what event driven programming is all about!".  An OS *could* create
an event-model that treats events as indexes into a jump table, but that is
not how the Palm OS works.  Your event loop sends each form event to the
appropriate form event handler (which you set up) and in that event handler
you have to respond to the events you want to handle and let the OS handle
the others.  As I mentioned, it might not be difficult to create your own
jump table (the "sparse array" I spoke of) if that is how you want to handle
events.  But it really doesn't provide any benefit to do so unless it makes
it easier for you to understand and debug your own code when you program
that way.


-- 
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