How do you set the stack level on Windows?

R

Rich

I'm wanting to not get the error - 'SystemStackError' ...

Here's my code:

require 'fox'
include Fox
theApp=FXApp.new
mainwin=FXMainWindow.new(theApp, "My
X.N.",nil,nil,DECOR_ALL,10,10,600,600,0,4,0,4)
mb=FXMenubar.new(mainwin,LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,0,0,0,0,0,0,0,
0)
fm=FXMenuPane.new(mb)
FXMenuCommand.new(fm,"&Quit\tCtl-Q",nil,theApp,FXApp::ID_QUIT);
FXMenuTitle.new(mb,"&File",nil,fm);
hf=FXHorizontalFrame.new(mainwin,LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LA
YOUT_FILL_Y|PACK_UNIFORM_WIDTH)
$tl=FXTreeList.new(hf,1,nil,0,LAYOUT_FILL_X|LAYOUT_FILL_Y|TREELIST_SHOWS_LIN
ES|TREELIST_SHOWS_BOXES|TREELIST_ROOT_BOXES)

$x=File.open("002.xml")
def populateDisplay(pi)
if(!$x.eof)
l=$x.gets.strip
if(l=="" || l.include?("<!")) then l="<WHITESPACE/>" end
c=$tl.addItemLast(pi,l)
if(l.index("</")==0 || l=="<WHITESPACE/>") then c.text="" end
if(!l.include?("/"))
populateDisplay(c)
else
if(l.strip.index("</")==0)
if(c.parent!=nil) then populateDisplay(c.parent.parent) end
else
populateDisplay(c.parent)
end
end
end
end
c=$tl.addItemLast(nil,$x.gets.strip)
begin # I don't want to have to put this in
populateDisplay(c)
rescue SystemStackError # I don't want to have to put this in
end # I don't want to have to put this in
FXTooltip.new(theApp)
theApp.create
mainwin.show(PLACEMENT_SCREEN)
theApp.run

Suggestions? (Remember - I'm a hobbyist programmer, so please be nice...
:) )

-Rich
 
R

Rich

Thanks for the quick response!!

I actually walked away for a few hours and get the solution... use the
existing each_line method. :)

Now I've got an FXTreeList that displays basic XML nesting! All within the
first 2 days of seeing FOX... I'm very impressed.

-Rich


----- Original Message -----
From: "Lyle Johnson" <[email protected]>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <[email protected]>
Sent: Saturday, December 20, 2003 10:36 AM
Subject: Re: How do you set the stack level on Windows?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top