Re: choose file of type {}
Re: choose file of type {}
- Subject: Re: choose file of type {}
- From: Philip Aker <email@hidden>
- Date: Fri, 24 Oct 2008 14:29:10 -0700
On Oct 24, 2008, at 2:01 AM, André Berg wrote:
Yeah that seems like a serious limitation of the system.
I wonder why we can't simply filter by extension... (I'm a switcher)
Maybe no one has made an enhancement request. I know for sure a
NavFilterUPP can handle filtering by file extensions and am fairly
sure NSOpenPanel has an option for file extensions.
But before a request for file extensions is made, consider that it
will be a more powerful option to have 'choose file/folder' invoke an
actual filter handler:
on MyFileFilter(theAlias)
-- pseudo-code example filter condition check
set finfo to info for theAlias
if( file extension of finfo is in {"xml", "xsl", "xsd"}) then
return true
end if
return false
end MyFileFilter
set f to (choose file using filter MyFileFilter)
But that doesn't work when the desired file type is already known
and the UTI is björked. For instance if an XML type is reduced to
"public.text" then the range of choices would be too large for
someone who obviously wanted to constrain the choice.
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
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