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

small (possibly noobish) compile error

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
[insert witty name]



Joined: 19 Sep 2011
Posts: 2

PostPosted: Tue Sep 20, 2011 6:51 pm    Post subject: small (possibly noobish) compile error Reply with quote

i am using gtkd and i seem to be getting compile erros, the compiler seems to object only with scroll.setPolicy (it will compile fine if was to comment out that line) however i would like to set the scrolled window policy to automatic

Code:

auto scroll = new ScrolledWindow();   
scroll.setPolicy(AUTOMATIC,AUTOMATIC);

ScrolledWindow.setPolicy takes 2 arguments of type: GtkPolicyType
and GtkPolicyType is defined as an enum in gtktypes.d

i have tried explicitly importing gtkc.gtkypes but it despite gtktypes.d being the file which the enum is defined i still get the compile error:
Quote:

Error: undefined identifier AUTOMATIC


ps is there a way to do a lazy java style "import foo.*;" instead of having to separately import every single file?, import gtk.*; doesn't seem to be allowed in D
Back to top
View user's profile Send private message
doob



Joined: 06 Jan 2007
Posts: 367

PostPosted: Wed Sep 21, 2011 10:30 am    Post subject: Reply with quote

You have to prefix AUTOMATIC with GtkPolicyType, i.e. GtkPolicyType.AUTOMATIC.

D doesn't not support "import foo.*" out of the box. What you can do is this:
Code:
// foo/all.d
public:

import foo.bar;
import foo.foobar;
// and so on

Then:
Code:
import foo.all;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General 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