View previous topic :: View next topic |
Author |
Message |
brianhsu
Joined: 17 Jan 2007 Posts: 9 Location: Taiwan
|
Posted: Thu Feb 01, 2007 3:20 am Post subject: Shouldn't gtk.Editable an interface? |
|
|
Sorry for my poor English.
I'm trying develop an application using DUIT, and found some bugs of DUIT.
I'm not very familiar with D and how D interface with C Library, so I can't patch it myself, what I can do is just point out what problem I found.
In GTK+, GtkEntry inherit GtkWidget and implement GtkEditable [INTERFACE], so GtkEntry would have signal handler of GtkEditable(eg.changed/delete-text/insert-text).
These signal is very useful when developing application.
But gtk.Entry of DUIT only inherit Widget, so it doesn't have signal listed above.
Since D doesn't support multiple inheritance, my work around is copy all codes of signals part in Editable into Entry and recompile DUIT.
It works fine, but seems not the best way to solve this problem.
Despite this, shouldn't gtk.Editable an interface?
There are at least three GTK+ Widgets(GtkEntry,GtkSpinButton,GtkText) inherit GtkWidget and implement GtkEditable in GTK+ library. |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Thu Feb 01, 2007 12:42 pm Post subject: Re: Shouldn't gtk.Editable an interface? |
|
|
brianhsu wrote: | Sorry for my poor English.
I'm trying develop an application using DUIT, and found some bugs of DUIT.
I'm not very familiar with D and how D interface with C Library, so I can't patch it myself, what I can do is just point out what problem I found. | Thank you!
brianhsu wrote: | In GTK+, GtkEntry inherit GtkWidget and implement GtkEditable [INTERFACE], so GtkEntry would have signal handler of GtkEditable(eg.changed/delete-text/insert-text).
These signal is very useful when developing application.
But gtk.Entry of DUIT only inherit Widget, so it doesn't have signal listed above.
Since D doesn't support multiple inheritance, my work around is copy all codes of signals part in Editable into Entry and recompile DUIT.
It works fine, but seems not the best way to solve this problem.
Despite this, shouldn't gtk.Editable an interface?
There are at least three GTK+ Widgets(GtkEntry,GtkSpinButton,GtkText) inherit GtkWidget and implement GtkEditable in GTK+ library. |
GtkEditable should be a mixin in Duit.
There are other cases, like TreeModel.
All those will be changed (hopefully in the near future).
And
PS: the rename to gtkD is comming out, try to grab gtkD from http://dsource.org/projects/dui/browser/trunk/gtkD |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|