is dwt alive?

Jeremy Powers jpowers at
Mon Jul 12 15:01:06 PDT 2010

On Mon, Jul 12, 2010 at 11:21 AM, torhu <no at spam.invalid> wrote:
> On 11.07.2010 20:30, Jacob Carlborg wrote:
>> On 2010-07-11 19.09, torhu wrote:
>>>  On 22.06.2010 14:49, Jacob Carlborg wrote:
>>>>  On 2010-06-22 01:40, torhu wrote:
> [...]
>>>  I've set up my own project on Bitbucket. I've made enough changes to
>>>  build my DWT app on Windows, and it's works like a charm. A lot of the
>>>  Phobos code was already there, and I've added what was needed for my
>>>  use. Since DWT enforces that all GUI code is run in the same thread
>>>  (usually the main thread), I didn't need to add shared and __gshared
>>>  that many places.
>>>  I had to add a lot of casts because D2 compilers are stricter about
>>>  narrowing conversions. In some places Java's char type was kept as char,
>>>  and not changed into wchar. I've changed the ones I came across to
>>>  wchar, to avoid truncating code points that are outside of ASCII. Some
>>>  conversions between char[] and wchar had to be added.
>>>  The String alias is D2 string, which works just fine.
>> So this is working with D2? If that's the case then it's great news.
>> I've also found two other guys who want to work on DWT2 so this is
>> starting to look pretty promising. Are your fork windows only? Have you
>> looked anything on the linux port? I'll try to have a look at your
>> branch and see if I can merge it with the main branch.
>> I'm also thinking that we may need to organize our self a bit so we
>> don't work on the same things.
> I've only looked at the Windows version, so if anyone else wants to work on
> the other platforms, feel free.
> At the moment my fork won't compile as D1 code, but that's easy to fix.  I
> didn't take a very systematic approach to the porting, since I didn't know
> how much work it would take or how it would work out.  You are welcome to
> review my changes and make suggestions.
> There were some methods that were synchronized in a couple of the java.*
> modules.  I removed synchronized from their declaration, since D2 doesn't
> accept this when the methods override superclass or interface methods that
> are not synchronized.  I can't recall the details, but I think it looked
> like synchronized implies shared, meaning it changes the type of the method.
>  They are not synchronized in the Java version of the code, so I don't know
> why they were in the D code.

Being one of the guys Jacob mentioned, wanted to chime in and second
his thoughts - this is cool, we need to coordinate, etc.  I haven't
had much time to work on this yet, but it looks like most of my
changes parallel yours.  I started by getting (most) things to work
with D1/Tango first, and got most of the snippets working on
Windows... was waiting to make sure I didn't break anything for the
Linux build before saying anything.

Encountered the same thing with synchronized you did, but my solution
was simply to move to a synchronized block surrounding the method
body.  Didn't examine why things were synchronized, but according to
what I've read D will treat a "synchronized { foo }" block like a
block on the object, which is the same as the synchronized tag on a
method in Java.  Didn't check the original Java code though...

What are your thoughts on how we should coordinate efforts?  I'm
mostly interested in doing D2/Phobos work, but have a setup where I
can (relatively) easily switch between to make sure things work w/
Tango and D2.


More information about the Digitalmars-d-dwt mailing list