Notifications
Clear all

[Closed] Getting node that custom attribute is on

Hi,
i’m trying to get node that custom attribute is on from custom attribute code. For example, when i press button (added as CA) called “rename me” object’s name changes. So i’m looking for something like: this.name = “new name”

I hope I explained this clear enough.

2 Replies

Do you mean something like this?

rollout AAA "AAA"
  	(
  		button btn1 "Rename" width:90 height:15
  		
  		on btn1 pressed do
  			try ($.name = "New Name") catch()
  	)
  
  createDialog AAA

You can use same code on your custom attribute without “rollout AAA “AAA”…” and “createDialog AAA”.

Or did I misunderstood?

Of course, why didn’t I think about it. This should do it. Thanks a lot.