larsiusprime / firetongue

A translation/localization framework written in Haxe
MIT License
143 stars 32 forks source link

"Invalid field access : __s" #13

Closed kkukshtel closed 10 years ago

kkukshtel commented 10 years ago

Not sure if this is a Haxelib or Firetongue related issue, though I'm assuming it's Haxelib in the way it accesses stuff, and it was just updated. But when I try to select a different language in the RPG Interface demo, I get this nice block of error:

Invalid field access : __s
Called from firetongue/FireTongue.hx line 1056
Called from firetongue/FireTongue.hx line 1016
Called from firetongue/FireTongue.hx line 180
Called from State_Title.hx line 63
Called from flixel/addons/ui/FlxUI.hx line 111
Called from flixel/addons/ui/FlxUIRadioGroup.hx line 296
Called from flixel/addons/ui/FlxUIRadioGroup.hx line 274
Called from flixel/addons/ui/FlxUICheckBox.hx line 230
Called from flixel/ui/FlxTypedButton.hx line 304
Called from a C function
Called from flixel/addons/ui/FlxUITypedButton.hx line 654
Called from a C function
Called from flixel/addons/ui/FlxUIButton.hx line 210
Called from flixel/ui/FlxTypedButton.hx line 290
Called from openfl/events/EventDispatcher.hx line 268
Called from openfl/events/EventDispatcher.hx line 98
Called from a C function
Called from openfl/display/DisplayObject.hx line 270
Called from openfl/display/Stage.hx line 892
Called from openfl/display/Stage.hx line 375

It's worth noting that the code still compiles and I can access the different menu examples, but it breaks on trying to switch languages.

larsiusprime commented 10 years ago

Weird, thanks for this. What target did you compile RPG Interface in? C++?

kkukshtel commented 10 years ago

This error gets thrown on the neko target, but flash does work. Worth noting as well that I'm still on the haxelib branch of firetongue.

larsiusprime commented 10 years ago

Gotcha. Are you using the haxelib version of flixel-demos or the latest from github?

kkukshtel commented 10 years ago

Haxelib on the flixel-demos as well.

kkukshtel commented 10 years ago

Of possible note, when I try to do the neko compile of my own basic implementation I get all the same errors, but with Called from /usr/lib/haxe/std/neko/_std/Xml.hx line 119 at the top.

skial commented 10 years ago

Just a quick comment, the "s" is the native string access for neko, so it could be getting called by reflection or via untyped. Using untyped is the usual way to access "s".

On Tue, Jul 22, 2014 at 7:59 AM, kkukshtel notifications@github.com wrote:

Of possible note, when I try to do the neko compile of my own basic implementation I get all the same errors, but with Called from /usr/lib/haxe/std/neko/_std/Xml.hx line 119 at the top.

— Reply to this email directly or view it on GitHub https://github.com/larsiusprime/firetongue/issues/13#issuecomment-49704755 .

larsiusprime commented 10 years ago

I am reproducing this error. Gonna try to fix it.

Okay, I think I have a fix for this. It was caused by a sloppy cleanup function.

larsiusprime commented 10 years ago

Actually looks like @Gama11 has already fixed this. I think I'll put out a new haxelib release as soon as I figure out what the current status of flixel-demos and flixel is.

larsiusprime commented 10 years ago

Closing for now as the code itself is correct, just needs a haxelib release.