FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can't set model of CellRendererCombo.

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
brianhsu



Joined: 17 Jan 2007
Posts: 9
Location: Taiwan

PostPosted: Sun Feb 04, 2007 2:58 am    Post subject: Can't set model of CellRendererCombo. Reply with quote

Hello, I'm here again. Wink

I'm trying use ComboBox in some columns of TreeView, so I created a column using CellRendererCombo.

Since CellRendererCombo needs access GObject property directly, so my code looks lile:

Code:

CellRendererCombo cell = new CellRendererCombo();
ListStore list = new ListStore([GtkType.STRING]);

cell.setProperty("editable", true);
cell.setProperty("model", store); // this faild


Compiler tell me that
Quote:
Error: cannot implicitly convert expression ((this.this).store) of type gtk.ListStore.ListStore to gobject.Value.Value


I also tried create an gobject.Value of GType.POINTER or GType.G_OBJECT, it can be compiled, but will have run time warning and doesn't work correctly.

So, what should I check?

BTW, maybe this could be wrapped in the future version as a syntax sugar?[/code]
Back to top
View user's profile Send private message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Sun Feb 04, 2007 2:14 pm    Post subject: Reply with quote

Quote:
Error: cannot implicitly convert expression ((this.this).store) of type gtk.ListStore.ListStore to gobject.Value.Value


It can't be done implicitly, so why not do it explicitely? Wink

maybe try:

cast(gobject.Value.whatever) store
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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