View previous topic :: View next topic |
Author |
Message |
[insert witty name]
Joined: 19 Sep 2011 Posts: 2
|
Posted: Tue Sep 20, 2011 6:51 pm Post subject: small (possibly noobish) compile error |
|
|
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 |
|
|
doob
Joined: 06 Jan 2007 Posts: 367
|
Posted: Wed Sep 21, 2011 10:30 am Post subject: |
|
|
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:
|
|
Back to top |
|
|
|