[fxruby-users] Uncaught bounce notification

Lyle Johnson lyle at knology.net
Tue Sep 5 08:16:21 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sep 4, 2006, at 1:32 PM, Jeroen van der Zijp wrote:

>
>> Hi,
>>
>> I'm using FOXRuby Tabbook to display some different frames.
>>
>> As part of my GUI options I have to replace sometime the frames I  
>> choose
>> to display on the tab book.
>>
>> The problem is that when I'm trying to remove a frame (and it's
>> FXTabItem) for some reason the garbage collector does not free its  
>> place
>> in the memory.
>>
>> This, eventually, slow down my GUI.
>>
>> I destroy both the page and it's tab item when I remove them from the
>> tab item.
>>
>
>
> FXRuby related questions should be directed at the fxruby mailing  
> list;
> I forwarded it to Lyle, who is the resident FXRuby Guru....

In order to remove a frame (or any other child window), you should  
use the removeChild() method, e.g.

	tabBook.removeChild(tab1)
	tabBook.removeChild(frame1)

As you've discovered, the destroy() method destroys the server-side  
resource but doesn't actually get rid of the client-side (Ruby)  
object. You need to use removeChild().

Hope this helps,

Lyle

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFE/WqVFXV/hD6oMd0RAhFnAKCL3hWlQ9CkUmCgibie7LKLIBADHwCfWuXc
e8KyHhQNrGfrH4PBEYTfUHs=
=MeVV
-----END PGP SIGNATURE-----


More information about the fxruby-users mailing list