[lazarus] Problem found

Jan.Schmidt at advitech.com.au Jan.Schmidt at advitech.com.au
Mon Jun 28 23:58:47 EDT 1999







Shane Miller <smiller at lakefield.net> on 29/06/99 15:14:25
I have set up TMemo to use the "changed" signal and when GTK fires that
      signal I do :
      If assigned FChanged then FChanged(Self);

Obviously when the callback is used, the connection to self is lost and
therefore it's children no longer retain their values.


You can associate an arbitrary piece of data with a GTK widget. In programming
      with GTK in the past, I have used something like

  gtk_object_set_data(widget,"Self",self)

In the signal handler you can just do

  sig_handler(Widget widget....)

    ...

    self = gtk_object_get_data(GTK_OBJECT(widget),"Self");

This works well in C, but I haven't had any reason to do it under fpc...

OR we could port gtk-- to pascal :-)



J.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jan Schmidt
Information Technologist - Business Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Advitech Pty Limited - Industry's Technology Resource Centre
1 Elizabeth Street, Tighes Hill NSW, Newcastle, Australia
PO Box 207, Mayfield 2304 NSW, Australia
Phone +61 2 49616544
Fax +61 2 49693530
http://www.advitech.com.au
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~







More information about the Lazarus mailing list