Profile

Member Since
October 11, 2011

Search Members

  

Crystallugia

8
@

Badges

This user hasn't earned any badges yet.

Posts

Viewing 1 to 8 (8 Total)

Re: Extensions

Thank you singmajesty,

I have looked in those examples before but they all take the cpp route. I didn't see any nme.JNI calls. But I found a (android/java only) example with nme.JNI calls on gigglingcorpse.com. In a comment you placed on that website you wrote about nme generating haxe classes with JNI bindings automatically. Is there any documentation on how to do that?

thanks,

Posted on July 20, 2012 at 2:18 AM

Extensions

Hi,


I want to expand my knowledge on Extensions (Android mainly) but I find it very difficult to grasp. For example de Webview extension (sample 21) in de sample directory doesn't work when I compile it. logcat gives me de following 'errors':

I/Resize (14357): 0xeb030 1024,558
I/trace (14357): Sample.hx:42: Test create ....
E/NME (14357): nme_jni_create_method - failed
I/trace (14357): Sample.hx:44: Test call ....
E/NME (14357): nme_jni_create_method - failed
E/NME (14357): nme_jni_call_member - not a method
I/trace (14357): Sample.hx:46: Test done.

I have the following questions:

Is there any ( comprehensive) documentation on Extensions?

And is there a big difference between (AIR) ANE extensions and NME extensions? In other words can an ANE extension 'easily' be adjusted to be used in a NME project?

Thanks,

Crystallugia

Posted on July 18, 2012 at 2:45 AM

Accelerometer stopped functioning (NME 3.3.2)

Hello,

The accelerometer worked fine on my tablet but I just realized that it stopped functioning in version 3.3.2. I downgraded to 3.3.0 to see if it is a regression and the accelerometer functioned like it should. So it problably is a regression?.
I didn't find anything about this issue on the forum or on the issue tracker. So I 'm wondering if I'm the only one experiencing this?

My tablet is a ( cheap chinese ) zenithink c91.

Posted on May 20, 2012 at 10:35 AM

Re: default arguments ignored (nme targeting windows and android)

Thank you Hugh,


I didn't know 2.09 was already released. And indeed this bug has been fixed. Another ' Interface bug' however still exists. When you use the Lamda.has method in combination with Interfaces you need to implement a compare function with default functionality for android and windows. In flash everything works fine without.
I have to find out exactly in what situation this occures and will post it here.

Posted on April 18, 2012 at 3:26 AM

default arguments ignored (nme targeting windows and android)

When you define a method with default arguments like this:

public function argumentTest(first:Int, ?second:Float = 20):Void
{
trace("second " + second);
}

and when you call this function without the second argument it will trace 20 ( like it should)

But when this method is implemented by an Interface:

interface ITest
{
function argumentTest(first:Int, ?second:Float = 20):Void;

}

and you do this:

var test:ITest = new Test(); // Test implements ITest
test.argumentTest(10);

this will trace 0 (zero) , not 20.

You can do the following of course (type inference)

var test = new Test();
test.argumentTest(10);

this will trace 20 (everything looks fine)

But if you want test to be a class member then a Type is required for member variable test. And of course I want that Type to be ITest and not Test

Is this a bug or is there another way I can make this work?

Btw. Targeting flash everything works fine but when I target windows and android (most likely) the default argument is skipped in some cases as described.

Posted on April 16, 2012 at 11:13 AM

Re: Box2D for NME

Hi Huge,


Thanks I just updated to 2.08 (Thought I did this already) and it works fine. Unfortunatly I can't add a shame icon to this post.Hope this one will do?confused

Posted on October 11, 2011 at 10:09 AM

Re: Box2D for NME

The following exception is thrown when compiling your example:

C:\Motion-Twin\haxe\lib\box2d/1,03/box2D/collision/B2DynamicTreeBroadPhase.hx:96: characters 8-19 : Cannot access m_pairCount in static function

Strange thing is that the function isn't static.

I just installed nme 3.1 beta, but changing back to 3.0.1 didn't solve the problem.

Any ideas?

Posted on October 11, 2011 at 7:59 AM

Accessing this field require flash version 10.1 (use -swf-version 10.1)

I get the following message when targetting flash:

Accessing this field require flash version 10.1 (use -swf-version 10.1)

The following code causes the exception.

private function urlLoader_ioError(e:IOErrorEvent):Void
{
trace(e.errorID);
}

When I target cpp no exception is thrown and e.errorID outputs 404 ( remote file doesn't exist yet smiling )

When targeting html5 a different exception is thrown:

: nme.events.IOErrorEvent has no field errorID

Is this a bug or should I adjust the nmml file?

Posted on October 11, 2011 at 6:38 AM