<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=996024912-28012008>Hello,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=996024912-28012008>ok, it was only a code snippet, but normally it should 
run in a window, like in the code below:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=996024912-28012008>I'm running Windows XP and i always get the error: 
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=996024912-28012008><STRONG>in `set_table': in method 'SetTable', argument 
2 of type 'wxGridTableBase *' 
(ObjectPreviouslyDeleted)</STRONG></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>require 'wx' 
<BR>include Wx </FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>class 
MyGridTableBase&nbsp; &lt; GridTableBase<BR>&nbsp; <BR>&nbsp; def 
initialize&nbsp; rowObjs, objType<BR>&nbsp;&nbsp;&nbsp; @objType = 
objType<BR>&nbsp;&nbsp;&nbsp; @rowObjs = rowObjs<BR>&nbsp;&nbsp;&nbsp; @colNames 
=&nbsp; ["aa", "bb"]<BR>&nbsp; end</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>&nbsp; def 
get_attr row, col, attr_kind<BR>&nbsp;&nbsp;&nbsp; # todo<BR>&nbsp;&nbsp;&nbsp; 
""<BR>&nbsp; end<BR>&nbsp; <BR>&nbsp; def get_number_rows<BR>&nbsp;&nbsp;&nbsp; 
return @rowObjs.size<BR>&nbsp; end<BR>&nbsp; <BR>&nbsp; def 
get_number_cols<BR>&nbsp;&nbsp;&nbsp; return @colNames.size<BR>&nbsp; 
end<BR>&nbsp; <BR>&nbsp; def get_col_label_value col<BR>&nbsp;&nbsp;&nbsp; 
return @colNames[col]<BR>&nbsp; end<BR>&nbsp; <BR>&nbsp; def is_empty_cell row, 
col<BR>&nbsp;&nbsp;&nbsp; return false&nbsp;&nbsp;&nbsp; <BR>&nbsp; 
end</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>&nbsp; def 
get_value row, col<BR>&nbsp;&nbsp;&nbsp; @rowObjs[col]<BR>&nbsp; 
end</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>&nbsp; def 
set_value row, col, value&nbsp;&nbsp; <BR>&nbsp; end</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>end</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>class TestWin &lt; 
Frame<BR>&nbsp; def initialize *args<BR>&nbsp;&nbsp;&nbsp; 
super(*args)<BR>&nbsp;&nbsp;&nbsp; StaticText.new self, -1, "Test Test 
Test"<BR>&nbsp;&nbsp;&nbsp; @g = Grid.new self<BR>&nbsp;&nbsp;&nbsp; @gt = 
MyGridTableBase.new ["aa", "bb"], String<BR>&nbsp;&nbsp;&nbsp; 
@g.set_table(@gt)&nbsp;&nbsp; ## !!!!!!!!!!!!!!!!!!!!!!!!</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>&nbsp; 
end<BR>&nbsp;&nbsp; <BR>end</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>class TestApp &lt; 
Wx::App<BR>&nbsp; def on_init<BR>&nbsp;&nbsp;&nbsp; frame = TestWin.new(nil, -1, 
"Grid Sample",Wx::Point.new(10, 
100),Wx::Size.new(630,400))<BR>&nbsp;&nbsp;&nbsp; 
set_top_window(frame)<BR>&nbsp;&nbsp;&nbsp; frame.show()<BR>&nbsp; 
end<BR>end</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2>TestApp.new.main_loop()</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2># App.new do<BR># 
end<BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=996024912-28012008><FONT face=Arial color=#0000ff size=2>Best 
regards,</FONT></SPAN></DIV>
<DIV><SPAN class=996024912-28012008><FONT face=Arial color=#0000ff 
size=2>Franz</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff 
size=2></FONT><BR>&nbsp;</DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> wxruby-users-bounces@rubyforge.org 
  [mailto:wxruby-users-bounces@rubyforge.org] <B>On Behalf Of </B>Mario 
  Steele<BR><B>Sent:</B> Monday, January 28, 2008 12:33 PM<BR><B>To:</B> General 
  discussion of wxRuby<BR><B>Subject:</B> Re: [wxruby-users] 
  GridTableBase<BR></FONT><BR></DIV>
  <DIV></DIV>If this is all top level code, you need to initialize the Wx::App 
  class first.&nbsp; When I try this, and change the bottom part where you 
  create the new grid and gridtablebase, it runs alright.<BR><BR>App.new 
  do<BR>&nbsp; g = Grid.new<BR>&nbsp; gt = MyGridTablebBase.new<BR>&nbsp; 
  g.set_table(gt)<BR>end<BR><BR>What platform are you running on?<BR><BR>
  <DIV><SPAN class=gmail_quote>On 1/28/08, <B class=gmail_sendername>Irlweg, 
  Franz (ZNT)</B> &lt;<A 
  href="mailto:Franz.Irlweg.ZNT@wacker.com">Franz.Irlweg.ZNT@wacker.com</A>&gt; 
  wrote:</SPAN>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><FONT 
    face=Arial color=#0000ff 
size=2></FONT>&nbsp;</BLOCKQUOTE></DIV></BLOCKQUOTE><pre></PRE><html><P><SPAN style="FONT-SIZE: 8pt"><FONT color=#000000><FONT face=Arial>
This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from <br>  disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed. <br>
If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited. <br>
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. <br> 
Thank you for your cooperation. Please contact your local IT staff or email <a href="mailto:info@siltronic.com?subject=Disclaimer">info@siltronic.com</a> if you need assistance.
<br>&nbsp;<br>
Siltronic AG, Sitz M&uuml;nchen, Hanns-Seidel-Platz 4, 81737 M&uuml;nchen, Germany. Amtsgericht M&uuml;nchen HRB 150884
<br>
Vorstand: Wilhelm Sittenthaler (Vorsitz), Gerhard Brehm, Paul Lindblad, Joachim Manke, Michael Peterat. Vorsitzender des Aufsichtsrats: Peter-Alexander Wacker
</FONT></FONT></SPAN></P></html>
</pre></BODY></HTML>