[Pythonmac-SIG] py2app applet: cannot drag files onto dock icon

Russell E. Owen rowen at uw.edu
Fri Jun 18 20:03:49 CEST 2010


I found the answer in a second google search (the first one, before I 
posted, didn't turn up anything).

<http://boredzo.org/blog/archives/2007-07-23/how-to-make-your-apps-dock-t
ile-highlight>
explained that I had to run mdls -name kMDItemContentType
on my application and add the result (which was 
com.apple.application-bundle) to the list of LSItemContentTypes

That worked.

-- Russell

In article <rowen-73CC6A.09572718062010 at news.gmane.org>,
 "Russell E. Owen" <rowen at uw.edu> wrote:

> I am making a Mac drag-and-drop applet using py2app.
> 
> The resulting application runs, and I can drag files onto the 
> application's icon in Finder, but I cannot drag files onto the 
> application's icon in the Dock.
> 
> The application processes plain text files. The property list is as 
> follows (I reluctantly decided not to list allowed file suffixes because 
> the appropriate keyword is deprecated for 10.5):
> 
> plist = dict(
>     CFBundleName                = appName,
>     CFBundleExecutable          = appName,
>     CFBundleShortVersionString  = versStr,
>     CFBundleGetInfoString       = "%s %s" % (appName, versStr),
>     CFBundleDocumentTypes       = [
>         dict(
>             CFBundleTypeName = "TEXT",
>             CFBundleTypeRole = "Viewer",
>             LSItemContentTypes = [
>                 "public.plain-text",
>                 "public.text",
>                 "public.data",
>             ],
>         ),
>     ],
> )
> 
> and when I look at the final info.plist and compare it to the plist from 
> other applications I don't see anything glaringly different (but I'm not 
> an expert on application proper lists).
> 
> Any idea what's going on? It's a serious limitation not to be able to 
> drag file onto the dock icon.
> 
> -- Russell
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG



More information about the Pythonmac-SIG mailing list