From: <mie...@us...> - 2010-02-12 01:49:30
|
Revision: 5556 http://oorexx.svn.sourceforge.net/oorexx/?rev=5556&view=rev Author: miesfeld Date: 2010-02-12 01:49:19 +0000 (Fri, 12 Feb 2010) Log Message: ----------- Fix some of the ooDialog samples Modified Paths: -------------- main/trunk/samples/windows/oodialog/calculator.rex main/trunk/samples/windows/oodialog/oobandit.rex main/trunk/samples/windows/oodialog/ooticket.rex Modified: main/trunk/samples/windows/oodialog/calculator.rex =================================================================== --- main/trunk/samples/windows/oodialog/calculator.rex 2010-02-12 01:45:28 UTC (rev 5555) +++ main/trunk/samples/windows/oodialog/calculator.rex 2010-02-12 01:49:19 UTC (rev 5556) @@ -128,20 +128,8 @@ return InitRet ::method InitDialog - InitDlgRet = self~InitDialog:super - - /* Initialization Code (e.g. fill list and combo boxes) */ - return InitDlgRet - -::method run - /* The run message is not automatically generated. */ - /* If you override it you have to call self~run:super. */ - /* It is the place for things that can't be done in the */ - /* init method, e.g. SetCurrentComboIndex. */ - expose tl tl = self~newEdit(TLine) /* get the EditControl object */ - self~run:super ::method getLine /* Return the current text-line content, */ Modified: main/trunk/samples/windows/oodialog/oobandit.rex =================================================================== --- main/trunk/samples/windows/oodialog/oobandit.rex 2010-02-12 01:45:28 UTC (rev 5555) +++ main/trunk/samples/windows/oodialog/oobandit.rex 2010-02-12 01:49:19 UTC (rev 5556) @@ -54,7 +54,16 @@ /* 1ms fast, 500ms slow, 200ms start, equals random every 25th */ d = .banditdlg~new(1,500,200,25) d~Execute("SHOWTOP") - d~deinstall + + -- You can not remove the bitmap handles while the dialog is still displayed + -- on the screen. As long as the dialog is showing, the os will try to repaint + -- the dialog when needed. If the bitmaps are destroyed, the program will + -- crash. + bmp. = d~getBitmapHandles + do i = 1 to 8 + d~removeBitmap(bmp.i) + end + ret = directory(curdir) return @@ -109,7 +118,7 @@ self~InitDialog:super self~connectEachSBEvent(1206,'FASTER','SLOWER','DRAG',minspeed,maxspeed,self~speed) -::method Run +::method Run unguarded expose x y z bmp. kind3 cycle maxcycle equal misses rand = random(1,8,time('S')*7) /* init random */ ret = play("WHISTLE.WAV") @@ -194,8 +203,9 @@ ::method cancel call Play "byebye.wav" - do i = 1 to 8 - self~RemoveBitmap(bmp.i) - end self~finished = 1 return 1 + +::method getBitmapHandles + expose bmp. + return bmp. Modified: main/trunk/samples/windows/oodialog/ooticket.rex =================================================================== --- main/trunk/samples/windows/oodialog/ooticket.rex 2010-02-12 01:45:28 UTC (rev 5555) +++ main/trunk/samples/windows/oodialog/ooticket.rex 2010-02-12 01:49:19 UTC (rev 5556) @@ -243,7 +243,7 @@ end self~setCurrentCategoryComboIndex(35,1,1) -::method run +::method run unguarded expose films daynames today self~setListBoxDataPage(31,'1',1) self~MovieClick @@ -254,7 +254,6 @@ leave end end - self~run:super ::method OK page = self~CurrentCategory This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |