Re: [TkD] X11 Error(Possible bug?)

2014-12-25 Thread Jack via Digitalmars-d-learn
On Friday, 26 December 2014 at 07:23:34 UTC, Rikki Cattermole wrote: On 26/12/2014 6:58 p.m., Jack wrote: Complete error code here: http://codepad.org/KcW7jhXl Apparently, there exists an incompatibility. Take note, I just listed tkd as a dependency on my dub.json, and I haven't really used th

Re: [TkD] X11 Error(Possible bug?)

2014-12-25 Thread Rikki Cattermole via Digitalmars-d-learn
On 26/12/2014 6:58 p.m., Jack wrote: Complete error code here: http://codepad.org/KcW7jhXl Apparently, there exists an incompatibility. Take note, I just listed tkd as a dependency on my dub.json, and I haven't really used the library as of the time of its building. So, is this a bug? Short ans

[TkD] X11 Error(Possible bug?)

2014-12-25 Thread Jack via Digitalmars-d-learn
Complete error code here: http://codepad.org/KcW7jhXl Apparently, there exists an incompatibility. Take note, I just listed tkd as a dependency on my dub.json, and I haven't really used the library as of the time of its building. So, is this a bug?

Discount Kitchens Sale

2014-12-25 Thread MosQuiTos007 via Digitalmars-d-learn
Discount Kitchens Sale. Thirty Ex Display Kitchens To Clear. www.exdisplaykitchens1.co.uk £ 595 Each with appliances.Tel 01616-694785 [URL=http://cutpricekitchenss.co.uk]Discount Kitchens Sale[/URL]

Discount Kitchens UK

2014-12-25 Thread nomgowez via Digitalmars-d-learn
Discount Kitchens UK. Thirty Ex Display Kitchens To Clear. www.exdisplaykitchens1.co.uk £ 595 Each with appliances.Tel 01616-694785

How to avoid invalid memory operation errors (and more) in DLLs?

2014-12-25 Thread Heinz via Digitalmars-d-learn
Hello everyone, I'm making a big framework with D2 (DMD 2.066.1) and I've been encountering many errors related to threads in DLLs. My program flow is a main exe wich statically loads a main dll, then this main dll dynamically loads an extra dll and then this extra dll dynamically loads a final

Re: opDispatch

2014-12-25 Thread Tobias Pankrath via Digitalmars-d-learn
On Thursday, 25 December 2014 at 16:41:51 UTC, Danny wrote: Not sure how that works together with opDispatch. I am not sure why you see safety reasons at compile time though. Hmm, I'm not really worried about safety in this case (in many other slightly different scenarios I am). More worried a

Re: opDispatch

2014-12-25 Thread Danny via Digitalmars-d-learn
Not sure how that works together with opDispatch. I am not sure why you see safety reasons at compile time though. Hmm, I'm not really worried about safety in this case (in many other slightly different scenarios I am). More worried about strange Unicode characters in fields I have no control

Re: opDispatch

2014-12-25 Thread Tobias Pankrath via Digitalmars-d-learn
On Thursday, 25 December 2014 at 16:24:10 UTC, Danny wrote: Adam: Thanks, that was very illuminating! I tried and these work indeed. Is there a function like opDispatch which can be used (at compile time) to refer to something by name wh ether or not it's custom? (to access something like "va

Re: opDispatch

2014-12-25 Thread Danny via Digitalmars-d-learn
Adam: Thanks, that was very illuminating! I tried and these work indeed. Is there a function like opDispatch which can be used (at compile time) to refer to something by name whether or not it's custom? (to access something like "value.a" safely. mixin and string concatenation looks like woul

Re: opDispatch

2014-12-25 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 25 December 2014 at 16:02:48 UTC, Danny wrote: Tobias: Thanks! Your version works. But now it's read-only. Make the opDispatch function return ref and then you can write to it. Alternatively, write a second setter opDispatch overload: T opDispatch(string name, T)(T rhs) {

Re: opDispatch

2014-12-25 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 25 December 2014 at 15:59:44 UTC, Danny wrote: I can only think: And? It's right there... it's a class instance, it has 'this'. There's no this at compile time though which is why it complains. What you're trying to do is an expression alias which D doesn't support (and sometimes

Re: opDispatch

2014-12-25 Thread Danny via Digitalmars-d-learn
Tobias: Thanks! Your version works. But now it's read-only.

Re: opDispatch

2014-12-25 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 25 December 2014 at 15:50:07 UTC, Danny wrote: struct X { int a; } class Foo { X value; template opDispatch(string s) { value.opDispatch!(s) opDispatch; That won't work anyway since X doesn't implement opDispatch - it needs to be written in

Re: opDispatch

2014-12-25 Thread Danny via Digitalmars-d-learn
I tried to make it even simpler to get to the core of the problem I'm having: ... template opDispatch(string s) { alias value.a opDispatch; } The compiler then complains: error: need 'this' for 'a' of type 'int' I can only think: And? It's right there... it's a class instance,

Re: opDispatch

2014-12-25 Thread Tobias Pankrath via Digitalmars-d-learn
On Thursday, 25 December 2014 at 15:50:07 UTC, Danny wrote: Hi, I'm trying to learn how opDispatch works. Unfortunately, a very simple example already doesn't work (error: no property 'a' for type 'Foo'): import std.stdio : writeln; struct X { int a; } class Foo { X value;

opDispatch

2014-12-25 Thread Danny via Digitalmars-d-learn
Hi, I'm trying to learn how opDispatch works. Unfortunately, a very simple example already doesn't work (error: no property 'a' for type 'Foo'): import std.stdio : writeln; struct X { int a; } class Foo { X value; template opDispatch(string s) { value.

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-25 Thread FrankLike via Digitalmars-d-learn
On Wednesday, 24 December 2014 at 12:53:06 UTC, JN wrote: I know this is probably a theoretical exercise, but easier way might be to execute "tasklist" and just grep the output. study D,you should do some exercises.

Re: Need example of usage DerelictPQ

2014-12-25 Thread Mike Parker via Digitalmars-d-learn
On 12/25/2014 3:03 PM, Suliman wrote: DerelictPQ is only a binding to libpq. The only difference is the DerelictPQ.load method. Just follow the libpq documentation. http://www.postgresql.org/docs/9.1/static/libpq.html Actually, Derelict binds to version 9.3, so the proper link should be http:

Re: Getting DAllegro 5 to work in Windows

2014-12-25 Thread Ivan Kazmenko via Digitalmars-d-learn
On Wednesday, 24 December 2014 at 06:47:26 UTC, Joel wrote: I can't get implib.exe (http://ftp.digitalmars.com/bup.zip) to produce .lib files from dlls (https://www.allegro.cc/files/). I think it works for other people. Thanks for any help. Reading Part II of this answer on Stackoverflow may