Reflection seems to break some lists?

Monkey Forums/Monkey Programming/Reflection seems to break some lists?

Yahfree(Posted 2012) [#1]
Hey, importing the reflection module seems to break some lists/stringmaps in some cases..

For an example try importing reflection into the angelfont example.


marksibly(Posted 2012) [#2]
Hi,

I believe in the case of the angelfont demo at least, reflection is causing some functions to compile that have bugs in them.

Normally, Monkey tries to compile only what it has to - ie: what your app uses. Enabling reflection causes everything to be compiled, which can reveal bugs.


therevills(Posted 2012) [#3]
Enabling reflection causes everything to be compiled, which can reveal bugs.


Which is great to test/develop with, I now add import reflection when developing to catch more bugs ;)


Difference(Posted 2012) [#4]
The Anglefont module should probably be fixed like this:

	Function Use:AngelFont(name:String)
		For Local af:= Eachin _list
			If af.Value().name = name
				current = af.Value()
				Return af.Value()
			End
		Next
		Return Null
	End