From: <mie...@us...> - 2009-11-23 17:26:16
|
Revision: 5338 http://oorexx.svn.sourceforge.net/oorexx/?rev=5338&view=rev Author: miesfeld Date: 2009-11-23 17:26:07 +0000 (Mon, 23 Nov 2009) Log Message: ----------- Some rearrangement of WinShell Added Paths: ----------- incubator/WinShell.4.0.0/testing/subclassNoAccessSFO_test.rex incubator/WinShell.4.0.0/testing/systemImages.rex Removed Paths: ------------- incubator/WinShell.4.0.0/examples/subclassNoAccessSFO_test.rex incubator/WinShell.4.0.0/examples/systemImages.rex Deleted: incubator/WinShell.4.0.0/examples/subclassNoAccessSFO_test.rex =================================================================== --- incubator/WinShell.4.0.0/examples/subclassNoAccessSFO_test.rex 2009-11-23 17:22:47 UTC (rev 5337) +++ incubator/WinShell.4.0.0/examples/subclassNoAccessSFO_test.rex 2009-11-23 17:26:07 UTC (rev 5338) @@ -1,53 +0,0 @@ -/* Demonstrates that the fromList and toList in the ShellFileOp class can not - * be set by the programmer. The attributes are defined in WinShell.cls as: - * - * ::attribute fromList get - * ::attribute toList get - * - * There is no way to do: obj~fromList = <someValue>, even by subclassing. - */ - --- TODO other.dir may not exist anymore. - - flags = "FOF_SILENT FOF_NOCONFIRMATION FOF_ALLOWUNDO FOF_NOCONFIRMMKDIR FOF_NOERRORUI" - fo = .MarkFileOp~new("my.test", "other.dir", flags) - - say 'from list:' fo~fromList - if fo~fromList \== .nil then do - say 'length: ' fo~fromList~length - say 'last char:' fo~fromList~right(1)~c2x - say '2nd last: ' fo~fromList~right(2)~left(1)~c2x - end - say 'to list:' fo~toList - - -- Does not work, the desired behavior: - -- fo~fromList = 'dog' - - say - say - say - say 'TRY IT' - say - fo~trySomeThing - say - say - say - say 'NOW WHAT IS FROM LIST ????' - say 'from list:' fo~fromList - - ret = fo~move - if ret then success = "true" - else success = "false" - say 'success:' success - -::requires 'WinShell.cls' - -::class 'MarkFileOp' public subclass ShellFileOp - -::method trySomeThing - say 'in try some thing' - say 'from list again:' self~fromList - say 'make from list a dog:' - - -- Does not work, which is the desired behavior. - self~fromList = "dog" Deleted: incubator/WinShell.4.0.0/examples/systemImages.rex =================================================================== --- incubator/WinShell.4.0.0/examples/systemImages.rex 2009-11-23 17:22:47 UTC (rev 5337) +++ incubator/WinShell.4.0.0/examples/systemImages.rex 2009-11-23 17:26:07 UTC (rev 5338) @@ -1,59 +0,0 @@ - - dlg = .ImageDisplay~new - if dlg~initCode = 0 then do - dlg~create(30, 30, 370, 230, "The System Image Cache", , , "Tahoma") - dlg~Execute("SHOWTOP") - dlg~Deinstall - end - --- End of entry point. - -::requires "OODWIN32.CLS" -::requires 'WinShell.cls' - -::class ImageDisplay subclass UserDialog inherit AdvancedControls - -::method defineDialog - - -- Use SHAREIMAGES so that the list-view control does not destroy the image - -- list. - self~addListControl(100, , 10, 10, 350, 185, "ICON SINGLESEL SHAREIMAGES"); - self~addButton(101, 330, 205, 30, 15, "Close", close, "DEFAULT") - - self~addText(15, 202, 80, 10, "", , 102) - self~addText(15, 217, 80, 10, "", , 103) - self~addText(105, 202, 180, 10, "", , 104) - -::method initDialog - expose list - - list = self~getListControl(100) - - -- Create an image list from the system icon cache. - imageList = .ImageList~new("SystemLarge") - - count = imageList~getImageCount - size = imageList~getImageSize - backGroundColor = imageList~getBkColor(.true) - - txt = 'Image count:' count - self~getStaticControl(102)~title = txt - - txt = 'Image size: ' size~word(1) 'x' size~word(2) - self~getStaticControl(103)~title = txt - - txt = 'Image background color R:' backGroundColor~word(1) 'G:' backGroundColor~word(2) - - 'B:' backGroundColor~word(3) '(' || backGroundColor~word(4) || ')' - self~getStaticControl(104)~title = txt - - imageList~setListViewImages(list~hwnd, LVSIL_NORMAL) - - do i = 0 to (count - 1) - list~add(i, i) - end - - -::method close - return self~ok:super - - Copied: incubator/WinShell.4.0.0/testing/subclassNoAccessSFO_test.rex (from rev 5337, incubator/WinShell.4.0.0/examples/subclassNoAccessSFO_test.rex) =================================================================== --- incubator/WinShell.4.0.0/testing/subclassNoAccessSFO_test.rex (rev 0) +++ incubator/WinShell.4.0.0/testing/subclassNoAccessSFO_test.rex 2009-11-23 17:26:07 UTC (rev 5338) @@ -0,0 +1,53 @@ +/* Demonstrates that the fromList and toList in the ShellFileOp class can not + * be set by the programmer. The attributes are defined in WinShell.cls as: + * + * ::attribute fromList get + * ::attribute toList get + * + * There is no way to do: obj~fromList = <someValue>, even by subclassing. + */ + +-- TODO other.dir may not exist anymore. + + flags = "FOF_SILENT FOF_NOCONFIRMATION FOF_ALLOWUNDO FOF_NOCONFIRMMKDIR FOF_NOERRORUI" + fo = .MarkFileOp~new("my.test", "other.dir", flags) + + say 'from list:' fo~fromList + if fo~fromList \== .nil then do + say 'length: ' fo~fromList~length + say 'last char:' fo~fromList~right(1)~c2x + say '2nd last: ' fo~fromList~right(2)~left(1)~c2x + end + say 'to list:' fo~toList + + -- Does not work, the desired behavior: + -- fo~fromList = 'dog' + + say + say + say + say 'TRY IT' + say + fo~trySomeThing + say + say + say + say 'NOW WHAT IS FROM LIST ????' + say 'from list:' fo~fromList + + ret = fo~move + if ret then success = "true" + else success = "false" + say 'success:' success + +::requires 'WinShell.cls' + +::class 'MarkFileOp' public subclass ShellFileOp + +::method trySomeThing + say 'in try some thing' + say 'from list again:' self~fromList + say 'make from list a dog:' + + -- Does not work, which is the desired behavior. + self~fromList = "dog" Property changes on: incubator/WinShell.4.0.0/testing/subclassNoAccessSFO_test.rex ___________________________________________________________________ Added: svn:executable + * Added: svn:mergeinfo + Added: svn:eol-style + native Copied: incubator/WinShell.4.0.0/testing/systemImages.rex (from rev 5337, incubator/WinShell.4.0.0/examples/systemImages.rex) =================================================================== --- incubator/WinShell.4.0.0/testing/systemImages.rex (rev 0) +++ incubator/WinShell.4.0.0/testing/systemImages.rex 2009-11-23 17:26:07 UTC (rev 5338) @@ -0,0 +1,59 @@ + + dlg = .ImageDisplay~new + if dlg~initCode = 0 then do + dlg~create(30, 30, 370, 230, "The System Image Cache", , , "Tahoma") + dlg~Execute("SHOWTOP") + dlg~Deinstall + end + +-- End of entry point. + +::requires "OODWIN32.CLS" +::requires 'WinShell.cls' + +::class ImageDisplay subclass UserDialog inherit AdvancedControls + +::method defineDialog + + -- Use SHAREIMAGES so that the list-view control does not destroy the image + -- list. + self~addListControl(100, , 10, 10, 350, 185, "ICON SINGLESEL SHAREIMAGES"); + self~addButton(101, 330, 205, 30, 15, "Close", close, "DEFAULT") + + self~addText(15, 202, 80, 10, "", , 102) + self~addText(15, 217, 80, 10, "", , 103) + self~addText(105, 202, 180, 10, "", , 104) + +::method initDialog + expose list + + list = self~getListControl(100) + + -- Create an image list from the system icon cache. + imageList = .ImageList~new("SystemLarge") + + count = imageList~getImageCount + size = imageList~getImageSize + backGroundColor = imageList~getBkColor(.true) + + txt = 'Image count:' count + self~getStaticControl(102)~title = txt + + txt = 'Image size: ' size~word(1) 'x' size~word(2) + self~getStaticControl(103)~title = txt + + txt = 'Image background color R:' backGroundColor~word(1) 'G:' backGroundColor~word(2) - + 'B:' backGroundColor~word(3) '(' || backGroundColor~word(4) || ')' + self~getStaticControl(104)~title = txt + + imageList~setListViewImages(list~hwnd, LVSIL_NORMAL) + + do i = 0 to (count - 1) + list~add(i, i) + end + + +::method close + return self~ok:super + + Property changes on: incubator/WinShell.4.0.0/testing/systemImages.rex ___________________________________________________________________ Added: svn:executable + * Added: svn:mergeinfo + Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |