Custom Attributes Owner

Hi everyone

I'm trying without success to access the object owner of a CA within its parameters or the on create event...
What I don't understand is that I can access the owner object within the rollout with this :
obj = (refs.dependents (custAttributes.getOwner this))[1]
but it doesn't work either on the parameters block or the on create event...

Does anyone knows how to ?
Thanks in advance

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

Use it like this

ca= attributes caData
(
	fn getNode = (refs.dependentnodes (custattributes.getowner this) firstonly:on)
	rollout rol "Test"
	(
		button printNode "PrintNode" 
		on printNode pressed do format "%\n" (getNode())
	)
)
d = Dummy isselected:on
custAttributes.add d ca
max modify mode

barigazy

barigazy's picture

...

I mean like fn ;)

barigazy

SugaR's picture

well works perfectly thanks

well works perfectly thanks :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.