Bindings and shared userd defaults

Hi,

I would like to know if is possible, using bindings, to force the kind of data.
Example: I have a text box connected with bindings to shared user defaults.
User type only integers in this text box.
If I open the pList the tupe is string. How I can force to integers, real, boolean using bindings.
I read the Shane book and using code is possible.

to get value from shared defaults just in case I need to a separate script I use:

set ud to current application’s NSUserDefaults’s standardUserDefaults()
set myData to ud’s valueForKey_(“test”)

Another trouble is to get AS date from a date stored in the plIst.

Rufus

You can force the value to be a number by attaching a number formatter to your text field (or choose the text field with a number formatter already attached to it in the library) .

Ric

Property lists only store NSDates, so you need to convert them. The easiest way to do this is using Myriad Helpers: www.macosxautomation.com/applescript/apps/helpers.html. You can do it in code, but it’s surprisingly complex.