i am making an app that will change your status (called ‘iChat Status Modulator’), and it is all set for release, except for the fact that it doesn’t work on other computers. yes, i set the build type to deployment, etc. i have no idea what the problem is, which is why i am asking you guys for help. i have made multiple apps like this before, and they all worked fine, but with this one, when other people try to open it, it shows up momentarily in the dock, then quits/goes away. please help me!
What you describe are typical symptoms of a permissions problem (the executable bit of the app is off). Some times, you package the app as a “sit” file and you users expand it using StuffIt 8.0.0 (which expands executable things as not-executable).
Also, you can package it other way such that at uncompressing time, the executable bit is not kept.
Have you tried distributing as a dmg file? (which shouldn’t cause problems)
I don’t use iChat so I can’t test this fully, but I had no problem launching your app, configuring it, and then clicking the “modu-latte” button. After that, it hangs waiting for ichat to give it some input. It did successfully write prefs and run it’s idle handler, but nothing happened. Perhaps you could write some initialization that checks to make sure the user has all the components to run your app?
I agree with jj, you should package it in a dmg file. Why are you using zip files, anyways? Let the pc losers keep their zip format to themselves. Use dmg, sit/sitx, or even bin…but not zip. It strips mac files of necessary resource components. If you must package in a ‘lossy’ format, one in which data is lost on compression or uncompression, there are often remedies. Oftentimes a small script or droplet can add any damaged resources or re-write any permissions problems. Alladin Systems released a droplet that fixes the unstuffit problem, which I have a copy of if you need it. I see this problem once in a while and keep it handy for just these occassions. It is a bit daft to expect a user to run it every time they unpackage your app for installation though, unless you can build it into a custom installer.
Also, perhaps you should consider using the user defaults instead of a custom text file to save prefs. It’s easier, and more reliable than reading/writing a file, in my opinion. Plus, multiple users get their own preferences file, rather than just one universal one stored in the app bundle.
everybody, thanks for the help; i’m working on saving them as normal prefs right now. on an unrelated note, can someone tell me how to create a new text file from within AS? thanks again, i really appreciate it
set myFile to choose file name
--> OR --> set myFile to "Macintosh HD:Users:jed:Desktop:test.txt" as file specification
set myFileContents to "Test"
try
open for access myFile with write permission
set eof of myFile to 0
write (myFileContents as string) to myFile starting at eof
close access myFile
on error
try
close access myFile
end try
end try