Nevermind, I see it. Too early for me to be looking at code :) Jason
--- Jason Snuggs <[EMAIL PROTECTED]> wrote: >Maybe I'm missing something but where are you getting LoadType from in your >function with the case statements. I see you send the TObject to the >function, but not the LoadType. > >Jason > >--- "Bobby Hicks" <[EMAIL PROTECTED]> wrote: >> >>-----Original Message----- >>From: Jason Gauthier [mailto:[EMAIL PROTECTED] >>Sent: Saturday, June 22, 2002 6:32 PM >>To: 'Bobby Hicks' >>Cc: 'rom@rom.org' >>Subject: RE: Here's a wierd one..... >> >> >>Can we see more code? Including the loop? >> >>Sure: >> >>-------------------main.cpp------------------- >>void __fastcall TMainForm::FileOpen1Execute(TObject *Sender) >>{ >> if (OpenDialog->Execute()) >> { >> CreateMDIChild("Area Information", AREA); >> CreateMDIChild("Room Data", ROOM); >> CreateMDIChild("Mobile Data", MOBILE); >> CreateMDIChild("Object Data", OBJECT); >> CreateMDIChild("Reset Data", RESET); >> CreateMDIChild("Shop Data", SHOP); >> } >>} >> >>void __fastcall TMainForm::CreateMDIChild(String Name, int Section_Type) >>{ >> TMDIChild *Child; >> >> //--- create a new MDI child window ---- >> LoadType = Section_Type; >> Child = new TMDIChild(Application); >> Child->Caption = Name; >>} >> >>-------------------mdichild.cpp------------------- >>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. >> >> >>-- >>ROM mailing list >>ROM@rom.org >>http://www.rom.org/cgi-bin/mailman/listinfo/rom > >_____________________________________________________________ >http://wotmania.com >feed your wot addiction > >_____________________________________________________________ >Promote your group and strengthen ties to your members with [EMAIL PROTECTED] >by Everyone.net http://www.everyone.net/?btn=tag > >-- >ROM mailing list >ROM@rom.org >http://www.rom.org/cgi-bin/mailman/listinfo/rom _____________________________________________________________ http://wotmania.com feed your wot addiction _____________________________________________________________ Promote your group and strengthen ties to your members with [EMAIL PROTECTED] by Everyone.net http://www.everyone.net/?btn=tag