What's the equivalence of StringBuffer (in Java) in DWT or D?
Frank Benoit
keinfarbton at googlemail.com
Thu Nov 20 10:53:33 PST 2008
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<n;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.
More information about the Digitalmars-d-dwt
mailing list