The code you posted worked fine for me as soon as I added:
require ''fox16/calendar''
I am not sure why require ''fox16'' isn''t including the
FXCalendar object.
Perhaps a bug?
I hope this helps you,
--Joey
On Tue, Mar 23, 2010 at 10:01 AM, Sergue? Cambour <s.cambour at
gmail.com>wrote:
> 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
>
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
--
If you are not the intended recipient, you are hereby notified
that any dissemination, distribution, copying or other use of
this communication is strictly prohibited. If you have
received this communication in error, please notify us
immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/fxruby-users/attachments/20100323/575da872/attachment.html>