View previous topic :: View next topic |
Author |
Message |
teales
Joined: 21 May 2007 Posts: 24 Location: Bangalore
|
Posted: Fri Dec 23, 2011 3:48 am Post subject: Cast from Widget to ColorSelection fails with DMD 2.057 |
|
|
I've posted this to digitalmars.D also.
gtkD has a ColorSelectionDialog class with a method that returns an associated ColorSelection class as a Widget. In COMPO I used to cast this to a ColorSelection, then I could set the initial color and retrieve the result.
The inheritance sequence is:
Widget -> Container -> Box -> VBox -> ColorSelection
OrientableIF ->
that is, Box is derived from Container and OrientableIF.
I've tried a chain of casts, but just the first one
Widget w = dialog.getColorSelection();
gtk.Container.Container ctr = cast(gtk.Container.Container) w;
gets null.
Any suggestions?
Steve |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Sat Dec 24, 2011 3:56 pm Post subject: |
|
|
I don't think that should have ever worked.
I'll change the function to return a ColorSelection. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Sun Dec 25, 2011 6:53 am Post subject: |
|
|
Changed in svn r913. |
|
Back to top |
|
|
teales
Joined: 21 May 2007 Posts: 24 Location: Bangalore
|
Posted: Sun Dec 25, 2011 10:51 am Post subject: |
|
|
Mike,
You forgot to do:
import gtk.ColorSelection;
Steve |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Tue Dec 27, 2011 4:02 pm Post subject: |
|
|
|
|
Back to top |
|
|
|