V70b Android: Missing arrayLength method

Monkey Forums/Monkey Bug Reports/V70b Android: Missing arrayLength method

MikeHart(Posted 2013) [#1]
Hi Mark,

not sure if it is reported already, but someone said that compiling for Android didn't work since V67. So I tested it with a bigger game I have. Up to V69 it is fine but in V70B I get these method arrayLength, cannot find symbol errors:


-compile:
[javac] Compiling 4 source files to /Users/michaelhartlef/Desktop/Monkey_prj/NeonCommand2/NeonCommand2.build/android/bin/classes
[javac] /Users/michaelhartlef/Desktop/Monkey_prj/NeonCommand2/NeonCommand2.build/android/src/com/whiteskygames/NeonCommand2/MonkeyGame.java:2874: cannot find symbol
[javac] symbol : method arrayLength(java.lang.String[])
[javac] location: class com.whiteskygames.NeonCommand2.bb_std_lang
[javac] if(bb_std_lang.arrayLength(t_lines)==2){
[javac] ^



	Method LoadOptions:Void ()
		Local state:String = LoadState()
		Local lines := state.Split(";;;")
		If lines[0] Then
			eng.scoreList.LoadFromString(lines[0])
		Endif
		If lines.Length()=2 Then
			Local options := lines[1].Split("###")
		
			eng.SetVolumeSFX(Float(options[0]))
			eng.SetVolumeMUS(Float(options[1]))
		Endif
	End

The problematic line here is
		If lines.Length()=2 Then


EDIT: Just had a look at the native sources in modules/monkey/native/lang.native. The arrayLength method is missing in V70 now.


Beaker(Posted 2013) [#2]
I don't think Length is a Method. Try removing the brackets.


MikeHart(Posted 2013) [#3]
Length is and was a method of arrays for a LONG time. :-) Works in other platforms still.


therevills(Posted 2013) [#4]
Sounds like this Pull-Request didnt merge correctly or something:
https://github.com/blitz-research/monkey/pull/5


muddy_shoes(Posted 2013) [#5]
Mark didn't merge that pull request. He made the changes manually for whatever reason.

However, the code as committed shouldn't be emitting an arrayLength call. I wonder if MikeHart has a trans exe that isn't in sync with the code or if his build output hasn't been cleared.


marksibly(Posted 2013) [#6]
MikeHart, are you on Mac/Linux?


marksibly(Posted 2013) [#7]
OK, looks like the Mac trans exe is out of date. Should have a v70c update ready soon-ish.


MikeHart(Posted 2013) [#8]
Yes, i am on s Mac. Osx 10.8.3