Am 29.09.2011 um 07:51 schrieb Beatrix Willius:

> Paths in AppleScript always have been a PITA.

Right. But NSAppleScriptMBS is the future, so I'll add:

FSRefValue as folderitem
descriptorWithFSRef(item as folderitem) as NSAppleEventDescriptorMBS
descriptorWithAlias(item as folderitem) as NSAppleEventDescriptorMBS

to the NSAppleEventDescriptorMBS class for easy creating and resolving those 
items.

You can use it like this:

  // pick a folderitem
  dim folder as FolderItem = SpecialFolder.Desktop
  
  // create value with file reference
  dim d as NSAppleEventDescriptorMBS = 
NSAppleEventDescriptorMBS.descriptorWithFSRef(folder)
  
  // show path
  MsgBox d.stringValue
  
  // convert back to FolderItem
  dim file as FolderItem = d.FSRefValue
  
  // show path
  MsgBox file.AbsolutePath
  

Will be in next prerelease in the next days. Or I can email you a copy today.

Greetings
Christian

-- 
See you in Frankfurt, Germany at the Real Studio Database Days

More details and registration here:
http://www.monkeybreadsoftware.de/realbasic/events/frankfurt-2011-event.shtml


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to