Mac OS X Preferences?

Ask a Question related to Macromedia Director Basics, Design and Development.

  1. #1

    Default Mac OS X Preferences?

    Hi all,
    I am trying to make a application playable on Mac OS X.
    I used the code

    if the machinetype <> 256 then
    set gWhere = getOSDirectory() & "Preferences" & ""
    else
    set gWhere = getOSDirectory() & "\"
    end if

    Then I create a file with the FileIO Xtra and write to it.
    This does not work on Mac OS X because this path does not exist. Funny: a
    file is created in the folder of the projector but remains empty and
    therefore a player error is produced.
    My question: Where is the place to store an Ini file on the Mac with OSX?
    Does "getOSDirectory()" of FileIO work?
    How I find out that I am on Mac OS X? the platform? What does it return
    then?

    Sorry I am developing on Windows and have an old Mac Power PC, but do not
    want to buy a new computer just for finding out a few lines of code...
    .... bad enough I had to spend the money for the MX update to create the
    projector...

    Thanks in advance for help.

    Moritz



    Moritz Boerner Guest

  2. Similar Questions and Discussions

    1. Preferences problems with CS
      Has anybody else experienced the "com.adobe.illustrator.plist" corrupting often in Illustrator CS? We seem to have a few very different and random...
    2. Help with preferences...
      Setting up a new PC. Same operating system (WinXP Pro). Is it possible to copy my preferences (i.e., swatches, print pre-sets, etc) for use on the...
    3. Need help with preferences
      How can I check if my default preferences have been restored? I did the shift-control-alt command when I launched the program but I'm not getting any...
    4. Resetting Preferences
      I'm embarrassed to even ask as many times as it has been posted...But can someone please refresh my memory on how to reset preferences. I printed it...
    5. preferences
      A recent article encouraged using the structural tags <strong> and <em> instead of the html formatting tags <b> and <i> (which Dreamweaver uses). Is...
  3. #2

    Default Re: Mac OS X Preferences?

    > My question: Where is the place to store an Ini file on the Mac with OSX?

    You need fileXtra4 from [url]http://kblab.net/xtras[/url] to get that info.
    > Does "getOSDirectory()" of FileIO work?
    I would be surprised if it worked with OSX because it was written a long time
    ago.

    Andrew

    Andrew Morton Guest

  4. #3

    Default Re: Mac OS X Preferences?

    Hi Moritz,

    You shouldn't use the machineType property to test for the platform.
    That doesn't work reliably any more.

    You can use getOSDirectory() to find the system folder in Mac OS X.
    However, there is no preferences folder inside the system folder in OS
    X. The only folder inside the system folder in OS X is Library. You
    can't write to the System folder in OS X. An alternative is to create a
    new folder at the root of that drive and write your file(s) there.
    Another option is to write to the Preferences folder that is in the
    Library folder that is at the root of the startup drive. This is where
    most apps store their preference information.

    If you want to find the exact OS that the user is running, ask for the
    osVersion property of the environment.

    put the environment.osVersion

    -- "Macintosh OS 10.3.2"

    for example.

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139