Hi Jim,
Thanks for responding. I am sure this is really programming problem rather than
an fltk2 bug so I have put a post up on the general forum with my code and
problem.
On tracing the problem it occurs in next_visible() in relayout() when fltk
tries to check visibility on a null widget. Why? I assume I must be supply a
null widget from my data class somehow. (I call relayout from my callback, but
it will still crash even if I have no action in my callback).
> --_5a879db5-9a9f-435b-a51e-4f1383c3aa32_
> Content-Type: text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
>
> Hi Stuart=2C
>
> > The application works fine when I use add() to fill the browser. Because =
> I can have up to 10=2C000 rows I thought I would try overriding list. It i=
> s a multiselect browser=2C so I wrote a class overridging children=2C child=
> and set-flags (using the documenation in StringHierarchy as a template).
> >=20
> > I sort and do functions such as select all=2C invert selection etc on the=
> data class and it shows fine in the browser.
> >=20
> > However when I double clikc a row it segfaults. I have put event_clicks(=
> 0) into my overwritten and this nearly always stops the crash. However I l=
> ose my double click action. I have tried setting a double click block befo=
> re setting event_clicks(o) and acting on the flag in the call back but then=
> it does respond until I go to a new (and thus precipitate a new call back =
> fro it to act). I supposed I could a function in my overriden class but th=
> is is becoming pretty ugly and spaghetti like.
> >=20
> > Even more worrying while the event_clicks(0) stuff stops most crashes I s=
> till get occasional crahses and have no idea why. It seems that events mus=
> t be being calling on zero'd widgets or something. Any help would be appre=
> ciated.
>
> Setting event_clicks(0) won't solve all these problems=2C I don't think. 2.=
> 0 can triple-click=2C so occasionally it might interpret your clicks as a s=
> eries of tripleclicks=2C which will set event_clicks_ to 2 (and thus double=
> click). However=2C it sounds like your problem is most likely in your over=
> ridden class.
>
> Could you please post a minimal compilable example that exhibits the proble=
> m (preferably without the event_clicks() kludges - so we can try to get thi=
> s code as nice as it should be!)=2C and I'll see what I can do?
>
> Regards=2C
> Ben
> =
>
> --_5a879db5-9a9f-435b-a51e-4f1383c3aa32_
> Content-Type: text/html; charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <html>
> <head>
> <style><!--
> ..hmmessage P
> {
> margin:0px=3B
> padding:0px
> }
> body.hmmessage
> {
> font-size: 10pt=3B
> font-family:Tahoma
> }
> --></style>
> </head>
> <body class=3D'hmmessage'><div dir=3D'ltr'>
> Hi Stuart=2C<br><br><div>>=3B The application works fine when I use add()=
> to fill the browser. Because I can have up to 10=2C000 rows I thought I wo=
> uld try overriding list. It is a multiselect browser=2C so I wrote a class=
> overridging children=2C child and set-flags (using the documenation in Str=
> ingHierarchy as a template).<br>>=3B <br>>=3B I sort and do functions s=
> uch as select all=2C invert selection etc on the data class and it shows fi=
> ne in the browser.<br>>=3B <br>>=3B However when I double clikc a row i=
> t segfaults. I have put event_clicks(0) into my overwritten and this nearl=
> y always stops the crash. However I lose my double click action. I have t=
> ried setting a double click block before setting event_clicks(o) and acting=
> on the flag in the call back but then it does respond until I go to a new =
> (and thus precipitate a new call back fro it to act). I supposed I could a=
> function in my overriden class but this is becoming pretty ugly and spaghe=
> tti like.<br>>=3B <br>>=3B Even more worrying while the event_clicks(0)=
> stuff stops most crashes I still get occasional crahses and have no idea w=
> hy. It seems that events must be being calling on zero'd widgets or someth=
> ing. Any help would be appreciated.<br><br>Setting event_clicks(0) won't s=
> olve all these problems=2C I don't think. 2.0 can triple-click=2C so occasi=
> onally it might interpret your clicks as a series of tripleclicks=2C which =
> will set event_clicks_ to 2 (and thus double click). However=2C it sounds l=
> ike your problem is most likely in your overridden class.<br><br>Could you =
> please post a minimal compilable example that exhibits the problem (prefera=
> bly without the event_clicks() kludges - so we can try to get this code as =
> nice as it should be!)=2C and I'll see what I can do?<br><br>Regards=2C<br>=
> Ben<br></div> </div></body>
> </html>=
>
> --_5a879db5-9a9f-435b-a51e-4f1383c3aa32_--
>
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs