<!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> </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> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>class
MyGridTableBase < GridTableBase<BR> <BR> def
initialize rowObjs, objType<BR> @objType =
objType<BR> @rowObjs = rowObjs<BR> @colNames
= ["aa", "bb"]<BR> end</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2> def
get_attr row, col, attr_kind<BR> # todo<BR>
""<BR> end<BR> <BR> def get_number_rows<BR>
return @rowObjs.size<BR> end<BR> <BR> def
get_number_cols<BR> return @colNames.size<BR>
end<BR> <BR> def get_col_label_value col<BR>
return @colNames[col]<BR> end<BR> <BR> def is_empty_cell row,
col<BR> return false <BR>
end</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2> def
get_value row, col<BR> @rowObjs[col]<BR>
end</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2> def
set_value row, col, value <BR> end</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>end</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>class TestWin <
Frame<BR> def initialize *args<BR>
super(*args)<BR> StaticText.new self, -1, "Test Test
Test"<BR> @g = Grid.new self<BR> @gt =
MyGridTableBase.new ["aa", "bb"], String<BR>
@g.set_table(@gt) ## !!!!!!!!!!!!!!!!!!!!!!!!</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>
end<BR> <BR>end</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>class TestApp <
Wx::App<BR> def on_init<BR> frame = TestWin.new(nil, -1,
"Grid Sample",Wx::Point.new(10,
100),Wx::Size.new(630,400))<BR>
set_top_window(frame)<BR> frame.show()<BR>
end<BR>end</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </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> </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> </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> </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. 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> g = Grid.new<BR> gt = MyGridTablebBase.new<BR>
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> <<A
href="mailto:Franz.Irlweg.ZNT@wacker.com">Franz.Irlweg.ZNT@wacker.com</A>>
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> </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> <br>
Siltronic AG, Sitz München, Hanns-Seidel-Platz 4, 81737 München, Germany. Amtsgericht Mü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>