defaultfolder under Windows and MacOS X

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

defaultfolder under Windows and MacOS X

Post by rozek » Tue Jul 01, 2008 7:15 pm

Hello!

Is there a reason why "the defaultfolder" initially points to the folder containing the current stack under Windows but to the folder containing the Revolution engine under MacOS X? (and: I am always talking about stack files, not about standalones)

The MacOS X behaviour makes it a bit more difficult for me to "start using" library stacks...
Kind regards,

Andreas Rozek

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Jul 01, 2008 8:25 pm

Hi Rozek,

I have never noticed that there is a problem with the defaultFolder. I never rely on any default settings, so I don't rely on Revolution setting the defaultFolder to a particular path initially. If I want the defaultFolder to the the Revolution folder, I set the path by script, regardless of whether Revolution accidentally already did this by itself.

To set the defaultFolder to the Rev folder, use this:

set the itemDel to slash
set the defaultFolder to item 1 to -2 of the address

and to set the defaultFolder to the location of the current stack:

set the itemDel to slash
set the defaultFolder to item 1 to -2 of the effective filename of this stack

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

Post by rozek » Wed Jul 02, 2008 4:42 am

Hello Mark!

I did yet not know of "the address" and used a more complicated expression instead of "the effective filename"...

Thanks for your hints!
Kind regards,

Andreas Rozek

Post Reply