Phillip Hutchings <sitharus / sitharus.com> wrote:

> 
> Unfortunately Cocoa can't actually handle aliases itself, you need to
> use other functions. Google for 'Cocoa alias resolve', there's a few
> informative pages.

fine thanx, i've found something by googleing...

this is at <http://bdistributed.com/Projects/BDAlias/>

they have implemented a class following Apple's rcomandation :
<http://developer.apple.com/documentation/Cocoa/Conceptual/LowLevelFileM
gmt/Tasks/ResolvingAliases.html>

(that's the BDAlias#fullPath method calling #fullPathRelativeToPath:nil)

here is my little test :

require 'osx/cocoa'

OSX.ns_import('BDAlias')
f=OSX::BDAlias.alloc.initWithPath("/Users/yvon/work/RubyCocoa/MacSOUPSwi
tcher/map/read-alias/search/for/the/original/file/read-alias.pl")
p "f.class=#{f.class}"
# => "f.class=OSX::BDAlias"
p "f.fullPath=#{f.fullPath}"
# =>
"f.fullPath=/Users/yvon/work/RubyCocoa/MacSOUPSwitcher/map/read-alias/se
arch/for/the/original/file/read-alias.pl"

using BDAlias from ruby works very well however the return path isn't
the path of the file pointed by the alias rather the path of the alias
itself )))

i've compared ObjC version of BDAlias versus Apple's recomandation :
looks good...

then, i don't understand why this desapointing result...

something i misunderstood ???
-- 
une bñ×ue