Page 1 of 1

Storing text as a custom property

Posted: Sat Mar 30, 2013 2:04 am
by reelstuff
I was looking over a custom properties stack used to store values, I wanted to store text as a custom property, then populate a field with that text.

I tried several different approaches to this and somehow I have missed something, I used the message watcher, to see if the engine was getting the message and it appears to update but I think that I am not referencing the custom property in the right way,


Code: Select all

on mouseUp
   put the customProperties["emotional1"] of me into myCustomvalue
   put myCustomvalue into fld "actionFld1"
   end mouseUp

Any suggestions or thought are greatly appreciated.

Re: Storing text as a custom property

Posted: Sat Mar 30, 2013 2:41 am
by magice
try this instead:

Code: Select all

on mouseUp
       put the emotional1 of me into myCustomvalue
       put myCustomvalue into fld "actionFld1"
       end mouseUp
of course this is assuming that you have created the custom property "emotional1" for the button being pushed, and that it has a value in place.

Re: Storing text as a custom property

Posted: Sat Mar 30, 2013 2:50 am
by Simon
Or simply:

Code: Select all

on mouseUp
   put the emotional1 of me into fld "actionFld1"
end mouseUp
Simon

Re: Storing text as a custom property

Posted: Sat Mar 30, 2013 3:07 am
by reelstuff
Super, it works, I see what I did wrong now, thanks for the help, )

Re: Storing text as a custom property

Posted: Sat Mar 30, 2013 3:08 am
by sturgis
Keep your first effort in mind, it will be useful if you decide to dig into custom property sets. Not really necessary for what you're doing at the moment though.