Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ShortCuts in a MAC?




----- Original Message ----- From: "Will Gilbert" <email@hidden>
To: "Johnny Kewl" <email@hidden>
Sent: Sunday, February 10, 2008 4:59 PM
Subject: Re: ShortCuts in a MAC?




On Feb 10, 2008, at 9:37 AM, Johnny Kewl wrote:


Actually amazed at this... think I could get used of it ;)

There are some pretty clever engineers at Apple. Not to say that UNIX and Windows doesn't also have clever engineers working on their OS'es.



Just a few more questions..

Under the MacApp folder... can applications safely write to those files and add unrelated folders.
I'm thinking for example that having a file associated with the app may be optional.. so if the user says no it mustnt handle .Text
then the app changes its own Info.plist file.
Then I'm thinking if the application has an optional module... and that Jar is added to Resources/Jar and the Info.plist modified accordingly


And I thinking it persists user prefrences to a folder called MacApp.App/RememberStuff



In some weird sense you probably could, but it's not considered standard practice and is going to cause problems when either (A) the application is run from a shared server, (B) by multiple users on the same computre, or (C) the user upgrades by dragging and dropping a new version, replacing the older one. Yicks!

Ha ha... oops, yes not smart... u see, I'm not Macified yet ;) Preferences is better outside...


Simple preferences are written to "~/Library/Preferences", the Java preference API takes care of this for you -- it's great and cross platform. Am assuming you know what "~" is, user's home directory.


For the kind of module stuff you're talking about I would consider using "~/Library/Application Support". You could keep modules in a folder in there and then load them with a JarClassLoader by reading all the JARs the directory, dynamically. This is not cross platform but it's quite easy to figure out what platform you are on, then use the correct file path to load the JARs. This way new versions would just pick the existing modules and each user would have their own set of modules.

Now I am learning, I assume this "~/Library/Application Support"
is using Javas extension mechanism....
mmmm... that means classpath, and I always try keep stuff out of general class paths.


Playing with JarPacker I see it happily packs an executable Jar and its LIB folder...
so... I think I would aim at application specific modules being added there.
Just means than my xml parser wont mess with other apps etc...




ALL OK?

And then one more thing....
In this environment, is there a concept of SHORTCUT links? Like in the MS system?

They are called 'aliases' and are much smarter than UNIX or Windows Symbolic links. You can move the original file the alias will still find it. But now we're getting very non-cross platform, Mac OS supports symbolic links as well.

I'd like to learn a little more about aliases.... Do they setup in much the same way as a MacApp file structure... Can they be set from shell script?

I asked to to see if my assumption that the app is all over the place is correct...
so I imagine that if the users wants to run the app, its say at /user/theappfolder/MacApp


and then on the Desktop and in other folders they, if they linux orientated to symlinks
or if they Macified to aliases...


When we write java apps (yes I know is not platform universal), we always give the user the
choice of (add shortcut to Start Menu or Desktop, or Quick launch) and it would be nice
to give Mac users the same facility....?


If we have to make a MacApp type structure... thats no problem
I imagine the Mac has something like "~/Desktop/"

Thanks.... again

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Cant find the OSXize ant task (From: Greg Guerin <email@hidden>)
 >Re: Cant find the OSXize ant task (From: "Johnny Kewl" <email@hidden>)
 >ShortCuts in a MAC? (From: "Johnny Kewl" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.