jface snippet 006 : Cyclic dependency in module dwtx.jface.viewers.TableLayout
Frank Benoit
keinfarbton at googlemail.com
Fri May 16 15:03:14 PDT 2008
Frank Benoit schrieb:
> yidabu schrieb:
>> I ported jface snippet 006 today, cause runtime exception:
> > Cyclic dependency in module dwtx.jface.viewers.TableLayout
>
> Thanks Yidabu for the snippet, I added it to dwt-samples/jface/snippets.
> The dwt-addons has now a fix for the cyclic dependency.
>
> I tried the snippet on linux, but i get a divide by zero exception in
> line 210. event.x is 0.
> Is this a problem with dwt-linux only, or do you get the same on windows
> also?
>
However, changing the line 210 from
int lines = size.x / event.width + 1;
into
int lines = ( event.width > 0 ) ? ( size.x / event.width + 1 ) : 1;
makes the snippet work on linux.
More information about the Digitalmars-d-dwt
mailing list