How to debug ?

2014-05-24 Thread Derix via Digitalmars-d-learn
OK, I have the newest Eclipse+DDT on Linux. Debugging capabilies look great : https://github.com/bruno-medeiros/DDT/blob/latest/documentation/Features.md#debugging-functionality However so far I haven't been able to step throug source code. What am I missing ? Is there an option to pass to the c

Upgrade woes : Eclipse/DDT/Linux , compile takes forever and other caveats

2014-05-24 Thread Derix via Digitalmars-d-learn
I'm on Linux 64-bit. I recently upgraded Eclipse to 4.3.2 and DDT to 0.10.1 ... and at first I couldn't compile a thing anymore. After googling some more, and burning a few more neurons, I finally gathered some clues and narrowed the quest to the dub.json file. I pieced together the following :

Re: How to debug ?

2014-05-24 Thread Derix via Digitalmars-d-learn
To debug you nee to use -g flag to compiler Thanks, but how ?

Passing a function as an argument to another function : what is this sorcery ?

2014-05-25 Thread Derix via Digitalmars-d-learn
Hello everyone, So I'm "Getting Started With Gtkd" [1] and the tuto includes this piece of code : ... DrawingArea da = new DrawingArea(590, 200); da.addOnDraw(&onDraw); layout.put(da, 5, 30); add(layout); // Add the layout to our main window showAll(); }

On inheritance and polymorphism in cats and dogs (and other beasts too)

2014-12-20 Thread Derix via Digitalmars-d-learn
So, I have this pet project where classes Cat and Dog inherit from the more generic Beast class. All beasts prosper and multiply and so do cats and dogs. The breeding routine is fairly constant across species, with minor variations. So I'd like to define the "breed" method in the Beast class and

Re: On inheritance and polymorphism in cats and dogs (and other beasts too)

2014-12-21 Thread Derix via Digitalmars-d-learn
Thank you kindly for this detailed response. Your directions bore frution, and I now have cats that breed cats (and not dogs). However I can't get rid of the following warning on compilation : |... | void mixGenetics(Cat mother,Cat father) {...} |... Warning: Beast.Beast.mixGenetics(Beast mother

Re: On inheritance and polymorphism in cats and dogs (and other beasts too)

2014-12-21 Thread Derix via Digitalmars-d-learn
Thanks a lot, I begin to see the light ! you aren't overriding anything -- you are /overloading/ Yep, I rekon the difference was not clear to me. It still isn't right now, but at least now I know that it exists and I have to look into it. As to the spell you cast to my cats in your rewriting

Importing a module from another directory

2014-12-27 Thread Derix via Digitalmars-d-learn
I try to compile the basic HelloWorld.d example in which I only added import Journal; where Journal is a module I defined in Journal.d in another directory. So I have /home/derix/development/publishing/journal/journal.d and /home/derix/development/examples/helloworld/main.d I work with M

Re: Importing a module from another directory

2014-12-27 Thread Derix via Digitalmars-d-learn
But of course ! I should have thought of this myself. Subsequent question though : what is the -I option for ? The dmd embedded help states -Ipath where to look for imports so I'd naively think it would work too, but it yields the same error as above.

Re: Importing a module from another directory

2014-12-27 Thread Derix via Digitalmars-d-learn
OK thanks.

Learning to XML with D

2015-02-06 Thread Derix via Digitalmars-d-learn
So, I set sails to transform a bunch of HTML files with D. This, of course, will happen with the std.xml library. There is this nice example : http://dlang.org/phobos/std_xml.html#.DocumentParser that I put to some use already, however some of the basics seem to escape me, specially in lines li

Re: Learning to XML with D

2015-02-09 Thread Derix via Digitalmars-d-learn
What I don't quite grab is the construct (in Element e) , especially the *in* part. Function parameters in D can be qualified as in or out, optionally: But of course. Actually I kinda found out just a little while after posting the question. Asking questions is a great way to figure out th

Re: Learning to XML with D

2015-02-09 Thread Derix via Digitalmars-d-learn
my dom.d works in a familiar way OK, will check it useful for scraping html sites. Not exactly what I'm doing, but close. I'm in the midst of a self-training spree, and what I use as test-tubes fodder is the following : a collection of 300+ html files constituting an electronic version of a