try to cast LoadType to unsigned int just to see
-----Original Message-----
From: Steve Boleware [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 22, 2002 4:08 PM
To: [email protected]
Subject: Re: Here's a wierd one.....
<snipped>
> void __fastcall TMDIChild::FormCreate(TObject *Sender)
> {
> switch ( LoadType )
> {
> case UNKNOWN: lblWarning->Visible = true; break;
> case AREA: fraAreaData->Visible = true; break;
> case ROOM: fraRoomData->Visible = true; break;
> case MOBILE: fraMobData->Visible = true; break;
> case OBJECT: fraObjectData->Visible = true; break;
> case RESET: fraResetData->Visible = true; break;
> case SHOP: fraShopData->Visible = true; break;
> }
> }
>
>
> As you can see, it's not actually a "loop" per se, but 6 separate calls.
> However, with each call, LoadType is set to the appropriate number as it
> should be. But the switch statement is NOT working as it should. I even
> changed the order of the case statement(though that should not matter) and
> it still comes up with the UNKNOWN setting.
Run it through your favorite debugger. break it at each call to
your create function, I have a feeling it has to do with local vs.
global scope.. (odd I know but try it) check for correct value for
LoadType both in and out of your function.. try passing it explicitly
good luck
/-------------------------------------------------------------\
| Steve Boleware | Beginning Coder |
| [EMAIL PROTECTED] | Student of Life |
| ICQ: 11120901 | |
\-------------------------------------------------------------/
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom