Re: How to create instance of class that get data from 2 another instance?

2015-01-04 Thread Suliman via Digitalmars-d-learn
Ali, thanks for example, I understood it, but I am still can't understand how to write code above without passing this as parameter...

Re: Need extern (C) interface even though using Derelict GLFW

2015-01-04 Thread Mike Parker via Digitalmars-d-learn
On 1/4/2015 1:34 PM, WhatMeWorry wrote: Now it resizes the screen successfully, but I feel like I've failed by using extern (C) nothrow. Shouldn't Derelict GLFW be providing a D interface? Maybe GLFW callback functions can't handled through Derelict GLFW? Derelict provides direct bindings,

Re: Need extern (C) interface even though using Derelict GLFW

2015-01-04 Thread Mike Parker via Digitalmars-d-learn
On 1/4/2015 1:34 PM, WhatMeWorry wrote: Maybe GLFW callback functions can't handled through Derelict GLFW? And just to be clear, because the pointers to the callback functions are being passed to a C API, they *have* to be extern( C ) -- i.e. they have to have the same calling convention

Re: How to create instance of class that get data from 2 another instance?

2015-01-04 Thread Suliman via Digitalmars-d-learn
On Sunday, 4 January 2015 at 15:37:53 UTC, Suliman wrote: Ali, thanks for example, I understood it, but I am still can't understand how to write code above without passing this as parameter... But now I think that possible is mess architecture of app if I meet such problem...

Re: Need extern (C) interface even though using Derelict GLFW

2015-01-04 Thread WhatMeWorry via Digitalmars-d-learn
On Sunday, 4 January 2015 at 09:02:48 UTC, Mike Parker wrote: On 1/4/2015 1:34 PM, WhatMeWorry wrote: Maybe GLFW callback functions can't handled through Derelict GLFW? And just to be clear, because the pointers to the callback functions are being passed to a C API, they *have* to be

Re: How to create instance of class that get data from 2 another instance?

2015-01-04 Thread Ali Çehreli via Digitalmars-d-learn
On 01/04/2015 07:37 AM, Suliman wrote: how to write code above without passing this as parameter... For reference, here is your code: http://www.everfall.com/paste/id.php?a5pp73ns1e4k There is nothing fundamentally wrong in a class constructor passing 'this' to an object that it

Re: Need extern (C) interface even though using Derelict GLFW

2015-01-04 Thread Rikki Cattermole via Digitalmars-d-learn
On 5/01/2015 9:30 a.m., WhatMeWorry wrote: On Sunday, 4 January 2015 at 09:02:48 UTC, Mike Parker wrote: On 1/4/2015 1:34 PM, WhatMeWorry wrote: Maybe GLFW callback functions can't handled through Derelict GLFW? And just to be clear, because the pointers to the callback functions are being

Re: Need extern (C) interface even though using Derelict GLFW

2015-01-04 Thread Mike Parker via Digitalmars-d-learn
Are they some extremely simple tutorials on bindings and wrappers? Something with lots of code examples. I don't think it's a subject that warrants a tutorial. There's not that much to it. Consider: // capi.h void do_something( const char *str ); // capi.d -- this is a binding