[java-gnome-hackers] Re: gnome UIInfo problems
Brought to you by:
afcowie
From: Mark H. <mh...@ti...> - 2003-04-11 20:03:58
|
Hi, I've now figured out what the problem is, but don't know how to fix it. This is all in org_gnu_gnome_App.c Many methods require an array of GnomeUIInfo's (not an array of pointers to them). app_getUIInfoArray creates such an array and fills it with copies of the supplied UIInfos (supplied a a jintArray of handles) Methods such as create_toolbar modify the uiinfos in the array (e.g. setting the widget field). This is lost as Java only knows of the original uiinfos. (hmm. we also have a memory leak here -the copies are not freed) So, how do we fix this? One possibility would be to copy everything back to the original uiinfo after calling the gnome method. It is only a few pointers, but seems like an ugly hack. I think UIInfo.setsubMenuInfo might also suffer from these problems. If so, then the above solution would not work - instead we would have to find some way of modifying the handles in the java objects to point to these new copies of UIInfo. Perhaps a better way to look at this would be to have a new object for UIInfoArrays, which would actually be a native array of UIInfo and pass this to the create_menu, etc. methods Any ideas? Have I missed anything? On Fri, 2003-04-11 at 20:32, Mark Howard wrote: > Hi, > When using gnome menus and toolbars, App.createToolbars does not seem > to fill in the widget part of the UIInfos. As such, exceptions are > raised on events from these widgets as the handler cannot construct a > new Widget (using the handle -1). > > Please can somebody more familiar with gnome and the UIInfo code take a > look at this. > > thanks -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |