Jump to page: 1 2
Thread overview
dwt-addons rework, please test
Aug 07, 2008
Frank Benoit
Aug 07, 2008
yidabu
Aug 07, 2008
Frank Benoit
Aug 07, 2008
yidabu
Aug 08, 2008
yidabu
Aug 08, 2008
yidabu
Aug 08, 2008
Frank Benoit
Aug 08, 2008
yidabu
Aug 08, 2008
Frank Benoit
Aug 08, 2008
yidabu
Aug 08, 2008
Frank Benoit
August 07, 2008
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 :)

August 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/


August 07, 2008
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.
August 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 ?? () at myProgram.d:38 from KERNEL32.dll
#1 0x0040a08c in __d_throw@4 () at myProgram.d:38 from deh
#2 0x0040411e in _Dmain (args = {
  [0] = "myProgram"
}) at myProgram.d:38
#3 0x00408764 in extern (C) int dmain2.main(int, char**) . void runMain(void*) () from dmain2
#4 0x0040879b in extern (C) int dmain2.main(int, char**) . void runAll(void*) () from dmain2
#5 0x004084dc in _main () from dmain2
#6 0x00511119 in _mainCRTStartup () from constart
#7 0x7c816fd7 in ?? () from KERNEL32.dll

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/


August 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/


August 08, 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 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 ?? () at myProgram.d:38 from KERNEL32.dll
> #1 0x0040a08c in __d_throw@4 () at myProgram.d:38 from deh
> #2 0x0040411e in _Dmain (args = {
>   [0] = "myProgram"
> }) at myProgram.d:38
> #3 0x00408764 in extern (C) int dmain2.main(int, char**) . void runMain(void*) () from dmain2
> #4 0x0040879b in extern (C) int dmain2.main(int, char**) . void runAll(void*) () from dmain2
> #5 0x004084dc in _main () from dmain2
> #6 0x00511119 in _mainCRTStartup () from constart
> #7 0x7c816fd7 in ?? () from KERNEL32.dll
> 
> 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/


August 08, 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 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 ?? () at myProgram.d:38 from KERNEL32.dll
> #1 0x0040a08c in __d_throw@4 () at myProgram.d:38 from deh
> #2 0x0040411e in _Dmain (args = {
>   [0] = "myProgram"
> }) at myProgram.d:38
> #3 0x00408764 in extern (C) int dmain2.main(int, char**) . void runMain(void*) () from dmain2
> #4 0x0040879b in extern (C) int dmain2.main(int, char**) . void runAll(void*) () from dmain2
> #5 0x004084dc in _main () from dmain2
> #6 0x00511119 in _mainCRTStartup () from constart
> #7 0x7c816fd7 in ?? () from KERNEL32.dll
> 
> 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/


August 08, 2008
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 ?? () at myProgram.d:38 from KERNEL32.dll
>> #1 0x0040a08c in __d_throw@4 () at myProgram.d:38 from deh
>> #2 0x0040411e in _Dmain (args = {
>>   [0] = "myProgram"
>> }) at myProgram.d:38
>> #3 0x00408764 in extern (C) int dmain2.main(int, char**) . void runMain(void*) () from dmain2
>> #4 0x0040879b in extern (C) int dmain2.main(int, char**) . void runAll(void*) () from dmain2
>> #5 0x004084dc in _main () from dmain2
>> #6 0x00511119 in _mainCRTStartup () from constart
>> #7 0x7c816fd7 in ?? () from KERNEL32.dll
>>
>> 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.
August 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/


August 08, 2008
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.


« First   ‹ Prev
1 2