www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - dwt-addons rework, please test

reply Frank Benoit <keinfarbton googlemail.com> writes:
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
next sibling parent reply yidabu <yidabu.spam gmail.com> writes:
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
parent Frank Benoit <keinfarbton googlemail.com> writes:
yidabu schrieb:
 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
strange that compiled for me :) is fixed now.
Aug 07 2008
prev sibling next sibling parent reply yidabu <yidabu.spam gmail.com> writes:
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
next sibling parent yidabu <yidabu.spam gmail.com> writes:
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 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.
switched to pre revison, it's diffcult to figure out 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
prev sibling parent reply yidabu <yidabu.spam gmail.com> writes:
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 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.
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/
Aug 07 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
yidabu schrieb:
 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 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.
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)]); }
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.
Aug 08 2008
parent reply yidabu <yidabu.spam gmail.com> writes:
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
parent Frank Benoit <keinfarbton googlemail.com> writes:
yidabu schrieb:
 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
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.
Aug 08 2008
prev sibling parent reply yidabu <yidabu.spam gmail.com> writes:
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
parent Frank Benoit <keinfarbton googlemail.com> writes:
yidabu schrieb:
 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 ...
It is added.
Aug 08 2008