RE: [java-gnome-hackers] Constructor for org.gnu.gtk.ProgressBar
Brought to you by:
afcowie
From: Jeffrey M. <Jef...@Br...> - 2002-09-09 12:05:18
|
I have added the constructor to ProgressBar. The need to construct a widget from a native handle is prevalent through the library. Every method that returns a widget needs this capability. I don't like the fact that we have created these public constructors but I haven't been able to think of a better solution. -Jeff > I'm working on filling out org.gnu.gnome.AppBar. One of the native > functions is gnome_appbar_get_progress, which returns a handle to the > GtkProgressbar used by AppBar. Is it possible to get a constructor > created so that I can construct an ProgressBar widget from > the handle? > > One of the biggest problems is that it would have to be public since I > need to call it from a org.gnu.gnome package class. I > dislike this kind > of constructor being public. Maybe, I can implement > org.gnu.gtk.ProgressBar's methods in org.gnu.gnome.AppBar and call the > appropriate Progressbar native calls with the handle returned by > gnome_appbar_get_progress. Honestly, I like this even less than the > public constructor that takes an int for handle. It defeats the whole > idea of object oriented programming, but it's a suggestion. > > Does anyone else have any suggestions? Maybe, the user of > our bindings > doesn't need to use the ProgressBar inside of AppBar. > However, I think > we're going to have to answer this question at some point since there > are other composite widgets. > > -- > Philip A. Chapman > |