Yosemite issues

After a quick Google search, looks like it is /tmp which is a symlink to /private/tmp

Wow, the HUD windows in DP6 are way cool. But some controls have font color issues (transparent text etc…).
The HUD also introduces strange things when you animate HUD windows (like doing a flip). Fingers crossed if they get this fixed.

I do a shell to textutil in my app and simply request folderitem.shellpath to get the current temporary folder, as I posted. Works perfectly. As you may notice above, sandboxed temporary is not at the same place as unsandboxed, and does not seem to be at /private/tmp. Using anything other than the folder supplied by the sandbox could be the recipe for trouble …

I’m not following you on that.

You must use the path supplied by the sandbox for SpecialFolder.Temporary, otherwise your app will not work.

I just sandboxed a short test project that does a very basic shell to ls /Private/tmp/ and the sanction is :

ls: : Operation not permitted.

The same project works fine unsandboxed.

I have learned not to use direct path notation when the sandbox is concerned.

[quote=122604:@Michel Bujardet]You must use the path supplied by the sandbox for SpecialFolder.Temporary, otherwise your app will not work.

I just sandboxed a short test project that does a very basic shell to ls /Private/tmp/ and the sanction is :

ls: : Operation not permitted.

The same project works fine unsandboxed.

I have learned not to use direct path notation when the sandbox is concerned.[/quote]

I was refering to not following your first sentence…how to get XOJO special folders into UNIX shells

The folder can vary. For AppleScript you can simply use

path to temporary items

HTH

[quote=122606:@Beatrix Willius]The folder can vary. For AppleScript you can simply use

path to temporary items

HTH[/quote]

And that will resolve to the App’s Sandboxed temp folder?

If you call the shell or the AppleScript from Xojo, you get the path from Xojo and pass it to the script.

In Xojo, Folderitem.ShellPath provides the escaped POSIX path for Mac OS X and Linux.
see http://documentation.xojo.com/index.php/FolderItem.ShellPath

[quote=122612:@Michel Bujardet]If you call the shell or the AppleScript from Xojo, you get the path from Xojo and pass it to the script.

In Xojo, Folderitem.ShellPath provides the escaped POSIX path for Mac OS X and Linux.
see http://documentation.xojo.com/index.php/FolderItem.ShellPath[/quote]

so eseentially, SpecialFolder.Temporary.ShellPath?

That’s it :slight_smile:

Gotcha, but I’m afraid that’s not going to help me in an Applescript calling a shell…unless Beatrix suggestion works.

Anyway…all good stuff to try! I appreciate the help!

How do you call an AppleScript from Xojo ? Through osascript ? You do not need AppleScript to run a shell from Xojo. Here is what I would do to list the files in the temporary folder :

s.execute("ls "+specialfolder.temporary.shellpath)

[quote=122645:@Michel Bujardet]How do you call an AppleScript from Xojo ? Through osascript ? You do not need AppleScript to run a shell from Xojo. Here is what I would do to list the files in the temporary folder :

s.execute("ls "+specialfolder.temporary.shellpath)

Oh, I know that! I have many programs in the MAS that run Shell commands directly from XOJO!

However, I have one very unique app that runs a lot of AppleScripts. It’s the only way it can be done. Would take too long to explain. You’ll have to trust me on that one!

Hopefully Beatrix’s suggestion works.

[quote=122648:@Niles Mitchell]Oh, I know that! I have many programs in the MAS that run Shell commands directly from XOJO!

However, I have one very unique app that runs a lot of AppleScripts. It’s the only way it can be done. Would take too long to explain. You’ll have to trust me on that one!

Hopefully Beatrix’s suggestion works.[/quote]

Result :

Macintosh HD:private:var:folders:sw:q9mqn7gd0jbg24kmdzxnv5qw0000gn:T:TemporaryItems:

Seems to work. Haven’t tried in a sandboxed environment. But just by curiosity : is it not possible to launch and AppleScript with passed arguments, like a bash script ?

You can pass variables in and out of an Applescript.

I hope this works…

POSIX path to temporary items

[quote=122653:@Niles Mitchell]You can pass variables in and out of an Applescript.
[/quote]

There you go :slight_smile: For a bash script, I would pass the path as a string to the script. Maybe you can do the same.

This what I did in the Script editor to get the path unsandboxed :

set toto to path to temporary items

I have no idea if it will work with the sandboxed folder.

Well, the advice of Michel and Beatrix worked perfectly on Yosemite!!!

I am very relieved now!!

Thank to both of you!

[quote=121936:@Christoph De Vocht]I ones did a lot of tests and it never worked out fine. Maybe Xojo Inc changed something?
I will do some new tests asap.

Thanks for the info[/quote]
With the shell class you can launch a unsandboxed terminal application, however if you need to include a terminal application within the application bundle it must be Sandboxed, at that point you have to use NSTask.