Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualkozec

Posted 25 December 2012 - 05:45 AM

Hello again. I'm sorry for my late response, there were some trouble with my account and I was not able to login.

Andreas, I modified your code a little so now its manifest same problem. Main difference is that my addListener method is in c++, not AS. Here is code and here is zipped eclipse project as well.
When I launch this code, both addListener calls...

EventSource@ x = cast(console);
addListener(x, ET_READLINE);               // source is first parameter
addListener(cast(console), ET_READLINE);   // source is first parameter

... should yield same results. In fact, output is:

ASRefCast: returning 0x940010
addListener: source = 0x940010
addListener: source.value = 2a

ASRefCast: returning 0x940010
addListener: source = 0x956400
addListener: source.value = 0

Value passed from typecasting function to addListener gets somehow changed sad.png

I'm on ArchLinux (3.6.9-1-ARCH), x86_64, using angelscript 2.25.2, built from AUR. As compiler, g++ (from gcc package, version 4.7.2) is used.


#2kozec

Posted 25 December 2012 - 05:44 AM

Hello again. I'm sorry for my late response, there were some trouble with my account and I was not able to login.

Andreas, I modified your code a little so now its manifest same problem. Main difference is that my addListener method is in c++, not AS. Here is code and here is zipped eclipse project as well.
When I launch this code, both addListener calls...

EventSource@ x = cast(console);addListener(x, ET_READLINE);                            // source is first parameteraddListener(cast(console), ET_READLINE);   // source is first parameter

... should yield same results. In fact, output is:

ASRefCast: returning 0x940010addListener: source = 0x940010addListener: source.value = 2aASRefCast: returning 0x940010addListener: source = 0x956400addListener: source.value = 0

Value passed from typecasting function to addListener gets somehow changed sad.png

I'm on ArchLinux (3.6.9-1-ARCH), x86_64, using angelscript 2.25.2, built from AUR. As compiler, g++ (from gcc package, version 4.7.2) is used.


#1kozec

Posted 25 December 2012 - 05:41 AM

Hello again. I'm sorry for my late response, there were some trouble with my account and I was not able to login.

 

 

 

Andreas, I modified your code a little so now its manifest same problem. Main difference is that my addListener method is in c++, not AS. Here is code and here is zipped eclipse project as well.

When I launch this code, both addListener calls...

EventSource@ x = cast<EventSource>(console);
addListener(x, ET_READLINE);                            // source is first parameter
addListener(cast<EventSource>(console), ET_READLINE);   // source is first parameter

... should yield same results. In fact, output is:

ASRefCast: returning 0x940010
addListener: source = 0x940010
addListener: source.value = 2a


ASRefCast: returning 0x940010
addListener: source = 0x956400
addListener: source.value = 0

 

Value passed from typecasting function to addListener gets somehow changed :(

 

 

I'm on ArchLinux (3.6.9-1-ARCH), x86_64, using angelscript 2.25.2, built from AUR. As compiler, g++ (from gcc package, version 4.7.2) is used.

 

 

PARTNERS