First working JFace example
Frank Benoit
keinfarbton at googlemail.com
Fri Apr 11 08:43:51 PDT 2008
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.
More information about the Digitalmars-d-dwt
mailing list