digitalmars.D.dwt - First working JFace example
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Now the JFace stuff compiles with the available dwt on win/linux.
dwt-samples/jface/ActionAndStatusbar
is a first showcase.
More example code as showcases and testcases is very welcome.
Snippets can be found here:
http://wiki.eclipse.org/index.php/JFaceSnippets
Due to a compiler bug (#1978), the tango collection need a fix to make
JFace not going into a endless loop.
- tango.util.collection.mode.View
line 39 : public Dispenser!(T) duplicate();
change to: public View!(T) duplicate();
- tango.util.collection.mode.Set
line 37 add:
public Set!(T) duplicate();
public alias duplicat dup;
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Frank Benoit wrote:
Now the JFace stuff compiles with the available dwt on win/linux.
Cool. I don't really know what it is, but it seems to be all the rage
among SWT coders.
dwt-samples/jface/ActionAndStatusbar
is a first showcase.
More example code as showcases and testcases is very welcome.
Snippets can be found here:
http://wiki.eclipse.org/index.php/JFaceSnippets
To try this out we need to update both dwt-samples and dwt-addons?
Due to a compiler bug (#1978), the tango collection need a fix to make
JFace not going into a endless loop.
- tango.util.collection.mode.View
Should be .model.View, not .mode.View right?
line 39 : public Dispenser!(T) duplicate();
change to: public View!(T) duplicate();
- tango.util.collection.mode.Set
line 37 add:
public Set!(T) duplicate();
public alias duplicat dup;
Should be alias duplicate not alias duplicat, right?
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter Wrote:
Frank Benoit wrote:
Now the JFace stuff compiles with the available dwt on win/linux.
Cool. I don't really know what it is, but it seems to be all the rage
among SWT coders.
dwt-samples/jface/ActionAndStatusbar
is a first showcase.
More example code as showcases and testcases is very welcome.
Snippets can be found here:
http://wiki.eclipse.org/index.php/JFaceSnippets
To try this out we need to update both dwt-samples and dwt-addons?
Yes
Due to a compiler bug (#1978), the tango collection need a fix to make
JFace not going into a endless loop.
- tango.util.collection.mode.View
Should be .model.View, not .mode.View right?
Yes
line 39 : public Dispenser!(T) duplicate();
change to: public View!(T) duplicate();
- tango.util.collection.mode.Set
line 37 add:
public Set!(T) duplicate();
public alias duplicat dup;
Should be alias duplicate not alias duplicat, right?
Yes
And instead Set it should be Seq.
I will try to do a better description on a wiki page in a few hours.
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Frank Benoit wrote:
Now the JFace stuff compiles with the available dwt on win/linux.
dwt-samples/jface/ActionAndStatusbar
is a first showcase.
More example code as showcases and testcases is very welcome.
Snippets can be found here:
http://wiki.eclipse.org/index.php/JFaceSnippets
Due to a compiler bug (#1978), the tango collection need a fix to make
JFace not going into a endless loop.
- tango.util.collection.mode.View
line 39 : public Dispenser!(T) duplicate();
change to: public View!(T) duplicate();
- tango.util.collection.mode.Set
line 37 add:
public Set!(T) duplicate();
public alias duplicat dup;
I made those changes to svn tango,
hg pulled & updated dwt-win and dwt-addons
did dsss build and dsss install for all three,
but I'm getting errors with dsss build on dwt-addons.
For instance
dwt-addons/dwtx/jface/viewers/AbstractListViewer.d(474)
is using Java style anonymous declaration.
And then the tango changes seem to be leading to lots of compiler erorrs
in dwtx.core:
dwtx\core\commands\operations\TriggeredOperations.d(200): Error: cannot
implicitly convert expression (this.children.duplicate()) of type
tango.util.collection.model.View.View!(IUndoableOperation).View to
tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq
dwtx\core\commands\operations\TriggeredOperations.d(237): Error: cannot
implicitly convert expression (childrenToRestore) of type
tango.util.collection.model.View.View!(IUndoableOperation).View to
tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq
dwtx\core\commands\operations\TriggeredOperations.d(243): Error: cannot
implicitly convert expression (childrenToRestore) of type
tango.util.collection.model.View.View!(IUndoableOperation).View to
tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq
dwtx\core\commands\operations\TriggeredOperations.d(247): Error: cannot
implicitly convert expression (childrenToRestore) of type
tango.util.collection.model.View.View!(IUndoableOperation).View to
tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq
--bb
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
- tango.util.collection.mode.Set
line 37 add:
public Set!(T) duplicate();
public alias duplicat dup;
hm, should be Seq instead of Set.
- tango.util.collection.mode.Seq
line 37 add:
public Seq!(T) duplicate();
public alias duplicate dup;
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
I made those changes to svn tango,
hg pulled & updated dwt-win and dwt-addons
did dsss build and dsss install for all three,
but I'm getting errors with dsss build on dwt-addons.
There were indead some compile errors left, due to my latest code
changes. I did only compile the example without rebuilding all files in
dwtx, so i did not saw the error. It should work now.
I added some more info here:
http://www.dsource.org/projects/dwt/wiki/JFace
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Frank Benoit wrote:
Bill Baxter schrieb:
I made those changes to svn tango,
hg pulled & updated dwt-win and dwt-addons
did dsss build and dsss install for all three,
but I'm getting errors with dsss build on dwt-addons.
There were indead some compile errors left, due to my latest code
changes. I did only compile the example without rebuilding all files in
dwtx, so i did not saw the error. It should work now.
I added some more info here:
http://www.dsource.org/projects/dwt/wiki/JFace
Where is this supposed to be found?
f:/usr/pkg/d/dsss/bin\..\include\d\dwt\dwthelper\utils.di(944): Error:
file "eclipse-icon-red-16.png" cannot be found, check -Jpath
I can't locate it in any of the dwt-* res dirs. Is it possible you
forgot to check it in?
--bb
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
Where is this supposed to be found?
f:/usr/pkg/d/dsss/bin\..\include\d\dwt\dwthelper\utils.di(944): Error:
file "eclipse-icon-red-16.png" cannot be found, check -Jpath
I can't locate it in any of the dwt-* res dirs. Is it possible you
forgot to check it in?
--bb
There are two folders containing images for compile time inclusion.
dwt-samples/res
dwt-addons/res
both folders need to be given with -J
Its also mentioned on the wiki page.
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Frank Benoit wrote:
Bill Baxter schrieb:
Where is this supposed to be found?
f:/usr/pkg/d/dsss/bin\..\include\d\dwt\dwthelper\utils.di(944): Error:
file "eclipse-icon-red-16.png" cannot be found, check -Jpath
I can't locate it in any of the dwt-* res dirs. Is it possible you
forgot to check it in?
--bb
There are two folders containing images for compile time inclusion.
dwt-samples/res
dwt-addons/res
both folders need to be given with -J
Its also mentioned on the wiki page.
And neither one contains eclipse-icon-red-16.png. Is it possible you
forgot to check it in?
--bb
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
And neither one contains eclipse-icon-red-16.png. Is it possible you
forgot to check it in?
--bb
yes ;)
↑ ↓ ← → davidl <davidl 126.com> writes:
在 Thu, 10 Apr 2008 17:23:31 +0800,Frank Benoit
<keinfarbton googlemail.com> 写道:
Now the JFace stuff compiles with the available dwt on win/linux.
dwt-samples/jface/ActionAndStatusbar
is a first showcase.
More example code as showcases and testcases is very welcome.
Snippets can be found here:
http://wiki.eclipse.org/index.php/JFaceSnippets
Due to a compiler bug (#1978), the tango collection need a fix to make
JFace not going into a endless loop.
- tango.util.collection.mode.View
line 39 : public Dispenser!(T) duplicate();
change to: public View!(T) duplicate();
- tango.util.collection.mode.Set
line 37 add:
public Set!(T) duplicate();
public alias duplicat dup;
The harder you work, the more shameful I feel for not being able to do
some dwt-related coding recently.
Anyway, good job! :)
--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
davidl wrote:
在 Thu, 10 Apr 2008 17:23:31 +0800,Frank Benoit
<keinfarbton googlemail.com> 写道:
The harder you work, the more shameful I feel for not being able to do
some dwt-related coding recently.
Anyway, good job! :)
Yep, this is great stuff!
--bb
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
davidl wrote:
在 Thu, 10 Apr 2008 17:23:31 +0800,Frank Benoit
<keinfarbton googlemail.com> 写道:
The harder you work, the more shameful I feel for not being able to do
some dwt-related coding recently.
Anyway, good job! :)
Yep, this is great stuff!
--bb
Thanks.
Still lots of works, hehe
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Frank Benoit wrote:
Now the JFace stuff compiles with the available dwt on win/linux.
dwt-samples/jface/ActionAndStatusbar
is a first showcase.
More example code as showcases and testcases is very welcome.
Snippets can be found here:
http://wiki.eclipse.org/index.php/JFaceSnippets
Due to a compiler bug (#1978), the tango collection need a fix to make
JFace not going into a endless loop.
- tango.util.collection.mode.View
line 39 : public Dispenser!(T) duplicate();
change to: public View!(T) duplicate();
- tango.util.collection.mode.Set
line 37 add:
public Set!(T) duplicate();
public alias duplicat dup;
I started trying to port the code from here:
http://www.ibm.com/developerworks/java/library/os-ecgui1/index.html?dwzone=java
I got through listings 1-3 just fine, but listing 4 which uses a
TreeViewer seems to be crapping out over ResourceBundle not being quite
implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[] filename)
just creates an empty bundle).
The problems seem to start in in dwtx/jface/resource/JFaceResources.d.
At least I think that's what's up. Here's the output I get:
f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\AbstractTreeViewer.d
918:
doUpdateItem
f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\AbstractTreeViewer.d
939:
doUpdateItem
f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\ColumnViewer.d
223: getViewerColumn
f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\ContentViewer.d 141:
f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\ContentViewer.d 143:
Exception occurred
Exception of type object.Exception in (0): Access Violation
Exception in (0): Access Violation
Exception occurred
Exception of type tango.core.Exception.NoSuchElementException in (0): no
matching key
Exception in (0): no matching key
tango.core.Exception.IllegalArgumentException: Argument cannot be null
--bb
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Bill Baxter wrote:
Frank Benoit wrote:
I got through listings 1-3 just fine, but listing 4 which uses a
TreeViewer seems to be crapping out over ResourceBundle not being quite
implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[] filename)
just creates an empty bundle).
The problems seem to start in in dwtx/jface/resource/JFaceResources.d.
Sorry that should be listing 4&5 not just 4.
DWT versions attached in case you have a chance to look into it.
--bb
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
Bill Baxter wrote:
Frank Benoit wrote:
I got through listings 1-3 just fine, but listing 4 which uses a
TreeViewer seems to be crapping out over ResourceBundle not being
quite implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[]
filename) just creates an empty bundle).
The problems seem to start in in dwtx/jface/resource/JFaceResources.d.
Sorry that should be listing 4&5 not just 4.
DWT versions attached in case you have a chance to look into it.
--bb
Yes, there are problems still everywhere :)
At the moment its more easy to say what works, than to list the untested
and problematic code.
I will look into your example code.
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
Bill Baxter wrote:
Frank Benoit wrote:
I got through listings 1-3 just fine, but listing 4 which uses a
TreeViewer seems to be crapping out over ResourceBundle not being
quite implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[]
filename) just creates an empty bundle).
The problems seem to start in in dwtx/jface/resource/JFaceResources.d.
Sorry that should be listing 4&5 not just 4.
DWT versions attached in case you have a chance to look into it.
--bb
Meanwhile i changed many stuff in jface.
Nevertheless, works now, with doing this:
class FileTreeContentProvider : ITreeContentProvider
{
Object[] getChildren(Object element)
{
try{
Object[] kids;
foreach( item; cast(FilePath) elements ){
kids ~= FilePath.from(item);
}
return kids;
}
catch( Exception e ){
return null;
}
}
....
See also the jface/FileTreeViewer example.
A problem is, the LabelProvider gets completely ignored. This is why the
icons and name do not show up properly.
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
More Examples
jface/FileTreeViewer
jface/ShowPrefs
jface/ShowFieldPrefs
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Frank Benoit wrote:
More Examples
jface/FileTreeViewer
jface/ShowPrefs
jface/ShowFieldPrefs
hg pull && hg updated all my dwt directories, but...
jface\FileTreeViewer.d(29): module stacktrace cannot read file
'jive\stacktrace.d'
Where can I get that?
--bb
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
Frank Benoit wrote:
More Examples
jface/FileTreeViewer
jface/ShowPrefs
jface/ShowFieldPrefs
hg pull && hg updated all my dwt directories, but...
jface\FileTreeViewer.d(29): module stacktrace cannot read file
'jive\stacktrace.d'
Where can I get that?
--bb
ok, thanks. should work now.
jive.stacktrace is a linux-only tool to make tango exceptions have the
stacktrace info. Its normally only active when version=JIVE is given.
↑ ↓ ← → Bill Baxter <dnewsgroup billbaxter.com> writes:
Jesse Phillips wrote:
On Sat, 12 Apr 2008 10:56:12 +0900, Bill Baxter wrote:
Frank Benoit wrote:
More Examples
jface/FileTreeViewer
jface/ShowPrefs
jface/ShowFieldPrefs
jface\FileTreeViewer.d(29): module stacktrace cannot read file
'jive\stacktrace.d'
Where can I get that?
--bb
Just a little side note `$ hg pull -u` will do the pull and then update.
Ah. Thanks for the tip.
--bb
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Frank Benoit schrieb:
More Examples
jface/FileTreeViewer
jface/ShowPrefs
jface/ShowFieldPrefs
Now the LabelProvider in those examples are working and the texts and
images show up correctly.
↑ ↓ ← → Frank Benoit <keinfarbton googlemail.com> writes:
Frank Benoit schrieb:
Frank Benoit schrieb:
More Examples
jface/FileTreeViewer
jface/ShowPrefs
jface/ShowFieldPrefs
Now the LabelProvider in those examples are working and the texts and
images show up correctly.
And now they also work on windows.
I discovered and fixed two bugs in dwt-win.
↑ ↓ ← → Jesse Phillips <jessekphillips gmail.com> writes:
On Sat, 12 Apr 2008 10:56:12 +0900, Bill Baxter wrote:
Frank Benoit wrote:
More Examples
jface/FileTreeViewer
jface/ShowPrefs
jface/ShowFieldPrefs
hg pull && hg updated all my dwt directories, but...
jface\FileTreeViewer.d(29): module stacktrace cannot read file
'jive\stacktrace.d'
Where can I get that?
--bb
Just a little side note `$ hg pull -u` will do the pull and then update.
|