Re: Pasting illegal character causes segmentation fault

2009-12-30 Thread Frank Benoit
sorry, i thought i can take the time.
but i haven't, so i can get you the support and fix the problem.

I someone else willing to fix that?



Re: Pasting illegal character causes segmentation fault

2009-12-25 Thread Frank Benoit
Am 25.12.2009 23:26, schrieb Mitja:
> strace output:
> select(4, [3], [3], NULL, NULL) = 1 (out [3])
> writev(3, [{"\24\0\6\000...@\5\343\2\0\0\0\0\0\0\0\0\0\0\377\377\377\37"..., 
> 24}], 1) = 24
> select(4, [3], [], NULL, NULL)  = 1 (in [3])
> read(3, "\1\10S6\4\0\0\0006\1\0\0\0\0\0\0\17\0\0\0VJ\25\10\374\325 
> \10tc\346\277\203"..., 4096) = 48
> read(3, 0x840a2fc, 4096)= -1 EAGAIN (Resource temporarily 
> unavailable)
> select(4, [3], [3], NULL, NULL) = 1 (out [3])
> writev(3, [{"+\0\1\0"..., 4}], 1)   = 4
> select(4, [3], [], NULL, NULL)  = 1 (in [3])
> read(3, "\1\2t6\0\0\0\0...@\5\374\325 
> \10tc\346\277x+\177\td\"\36\10Y3\t\10"..., 4096) = 32
> read(3, 0x840a2fc, 4096)= -1 EAGAIN (Resource temporarily 
> unavailable)
> select(4, [3], [3], NULL, NULL) = 1 (out [3])
> writev(3, [{"\23\0\3\000...@\5\343\2\0\0+\0\1\0"..., 16}], 1) = 16
> select(4, [3], [], NULL, NULL)  = 1 (in [3])
> read(3, 
> "\34\"u6...@\5\343\2\0\0\0\252fc\1\2\0\0\4\0\0\0\1\0\0\0@B\233\t\1"..., 4096) 
> = 64
> read(3, 0x840a2fc, 4096)= -1 EAGAIN (Resource temporarily 
> unavailable)
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> 

Oh, i did not mean strace (which is a trace of the OS calls a process
does), instead i mean stack trace. You can perhaps get it with the
current tango (i think) or by running the program in GDC and after the
segfault run the "backtrace" command in it. It show the code line where
the segfault happens and the code lines where this one was called from.


> Example code:
> module text;
> 
> import dwt.DWT;
> import dwt.custom.StyleRange;
> import dwt.widgets.Text;
> import dwt.layout.FillLayout;
> import dwt.widgets.Display;
> import dwt.widgets.Shell;
> 
> void main() {
> Display display = new Display();
> Shell shell = new Shell(display);
> shell.setLayout(new FillLayout());
> Text text = new Text(shell, DWT.BORDER);
> shell.pack();
> shell.open();
> while (!shell.isDisposed()) {
>   if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
> 

thanks.


> I cannot reproduce the character.
> The way I got it was by pasting block of Japanese or Chinese characters into 
> text widget and then selecting by mouse and copying a few characters from 
> that block.
> Illegal character(s) would as a result of copying appear in Klipper (KDE 
> clipboard), usually in front or at the end of copied selection.
> Segmentation fault would occur when I pasted back the very same selection, 
> now with prepended or appended illegal characters.
> 

Hm, perhaps you can paste the same into a editor and open it with a
hex-view (hexdump) to make the byte values visible.



Re: Pasting illegal character causes segmentation fault

2009-12-25 Thread Frank Benoit
Am 25.12.2009 13:22, schrieb Mitja:
> When I paste illegal character (looks like rectangle) in Text widget,
> application exits with segmentation fault. I cannot catch bad character with 
> Verify Listener, because it's already too late. Is there any other way to 
> detect it?
> 
> Platform is Debian 5.0.3 (lenny), DMD v1.033.

Can you give a stack trace, the exact character you pasted and perhaps a
compilable small example code to reproduce the bug?


Re: SelectionListener called twice

2009-11-14 Thread Frank Benoit
Windows/Linux/Mac ?
Please provide more information.
I tried it on winxp with no problem.


Re: dwt-win on dmd 1.047 or later?

2009-11-08 Thread Frank Benoit
torhu schrieb:
> On 08.11.2009 00:52, Frank Benoit wrote:
>> If you are willing to supply a patch, that would be great.
> 
> Seems it's only dmd not allowing functions to return something when
> their return type is void.
> 
> I posted a patch here:
> http://dsource.org/projects/dwt/ticket/21
> 
> I suppose this goes for dwt2 too, but I haven't checked.

Thanks


Re: dwt-win on dmd 1.047 or later?

2009-11-07 Thread Frank Benoit
torhu schrieb:
> Has anyone successfully built dwt-win (r339) with dmd 1.047 or later?
> I've tried all version from 1.047 through 1.051, but only run into new
> compiler bugs.

If you are willing to supply a patch, that would be great.


Re: dwt-linux with ldc successfully built

2009-10-19 Thread Frank Benoit
digited schrieb:
> Gian Perrone Wrote:
> 
>> I just wanted you to know that i built dwt-linux (from the repository) 
>> with ldc, just a few small changes were made:
>>
>> <...patch here...>
>>
>> The browser widget had to be ignored (move away dwt/browser and 
>> dwt/internals/mozilla). The "simple" example was run successfully, i 
>> didn't test more.
>>
>> dwt-addons doesn't work because of a bug with tuples in ldc.
> 
> Thanks for the patch!
> 
> I've compiled some HelloWorlds with LDC trunk, Tango trunk and xfbuild on 
> openSUSE 11.1 x86_64:
> 
> xfbuild dwt-samples/examples/helloworld/HelloWorld1.d -Idwt-linux 
> -Jdwt-linux/res -d-version=TANGOSVN -d +ohw1 -L-lz -L-lgtk-x11-2.0 
> -L-lgdk-x11-2.0 -L-latk-1.0 -L-lgdk_pixbuf-2.0 -L-lgthread-2.0 
> -L-lpangocairo-1.0 -L-lfontconfig -L-lXtst -L-lXext -L-lXrender -L-lXinerama 
> -L-lXi -L-lXrandr -L-lXcursor -L-lX11 -L-lXfixes -L-lpango-1.0 
> -L-lgobject-2.0 -L-lgmodule-2.0 -L-ldl -L-lglib-2.0 -L-lcairo
> 
> However, i have problems with Gtk/Gdk and locale - when i try to run a DWT 
> app, i get:
> 
> (process:9804): Gdk-WARNING **: locale not supported by C library
> (process:9804): Gtk-WARNING **: Locale not supported by C library.
> Using the fallback 'C' locale.
> 
> And the app halts without showing any window. 'locale' returns en_US.UTF-8 
> everywhere, resetting it with 'localedef' also doesn't change the error. May 
> it be some DWT bug?

I know this warning. I do not remember what the solution was, to make it
go away, but my application always worked with it.
So the not showing window or halt might not be related to the warning.


Re: dwt-linux with ldc successfully built

2009-09-17 Thread Frank Benoit
Thats good news. How long was the compile time? How big the executable?


Re: DWT Status

2009-09-01 Thread Frank Benoit
Colin Barnes schrieb:
> DWT doesnt seem to have been touched in a while.
> 
> Is it dead in the water?
> 
> 
> col.

from my side yes, i am not working on it atm.
in the future, i don't know.

If you want to update the port to swt 3.5, you are welcome :)


Re: How to highlight a particular day in DateTime / Calendar widget?

2009-09-01 Thread Frank Benoit
Mitja schrieb:
> I looked at DateTime source but couldn't find any functions that would 
> highlight given day in Calendar in different color. Is it even possible at 
> this time? Also, can today's date be marked distinctly from others?

if you can do that in swt, it should also work in dwt. So you probably
ask in the official swt newsgroup.


Re: DWT2 built with DSSS

2009-05-22 Thread Frank Benoit
Sam Hu schrieb:
> So far I experenced with DWT2 built by rake,many problems met during
> the trial.say I can not compile an app which include more than one
> module,and can not compie an app with bsss...
> 
> So may I ask whether there is an alternative one can build the dwt2
> with DSSS just like DWT3.4.x?

At the moment i have very limited time for dwt. Perhaps you can come up
with a solution.

> 
> Btw,which version the latest of Tango does DWT2 support?When is it
> supposed to release DWT2 for phbobos2?

I use tango svn rev 4456.

For phobos2 support, I think i will wait for phobos users to help.


Re: DWT2 getting started problems

2009-05-08 Thread Frank Benoit
Kristoffer schrieb:
> 1. Do I need to install the "dwt-win-importlibs.zip" for DWT2?

No they are part of the repository. See:
http://hg.dsource.org/projects/dwt2/file/88652073d1c2/org.eclipse.swt.win32.win32.x86/lib/
When build swt they are copied to the dwt2/lib directory

> 2. What about the "-L+tango-user-dmd.lib" in sc.ini under DFLAGS?
Yes, you need it. Or depending how you build your application.

> 3. Can I use DSSS to build apps or is rake the only one supported?
Yes I think. I am not tried yet. Just give the "imp" folder with the
"-I" option and all the libs for linking.

> 4. Do I need a rake file to make a program?
I use it to build the the dwt2 tree. You are free for your application.

> 5. I have successfully built "rake base swt", but "rake all" fails in
> the "org.eclipse.text" module.
Hm, i am working on bigger rework at the moment. I will come back to
those error later. But if you want to use swt, only "base" and "swt" is
needed. For JFace you need "base swt equinox core jface".

Nevertheless, thanks for reporting.

> 6. The "rake swtsnippets" gives the following warning on all the snippets:
> 
> org.eclipse.swt.win32.win32.x86
>  Warning 2: File Not Found org.eclipse.swt.win32.win32.x86

A reported bug in the linker. See
http://d.puremagic.com/issues/show_bug.cgi?id=2857

> 7. Building snippet [Snippet130a] gives following error:
I will look into those.

I posted in the poseidon forum, how to set up a own app. See
http://www.dsource.org/forums/viewtopic.php?t=4602
Again i use a rake build process. Maybe not the most elegant thing. I am
sure the rakefile can be made better, this is just a shrinked copy of
the dwt2 rakefile.

Thanks for you interest in dwt.


Re: org.eclipse.core.jobs works test case

2009-04-13 Thread Frank Benoit
yidabu schrieb:
> On Mon, 13 Apr 2009 13:58:46 +0200
> Frank Benoit  wrote:
> 
>> yidabu schrieb:
>>> Exception with test case:
>>>
>>> 3249 Fatal dwt - java\util\HashSet.d 31: implementation missing in file 
>>> java\util\HashSet.d line 31
>>> 3255 Fatal dwt - java\util\HashSet.d 31: Please create a bug report at 
>>> http://www.dsource.org/projects/dwt
>>> 3261 Fatal dwt - java\util\HashSet.d 31: exiting ...
>>>
>>>
>>> the code:
>>>
>> I did some fixes
> 
> 
> no changes found
> 
> 

hm, I forgot to upload. :/


Re: org.eclipse.core.jobs works test case

2009-04-13 Thread Frank Benoit
yidabu schrieb:
> Exception with test case:
> 
> 3249 Fatal dwt - java\util\HashSet.d 31: implementation missing in file 
> java\util\HashSet.d line 31
> 3255 Fatal dwt - java\util\HashSet.d 31: Please create a bug report at 
> http://www.dsource.org/projects/dwt
> 3261 Fatal dwt - java\util\HashSet.d 31: exiting ...
> 
> 
> the code:
> 

I did some fixes


Re: Does org.eclipse.core.jobs works now?

2009-04-12 Thread Frank Benoit
yidabu schrieb:
> I run a background thread by Job, the app crashing on runtime exception:
> 
> No symbols available from sxs.dll
> sxs.dll loaded at 0x75e9
> Unhandled D Exception (tango.core.Exception.IOException
>  " :: The handle is invalid.") at KERNEL32.dll (0x7c812a5b) 
> thread(3356)
> ->us
> #0 ?? () from KERNEL32.dll
> 
> 
> the job is do some local IO, but not access to GUI resource.
> 
> 
> 

I think it was never tested.
If you can provide a test case, i try to fix existing problems.


Re: dwt2: IllegalArgumentException at ActionContributionItem.updateImages

2009-04-11 Thread Frank Benoit
yidabu schrieb:
> dwt 2 updated to revision 70, the app still not work
> 1. right click on tree node A, popup a contextmenu
> 2. right click on tree node B, popup a contextmenu
> 3. right click on tree node A, the contenextmenu is not shown
> 
> the issue maybe releated to ActionContributionItem.updateImages
> the exception from sample code:
> 

It is fixed now.
Was an error in the impl of java.util.HashMap remove()



Re: Need Help on Compiling DWT2 in XP

2009-04-10 Thread Frank Benoit
%u schrieb:
> .../src\org\eclipse\jface\text\AbstractHoverInformationControlManager.d(183): 
> Err
> or: module Job cannot read file 'org\eclipse\core\runtime\jobs\Job.d'
> rake aborted!

the module should be build with "rake core". To ensure everything is
build, just run "rake".


> -- Build: Debug in WinApp01 ---
> 
> Compiling: hello.d
> C:\dmd1042\dmd\windows\bin\..\..\..\dmd\src\dwt2\imp\java\lang\wrappers.di(48):
>  Error: identifier 'equals_t' is not defined
> C:\dmd1042\dmd\windows\bin\..\..\..\dmd\src\dwt2\imp\java\lang\wrappers.di(48):
>  Error: equals_t is used as a type
> C:\dmd1042\dmd\windows\bin\..\..\..\dmd\src\dwt2\imp\java\lang\wrappers.di(48):
>  Error: function java.lang.wrappers.ArrayWrapperT!
> (byte).ArrayWrapperT.opEquals of type void(Object o) overrides but is not 
> covariant with object.Object.opEquals of type int(Object o)
> C:\dmd1042\dmd\windows\bin\..\..\..\dmd\src\dwt2\imp\java\lang\wrappers.di(48):
>  Error: function java.lang.wrappers.ArrayWrapperT!
> (byte).ArrayWrapperT.opEquals does not override any function
> C:\dmd1042\dmd\windows\bin\..\..\..\dmd\src\dwt2\imp\java\lang\wrappers.di(157):
>  Error: template instance java.lang.wrappers.ArrayWrapperT!(byte) error
> instantiating
> Process terminated with status 1 (0 minutes, 1 seconds)
> 5 errors, 0 warnings

equals_t is defined in tango object.di, so there is perhaps something
wrong in your install?




Re: dwt2 rev 71: osgi.framework.Bundle is in multiple packages

2009-04-09 Thread Frank Benoit
yidabu schrieb:
> Ranke error:
> 
> org\eclipse\core\runtime\Platform.d(27): Error: module Bundle cannot read 
> file '
> org\eclipse\osgi\framework\Bundle.d'
> rake aborted!
> compile error
> D:/d/dmd/src/dwt2/rakefile:159:in `block (2 levels) in buildTree'
> (See full trace by running task with --trace)
> 
fixed


Re: dwt2 rev 71: osgi.framework.Bundle is in multiple packages

2009-04-08 Thread Frank Benoit
yidabu schrieb:
> dsss building error:
> 
> dwt2\org.eclipse.core.runtime\src\org\eclipse\core\runtime\ILog.d(19): module 
> or
> g.eclipse.osgi.framework.Bundle is in multiple packages 
> org.eclipse.osgi.framewo
> rk.Bundle
> 
fixed


Re: dwt2 rev 70: org.eclipse.osgi.util.NLS is in multiple packages

2009-04-08 Thread Frank Benoit
yidabu schrieb:
> Using dsss to build dwt2.lib, get error:
> 
> dwt2\org.eclipse.core.jobs\src\org\eclipse\core\internal\jobs\Worker.d(24): 
> modu
> le org.eclipse.osgi.util.NLS is in multiple packages org.eclipse.osgi.util.NLS
> dwt2\org.eclipse.core.runtime\src\org\eclipse\core\runtime\ILog.d(19): module 
> or
> g.eclipse.osgi.framework.Bundle is in multiple packages 
> org.eclipse.osgi.framewo
> rk.Bundle
> dwt2\org.eclipse.text\src\org\eclipse\jface\text\templates\TemplateTranslator.d(
> 29): module java.util.LinkedHashmap is in multiple packages 
> java.util.LinkedHash
> map
> 
> 

Fixed, thanks yidabu
http://hg.dsource.org/projects/dwt2/rev/a7064d39311b


Re: Can't build dwt-linux

2009-04-08 Thread Frank Benoit
torhu schrieb:
> I've tried to build dwt-linux tip (r363) on linux, with dmd 1.041 and
> tango r4498 (0.99.8 plus backtrace).  But I get compiler errors relating
> to toString16 in some browser/mozilla files.
> 
> Just want to hear if others have the same problems, before I dive into
> linux again...

I made some changes, but have no linux box available to test.
As soon as possible i will fix those.



Re: sample to re-produce the ACCESS_VIOLATION

2009-04-08 Thread Frank Benoit
yidabu schrieb:
> dynamic change Action's text in menuAboutToShow, will get exception:
> 
> rg.eclipse.swt.SWTException.SWTException: Failed to execute runnable
> 
> object.Exception: Access Violation - Read at address 0x9090911b
> 
> 

Thanks for this test case.
It is fixed now.
http://hg.dsource.org/projects/dwt2/rev/bf0426bfc6e0


Re: What's the problem with IMenuListener

2009-04-05 Thread Frank Benoit
yidabu schrieb:
> switched to dwt2, jface IMenuListener causes problem, the gui is not 
> responsed when acition.sebEnalbed(false), how to fix this?
> 
> thanks!
> 
> 

Like you reported in the IRC, this is solved.
Frank


Re: dwt2: identifier 'CTabFolderEvent' is not defined

2009-04-04 Thread Frank Benoit
yidabu schrieb:
> replace dwt-win to dwt2, an app failed to build, the exceptions are:
> 
> ...\windows\bin\..\..\src\dwt2\imp\org\eclipse\swt\events\SelectionListener.di(52):
>  Error: identifier 'CTabFolderEvent' is not defined
> \windows\bin\..\..\src\dwt2\imp\org\eclipse\swt\events\SelectionListener.di(52):
>  Error: Tuple!(int) is used as a type
> 
> what's the issue? 
> 
> thanks!
> 

it is fixed.
Was a copy/paste bug.


Re: Pagesize Catch-22

2009-04-02 Thread Frank Benoit
Mike James schrieb:
> I had to increase the pagesize to 2048 to get DWT-Win to build, nothing 
> smaller would work. I copied a hello world program and dsss.conf file to a 
> new directory and tried to build and I get the following error...
> 
>  
> C:\dProjects\tryDWT>dsss build
> main.d => main
> + c:\dsss\bin\rebuild.exe -Idsss_imports\ -I. -S.\ -Ic:\dsss\include\d 
> -Sc:\dsss\lib\  -Ic:\dsss\include\d -Sc:\dsss\lib
>   -oqdsss_objs\D -g -gc -J../res -Ic:/dwt-win -Jc:/dwt-win/res 
> -L/SUBSYSTEM:console:5 -L/rc:..\dwt main.d -ofmain
> OPTLINK (R) for Win32  Release 8.00.1
> Copyright (C) Digital Mars 1989-2004  All rights reserved.
> c:\dsss\lib\\DD-dwt.lib
>  Warning 178: .LIB pagesize exceeds 512
> c:\dsss\lib\\DD-tango-core.lib
>  Warning 178: .LIB pagesize exceeds 512
> c:\dsss\lib\\DD-tango-stdc.lib
>  Warning 178: .LIB pagesize exceeds 512
> c:\dsss\lib\\DD-tango-io.lib
>  Warning 178: .LIB pagesize exceeds 512
> ^C--- errorlevel -1073741510
> Command c:\dsss\bin\rebuild.exe returned with code -1073741510, aborting.
> Er^C^C
> C:\dProjects\tryDWT>
> 
> 
> I had to Ctl-C it to stop it. It is complaining that the pagesize is too 
> large. Is this a linker 'feature'?
> 
> 
> Regards, Mike.
> 

When I use dwt-win/addons, i used it all the time directly. That is,
without building libs and just putting the sources into the -I paths.
Well, it worked for me.
But certainly, it would be much better if the lib stuff would work
better. I still don't know what the pagesize is :/




Re: Need Help on Compiling DWT2 in XP

2009-04-02 Thread Frank Benoit
Sam Hu schrieb:
> Hi Frank,
> 
> I compiled DWT2 successfuly base on your path/folders.But I have  a couple of 
> questions:
> 1.How do I compile my own d program which is not in the swtsnippets 
> folder,say in anohter drive,D:\dprogram\ex?How is the command look like--rake 
> ???

If you compile your own app, you can use whatever build system you want.

> 2.Is jface and other packages such as 
> draw2d,core.job,core.runtime,jface.text,osgi,ui.forms,text,and tools 
> compilable and workable at this moment,if yes,how to compile?

Yes, you can show the other rake build targets with
> rake -T

> 3.Is d still workable to compile DWT2 program?

Yes, you can just put all those -I and -J and -L into the dsss.conf
But dwt2 is not to be build itself by dsss. And it is not installed into
dsss.



Re: Need Help on Compiling DWT2 in XP

2009-04-01 Thread Frank Benoit
Sam Hu schrieb:
> Add the 'imp' dir to your import search path:
>> -IC:\Project\dwt2\imp
>> Add the 'lib' dir to your library search path:
>> -L+C:\Project\dwt2\lib\
>> Add all needed libraries to the commandline:
>> -L+advapi32.lib
>> -L+comctl32.lib
>> -L+comdlg32.lib
>> -L+gdi32.lib
>> -L+kernel32.lib
>> -L+shell32.lib
>> -L+ole32.lib
>> -L+oleaut32.lib
>> -L+olepro32.lib
>> -L+oleacc.lib
>> -L+user32.lib
>> -L+usp10.lib
>> -L+msimg32.lib
>> -L+opengl32.lib
>> -L+shlwapi.lib
>> -L+zlib.lib
>> -L+dwt-base.lib
>> -L+org.eclipse.swt.win32.win32.x86.lib
>>
> Any shorthand that can save this so long -I and -L everytime?Thanks.

Yeah, it should be possible. I tried the pragma(lib, ..) but
unfortunately it seems to me, there is a dmd bug.

http://d.puremagic.com/issues/show_bug.cgi?id=2776

Frank





Re: Problem building DWT-Win

2009-04-01 Thread Frank Benoit
davidl schrieb:
> 在 Wed, 01 Apr 2009 17:44:17 +0800,Mike James  写道:
> 
>> Hi,
>>
>> I got this error with latest trunk Tango, DMD 1.042 and latest trunk
>> DWT-Win...
>>
>> d dwt\widgets\Widget.d -ofDD-dwt.lib
>> dwt\dwthelper\InflaterInputStream.d(34): Error: function
>> tango.io.device.Conduit
>> .Conduit.load (uint) does not match parameter types
>> (InputStreamWrapper,void[])
>> dwt\dwthelper\InflaterInputStream.d(34): Error: cannot implicitly
>> convert expres
>> sion (dst) of type void[] to uint
>> Command c:\dsss\bin\rebuild.exe returned with code 1, aborting.
>> Error: Command failed, aborting.
>>
>> C:\dwt-win>
>>
>> Regards, Mike.
> 
> try build with -version=TANGOSVN
> 
> However, maybe it's time for frank to catch up with tango due to tango
> release

This was changed two weeks ago
http://hg.dsource.org/projects/dwt-win/rev/ecb375fd8f95

Do an "hg pull" and don't forget the "hg up".

Frank


Re: Need Help on Compiling DWT2 in XP

2009-04-01 Thread Frank Benoit
Sam Hu schrieb:
> Hi ,I am going to compiling DWT2 +tango 0998+rake.I have done below steps:
> 1.Download Tango0998+DMD1.041
> 2.Download dmc from:
> http://www.digitalmars.com/d/2.0/dmd-windows.html
> Up to now the D folder is as below:
> c:\
> dmd\
> dm
> 3.Download and install ruby to C:\  from 
> http://www.ruby-lang.org/en/downloads/
> The version I chose is Ruby 1.8.6-one-click-installer
> Now I have C:\ruby
> 4.Install rake:
> In folder C:\ruby\bin:
>> gem install --remote rake
> Now in C:\ruby\bin I have rake.bat and rake.cmd;
> 5.Install TortoiseHg0.72 to c:\program files\  from below link:
> http://bitbucket.org/tortoisehg/stable/wiki/Home
> 6.In c:\dmd\import there are two subfolders:C:\dmd\std and c:\dmd\tango. 
> Create a new folder c:\dmd\import\dwt2;
> 7.Right from c:\dmd\import right click mouse tortoiseHG->Clone a Respository:
> Source Path:http://hg.dsource.org/projects/dwt2
> Destination Path:c:\dmd\import\dwt2
> Leave the other options default.
> 
> OK.All above have been done without any error and HG proceeded completed and 
> successfully.
> 
> What should I do in next step?Please guide me.Thanks.
> 
> Regards,
> Sam
> 

Hi

I have made changes to dwt2 to work it like the following receipt.

Download the tango release and dwt2 to
c:\Project\tango-0.99.8-bin-win32-dmd.1.041
c:\Project\dwt2

Then add dmd to the PATH
C:\Project> set PATH=%PATH%;c:\Project\tango-0.99.8-bin-win32-dmd.1.041\bin

Verify the dmd version
C:\Project> dmd
Digital Mars D Compiler v1.041
...

Then build the libs and snippets

C:\Project\dwt2> rake clean base swt
(in C:/Project/dwt2)
Cleaning
Building dwt-base
Building org.eclipse.swt.win32.win32.x86

C:\Project\dwt2> rake swtsnippets
Building swtsnippets[Snippet10]
Building swtsnippets[Snippet107]
Building swtsnippets[Snippet108]
Building swtsnippets[Snippet109]
Building swtsnippets[Snippet111]
...
(Cancel with Ctrl+C)
C:\Project\dwt2> bin\SwtSnippet10.exe

To build your own application...
Add the 'imp' dir to your import search path:
-IC:\Project\dwt2\imp
Add the 'lib' dir to your library search path:
-L+C:\Project\dwt2\lib\
Add all needed libraries to the commandline:
-L+advapi32.lib
-L+comctl32.lib
-L+comdlg32.lib
-L+gdi32.lib
-L+kernel32.lib
-L+shell32.lib
-L+ole32.lib
-L+oleaut32.lib
-L+olepro32.lib
-L+oleacc.lib
-L+user32.lib
-L+usp10.lib
-L+msimg32.lib
-L+opengl32.lib
-L+shlwapi.lib
-L+zlib.lib
-L+dwt-base.lib
-L+org.eclipse.swt.win32.win32.x86.lib

Frank






Re: Stacktrace bugs in dwt2

2009-03-30 Thread Frank Benoit
Domain schrieb:
> base\src\java\lang\exceptions.d: line 148, 161
> org.eclipse.tools\Sleak\org\eclipse\swt\tools\internal\Sleak.d: line 237
> 
> The stacktrace had changed in tango 0.99.8. 

Should be fixed now.


Re: dwt2 debug lib

2009-03-30 Thread Frank Benoit
yidabu schrieb:
> how about pre-build dwt2 debug lib for debugger?

Right, that was missing.
I added this to the rakefile.
You can now enable that with

$ rake DEBUG=1 base swt

or set the environment variable DEBUG to '1'.

$ set DEBUG=1
$ rake base swt




Re: Problem building DWT addons

2009-03-29 Thread Frank Benoit
Mike James schrieb:
> I'm having a problem building the DWT addons. It takes about 45 minutes then 
> fails with the following problem:
> 
> D:\dwt-addons>dsss build -version=TANGOSVN
> WARNING: Section for nonexistant file test.d.
> Creating imports for DD-dwtx
> 
> dwtx => DD-dwtx
> Digital Mars Librarian Version 8.02n
> Copyright (C) Digital Mars 2000-2007 All Rights Reserved
> http://www.digitalmars.com/ctg/lib.html
> 
> Error: cannot open response file
> Command c:\dsss\bin\rebuild.exe returned with code -1, aborting.
> Error: Command failed, aborting.
> 
> D:\dwt-addons>dsss build -version=TANGOSVN
> WARNING: Section for nonexistant file test.d.
> Creating imports for DD-dwtx
> 
> dwtx => DD-dwtx
> Digital Mars Librarian Version 8.02n
> Copyright (C) Digital Mars 2000-2007 All Rights Reserved
> http://www.digitalmars.com/ctg/lib.html
> 
> Error: cannot open response file
> Command c:\dsss\bin\rebuild.exe returned with code -1, aborting.
> Error: Command failed, aborting.
> 
> D:\dwt-addons>
> 
> I'm using Windows XP, DMD 1.041, Tango 0.99.8 and the latest DWT trunk.
> 
> 
> Regards, mike.
> 

Yes, i can confirm this behavior.
But i don't know the cause nor a solution.


Re: exe size increased with dwt2

2009-03-29 Thread Frank Benoit
yidabu schrieb:
> I tested a app (with tango 0.99.8, dmd 1.041):
> 
> 2.25 MB with dwt-win
> 3.06 MB with dwt2
> 
> what's causes this?
> 

Hm, good question.
There are now more modules in base, that is because I merged dwthelper
and dwtxhelper. Also the java classes are more precisely remodelled.
There are less classes combined in a single modules.
Nevertheless this seems to me not enough an argument for this size
increase. I hope, at some day a compiler guru will take a look at this
issue.


Re: Failed to build dwt-addons

2009-03-27 Thread Frank Benoit
Mike James schrieb:
> Hi.
> 
> I've tried to build the dwt-addons but get the following error messages:
> 
> D:\dwt-addons>dsss build -version=TANGOSVN
> WARNING: Section for nonexistant file test.d.
> Creating imports for DD-dwtx
> 
> dwtx => DD-dwtx
> dwtx\sleak\Sleak.d(238): Error: incompatible types for ((line) ~ ("\x0a")): 
> 'Fra
> meInfo' and 'char[1u]'
> dwtx\sleak\Sleak.d(238): Error: Can only concatenate arrays, not (FrameInfo ~ 
> ch
> ar[1u])
> Command c:\dsss\bin\rebuild.exe returned with code 1, aborting.
> Error: Command failed, aborting.
> 
> D:\dwt-addons>
> 
> 
> I am using the latest dwt trunk, dmd 1.041 and Tango trunk. Is this another 
> problem with the compiler differences?
> 
> Regards, Mike.
> 

It is fixed now.


Re: dwt2 revison 45, typo in Rake file

2009-03-27 Thread Frank Benoit
yidabu schrieb:
> Building jfacesnippets[Snippet001TableViewer]
> rake aborted!
> No such file or directory - /dwt2/org.eclipse.jface.snippets/src
> dwt2/rakefile:220:in `chdir'
> (See full trace by running task with --trace)
> 
> with current revision.

this should be fixed meanwhile.


Re: DWT2 state update

2009-03-27 Thread Frank Benoit
yidabu schrieb:
> On Sat, 28 Mar 2009 00:03:05 +0100
> Frank Benoit  wrote:
> 
>> State update:
>> ...|_D1 Tango||_D2 Phobos___|
>> ...|_Linux__|_Win32__||_Linux__|_Win32__|
>> base...|_OK_|_OK_||_OK_|_OK_|
>> swt|_OK_|_OK_||_OK_|_OK_|
>> core...|_OK_|_OK_||_NO_|_NO_|
>> jface..|_OK_|_OK_||_NO_|_NO_|
>> jfacetext..|_OK_|_OK_||_NO_|_NO_|
>> uiforms|_OK_|_OK_||_NO_|_NO_|
>> draw2d.|_OK_|_OK_||_NO_|_NO_|
>> swtsnippets|_NONE___|_OK_||_NONE___|_SOME___|
>> jfacesnippets..|_NONE___|_OK_||_NONE___|_NONE___|
>>
>> Linux D1 Tango sample app are not yet running, because of the build
>> process for them is not yet set up.
>>
>> Phobos on win/linux is compiling but none of the code can be used for
>> applications right now. I really need help from some Phobos users to get
>> the implementations done. This is not hard, it just needs to be done.
>> And since I am not a phobos user, i hope for others.
>> On Windows there are some swt snippets buildable. they can be used to
>> make the first mini app running.
>>
> 
> 
> unhandled D Exception (tango.sys.SharedLib.SharedLibException
>  "Couldn't load symbol 'BufferedPaintUnInit' from shared library 
> 'UxTheme.dll' : The specified procedure could not be found.") at KERNEL32.dll 
> (0x7c812a5b) thread(1180)
> 
> with revison 57, tango 0.99.8, exception on app starts.

thx, should work now.


Re: DWT2 state update

2009-03-27 Thread Frank Benoit

State update:
...|_D1 Tango||_D2 Phobos___|
...|_Linux__|_Win32__||_Linux__|_Win32__|
base...|_OK_|_OK_||_COMPILE|_COMPILE|
swt|_OK_|_OK_||_COMPILE|_COMPILE|
core...|_OK_|_OK_||_NO_|_NO_|
jface..|_OK_|_OK_||_NO_|_NO_|
jfacetext..|_OK_|_OK_||_NO_|_NO_|
uiforms|_OK_|_OK_||_NO_|_NO_|
draw2d.|_OK_|_OK_||_NO_|_NO_|
swtsnippets|_OK_|_OK_||_NONE___|_SOME___|
jfacesnippets..|_OK_|_OK_||_NONE___|_NONE___|

It turns out it was not too hard to get the samples build on linux


DWT2 state update

2009-03-27 Thread Frank Benoit
State update:
...|_D1 Tango||_D2 Phobos___|
...|_Linux__|_Win32__||_Linux__|_Win32__|
base...|_OK_|_OK_||_OK_|_OK_|
swt|_OK_|_OK_||_OK_|_OK_|
core...|_OK_|_OK_||_NO_|_NO_|
jface..|_OK_|_OK_||_NO_|_NO_|
jfacetext..|_OK_|_OK_||_NO_|_NO_|
uiforms|_OK_|_OK_||_NO_|_NO_|
draw2d.|_OK_|_OK_||_NO_|_NO_|
swtsnippets|_NONE___|_OK_||_NONE___|_SOME___|
jfacesnippets..|_NONE___|_OK_||_NONE___|_NONE___|

Linux D1 Tango sample app are not yet running, because of the build
process for them is not yet set up.

Phobos on win/linux is compiling but none of the code can be used for
applications right now. I really need help from some Phobos users to get
the implementations done. This is not hard, it just needs to be done.
And since I am not a phobos user, i hope for others.
On Windows there are some swt snippets buildable. they can be used to
make the first mini app running.



Re: The new DWT2

2009-03-26 Thread Frank Benoit
Saaa schrieb:
>> Meanwhile the org.eclipse.swt.win32.win32.x86 tree builds for D2. But
>> will not be usable until the missing impls are done.
> 
> What does it mean for an implMissing to not be encapsulated within a version 
> check?
> Didn't the tango version need those implementations? 
> 
> 

Yes, also did add those in the beginning of dwt. So if there is no tango
implementation, that means, that function was never called before. So it
can stay not implemented.


Re: The new DWT2

2009-03-25 Thread Frank Benoit
Saaa schrieb:
> dmd 2.026
> phobos
> newest ruby one-click :)
> 
> What am I doing wrong ?
> 
>  C:\_D\Compiler\dwt2>rake
> (in C:/_D/Compiler/dwt2)
> Cleaning
> Building dwt-base
> Building org.eclipse.swt.win32.win32.x86
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\COMTYPES.d(19):
>  
> Error: org.eclipse.swt.internal.win32.WINTYPES.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\win32\WINTYPES.d(190)
>  
> conflicts with
> org.eclipse.swt.internal.ole.win32.extras.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\extras.d(54)
> 
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\OBJIDL.d(125):
> Error: org.eclipse.swt.internal.ole.win32.extras.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\extras.d(54)
> conflicts with
> org.eclipse.swt.internal.win32.WINTYPES.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\win32\WINTYPES.d(190)
> 
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\OBJIDL.d(382):
> Error: org.eclipse.swt.internal.ole.win32.extras.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\extras.d(54)
> conflicts with
> org.eclipse.swt.internal.win32.WINTYPES.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\win32\WINTYPES.d(190)
> 
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\OBJIDL.d(785):
> Error: org.eclipse.swt.internal.ole.win32.extras.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\extras.d(54)
> conflicts with
> org.eclipse.swt.internal.win32.WINTYPES.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\win32\WINTYPES.d(190)
> 
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\ifs.d(65):
> Error: org.eclipse.swt.internal.win32.WINTYPES.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\win32\WINTYPES.d(190)
> conflicts with
> org.eclipse.swt.internal.ole.win32.extras.IID
> at
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\ole\win32\extras.d(54)
> 
> C:\_D\Compiler\dwt2\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\events\SelectionListener.d(19):
> module Traits cannot read file 'tango\core\Traits.d'
> rake aborted!
> compile error
> C:/_D/Compiler/dwt2/rakefile:138:in `buildTree'
> 
> 

Meanwhile the org.eclipse.swt.win32.win32.x86 tree builds for D2. But
will not be usable until the missing impls are done.


Re: dwt2 rev 36 building error

2009-03-25 Thread Frank Benoit
>>
>> env:
>> tango 0.99.8 current svn, Ruby 1.91, Rake 0.83
> 
> I figured it out by add correct parameters to sc.ini.

I mention that now in the README


Re: The new DWT2

2009-03-25 Thread Frank Benoit
Saaa schrieb:
> So I should look up what the tango function does and try and find something 
> which does the same in Phobos 2.
> Sound like something I might even manage.. for some functions.
> 
> But how do I check if it works if I can't build dwt? Just guess?

hm, the base tree can be build on its own.
rake base
If you want, you can do unittests or contracts (in/out/invariant).


Re: The new DWT2

2009-03-24 Thread Frank Benoit
Saaa schrieb:
> "Frank Benoit"  wrote in message 
> news:gqbdt5$12r...@digitalmars.com...
>> Saaa schrieb:
>>>> I started with making it phobos compatible, but it is not yet completed.
>>>> You are welcome to help (see "DWT2 D2+Phobos help needed").
>>>>
>>> Ok, I thought it would compile but just not work because it would hold 
>>> loads
>>> of dummy code.
>>> So the first step now would be to add more dummy code until it compiles?
>>>
>>>
>> To fill in the dummy code is a linear task. The compiler guides me from
>> problem to problem. I don't think that can run in parallel.
>>
>> What you can do is, if you want, to fill in the phobos implementations
>> in the base tree. Highest priority are places where a tango impl.
>> exists, but none for phobos.
> 
> DWT is a PORT of SWT :)
> Which uses D1 + tango
> DWT2 will be a port of dwt using D2 + phobos.
> Does this mean I should use D2 Phobos? Or should it also support D1 Phobos?
> 

My target is to add D2+Phobos. If there is manpower to make that also
work for D1+phobos... well thats fine also. :)


Re: The new DWT2

2009-03-24 Thread Frank Benoit
Saaa schrieb:
>> I started with making it phobos compatible, but it is not yet completed. 
>> You are welcome to help (see "DWT2 D2+Phobos help needed").
>>
> 
> Ok, I thought it would compile but just not work because it would hold loads 
> of dummy code.
> So the first step now would be to add more dummy code until it compiles? 
> 
> 

To fill in the dummy code is a linear task. The compiler guides me from
problem to problem. I don't think that can run in parallel.

What you can do is, if you want, to fill in the phobos implementations
in the base tree. Highest priority are places where a tango impl.
exists, but none for phobos.


Re: The new DWT2

2009-03-24 Thread Frank Benoit
sleek schrieb:
> Will the old dwt-win/linux/samples/addons be modified to work with the new 
> Tango release?
> 

yes


Re: The new DWT2

2009-03-24 Thread Frank Benoit
Saaa Wrote:

> dmd 2.026
> phobos
> newest ruby one-click :)
> 
> What am I doing wrong ?

I started with making it phobos compatible, but it is not yet completed. You 
are welcome to help (see "DWT2 D2+Phobos help needed"). 



Re: DWT2 Windows building error

2009-03-23 Thread Frank Benoit
yidabu schrieb:
> snitppet147 
>   with dmd 1.037 dwt-win, exe size is 2.47 MB
>   with dmd 1.041 dwt2, exe size is 2.75 MB
> 
> 

oh, i thought the old one was bigger.


Re: DWT2 Windows building error

2009-03-23 Thread Frank Benoit
davidl schrieb:
> ah, sorry, rspfile_abs is required because of my last stupid debugging
> trace :p
> Maybe it's better make the rake native executable. That would be better
> for other to test and have fun, or by specifying the rake version.
> I'm using the official bundle. shouldn't the rake be the same as yours
> x_x ?

Specifying the version is necessary. It is all still new :)
How would you make it native executable?

> BTW, those snippets work brilliantly. Why does the binary size drop
> magically?

I don't have a clue. Building/linking is still magic for me.


Re: DWT2 Windows building error

2009-03-23 Thread Frank Benoit
davidl schrieb:
> The clean target is somewhat stupid ;) I need to fake files for it to
> clean.

Should be fixed now

> Also
> My rakefile need this line:
> rspfile_abs = File.expand_path( RSPNAME )
> Don't know why it's gone.

Where did you need to add it?
I had chaned RSPNAME to contain the abs path already.


Re: DWT2 Windows building error

2009-03-23 Thread Frank Benoit
davidl schrieb:
> (in D:/digitalmars/dsource/dwt2)
> rake aborted!
> wrong number of arguments (2 for 1)
> D:/digitalmars/dsource/dwt2/rakefile:208:in `task'
> (See full trace by running task with --trace)
> 
> seems your rake is more advancing?

I use rake version 0.8.3, ruby 1.9.1



Re: DWT2 Windows building error

2009-03-23 Thread Frank Benoit
yidabu schrieb:
> On Sun, 22 Mar 2009 10:38:54 +0100
> Frank Benoit  wrote:
> 
>> yidabu schrieb:
>>> how to building lib file on Windows? 
>>> Run Rake, obj fiels generated, Should I to run "lib a.obj b.obj " to 
>>> generated dwt2.lib?
>>>
>> Building libs and apps is not yet integrated. At the moment i just use
>> it to compile.
> 
> Is it the time to use dwt2 instead of dwt-win to build app?
> 
> 

The rakefile can now build the snippets on windows. So I think it should
be possible to build apps also.

I think compile time and exe size went down, but i haven't measured.



Re: Failed to build dwt-addons

2009-03-22 Thread Frank Benoit
Mike James schrieb:
> Hi.
> 
> I've tried to build the dwt-addons but get the following error messages:
> 
> D:\dwt-addons>dsss build -version=TANGOSVN
> WARNING: Section for nonexistant file test.d.
> Creating imports for DD-dwtx
> 
> dwtx => DD-dwtx
> dwtx\sleak\Sleak.d(238): Error: incompatible types for ((line) ~ ("\x0a")): 
> 'Fra
> meInfo' and 'char[1u]'
> dwtx\sleak\Sleak.d(238): Error: Can only concatenate arrays, not (FrameInfo ~ 
> ch
> ar[1u])
> Command c:\dsss\bin\rebuild.exe returned with code 1, aborting.
> Error: Command failed, aborting.
> 
> D:\dwt-addons>
> 
> 
> I am using the latest dwt trunk, dmd 1.041 and Tango trunk. Is this another 
> problem with the compiler differences?
> 
> Regards, Mike.
> 

The stacktrace stuff seems to have changed. Please comment out the line
to make it compile. I will fix that in near time.



Re: DWT2 Windows building error

2009-03-22 Thread Frank Benoit
yidabu schrieb:
> how to building lib file on Windows? 
> Run Rake, obj fiels generated, Should I to run "lib a.obj b.obj " to 
> generated dwt2.lib?
> 

Building libs and apps is not yet integrated. At the moment i just use
it to compile.


Re: DWT2 Windows building error

2009-03-21 Thread Frank Benoit
yidabu schrieb:
> Rake building error:
> 
> dwt2>Rake base --trace
> (in .../dwt2)
> ** Invoke base (first_time)
> ** Execute base
> Building base/src
> dmd @...dwt2\rsp
> dwt2\base\src\java\lang\wrappers.d(15): Error: identifier 'equals_t
> ' is not defined
> dwt2\base\src\java\lang\wrappers.d(15): Error: equals_t is used as
> a type
...

> Ruby Windows 1.91, Rake 0.83
> 
> Tango 0.99.7, Revision:4052, last changed date:2008-10-30
> DMD 1.037

for dwt2 i use the tango 0.99.8 ( see svn tags/releases/0.99.8), there
the type equals_t is defined in object.di. For dmd i use 1.041.


Re: The new DWT2

2009-03-21 Thread Frank Benoit
Christopher Wright schrieb:
> It's well motivated from a development standpoint. I don't see what it
> contributes, otherwise.

there are existing naming conflicts of packages.
org.eclipse.swt => dwt
that was the start. Well then, rename all other swt to dwt also. So we have
SWT => DWT
SWTError => DWTError
SWTException => DWTException
SWTEventObject => DWTEventObject
SWTEventListener => DWTEventListener
then there are the packages from jface. Oh the first problem.
org.eclipse.jface where to map those. Ok, have all the future packages
from org.eclipse in dwtx, dwtx to be an abbreviation for org.eclipse
org.eclipse.jface => dwtx.jface
...
Oh, oh, now there is org.eclipse.osgi and org.osgi, now it gets a bit ugly.
You see, where this is going to?
All those renaming produce work in comparing versions and updates. A
porting project like this needs lots of comparing and merging.
It produces work for me, the developer. And I think my time is the most
valuable resource the dwt project has. And really, I see not what those
renaming contribute. Instead, when the original namings are used,
examples and snippets can be used without or less change, that is a
contribute for the user.



Re: The new DWT2

2009-03-21 Thread Frank Benoit
Saaa schrieb:
> I'll be trying it out for dmd 2.. how far along is it at the moment? 

At the moment the refactoring is complete for D1+Tango.
The 'base' tree compiles also for D2+Tango and i am working on the swt
tree. But compile means really just compile. There is implementation
work needed for Phobos.

Please see also my posting: "DWT2 D2+Phobos help needed"


DWT2 D2+Phobos help needed

2009-03-21 Thread Frank Benoit

If you want to contribute, please note:
http://www.dsource.org/projects/dwt/wiki/Contribution

Get it with Mercurial (hg) Version Control software:
First get:
hg clone http://hg.dsource.org/projects/dwt2
To get later changes from the server
hg pull -u

To build you need "Rake", that is the Ruby make tool and is part of a
standard Ruby installation. Also DMD needs to be in the path environment
variable.

To build with D1+Tango, the dmd.conf/sc.ini must be setup correctly
(version=Tango,Posix, include paths, libs)
You can build all with a simple call to 'rake'. The available target can
be shown with 'rake -T'.

The repository contains the following trees:
Java stuff and helper:
see "base"
SWT:
org.eclipse.swt.win32.win32.x86
org.eclipse.swt.gtk.linux.x86
Additional stuff:
org.eclipse.*

What I already did and still doing is, i try to make the code compilable
for Phobos. I do this by deactivating the tango code by 'version' and
put in 'implMissing()' calls for the missing Phobos implementation. If
needed i also add dummy code (like the 'return 0;' to make it compile.

public int lastIndexOf(String str, char ch, int formIndex){
version(Tango){
int res = tango.text.Util.locatePrior( str, ch, formIndex );
if( res is str.length ) res = -1;
return res;
} else { // Phobos
implMissing( __FILE__, __LINE__ );
return 0;
}
}

Now the code compiles, but it does not work. If a call to implMissing is
entered, the application will be terminated.

That is where I need help. Please help me to replace the "implMissing"
with the correct implementation. Highest priority has the 'base' tree
and within this tree, the places where a tango implementation exists,
but none for Phobos. Places where also is no Tango implementation can be
ignored.

Code changes can be committed locally (hg ci) and packed into bundle
files (hg bundle). Then the bundle file can be sent to me by email
(keinfarb...@googlemail.com). After reviewing i will add the change to
the global repository and do merges if necessary.

Please reply in this thread or start a new one, if you want to start
working with a file(s), so nobody else is starting the same work. On the
other hand, please do also tell, if you will pause/stop working on this,
so someone else can take over.

For questions and general conversation, please also try to find me in
IRC (freenode, #dwt, keinfarbton).





The new DWT2

2009-03-21 Thread Frank Benoit
Now there is the new hg repository for DWT2.

DWT2 is like dwt-win/linux/addons, but the folders are organized in the
original directory structure of the Eclipse sources. This also means the
packages are again like the original.

DWT.CENTER =>
SWT.CENTER

import dwt.widgets.Button; =>
import org.eclipse.swt.widgets.Button;

This makes future porting of more files and versions much more easier.

I started to make dwt2 compilable also for D2+Phobos. Support for
D1+Tango will certainly stay.

The repositories dwt-win/linux/addons/samples will stay and i will
support them with bug fixes for a while. But I plan to do my future work
in DWT2.

Get it with Mercurial (hg) Version Control software:
First get:
hg clone http://hg.dsource.org/projects/dwt2
To get later changes from the server
hg pull -u

To build you need "Rake", that is the Ruby make tool and is part of a
standard Ruby installation. Also DMD needs to be in the path environment
variable.


Re: DWT failed to build

2009-03-11 Thread Frank Benoit
it is fixed now.


Re: DWT failed to build

2009-03-11 Thread Frank Benoit
Mike James schrieb:
> When I try to build the latest version of DWT (downloaded using hg) I get the 
> following errors during the build using dsss:
> 
> dwt\dwthelper\InflaterInputStream.d(34): function 
> tango.io.device.Conduit.Conduit.load (uint) does not match parameter types 
> (InputStreamWrapper,void[])
> dwt\dwthelper\InflaterInputStream.d(34): Error: cannot implicitly convert 
> expression (dst) of type void[] to uint
> 
> I am using dmd version 1.041, dsss version 0.75 and the latest Tango from the 
> CVS trunk.
> 
> Has anyone any pointers to the problem?
> 
> regards,
> 
> -=mike=-
> 

yes, i can confirm that tango rev 4405 does cause these problems. The
tango rev 4322 worked. I will look to fix it.


DWT on phobos/D2?

2009-03-10 Thread Frank Benoit
Is there interest in DWT for phobos on D2?
If someone wants to contribute, please contact me.


Re: ColumnView tooltips?

2009-02-01 Thread Frank Benoit
Thanks for reporting.

I added this snippet to the dwt-samples repo.

The problem is, tango container crashes on storing a null value for
HashMap!(Object). I added a tango ticket (1468) and a workaround in
dwt-addons.



Re: Weird JFace Preferences bug

2009-01-21 Thread Frank Benoit
Gian Perrone schrieb:
> I think I found a really weird bug in JFace. I use DWT 3.4-1, Tango
> 0.99.7 and DMD 1.028.
> A minimal example really is minimal:
> 
> ---
> 
> module bug;
> 
> import jive.stacktrace; //Optional
> import dwtx.jface.preference.PreferenceManager;
> 
> void main(char[][] args) {
> }
> 
> ---
> 
> If libicu is not installed, it crashes at runtime. Should better be a
> compile time error. If it is installed:
> 
> ---
> 
> tango.core.Exception.IllegalElementException: Attempt to include invalid
> key _in Collection
> 
> 0x0827d4b5 [bug] object.traceContext
> 0x0827d428 [bug] object.Exception._ctor
> 0x08277ca9 [bug] tango.core.Exception.IllegalElementException._ctor
> 0x0809c3b5 [bug]
> tango.util.collection.impl.MapCollection.MapCollection!(dwt.widgets.Display,
> dwtx.jface.resource.ResourceManager).MapCollection.checkKey
> 0x0809af6b [bug]
> tango.util.collection.HashMap.HashMap!(dwt.widgets.Display,
> dwtx.jface.resource.ResourceManager).HashMap.add
> 0x08099fc9 [bug]
> dwtx.jface.resource.JFaceResources.JFaceResources.getResources
> 0x08099f67 [bug]
> dwtx.jface.resource.JFaceResources.JFaceResources.getResources
> 0x0809a156 [bug]
> dwtx.jface.resource.JFaceResources.JFaceResources.getImageRegistry
> 0x0815bfb0 [bug]
> dwtx.jface.viewers.DialogCellEditor.DialogCellEditor._staticCtor18
> 0x0815c63b [bug] dwtx.jface.viewers.DialogCellEditor.__modctor
> 0x0827d6c1 [bug] object._moduleCtor2
> 0x0827d704 [bug] object._moduleCtor2
> 0x0827d5a3 [bug] _moduleCtor
> 0x0827e036 [bug] dmain2.main.runAll
> 0x0827dde8 [bug] dmain2.main.tryExec
> 0x0827dd91 [bug] main
> 0xf75ae44f [libc-2.7.so]
> 0x08054400 [bug] _start
> 
> ---
> 
> I spent a lot of time finding what caused this. The minimal *working*
> example is:
> 
> ---
> 
> module bug;
> 
> import dwtx.jface.preference.PreferenceManager;
> import dwt.widgets.Display;
> import dwt.layout.RowLayout;
> 
> void main(char[][] args) {
> }
> 
> ---
> 
> You have to import Display and RowLayout or else a static this() fails.
> I didn't find any clue what actually causes this behaviour.
> 

The problem occurs in the tango.util.collections. They are used in the
latest release. But the current development repositories do no more use
those, they use the tango.util.containers and have explicit wrappers to
make them compatible to the Java collections.

I would recommend to use the sources from the dev repository. The reason
there is not a more actual release is, I am waiting for the next tango
release. :/

I tried your testcase with the current source code, current tango from
svn, the ICU libs removed, on winxp.
The was no error shown.







Re: Exception in (0): invalid utf8 input

2008-11-30 Thread Frank Benoit
yidabu schrieb:
> On Sun, 30 Nov 2008 11:37:34 +0100
> Frank Benoit <[EMAIL PROTECTED]> wrote:
> 
>> yidabu schrieb:
>>> On Sun, 30 Nov 2008 09:27:59 +0100
>>> Frank Benoit <[EMAIL PROTECTED]> wrote:
>>>
>>>> I added a fix for dwt-win.
>>>> Please verify that it works for you.
>>> I upated dwt-win, run jface sample ActionAndStatusbar causes Access 
>>> Violation.
>>>
>> is there location where it happens?
> 
> happens on app starts. I tried all jface samples, all failed to starts, the 
> GUI not shown.
> 

is this an update problem? I don't see this. have you rebuilt both libs
(dwt+dwtx)?


Re: Exception in (0): invalid utf8 input

2008-11-30 Thread Frank Benoit
yidabu schrieb:
> On Sun, 30 Nov 2008 09:27:59 +0100
> Frank Benoit <[EMAIL PROTECTED]> wrote:
> 
>> I added a fix for dwt-win.
>> Please verify that it works for you.
> 
> I upated dwt-win, run jface sample ActionAndStatusbar causes Access Violation.
> 

is there location where it happens?


Re: Exception in (0): invalid utf8 input

2008-11-30 Thread Frank Benoit
I added a fix for dwt-win.
Please verify that it works for you.


Re: Exception in (0): invalid utf8 input

2008-11-29 Thread Frank Benoit
yidabu schrieb:
> On Sat, 29 Nov 2008 17:42:14 +0800
> yidabu <[EMAIL PROTECTED]> wrote:
> 
> I'm sure it's valid utf8 characters, exception when 
> ApplicationWindow.setStaus(utf8Str);

With this few information it is hard to help.

Can you give me an example of the input string, so i can try to find out
what is the problem?

for example put this at the start of getRelativeCodePointOffset:

Trace.formatln( "str={}, startIndex={}, searchRelCp={}", str,
startIndex, searchRelCp );
Trace.memory( str );

and post the output.

Also using the stacktrace enabled tango lib from team0xf can help.


Re: Exception in (0): invalid utf8 input

2008-11-29 Thread Frank Benoit
yidabu schrieb:
> My application( contains Chinese ) some times causes Exception in
> (0): invalid utf8 input , I find that it's from
> dwt.dwthelper.utils.getAbsoluteCodePointOffset
> getAbsoluteCodePointOffset, I failed to debug this exception by ddbg,
> I don't isue it's my application issue or dwt issue, any body help?
> 
> 
> 

A short example for error reproduction would be a perfect help.
Or can you see from where the getAbsoluteCodePointOffset got called from
or with what parameters?

If nothing else works, you can use tango.util.log.Trace to hexdump the
arguments with Trace.memory.
So the question is, is getAbsoluteCodePointOffset wrong, or is it called
with invalid args.


Re: Exception - PrintWindow not found in User32.dll

2008-11-22 Thread Frank Benoit
tao schrieb:
> Thanks. But don't work, I rebuild DWT and examples: object.Exception
> - Access violation.

With which of the examples do you get this?


Re: Exception - PrintWindow not found in User32.dll

2008-11-20 Thread Frank Benoit
tao schrieb:
> Hello. I'am build DWT examples and run them on WinXP. All OK. When I
> try to run them on Win2000: Exception - PrintWindow not found in
> User32.dll(yes, there is no PrintWindow in Win2000 and lower). How I
> can solve this problem ?

Right, i fixed it in the HG repository.
http://www.dsource.org/projects/dwt-win/changeset/322%3A2b8f40a1c515
Thanks for reporting this.


Re: What's the equivalence of StringBuffer (in Java) in DWT or D?

2008-11-20 Thread Frank Benoit
Sam Hu schrieb:
> Hello everybody!I was wondering what's the translation of StringBuffer in DWT 
> or D,please refer to below codes in Java:
> //
> 
> FileDialog dlg=new FileDialog(shell,SWT.MULTI);
> String fn=dlg.open();
> if(fn!=null)
> {
>  StringBuffer buf=new StringBuffer();
>  String[] files=dlg.getFileName();
>  for(int i=0,n=files.length;i  {
>buf.append(dlg.getFilterPath());
>if(buf.charAt(buf.length()-1) !=File.separatorChar)
>{
>buf.append(File.separatorChar);
>}
>buf.append(files[i]);
>buf.append("  ");
>}
>// other operation
> }
> //***
> Can anybody help to the same implement in DWT,Thanks so much!!
> Sam

tango.text.Text has similar features, but a bit different API. I used it
often for porting DWT. Unfortunately there is dwt.widgets.Text which
might make symbol conflicts.


Re: dwtx.jface.preference.PreferenceStore issue

2008-11-15 Thread Frank Benoit
yidabu schrieb:
> dwtx.jface.preference.PreferenceStore
> 
> line 113:
> case 't': c = '\t'; break;
> case 'n': c = '\n'; break;
> case '\\': c = '\\'; break;
> 
> should be:
> case 't': c = '\t'; break;
>   case 'r': c = '\r'; break;
> case 'n': c = '\n'; break;
> case '\\': c = '\\'; break;
> 
> for use MultiLineTextFieldEditor on Windows.
> 
> 

Done in
http://www.dsource.org/projects/dwt-addons/changeset/193%3Aa785420fe9ca

Thanks


Re: how to add focuslistener to tree?

2008-11-03 Thread Frank Benoit
yidabu schrieb:
> I want to add focuslistener to each tree node so that we focus gets
> lost from particular tree node I want to validate information
> associated with it.

You can add the focuslistener to the Tree itself. I think, if called,
you can query the still selected node and validate your information.

If that does not help, perhaps you can find an answer in the SWT
newsgroup on eclipse.org



Re: What's up with DWTx?

2008-11-03 Thread Frank Benoit
Jesse Phillips schrieb:
> I'm trying to install the entire suite here. I got all the basics, DMD, 
> Tango .99.7, DSSS, and DWT 3.4-1. I even have Derelict installed to run 
> the OpenGL stuff. I am unable to get the dwt-addons to compile, 
> specifically looking at JFace. (This is all of course in Linux)
> 
> I just run $ dsss build from my up-to-date HG dwt-addons directory. The 
> first issue I run into is a Runnable is not a type error in JThread, 
> corrected by importing dwt.dwthelper.Runnable. Then I get the error.
> 
> dwtx/jface/viewers/CustomHashtable.d(54): Error: 
> dwt.dwthelper.utils.Enumeration at /usr/local/bin/../include/d/dwt/
> dwthelper/utils.di(815) conflicts with 
> dwtx.dwtxhelper.Collection.Enumeration at dwtx/dwtxhelper/Collection.d(52)
> 
> I'm thinking I have something in the middle of a change.

I do not get this error. But the message seems like there are two
include paths for dwt and dwtx. On in /usr/local/include/d/dwt and the
other as the local folder dwtx.

Have you solved that?






Re: DWT multi thread issue

2008-10-31 Thread Frank Benoit
I cannot try it right now, but perhaps this works? :

void dgRefresh()
{
auto runOne = new RunOne();
Thread thread = new Thread( &runOne.run );
thread.start();
}



Re: novocode\CustomSeparator.d(100): identifier 'PaintEvent' is not defined

2008-10-28 Thread Frank Benoit
yidabu schrieb:
> Build recent dwtx by DSSS 0.75 on Windows, get error:
> 
> dwtx\novocode\CustomSeparator.d(100): Error: identifier 'PaintEvent' is
> not defined

thanks for reporting.
It is fixed now.


Re: any dwtx.text.edits... sample avaiable ?

2008-10-26 Thread Frank Benoit
yidabu schrieb:
> Does dwtx.text.edits... package works now?
> 

I submitted a bugfix, the dwt-samples/jface.text/Simple.d and updated
the screenshot package.
See http://www.dsource.org/projects/dwt/wiki/JFaceTextExample

So AFAIK it works, as long as i receive bug reports :)



Re: DWT package mapping?

2008-10-21 Thread Frank Benoit
John Reimer schrieb:
> Hello Frank,
> 
>> At the moment there are these mappings
>>
>> org.eclipse.swt -> dwt
>> org.eclipse -> dwtx
>> Symbols:
>> SWT -> DWT
>> SWTError-> DWTError
>> SWTException-> DWTException
>> ...
>> But there are more candidates for the dwt project.
>>
>> com.novocode-> ??
>> com.ibm.icu -> ??
>> org.osgi-> ??
>> Where to put them?
>> And the rule for renaming should be consistent and open to new
>> packages.
>> But why do renaming anyway? Is it really that hard to type? Can IDEs
>> and
>> collective imports help?
>> What also is bad about the renaming, is that it must be done all over
>> again. That is time consuming when preparing Java source.
>>
>> So I think... What about changing all the renaming back to the
>> original? Would that work? What do you think?
>>
> 
> 
> DWT really is SWT throughout.  Even the coding style is almost
> completely Java-like.  I think that the only reason it remains DWT is
> because of the original porting precedent that chose the name. :)
> 
> It wouldn't bother me if DWT reverted back to the SWT name.  In fact,
> that probably makes a lot of sense. I'm guessing that it might even
> receive more recognition as a genuine SWT port from the SWT team and
> others if it were to revert to that name.
> 
> BUT, I really really hope we don't adopt the long package names so
> typical of the Java realm.  "org.eclipse.*" prepended to the dwt
> namespace would be painful.  That's one Javaism that I hope stays away
> from D.  But, if there are some REALLY good reasons that the complete
> package names should be included, maybe I could be made to agree.  I'm
> not very enthusiastic about Java in general, so anything that reminds me
> too much of Java or causes me to forget that I'm actually using D (which
> is supposed to improve the programmer's life)... is not good.
> 
> That's my opinion, anyway. :)
> 
> -JJR
> 
> 

I was really not asking for renaming the DWT project. I think the name
is ok. DWT started as a SWT port but now, there is much more else.

Changing the Symbol DWT back to SWT, well i never liked to rename it. It
is the same reason i never wanted to rename jface to dface. The source
is ported, but it is still SWT. And renaming is a bit like hiding the
origin, which is not what i want.

About the package name.
How would you map org.eclipse.osgi and org.osgi?
How to map non-eclipse packages?






Re: DWT package mapping?

2008-10-21 Thread Frank Benoit
Robert Fraser schrieb:
> Frank Benoit wrote:
>> At the moment there are these mappings
>>
>> org.eclipse.swt -> dwt
>> org.eclipse -> dwtx
>>
>> Symbols:
>> SWT -> DWT
>> SWTError-> DWTError
>> SWTException-> DWTException
>> ...
>>
>> But there are more candidates for the dwt project.
>>
>> com.novocode-> ??
>> com.ibm.icu -> ??
>> org.osgi-> ??
>>
>> Where to put them?
>> And the rule for renaming should be consistent and open to new packages.
>> But why do renaming anyway? Is it really that hard to type? Can IDEs and
>> collective imports help?
>>
>> What also is bad about the renaming, is that it must be done all over
>> again. That is time consuming when preparing Java source.
>>
>> So I think... What about changing all the renaming back to the original?
>> Would that work? What do you think?
> 
> I would say even if you rename the imports, don't rename the project
> (i.e. the website, logo, etc.). DWT is a catchy name, even if using
> "DWT" requires you to import something in org.swt

Yes, that is not what i want. I am just thinking about the package name
and symbols.


Re: DWT package mapping?

2008-10-21 Thread Frank Benoit
Ary Borenszweig schrieb:
> I find that when porting stuff, renaming is not a good option. Take for
> instance Descent. It kept all the names of JDT unchanged, and that makes
> it very easy to add new code, make plugins work almost out of the box, etc.
> 
> When I started Descent, I thought about renaming stuff like IJavaProject
> to IDeeProject, or something similar, but I asked the PHPEclipse guys
> what did they do, since they also used JDT's code base. They replied to
> me saying that they renamed IJavaProject to IPhpProject, things like
> that, big mistake, and that they were having a bad time getting updates
> from newer JDT releases, and that I should not do the same as they did.
> 
> So my advice is to just keep the original names. Anyway, the S in SWT
> means Standard, so SWT for D is not bad. :-P

Thanks for your feedback.


DWT package mapping?

2008-10-21 Thread Frank Benoit
At the moment there are these mappings

org.eclipse.swt -> dwt
org.eclipse -> dwtx

Symbols:
SWT -> DWT
SWTError-> DWTError
SWTException-> DWTException
...

But there are more candidates for the dwt project.

com.novocode-> ??
com.ibm.icu -> ??
org.osgi-> ??

Where to put them?
And the rule for renaming should be consistent and open to new packages.
But why do renaming anyway? Is it really that hard to type? Can IDEs and
collective imports help?

What also is bad about the renaming, is that it must be done all over
again. That is time consuming when preparing Java source.

So I think... What about changing all the renaming back to the original?
Would that work? What do you think?