Re: How do you test if a property is empty
Re: How do you test if a property is empty
- Subject: Re: How do you test if a property is empty
- From: "Stockly, Ed" <email@hidden>
- Date: Mon, 19 Jan 2009 15:05:11 -0800
- Thread-topic: How do you test if a property is empty
> I believe something like this should work in general, not just for iTunes
tracks:
>
> set current_val to the missing value
> try
> set current_val to some_prop of some_object
> end try
>
That does work in many cases, but I wouldn't say it works "in general"
You really need to look at each property of each object in the application
to see what it returns when it hasn't been set or if it has no value.
For example, there are several itunes track settings that return an empty
string if they haven't been set.
Missing value seems to consistently work for itunes properties based on
dates that haven't been set; 0 works for number based properties and ""
works for text based properties.
I wouldn't count on that being consistent across all apps.
HTH,
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden