--- "Lauren B. Robert" <[EMAIL PROTECTED]> wrote:
> Hi All,
> I managed to solve the problem. I swapped the placing of
> lstSelectEvent with the frmOpenEvent and everything works. Sorry for
> the trouble everyone.
>
If swapping around case blocks in a switch statement affects how your
program executes, that suggests that you have left out the break
statement at the end of one or more of those blocks, or possibly done
something else to modify program flow in an unwanted way.
For example, this code:
switch (something)
{
case a:
A();
case b:
B();
}
will execute function A and then B if something==a. (which could have
unintended consequences)
Whereas this code:
switch (something)
{
case a:
A();
break; // exit the switch
case b:
B();
break; // not required, but a good idea
}
will work as you might have expected.
Another possibility is that you had curly braces in unusual places, and
you put them where they should be when you swapped lstSelectEvent with
frmOpenEvent.
The point is, lstSelectEvent and frmOpenEvent are two entirely separate
events. If your code is constructed correctly, it should not matter
what order they appear in your code (within a switch, an if-else, or
even a painful cluster of goto's). When your form handler is called,
it should only execute the block of code that corresponds to the event
that is passed in to it.
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/