[fxruby-users] No accelTable for an FXTabItem?

Jeroen van der Zijp jeroen at fox-toolkit.org
Fri Feb 16 08:31:03 EST 2007


On Friday 16 February 2007 06:21, Philippe Lang wrote:
> Hi,
> 
> Here is a small test application made up of an FXMainWindow, where you
> can find an FXTabBook and three items inside.
> 
> I can add "keyboard accelerators" in the main window. It works just
> fine.
> 
> But I'm unable to do the same in the FXTabItem class. If I call
> "accelTable.addAccel" in the MyTabItem class, the error I get is:
> 
> ------------------------------
> test.rb:17:in `initialize': undefined method `addAccel' for nil:NilClass
> (NoMeth
> odError)
>         from test.rb:33:in `new'
>         from test.rb:33:in `initialize'
>         from test.rb:53:in `new'
>         from test.rb:53
> ------------------------------
> 
> Apparently, accelTable is not initialized in the FXTabItem class.
> 
> FXTabItem is derived from FXWindow and should have an accelTable
> attribute, right?

It has a variable for accel table, but no accel table has been added
yet.  However, after you add an accel table, you should certainly
be able to add accelerator key-combinations to it then!


		- Jeroen


-- 
+----------------------------------------------------------------------------+
| Copyright (C) 07:20 02/16/2007 Jeroen van der Zijp.   All Rights Reserved. |
+----------------------------------------------------------------------------+


More information about the fxruby-users mailing list