Problem with circular imports of modules with static ctors an immutable variables

2016-04-14 Thread Uranuz via Digitalmars-d-learn
In my program I have error with circular imports of modules with static ctors. So I decided to move ctors in separate file and import it only from the 1st file. But problem is that in the first file I have immutables that should be initialized in shared static ctor. However doing it from anothe

Dlang UI - making widget extend to the bounds of the window

2016-04-14 Thread stunaep via Digitalmars-d-learn
I'm trying to make a gui program with dlangui, but no matter what I do, I cannot get widgets to fill the whole window. The window is resizable so I cannot just set the widths to static numbers. No layoutWidth and layoutHeight set: http://i.imgur.com/UySt30K.png layoutWidth/Height set to fill (

Re: Overriding a property ?

2016-04-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/14/16 4:54 PM, Lucien wrote: You're right. In fact it didn't work because I did: class A { @property foo() { return false; } void myFunc() { } } class B : A { override @property foo() { return true; } // error override void myFunc() { } }

Re: Overriding a property ?

2016-04-14 Thread Lucien via Digitalmars-d-learn
On Thursday, 14 April 2016 at 20:39:50 UTC, Steven Schveighoffer wrote: On 4/14/16 4:21 PM, Lucien wrote: How can I override a property ? Test code: class A { @property bool foo { return false; } This isn't valid, you need parentheses for foo. This doesn't c

Re: Overriding a property ?

2016-04-14 Thread Satoshi via Digitalmars-d-learn
On Thursday, 14 April 2016 at 20:21:38 UTC, Lucien wrote: How can I override a property ? Test code: class A { @property bool foo { return false; } void myFunc() { ... } } class B : A { override bool foo { return true; } // error override void myFunc

Re: Overriding a property ?

2016-04-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/14/16 4:21 PM, Lucien wrote: How can I override a property ? Test code: class A { @property bool foo { return false; } This isn't valid, you need parentheses for foo. This doesn't compile does it? void myFunc() { ... } } class B : A { overr

Overriding a property ?

2016-04-14 Thread Lucien via Digitalmars-d-learn
How can I override a property ? Test code: class A { @property bool foo { return false; } void myFunc() { ... } } class B : A { override bool foo { return true; } // error override void myFunc() { ... } } Output error: fun

Re: DWT Cloning / Build fails

2016-04-14 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-04-14 15:56, Chris wrote: I had to add ".a" to `-L-l:dwt-base` and `-L-l:org.eclipse.swt.gtk.linux.x86`, and add `-L-lgnomevfs-2` as well. I added `-L-lgnomevfs-2 to the example. I need to look into way the ".a" was needed. -- /Jacob Carlborg

Re: How to run unit tests on Windows?

2016-04-14 Thread jmh530 via Digitalmars-d-learn
On Thursday, 14 April 2016 at 11:43:42 UTC, pineapple wrote: I'm haven't got access to my Windows PC at the moment, but that sounds like it will solve my problem. Thank you! Also, you can use rdmd on Windows if dmd is installed.

Re: DWT Cloning / Build fails

2016-04-14 Thread Chris via Digitalmars-d-learn
For the record, on my Linux (Ubuntu 15), I had to tweak the command for the example: dmd main.d -I/imp -J/org.eclipse.swt.gtk.linux.x86/res -L-L/lib \ -L-l:org.eclipse.swt.gtk.linux.x86.a \ -L-l:dwt-base.a -L-lgtk-x11-2.0 -L-lgdk-x11-2.0 -L-latk-1.0 -L-lgdk_pixbuf-2.0 \ -L-lgthread-2.0

Re: How to run unit tests on Windows?

2016-04-14 Thread pineapple via Digitalmars-d-learn
On Thursday, 14 April 2016 at 10:50:00 UTC, ag0aep6g wrote: Invoked like that, dmd doesn't run the program at all. It just makes an .exe file of it. To run the program simply type its name into the command prompt. So if your source file is foo.d, `dmd foo.d -main -unittest` creates foo.exe, and

Re: How to run unit tests on Windows?

2016-04-14 Thread ag0aep6g via Digitalmars-d-learn
On 14.04.2016 12:39, pineapple wrote: I've had success running unit tests on OSX by running `rdmd --main -unittest [file]` but have had no such luck on Windows. The aforementioned command fails, Should work. If you can go into more detail as to how it fails, maybe we can figure out what's wron

How to run unit tests on Windows?

2016-04-14 Thread pineapple via Digitalmars-d-learn
I've had success running unit tests on OSX by running `rdmd --main -unittest [file]` but have had no such luck on Windows. The aforementioned command fails, and `dmd [file] -main -unittest` seems to run the program without actually executing the unit tests. Help?

Re: DWT Cloning / Build fails

2016-04-14 Thread Chris via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 18:50:22 UTC, Jacob Carlborg wrote: On 2016-04-13 17:23, Jesse Phillips wrote: Looks like your firewall is blocking the git protocol. Checkout dwt without --recursive Modify the .gitmodules file so that https:// urls are used instead of git Run the git submod

Re: Dub and derelict-allegro5 "Could not find a valid dependency tree configuration"

2016-04-14 Thread Pedro Lopes via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 12:34:52 UTC, Mike Parker wrote: On Wednesday, 13 April 2016 at 11:21:25 UTC, Pedro Lopes wrote: In the second paragraph I meant to say: The first library that Derelict-Allegro (not dub) looks for is called: "liballegro_image-5.0.11.so" ... I know dub has nothing

looking for SceneGraph D implementation

2016-04-14 Thread drug via Digitalmars-d-learn
Could somebody point to the D implementation of the scene graph?