[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

FXTreeList-App crashes

Jörg Abelshauser

2/22/2007 12:15:00 PM

My FX-Application crashes, when I update an FXTreeItem-Icon in an
FXTreeList (setopenIcon / setClosedIcon) with an event-method
(right-mouse-click).
Does anybody have an idea ?

--
Posted via http://www.ruby-....

4 Answers

David Vallner

2/22/2007 1:08:00 PM

0

On Thu, 22 Feb 2007 13:15:13 +0100, Jörg Abelshauser
<joerg.abelshauser@freenet.de> wrote:

> My FX-Application crashes, when I update an FXTreeItem-Icon in an
> FXTreeList (setopenIcon / setClosedIcon) with an event-method
> (right-mouse-click).
> Does anybody have an idea ?
>

Run it with regular ruby.exe instead of rubyw.exe (if on Windows) to get
some details about the crash?

David Vallner

Jörg Abelshauser

2/22/2007 1:25:00 PM

0

David Vallner wrote:
> On Thu, 22 Feb 2007 13:15:13 +0100, Jörg Abelshauser
> <joerg.abelshauser@freenet.de> wrote:
>
>> My FX-Application crashes, when I update an FXTreeItem-Icon in an
>> FXTreeList (setopenIcon / setClosedIcon) with an event-method
>> (right-mouse-click).
>> Does anybody have an idea ?
>>
>
> Run it with regular ruby.exe instead of rubyw.exe (if on Windows) to get
> some details about the crash?
>
> David Vallner

not really helpful:
FxGui.rb:547: [BUG] Segmentation fault
ruby 1.8.2 (2004-12-25) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.

Further, here is the code-snippet, which is called when
right-mouse-click at an tree-item:

item = @tree.getFirstItem

if @toggle != 8
@tree.setItemText(item, "Bla")
icon = makeIcon("testnode.ico")
@tree.setItemClosedIcon(item, icon)
@toggle = 8
else
@tree.setItemText(item, "Boing")
icon = makeIcon("testnode.ico")
@tree.setItemClosedIcon(item, icon)
@toggle = 7
end

regards Jörg

--
Posted via http://www.ruby-....

Jörg Abelshauser

2/23/2007 8:48:00 AM

0

...has helped ! Thanks a lot!
but it's not obvious from the docs. Whats's the difference between the
constructor and the create-method, the 1st icon , which i commit to the
item doesn't need the create-method ???

regards Joerg

--
Posted via http://www.ruby-....

Raj Sahae

2/23/2007 9:12:00 AM

0

When you initially create the application, all children of the app are
created automatically.
If you add any new children after the initial App.create and you attempt
to access/display them, they have to be created, which you have to do
manually. I made this mistake before too.

Raj

Jörg Abelshauser wrote:
> ...has helped ! Thanks a lot!
> but it's not obvious from the docs. Whats's the difference between the
> constructor and the create-method, the 1st icon , which i commit to the
> item doesn't need the create-method ???
>
> regards Joerg
>
>