[fxruby-users] foxGUIb and the displaying of a dialogbox
dglnz at yahoo.com
Mon Jul 13 21:31:45 EDT 2009
Yes it's not shown here but i did try that too.
The errors where reduced to 1 or 2 lines.
I will when i get home tonight do this excercise again and post the error/s generated but still reflects
the fact that i'm not doing something right because it points to the @topwin, :@topwin,mainWindow.topwin as being an undefined method.
I noticed in the example 7 code that the creation of the dialog object points to the class but when i tried that i again got errors so thought best to post what i did looking for someone to say ....
Oh ya yo've gotta do @dailogbox = Fox::fxdialog.new(....)
as said will post in another email further code and the errors i get and hopefully it'll be an light turning on for someone who can then show me my error.
--- On Tue, 14/7/09, Meinrad Recheis <meinrad.recheis at gmail.com> wrote:
> From: Meinrad Recheis <meinrad.recheis at gmail.com>
> Subject: Re: [fxruby-users] foxGUIb and the displaying of a dialogbox
> To: fxruby-users at rubyforge.org
> Received: Tuesday, 14 July, 2009, 5:31 AM
> On Mon, Jul 13,
> 2009 at 11:34 AM, dave L <dglnz at yahoo.com>
> Hi folks,
> Using foxGUI for the graphical layout of my user screen.
> And have another file for the event handling.
> I am very new to FXRuby and have asked Meinrad for advise
> off list but so far i've failed to grasp things.
> below is a snippet of code from my event handling file and
> would like advice as to fixing the current errors for that.
> I have read but don't full understand the code for
> example 7 - dialogbox in so far as how it links to mine.
> require 'sqlite3_calls.rb'
> require 'monitordxlog'
> require 'monitorscreen'
> class Fxwindow_code < MainWindow
> def initialize(parent)
> # the 3 lines below i saw in Meinrads code for docman.rb so
> thought to try it out.
> @Dialog=DialogBox.new @parent
> @mydb = Dbase.new
> def init
> # sample code given to me by Meinrad as
> being possibly correct
> # I've tried both variants -
> Fox::FX.... and FX::D... both failing to display the
> # dialogbox.
> #dialog = Fox::FxDialogBox.new( :@topwin) # or
> if @textfield1.text.length == 2
> @text2.text = '10 max chars
> errors are
> >ruby mymainwin.rb
> `old_initialize': No matching function for overloaded
> 'new_FXDialogBox' (ArgumentError)
> from ./monitordxlog.rb:11:in `new'
> from ./monitordxlog.rb:11:in
> from ./monitordxlog.rb:5:in `initialize'
> from mymainwin.rb:10:in `new'
> from mymainwin.rb:10:in
> from mymainwin.rb:53:in `new'
> from mymainwin.rb:53
> >Exit code: 1
> it should be @topwin (a foxguib generated
> instance variale pointing to the top most widget of a
> foxguib class), not :@topwin which is simply a symbol.
> -- henon
> -----Inline Attachment Follows-----
> fxruby-users mailing list
> fxruby-users at rubyforge.org
More information about the fxruby-users