[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: porting GWorkspace to osx
From: |
Lars Sonchocky-Helldorf |
Subject: |
Re: porting GWorkspace to osx |
Date: |
Mon, 10 Feb 2003 14:06:05 +0100 |
>I've bought an old iMac and, by joke, I'm trying to port GWorkspace.
>Actually it compiles, builds and runs.
>But it does about nothing, so, to see, for example, why the
>draggingPasteboard seems to have no data, I've added some NSLog.
>And here I've noticed an interesting think.
>NSWorkspace's -getInfoForFile:application:type: is used in many places in
>the GW sources, and here are some example of what I get:
>
> path = /Applications/Mail.app
>application = /Applications/Mail.app
> type = app
>
> path = /bin/bash
>application = (null)
> type =
>
> path = /etc
>application = /System/Library/CoreServices/Finder.app
> type =
>
> path = /Users/enrico/afile.gif
>application = /Applications/Preview.app
> type = gif
>
> path = /Users/enrico/aplainfile
>application = (null)
> type =
>
> path = /Volumes/X-ChatAqua (a mounted disk image)
>application = /System/Library/CoreServices/Finder.app
> type = 0
>
>>From the Apple documentation, regarding
-getInfoForFile:application:type::
>"Retrieves information about the file specified by fullPath. If this
>method returns YES, the NSString pointed to by appName is set to the
>application the system would use to open fullPath. The NSString pointed
>to by type contains one of the values described in "Constants"."
>
>Probably, all of us knows these constants but I write them here:
>
>Constant Description
>
>NSPlainFileType Plain (untyped) file
>NSDirectoryFileType Directory
>NSApplicationFileType Cocoa application
>NSFilesystemFileType File-system mount point
>NSShellCommandFileType Executable shell command
>
>As you can see, NO ONE OF THEM is used!
Since Apple's documentation
<http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSWorkspace.html#BCIEEFBI>
says so we can asume you found a bug here. When I was working on the
GWorkspace port to Cocoa (long time ago) I could never open a folder by
doubleclicking it but only by using the open as folder command. After
peeking at the sources I also suspected a bug in Cocoa but got never that
close to it as you did.
I advise you to file a bug report with Apple
<https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa>. Since you
already got the developer tools I think you are already registered as a
developer with Apple (you need this to login the bugreporter), otherwise
you can do it here <https://connect.apple.com/>, it will cost you nothing
(free online membership).
>
>They use the suffix if this exists (app, gif, pdf), an empty string if no
>suffix and "0" for the mounted volume!
>
>And there are people speaking about compatibility...
greetings, Lars