Re: [Fxruby-users] Strange Behaviour under Win32 with FXRuby
Status: Inactive
Brought to you by:
lyle
From: Stef T <st...@ch...> - 2003-12-10 19:03:49
|
Lyle wrote: > I don't *see* anything that looks wrong, but it's hard to tell without > having all of the code in hand and thus being able to reproduce the > problem(s). If you'd like to send the rest of the code (everything > needed to run it), I can take a look. [Probably best to send it off-list.] > Actually, i went back to a tried and tested debugging technique called 'remarking' :) Basically, an earlier version was working as expected under Win32, so checked it out from CVS, compared the differences and one by one remarked out the bits and re-ran it. Not the most scientific approach, granted, but i narrowed it down to the 4 buttons newly added at the bottom. Here is one of them: XButton.new(bot2_hform, "Store", nil, self, 0, FRAME_RAISED|LAYOUT_FILL_X) for some reason, i was passing in 'self' instead of 'nil'. Changing that fixed it all up and now the program is layed out as desired. FXRuby is not my usual widget toolkit (i am a glade/gtk person by nature) so sorry if this is also causing some confusion with my code :) (of course, for Win32, gtk is jst awful, whereas Fox works very well :) One last teeny tiny probably stupid question, which i know breaks OO design but, how would i tie a 'connect' onto a button from another class ? Can you typecast the connect so that it knows its going onto a FXButton in an instance variable or is there a 'widget controller' which i can query to get an FXButton 'handle' passed to me ? (i have a single login/password dialog, and depending on where the person 'okays', i want to run a different method in different classes, if you see what i mean :) Sorry for the really 'clumsy' way of doing this :) Many thanks and best regards Stef |