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

Russell E. Owen rowen at uw.edu
Fri Jun 18 18:57:27 CEST 2010


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



More information about the Pythonmac-SIG mailing list