[wxruby-users] GridTableBase

Mario Steele mario at ruby-im.net
Mon Jan 28 06:33:10 EST 2008


If this is all top level code, you need to initialize the Wx::App class
first.  When I try this, and change the bottom part where you create the new
grid and gridtablebase, it runs alright.

App.new do
  g = Grid.new
  gt = MyGridTablebBase.new
  g.set_table(gt)
end

What platform are you running on?

On 1/28/08, Irlweg, Franz (ZNT) <Franz.Irlweg.ZNT at wacker.com> wrote:
>
>  Hello all,
> i'm using wxruby 1.9.4  with Grid and the model class: "GridTableBase"
> like in the code below. But the method set_table of the grid does'nt work.
> Can anyone help me?
>
> require 'wx'
> include Wx
>
> class MyGridTableBase  < GridTableBase
>   def get_attr row, col, attr_kind
>     ##
>   end
>
>   def get_number_rows
>     0
>   end
>
>   def get_number_cols
>     0
>   end
>
>   def get_col_label_value col
>     return "empty"
>   end
>
>   def is_empty_cell row, col
>     return false
>   end
>
>   def get_value row, col
>     return "empty"
>   end
> end
>
> g = Grid.new
> gt = MyGridTableBase.new
> g.set_table gt
>
> # i get one of this errors:
> # TypeError: in method 'SetTable', argument 2 of type 'wxGridTableBase *'
> # or a "unknown software exception" (0xc0000094)  on 0x030dc124      is
> thrown
>
> Best Regards,
> Franz
>
> This communication and any files or attachments transmitted with it may
> contain information that is copyrighted or confidential and exempt from
> disclosure under applicable law. It is intended solely for the use of the
> individual or the entity to which it is addressed.
> If you are not the intended recipient, you are hereby notified that any
> use, dissemination, or copying of this communication is strictly prohibited.
>
> If you have received this communication in error, please notify us at once
> so that we may take the appropriate action and avoid troubling you further.
> Thank you for your cooperation. Please contact your local IT staff or
> email info at siltronic.com <info at siltronic.com?subject=Disclaimer> if you
> need assistance.
>
> Siltronic AG, Sitz München, Hanns-Seidel-Platz 4, 81737 München, Germany.
> Amtsgericht München HRB 150884
> Vorstand: Wilhelm Sittenthaler (Vorsitz), Gerhard Brehm, Paul Lindblad,
> Joachim Manke, Michael Peterat. Vorsitzender des Aufsichtsrats:
> Peter-Alexander Wacker
>
> _______________________________________________
> 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/
http://rubyforge.org/projects/vwmc/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20080128/04ae25ec/attachment.html 


More information about the wxruby-users mailing list