[fxruby-users] how to use FXCalendar widget

Sergueï Cambour s.cambour at gmail.com
Tue Mar 23 10:01:05 EDT 2010


Hi everyone ! Can anybody explaine me in some lines how to use FXCalendar
component,please.
I tried as follows:

[code]
require 'rubygems'
require 'fox16'
include Fox

class Main < FXMainWindow

  def initialize(app)
    super(app, "AGC - Excel file processing" , :width => 600, :height =>
400)
    add_calendar

  end

  def add_calendar
    FXCalendar.new(self)
  end

  def create
    super
    show(PLACEMENT_SCREEN)
  end

  if __FILE__ == $0
    FXApp.new do |app|
      Main.new(app)
      app.create
      app.run
    end
  end
end

[/code]

and got the beloow exception:
[code]
C:/Documents and Settings/cambose/My
Documents/projects/excel_gui/lib/main.rb:14:in `add_calendar': uninitialized
constant Main::FXCalendar (NameError)
        from C:/Documents and Settings/cambose/My
Documents/projects/excel_gui/lib/main.rb:9:in `initialize'
        from C:/Documents and Settings/cambose/My
Documents/projects/excel_gui/lib/main.rb:24:in `new'
        from C:/Documents and Settings/cambose/My
Documents/projects/excel_gui/lib/main.rb:24
        from
C:/Ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:267:in
`old_initialize'
        from
C:/Ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:267:in
`initialize'
        from C:/Documents and Settings/cambose/My
Documents/projects/excel_gui/lib/main.rb:23:in `new'
        from C:/Documents and Settings/cambose/My
Documents/projects/excel_gui/lib/main.rb:23
[/code]

Any idea how to do that ? Thanks

-- 
Sergueï CAMBOUR
+32-499-36.17.73
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100323/b63ddf01/attachment.html>


More information about the fxruby-users mailing list