Re: delegate !is null

2009-09-08 Thread Saaa
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.uzxs4wyreav...@localhost.localdomain... On Sun, 06 Sep 2009 18:54:47 -0400, Saaa em...@needmail.com wrote: I'd like to set D's delegate to a method which is not yet available (like c.method). I solved this by encapsulating

Re: delegate !is null

2009-09-08 Thread Steven Schveighoffer
On Tue, 08 Sep 2009 09:22:30 -0400, Saaa em...@needmail.com wrote: Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.uzxs4wyreav...@localhost.localdomain... On Sun, 06 Sep 2009 18:54:47 -0400, Saaa em...@needmail.com wrote: I'd like to set D's delegate to a method which is

Re: delegate !is null

2009-09-08 Thread Saaa
The problem lies more in that I'd like to point to something which is not there yet. In the code 'c.method()' is not there yet, as c is null. Maybe I should create a dummy object for c to point to in stead of null ? That way I point the delegate to the dummy method and ignore it as long as

Re: delegate !is null

2009-09-08 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Saaa wrote: The problem lies more in that I'd like to point to something which is not there yet. In the code 'c.method()' is not there yet, as c is null. Maybe I should create a dummy object for c to point to in stead of null ? That way I point

Re: delegate !is null

2009-09-08 Thread Steven Schveighoffer
On Tue, 08 Sep 2009 12:40:13 -0400, Saaa em...@needmail.com wrote: Hm... I'm still confused. Why not just set the delegate to null? Why do you need to have the delegate set to something? It is for the gui. I give it a list of things to display. And some of these things don't yet exist or

Re: Cannot convert of type HANDLE to HANDLE

2009-09-08 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sam Hu wrote: Under DMD 2.032+Window Xp: Can I use HMODULE LoadLibraryEx( LPCTSTR lpFileName, // file name of module HANDLE hFile, // reserved, must be NULL DWORD dwFlags // entry-point execution option ); in

Re: delegate !is null

2009-09-08 Thread Steven Schveighoffer
On Tue, 08 Sep 2009 16:15:49 -0400, Saaa em...@needmail.com wrote: // dg is now a instanceless delegate to C.method. dg.ptr = new C; So, nothing special under the hood, this would also work? C c= new C; dg.ptr = c; Yes, same thing. I also don't know how well it will work on interfaces.

Re: delegate !is null

2009-09-08 Thread Saaa
Hm... I'm still confused. Why not just set the delegate to null? Why do you need to have the delegate set to something? It is for the gui. I give it a list of things to display. And some of these things don't yet exist or can be deleted at any time. I'd like it to display the last valid

Re: delegate !is null

2009-09-08 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Saaa wrote: The only way I've found so far to do static binding like you are talking about is using string mixins. I need to rethink stuff a bit, but mixins might be the solution. My port of Atl's window classes uses a MFC like message map:

Re: Trying to get DMD bundled with libs

2009-09-08 Thread Joel Christensen
Jarrett Billingsley wrote: On Mon, Sep 7, 2009 at 6:44 AM, Joel Christensenjoel...@gmail.com wrote: div0 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joel Christensen wrote: I noticed you can get DMD bundled with various libraries. I found you had to login to another web site, but

Re: Trying to get DMD bundled with libs

2009-09-08 Thread Jarrett Billingsley
On Tue, Sep 8, 2009 at 8:48 PM, Joel Christensenjoel...@gmail.com wrote: Jarrett Billingsley wrote: On Mon, Sep 7, 2009 at 6:44 AM, Joel Christensenjoel...@gmail.com wrote: div0 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joel Christensen wrote: I noticed you can get DMD

Re: Trying to get DMD bundled with libs

2009-09-08 Thread Jarrett Billingsley
On Tue, Sep 8, 2009 at 9:17 PM, Jarrett Billingsleyjarrett.billings...@gmail.com wrote: On Tue, Sep 8, 2009 at 8:48 PM, Joel Christensenjoel...@gmail.com wrote: Jarrett Billingsley wrote: On Mon, Sep 7, 2009 at 6:44 AM, Joel Christensenjoel...@gmail.com wrote: div0 wrote: -BEGIN PGP

Re: Cannot convert of type HANDLE to HANDLE

2009-09-08 Thread Sam Hu
div0 Wrote: You must have two different HANDLEs around. The one in phobos is aliased to void* and there is no LoadLibraryEx call in phobos, so you must be using something else. Try using the FQN of the import where you are getting the LoadLibraryEx from. Thanks for your help. Yeah.I use DFL