digitalmars.D.dwt - dwt-addons rework, please test
- Frank Benoit (12/12) Aug 07 2008 I did a rework of the use of collections and added a new collection
- yidabu (15/31) Aug 07 2008 dwtx\dwtxhelper\Bean.d(76): Error: undefined identifier package core.Arr...
- Frank Benoit (3/28) Aug 07 2008 strange that compiled for me :)
- yidabu (25/41) Aug 07 2008 I tested 3 dwtx(svn) based apps, all get run time exception:
- yidabu (11/60) Aug 07 2008 switched to pre revison, it's diffcult to figure out the problem.
- yidabu (17/54) Aug 07 2008 I found the problem that with shell.setImages:
- Frank Benoit (40/92) Aug 08 2008 The source of setImages:
- yidabu (37/39) Aug 08 2008 On Fri, 08 Aug 2008 11:32:13 +0200
- Frank Benoit (7/59) Aug 08 2008 While trying this, i get first an access violation, because no Display
- yidabu (13/29) Aug 07 2008 \dwt-samples\jface>Librarian
- Frank Benoit (2/25) Aug 08 2008 It is added.
I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)
Aug 07 2008
On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)dwtx\dwtxhelper\Bean.d(76): Error: undefined identifier package core.Array dwtx\dwtxhelper\Bean.d(76): Error: undefined identifier package core.Array dwtx\dwtxhelper\Bean.d(76): Error: no property 'remove' for type 'void' dwtx\dwtxhelper\Bean.d(76): Error: function expected before (), not 1 of type in t -- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/
Aug 07 2008
yidabu schrieb:On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:strange that compiled for me :) is fixed now.I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)dwtx\dwtxhelper\Bean.d(76): Error: undefined identifier package core.Array dwtx\dwtxhelper\Bean.d(76): Error: undefined identifier package core.Array dwtx\dwtxhelper\Bean.d(76): Error: no property 'remove' for type 'void' dwtx\dwtxhelper\Bean.d(76): Error: function expected before (), not 1 of type in t
Aug 07 2008
On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)I tested 3 dwtx(svn) based apps, all get run time exception: nhandled D Exception (tango.core.Exception.IllegalArgumentException "Argument not valid") at KERNEL32.dll (0x7c812a5b) thread(2444) ->us [0] = "myProgram" }) at myProgram.d:38 () from dmain2 () from dmain2 I'm not sure what's the problem. -- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/
Aug 07 2008
On Fri, 8 Aug 2008 07:56:51 +0800 yidabu <yidabu.spam gmail.com> wrote:On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:switched to pre revison, it's diffcult to figure out the problem.I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)I tested 3 dwtx(svn) based apps, all get run time exception: nhandled D Exception (tango.core.Exception.IllegalArgumentException "Argument not valid") at KERNEL32.dll (0x7c812a5b) thread(2444) ->us [0] = "myProgram" }) at myProgram.d:38 () from dmain2 () from dmain2 I'm not sure what's the problem.-- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/-- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/
Aug 07 2008
On Fri, 8 Aug 2008 07:56:51 +0800 yidabu <yidabu.spam gmail.com> wrote:On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:I found the problem that with shell.setImages: protected void configureShell(Shell shell) { super.configureShell(shell); /// cause IllegalArgumentException //shell.setImages([imageManager.get(imageManager.SOFT32_ICO), imageManager.get(imageManager.SOFT32_PNG)]); } -- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)I tested 3 dwtx(svn) based apps, all get run time exception: nhandled D Exception (tango.core.Exception.IllegalArgumentException "Argument not valid") at KERNEL32.dll (0x7c812a5b) thread(2444) ->us [0] = "myProgram" }) at myProgram.d:38 () from dmain2 () from dmain2 I'm not sure what's the problem.
Aug 07 2008
yidabu schrieb:On Fri, 8 Aug 2008 07:56:51 +0800 yidabu <yidabu.spam gmail.com> wrote:The source of setImages: /** * Sets the receiver's images to the argument, which may * be an empty array. Images are typically displayed by the * window manager when the instance is marked as iconified, * and may also be displayed somewhere in the trim when the * instance is in normal or maximized states. Depending where * the icon is displayed, the platform chooses the icon with * the "best" attributes. It is expected that the array will * contain the same icon rendered at different sizes, with * different depth and transparency attributes. * * param images the new image array * * exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if one of the images is null or has been disposed</li> * </ul> * exception DWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * since 3.0 */ public void setImages (Image [] images) { checkWidget (); // DWT extension: allow null array //if (images is null) error (DWT.ERROR_INVALID_ARGUMENT); for (int i = 0; i < images.length; i++) { if (images [i] is null || images [i].isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT); } this.images = images; setImages (null, images); } Are you sure, the imageManager return the Images as non-null? This would explain the invalid arg exception.On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:I found the problem that with shell.setImages: protected void configureShell(Shell shell) { super.configureShell(shell); /// cause IllegalArgumentException //shell.setImages([imageManager.get(imageManager.SOFT32_ICO), imageManager.get(imageManager.SOFT32_PNG)]); }I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)I tested 3 dwtx(svn) based apps, all get run time exception: nhandled D Exception (tango.core.Exception.IllegalArgumentException "Argument not valid") at KERNEL32.dll (0x7c812a5b) thread(2444) ->us [0] = "myProgram" }) at myProgram.d:38 () from dmain2 () from dmain2 I'm not sure what's the problem.
Aug 08 2008
On Fri, 08 Aug 2008 11:32:13 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:Are you sure, the imageManager return the Images as non-null? This would explain the invalid arg exception.your are right, the image is null now. but the same code works fine before, causes exception after upgrade to dwtx svn. perhaps this is an ImageRegistry issue? I'm sure the Images -JPath is right(have not compile error, and works fine before). import dwtx.jface.resource.ImageDescriptor; import dwtx.jface.resource.ImageRegistry; import dwt.graphics.Image; import dwt.graphics.ImageData; import dwt.widgets.Display; import dwt.dwthelper.utils; public class ImageManager { static const char[] SOFT32_ICO = "soft32.ico"; static const char[] SOFT32_PNG = "soft32.png"; this() { ir = new ImageRegistry(); ir.put(SOFT32_ICO, ImageDescriptor.createFromFile(getImportData!(SOFT32_ICO))); ir.put(SOFT32_PNG, ImageDescriptor.createFromFile(getImportData!(SOFT32_PNG))); assert( get(SOFT32_ICO) !is null);//image is null assert( get(SOFT32_PNG) !is null); //image is null } Image get(char[] key) { return ir.get(key); } private ImageRegistry ir; } // end class ImageManager -- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/
Aug 08 2008
yidabu schrieb:On Fri, 08 Aug 2008 11:32:13 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:While trying this, i get first an access violation, because no Display was created before. I don't know if should be seen as an error in DWT. The real problem was in ArrayWrapperT that is used as a encapsulation object for char[]. It did not have a toHash(), hence the HashMap in ImageRegistry did not retrieve the object properly. It is now fixed in dwt-win.Are you sure, the imageManager return the Images as non-null? This would explain the invalid arg exception.your are right, the image is null now. but the same code works fine before, causes exception after upgrade to dwtx svn. perhaps this is an ImageRegistry issue? I'm sure the Images -JPath is right(have not compile error, and works fine before). import dwtx.jface.resource.ImageDescriptor; import dwtx.jface.resource.ImageRegistry; import dwt.graphics.Image; import dwt.graphics.ImageData; import dwt.widgets.Display; import dwt.dwthelper.utils; public class ImageManager { static const char[] SOFT32_ICO = "soft32.ico"; static const char[] SOFT32_PNG = "soft32.png"; this() { ir = new ImageRegistry(); ir.put(SOFT32_ICO, ImageDescriptor.createFromFile(getImportData!(SOFT32_ICO))); ir.put(SOFT32_PNG, ImageDescriptor.createFromFile(getImportData!(SOFT32_PNG))); assert( get(SOFT32_ICO) !is null);//image is null assert( get(SOFT32_PNG) !is null); //image is null } Image get(char[] key) { return ir.get(key); } private ImageRegistry ir; } // end class ImageManager
Aug 08 2008
On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)\dwt-samples\jface>Librarian implementation missing in file dwtx\dwtxhelper\Collection.d line 1707 exiting ... -- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/
Aug 07 2008
yidabu schrieb:On Thu, 07 Aug 2008 15:32:48 +0200 Frank Benoit <keinfarbton googlemail.com> wrote:It is added.I did a rework of the use of collections and added a new collection wrapper. The new wrappers make use of the new tango.util.containers instead of the prior code that used tango.util.collection directly. The new collection wrappers in dwtx.dwtxhelper.Collection have still many unimplemented methods. If such one is called, the application is terminated immediatly with a message of file and line. I did a few tests with examples to catch many of the unimplemented methods. If you encounter such a messages implementation missing in file ../dwt-addons/dwtx/dwtxhelper/Collection.d line 1527 please report that so the implementation can be added quickly. Or if you want you can also send me patches or hg bundles :)\dwt-samples\jface>Librarian implementation missing in file dwtx\dwtxhelper\Collection.d line 1707 exiting ...
Aug 08 2008