Using ContextPtr:LookUpControl for instances

JFD

Kathigitarkh
Joined
Oct 19, 2010
Messages
9,132
Location
The Kingdom of New Zealand
Do you mean dynamic controls created from <Instance> elements, or sub-contexts added via <LuaContext> elements?

The former you can't lookup (as they don't have unique ids), the latter can be found as normal (but IIRC, there is some oddity that the ID attribute in the <LuaContext> tag must be the same as the ID attribute in the corresponding <Context> tag).

Unless you're trying to get something in a core stack (eg one of the top panel controls) you shouldn't need to lookup dynamic instances as you can store references to them as you create them.
 
Back
Top Bottom