Hey guys,
Sorry, been busy with RL. Actually, you just need to define wxID_EXIT, and
wxID_ABOUT in the wxFormBuilder. On the Ruby side, you need to use
Wx::ID_EXIT and Wx::ID_ABOUT to catch it. This is cause of the naming
conventions, and how Ruby doesn''t allow constants to be formed with a
lowercase first letter. EG: All constants, classes, and modules need to
start their first character as an Uppercase letter. Ruby will throw a tissy
fit when you don''t do this.
Again, sorry for the late reply.
On Tue, Oct 27, 2009 at 8:44 AM, Alex Fenton <alex at pressure.to> wrote:
> Timo Springmann wrote:
>
>> actually I''m trying to generate my UI with wxFormBuilder. But
I haven''t
>> managed to create correct plattform-independent Quit- and
About-Menuitem
>> with the correct IDs (Wx::ID_EXIT, Wx::ID_ABOUT). Can anyone tell me
how to
>> do this?
>>
>
> I haven''t used wxFormBuilder. But looking at the screenshots,
there is a
> box in a panel on the right-hand side called "Object Properties".
At the top
> of the yellow tinted section in this list of properties, there is an entry
> called "id" which I guess has the default value
"wxID_ANY". To use one of
> the standard ids, change this to wxID_EXIT, wxID_ABOUT.
>
> Generally to map from C++ constant and class names to Ruby, replace the
> preceding wx (lower case) with Wx:: (module name).
>
> C++ -> Ruby
> wxWindow -> Wx::Window
> wxID_EXIT -> Wx::ID_EXIT
>
>
> a
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
--
Mario Steele
http://www.trilake.net
http://www.ruby-im.net
http://rubyforge.org/projects/wxruby/
http://rubyforge.org/projects/wxride/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/wxruby-users/attachments/20091027/ed8ed852/attachment.html>