Bug in asyncimageloader?

Monkey Forums/Monkey Bug Reports/Bug in asyncimageloader?

GfK(Posted 2013) [#1]
Just updated to V70g and clicked "update modules database" in JungleIDE, and got an error about "mismatched END" in asyncimageloader.

Had a look and found this:
Class AsyncImageLoaderThread Extends BBThread="BBAsyncImageLoaderThread"

	Field _device:GraphicsDevice
	Field _path:String
	Field _surface:Surface
	
	Method Start:Void()

End

...should there not also be an End after Method Start:Void(), also with a bit of code of some description in between?


therevills(Posted 2013) [#2]
should there not also be an End after Method Start:Void(), also with a bit of code of some description in between?

Nope, because its an Externed class:
#If LANG="js" Or LANG="as"

Import "native/asyncimageloader.${LANG}"

Extern Private

Class AsyncImageLoaderThread Extends BBThread="BBAsyncImageLoaderThread"

	Field _device:GraphicsDevice
	Field _path:String
	Field _surface:Surface
	
	Method Start:Void()

End

#Else

^ Code from v70f


ziggy(Posted 2013) [#3]
The source code is right. (removed sensible implementation detail becouse of copyright)

#If LANG="js" Or LANG="as"

Import "native/asyncimageloader.${LANG}"

Extern Private
 
Class AsyncImageLoaderThread Extends BBThread="BBAsyncImageLoaderThread"

	Field _device:GraphicsDevice
	Field _path:String
	Field _surface:Surface
	
	Method Start:Void()

End

#Else

Class AsyncImageLoaderThread Extends Thread

	Field _device:GraphicsDevice
	Field _path:String
	Field _surface:Surface
	
	Method Start:Void()
		...
	End
	
	Method Run__UNSAFE__:Void()
		...
	End

End
#Endif


The Private set inside a compiler #IF directive is confusing Jungle Ide parser. Fixing this is non trivial, but I add this to the TODO list. Processing compiler directives at the IDE parser level can complicate things a lot.

That said, no worries, this mojo module source code is properly formatted.


GfK(Posted 2013) [#4]
The Private set inside a compiler #IF directive is confusing Jungle Ide parser
Ah. I thought all that error stuff came directly from Monkey, and Jungle just displayed whatever it was told to.

Makes a little more sense now.

I'm not actually using Monkey just now, and haven't for ages. Just updated to the latest stable build to play with a few ideas, and that error was the first thing I saw! :D