Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > how do I accept all doc types?

how do I accept all doc types?
Thread Tools
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Jul 6, 2003, 07:15 PM
 
I've noticed that carbon apps like GraphicConverter and HexEdit can accept drag operations from all types of documents and even folders. While cocoa apps like VLC (and my app) can't. Is this possible in cocoa?
     
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Jul 6, 2003, 09:52 PM
 
What I did (I think this is standard) is in the Document Types section in the Targets tab in PB is create a type called All, with Role of Editor, with Extensions "*", and OS Types "****" (I have the quotes, although those maybe unecessary).

It seems to work for me in DropCompress.

Hope this helps,
Matt Fahrenbacher
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Jul 7, 2003, 10:46 AM
 
ok, that lets me open files of any extension, but it doesn't work for files with no extension (and no mime type) or for folders, which is what I really want (GC and HexEdit both accept both these kinds).

(PB ads the quotes if you try to remove them, btw)
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Jul 7, 2003, 01:43 PM
 
IIRC, registering for the OSType 'fold' will get you folders specifically.

However, */**** normally does catch untyped files and folders. You may need to log out and back in, reboot, delete some LaunchServices cache files, or perform a virgin sacrifice to get the OS to register your change of document types.
Rick Roe
icons.cx | weblog
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Jul 7, 2003, 01:49 PM
 
thanks I'll try that when I get home. I don't think I had a cache problem, because I could change the ability to accept random filename extensions with just a recompile (with or without the *s).
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Jul 8, 2003, 12:44 AM
 
Originally posted by Rickster:
IIRC, registering for the OSType 'fold' will get you folders specifically.
yup, that's just what the doctor ordered. thanks again
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2