On 19 juin 08, at 10:23, frael wrote:
oui, justement, comment vérifier la conversion ???
j'ai bien ajouté une ligne pour voir :
display dialog (">" & laPj as text) & "<"
et dans les 2 cas (appel par RB / selection à la main) j'ai le même
résultat !!!
...sauf que par RB le mail se crée sans la PJ
choose file renvoie un alias. RB passe probablement un pathname. La
première chose à vérifier, c'est que le pathname permet effectivement
de créer un alias. Essaie par exemple le script suivant pour voir.
tell application "Finder"
activate
set theAlias1 to choose file
set theMacOS9Path to theAlias1 as string
display dialog "class: " & class of theAlias1 & return & "path: " &
theMacOS9Path
set theAlias2 to (theMacOS9Path as alias)
set thePOSIXPath to POSIX path of theAlias2
display dialog "class: " & class of theAlias2 & return & "path: " &
thePOSIXPath
set theAlias3 to (thePOSIXPath as alias) -- erreur
display dialog "class: " & class of theAlias3 -- on n'ira pas jusque là
end tell
En résumé : si le path est à la Mac OS 9, tu peux le typecaster en
alias, mais pas s'il est au format unix. La notion même d'alias est
encore fortement attachée à Carbon...
B.
// http://www.widemann.net //
|