[lazarus] Weird behavior of the day....

Cliff Baeseman vbman at pcpros.net
Mon Aug 2 22:34:05 EDT 1999


Here is something a little funny I found under Win32....  I am not sure of
the cause or fix to this
little bug.

The text is not showing under win32 because a signal is not being connected
to the OK button.



below is what I did to fix it, but this is totally hosed. The declaration
order in the gtk units is like this

main_vbox: PGtkWidget
ok_button: PGtkWidget
cancel_button: PGtkWidget
help_button: PGtkWidget;


Here is the original

gtk_signal_connect( gtk_object(pGtkButton((PGtkFileSelection(P))^.ok_button)
), 'clicked',   gtk_signal_func(@gtkDialogOKclickedCB), Sender);

gtk_signal_connect( gtk_object((PGtkFileSelection(P))^.cancel_button),
'clicked', gtk_signal_func(@gtkDialogCancelclickedCB), Sender);

A gtk error was being thrown saying that signal clicked could not be found
in the vbox classes. I moved down the declaration list and put cancel where
ok should be and help where cancel should be and low and behold it works
like it is supposed to.


gtk_signal_connect( gtk_object(pGtkButton((PGtkFileSelection(P))^.cancel_but
ton)), 'clicked',   gtk_signal_func(@gtkDialogOKclickedCB), Sender);

gtk_signal_connect( gtk_object((PGtkFileSelection(P))^.help_button),
'clicked', gtk_signal_func(@gtkDialogCancelclickedCB), Sender);

Does this have any thing to do with record packing?

I am stumped over this one.

Cliff








More information about the Lazarus mailing list