There are times I need to check if there is data stored for only the current state.
That is I don't care if the parent states hold the data with the same name.
Would it make sense to have something like
to only check for "view" in the current state and not propagate to the parent states if nothing is found?
Interesting idea. Kind of breaks the deterministics of a statechart because you are asking the current state of the statechart hierarchy if it has a value and short circuiting it.
I'll have to think about it...
I find some properties are state specific not statechart specific.
Eg. instead of me having to return a closure for wrapping around a variable for only that state it would be simpler to just set the data in that state and know i can retrieve it if it's there and not one from the parent if it's not there.