Forum Discussion

EnTerr's avatar
EnTerr
Roku Guru
9 years ago

RSG bug: `node.bogusField = 42` does zilch

Here is a scenical bug: assigning a value to a non-existent field of a Node does not work - nor does it show error message of any kind:
BrightScript Debugger> ? scene.foo : scene.foo = 42 : ? scene.foo
invalid
invalid

BrightScript Debugger> ? type(scene), scene.parentSubtype(scene.subtype())
roSGNode        Scene

Ok, so perhaps a field that has not been officially added (<interface> or addField()) - or name is misspelled - cannot be assigned, that makes sense. What does not make sense is execution silently ignoring the exception and continuing! Hard error message should be shown and program interrupted when this happens.

I found this the hard way, having my code "working" - but not really. Had to meticulously examine line by line to figure what might have gone wrong. Not a good way to spend our time.

1 Reply

  • @Roku - anybody going to kindly enter bug on this one?