Re: Accessing COM Objects

2017-03-10 Thread Inquie via Digitalmars-d-learn
On Friday, 17 June 2016 at 08:09:42 UTC, John wrote: On Wednesday, 15 June 2016 at 21:06:01 UTC, Joerg Joergonson wrote: My thinking is that CoCreateinstance is suppose to give us a pointer to the interface so we can use it, if all this stuff is crashing does that mean the interface is invalid

Re: Accessing COM Objects

2017-03-10 Thread Inquie via Digitalmars-d-learn
On Friday, 17 June 2016 at 08:09:42 UTC, John wrote: On Wednesday, 15 June 2016 at 21:06:01 UTC, Joerg Joergonson wrote: [...] The problem is Photoshop hasn't provided an interface with methods that can be called directly. They don't exist on the interface, hence them being commented out.

Re: Comparing Instances of Classes

2017-03-10 Thread DRex via Digitalmars-d-learn
On Friday, 10 March 2017 at 20:27:09 UTC, Meta wrote: On Friday, 10 March 2017 at 17:08:42 UTC, Whatsthisnow wrote: I guess i am just too used to the java way of x.equals(object) which at the source is exactly 'return this == object' Java would return false here too, though, if it actually

Re: DMD win32.mak error

2017-03-10 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 11 March 2017 at 00:34:03 UTC, Paul D Anderson wrote: On Friday, 10 March 2017 at 22:04:23 UTC, Paul D Anderson wrote: While building DMD -- "make -fwin32.mak release" -- I received the following error message: echo "2.073.2" > verstr.h Error: don't know how to make

Re: DMD + Dynamic Library.

2017-03-10 Thread Cassio Butrico via Digitalmars-d-learn
On Wednesday, 8 March 2017 at 18:21:35 UTC, Damien Gibson wrote: On Wednesday, 8 March 2017 at 06:28:47 UTC, Jerry wrote: You have to use "export" for any symbol to be visible from a dll. On Windows by default nothing is exported. Would "export" and "export extern(D):" not be the same? Im

Re: DMD win32.mak error

2017-03-10 Thread Paul D Anderson via Digitalmars-d-learn
On Friday, 10 March 2017 at 22:04:23 UTC, Paul D Anderson wrote: While building DMD -- "make -fwin32.mak release" -- I received the following error message: echo "2.073.2" > verstr.h Error: don't know how to make '../res/default_ddoc_theme/ddoc' --- error level 1 I'm guessing it might be a

DMD win32.mak error

2017-03-10 Thread Paul D Anderson via Digitalmars-d-learn
While building DMD -- "make -fwin32.mak release" -- I received the following error message: echo "2.073.2" > verstr.h Error: don't know how to make '../res/default_ddoc_theme/ddoc' --- error level 1 I'm guessing it might be a build configuration problem on my end, but what is the problem?

Re: TLS

2017-03-10 Thread sarn via Digitalmars-d-learn
On Friday, 10 March 2017 at 19:24:29 UTC, bauss wrote: Mark your variables with __gshared. I would say shred, but it has some restrictions to it, where __gshared is the equivalent to global variables in C. immutable variables are also not put in TLS.

Re: Comparing Instances of Classes

2017-03-10 Thread Meta via Digitalmars-d-learn
On Friday, 10 March 2017 at 17:08:42 UTC, Whatsthisnow wrote: I guess i am just too used to the java way of x.equals(object) which at the source is exactly 'return this == object' Java would return false here too, though, if it actually did `this == object` in its default compare method. If

Re: Comparing Instances of Classes

2017-03-10 Thread Ali Çehreli via Digitalmars-d-learn
On 03/10/2017 08:22 AM, DRex wrote: Error: function app.A.opEquals does not override any function, did you mean to override 'object.Object.opEquals'? My A class appears exactly as mentioned in your comment... FWIW, here's some other info:

Re: TLS

2017-03-10 Thread bauss via Digitalmars-d-learn
On Friday, 10 March 2017 at 07:33:44 UTC, M-exe wrote: On Friday, 10 March 2017 at 07:17:22 UTC, rikki cattermole wrote: D does not support Windows XP. If you absolutely require it, you will have to contact Walter about support. Let me care about it ;) I just need help with the TLS :) Mark

Re: Comparing Instances of Classes

2017-03-10 Thread Whatsthisnow via Digitalmars-d-learn
On Friday, 10 March 2017 at 16:47:47 UTC, Adam D. Ruppe wrote: On Friday, 10 March 2017 at 16:36:17 UTC, DRex wrote: I'm fairly new to D, but this seems to be quite a pain in the rear for a simple comparison of instances of classes...really odd that comparing instances of classes in D requires

Re: Comparing Instances of Classes

2017-03-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 10 March 2017 at 16:36:17 UTC, DRex wrote: I'm fairly new to D, but this seems to be quite a pain in the rear for a simple comparison of instances of classes...really odd that comparing instances of classes in D requires that messing around when D seems all about simplifying

Re: Comparing Instances of Classes

2017-03-10 Thread DRex via Digitalmars-d-learn
On Friday, 10 March 2017 at 16:30:00 UTC, Adam D. Ruppe wrote: On Friday, 10 March 2017 at 16:22:18 UTC, DRex wrote: Error: function app.A.opEquals does not override any function, did you mean to override 'object.Object.opEquals'? Oh sorry, maybe I messed up the const. Try: override bool

Re: Comparing Instances of Classes

2017-03-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 10 March 2017 at 16:22:18 UTC, DRex wrote: Error: function app.A.opEquals does not override any function, did you mean to override 'object.Object.opEquals'? Oh sorry, maybe I messed up the const. Try: override bool opEquals(A rhs) { ... } and if the compiler still complains

Re: Comparing Instances of Classes

2017-03-10 Thread DRex via Digitalmars-d-learn
On Friday, 10 March 2017 at 16:13:21 UTC, Adam D. Ruppe wrote: On Friday, 10 March 2017 at 16:08:05 UTC, DRex wrote: Am I missing something here? Yeah, you need to implement a custom equality operator. class A { int member; override bool opEquals(const A rhs) { return

Re: Comparing Instances of Classes

2017-03-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 10 March 2017 at 16:08:05 UTC, DRex wrote: Am I missing something here? Yeah, you need to implement a custom equality operator. class A { int member; override bool opEquals(const A rhs) { return this.member == rhs.member; // and other members that need to be equal

Comparing Instances of Classes

2017-03-10 Thread DRex via Digitalmars-d-learn
Hi, I am trying to compare two instances of a class. I created a test program to try this, but every method I use to compare the instances always returns false. this is my code to test comparison class A { this() { } } void main() { A a = new A(); A a2 = new A();

Re: Where do you test syntax of D regexp online?

2017-03-10 Thread Suliman via Digitalmars-d-learn
On Friday, 10 March 2017 at 14:36:48 UTC, Suliman wrote: On Thursday, 9 March 2017 at 16:47:18 UTC, Adam D. Ruppe wrote: On Thursday, 9 March 2017 at 16:40:13 UTC, Suliman wrote: How should I write to file result without \r\n\ symbols? auto x = content.matchFirst(bigCodeBlock); File f =

Re: Where do you test syntax of D regexp online?

2017-03-10 Thread Suliman via Digitalmars-d-learn
On Thursday, 9 March 2017 at 16:47:18 UTC, Adam D. Ruppe wrote: On Thursday, 9 March 2017 at 16:40:13 UTC, Suliman wrote: How should I write to file result without \r\n\ symbols? auto x = content.matchFirst(bigCodeBlock); File f = File("foo.txt", "w"); f.write(x); Just f.write(x[0]); to

How to write document for methods under static if?

2017-03-10 Thread Yuxuan Shui via Digitalmars-d-learn
Example: /** test type */ struct A(bool T) { static if (T) { /// Case 1 int ok(){ return 1; } } else { /// case 2 int notok(){ return 1; } } /// Other int other() { return 0; } } ///