Reflection Case Sensitivity

BlitzMax Forums/BlitzMax Programming/Reflection Case Sensitivity

beanage(Posted 2009) [#1]
Are member requests in the Reflection mod case-insensitive; e.g. will the following ..

MyFieldObject = MyTypeID.GetField( "MyField" )


.. return the same as ..

MyFieldObject = MyTypeID.GetField( "mYFiELD" )


..? Thank you.


beanage(Posted 2009) [#2]
Any Ideas?


plash(Posted 2009) [#3]
Since Max is not a case-sensitive language, yes they will both return the same exact object.

Example:
SuperStrict

Framework brl.blitz
Import brl.standardio
Import brl.reflection


Type TMyType
	Field m_myfield:Int = 100
End Type

Local tid:TTypeId = TTypeId.ForName("TMyType")
Local fld:TField = tid.FindField("m_myfield")
Local fld2:TField = tid.FindField("M_MyFiElD")

If fld = fld2
	Print("fld and fld2 are identical")
Else
	Print("fld and fld2 are /not/ identical!")
End If



N(Posted 2009) [#4]
Why didn't you just test this yourself instead of waiting 6 hours for a reply? O_o


beanage(Posted 2009) [#5]
@Nilium: Sorry.. primarily lazyness, secondary i thouhgt it might be good to have the answer on this question recorded in the forums...

@Plash: Thank you. i was too busy yesterday with completely different programming tasks, so i couldnt test it myself, but the q kept me nervous. Finally a good aswer.