Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-08

Weird behavior of the day....

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Cliff Baeseman

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

Reply by email

Curtis White
to Cliff Baeseman

OK, I finally got all the GTK code moved from the TNotebook component to the gtkint units and it has all been committed to CVS. So now the extctrls.pp unit does not require the gtk units any more. I also added some additional tests to the notebook example to test some of the other TNotebook methods and properties.

Right now, the TNotebook component has the ability to show tabs, but to be compatible with Delphi, I will need to remove this ability from the TNotebook component and add it to the TTabbedNotebook component. But now that I have the code working with TNotebook, it will just be a matter of moving it to TTabbedNotebook. So if anyone plans on using the TNotebook component for anything soon, do not use the tabs properties because they will be moved into TTabbedNotebook when I get it started and removed from TNotebook. But for now, they allow you to see that TNotebook is actually working.

Curtis

Reply by email

Noel Cuillandre
to Cliff Baeseman: Here is something a little funny I found under Win32.... I am not sure of the cause or…
i'm developping under win32 and till now, i was unable to see a file
when i tried to open one ( as result, i had an empty window ).
To solve this problem, i have swapped some lines of code in the
'gtkfilesel.pp' file.
the original code was :
  type
     PGtkFileSelection = ^TGtkFileSelection;
     TGtkFileSelection = record
          window : TGtkWindow;
          dir_list : PGtkWidget;
          file_list : PGtkWidget;
          selection_entry : PGtkWidget;
          selection_text : PGtkWidget;
          main_vbox : PGtkWidget;
          ok_button : PGtkWidget;<<------
          cancel_button : PGtkWidget;<<-- These lines have to be swapped
          help_button : PGtkWidget;<<----
          history_pulldown : PGtkWidget;
          history_menu : PGtkWidget;
          history_list : PGList;
          fileop_dialog : PGtkWidget;
          fileop_entry : PGtkWidget;
          fileop_file : ^gchar;
          cmpl_state : gpointer;
          fileop_c_dir : PGtkWidget;
          fileop_del_file : PGtkWidget;
          fileop_ren_file : PGtkWidget;
          button_area : PGtkWidget;
          action_area : PGtkWidget;
       end;
And now the modified code of 'gtkfilesel.pp' file :
  type
     PGtkFileSelection = ^TGtkFileSelection;
     TGtkFileSelection = record
          window : TGtkWindow;
          dir_list : PGtkWidget;
          file_list : PGtkWidget;
          selection_entry : PGtkWidget;
          selection_text : PGtkWidget;
          main_vbox : PGtkWidget;
          help_button : PGtkWidget;<<----
          ok_button : PGtkWidget;<<------ These lines have BEEN swapped
          cancel_button : PGtkWidget;<<--
          history_pulldown : PGtkWidget;
          history_menu : PGtkWidget;
          history_list : PGList;
          fileop_dialog : PGtkWidget;
          fileop_entry : PGtkWidget;
          fileop_file : ^gchar;
          cmpl_state : gpointer;
          fileop_c_dir : PGtkWidget;
          fileop_del_file : PGtkWidget;
          fileop_ren_file : PGtkWidget;
          button_area : PGtkWidget;
          action_area : PGtkWidget;
       end;
after this change, when opening a file, the code appears colorized in a
window.But there is some strange 'empty square' cars which appears also
maybe is a UNIX / Window text conversion problem.

Cliff Baeseman a �crit :

Show quoted text 45 lines
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 _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Cliff Baeseman

Peter

HOw should we approach this problem...???

Should we maybe put a define in the header for the win32 folks. It seems to be a bug in the dll implementation. I confirmed this one before but how should we handle it. We can either adjust in the
component library or in the headers..

Cliff

Earlier message 24 lines
-----Original Message----- From: Peter Vreman To: Date: Saturday, August 07, 1999 7:19 PM Subject: Re: [lazarus] Weird behavior of the day.... > >> i'm developping under win32 and till now, i was unable to see a file >> when i tried to open one ( as result, i had an empty window ). >> To solve this problem, i have swapped some lines of code in the >> 'gtkfilesel.pp' file. >This can't be done, because it's also defined in this order in the C >header file and it'll then bug under linux. Did you also try the swapping >under linux? > > >Peter > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Peter Vreman
to Noel Cuillandre: i'm developping under win32 and till now, i was unable to see a file when i tried to open…
i'm developping under win32 and till now, i was unable to see a file when i tried to open one ( as result, i had an empty window ). To solve this problem, i have swapped some lines of code in the 'gtkfilesel.pp' file.

This can't be done, because it's also defined in this order in the C header file and it'll then bug under linux. Did you also try the swapping under linux?

Peter

Reply by email

Peter Vreman
to Cliff Baeseman: Peter HOw should we approach this problem...??? Should we maybe put a define in the…
you wrote 8 lines
Peter HOw should we approach this problem...??? Should we maybe put a define in the header for the win32 folks. It seems to be a bug in the dll implementation. I confirmed this one before but how should we handle it. We can either adjust in the component library or in the headers..

You ask it on the mailinglist of the win32 port of gtk. They should know more about this.

Reply by email