• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Weird XCode 1.5 problem, I think
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird XCode 1.5 problem, I think


  • Subject: Weird XCode 1.5 problem, I think
  • From: Lorenzo Thurman <email@hidden>
  • Date: Wed, 19 Jan 2005 21:14:13 -0600

OK, I have a program which is supposed to call an AppleScript to retrieve a password from the Keychain. For the AppleScript part, I found some sample code which demonstrates how to call a script from Cocoa. So I copy the code into my program and run it to make sure it works. What should happen is that the script should return an integer value (int32Value). Well it did, the value returned was 2, which is correct. OK, so I see how to do this. So now I change the AppleScript to suite my needs along with the code that calls the script which should retrieve a password from the Keychain, an NSString* (stringValue), 'spike'. Well, it does, at least on my account on this computer. I copy the program to the /Applications folder, login as another user also with admin rights and an identical Keychain item in its Keychain, run the program, and the result is 2. What! So, I switch back to my account, run the program from the /Applications folder and the result is: 'spike', this is correct. I have a third account on this computer which does not have admin rights, so I had to set access for it to run. This account does not have that same Keychain item but the result is still 2. So I clean the project, rebuild, copy the program back to /Applications and the result, in the same order as before is: 'spike', 2, 2. Maybe this makes sense to some people out there, if so, please stop here and clue me in, otherwise read on, because it gets stranger.
I debug the program in my account and get to the line where my result is returned, and this is what I should see: NSString* pw = [result stringValue].
Well that's what I do see, and of course it returns the correct result. I open the project in my secondary account, but the above line now reads: int result = [result int32Value], the is from the sample code! What happened? If I quit XCode and open that particular source file from the Finder, XCode opens the file and that line now reads correctly: NSString* pw = [result stringValue]. Of course, it occurred to me that somehow I'm looking at two different files, but "Reveal in Finder" shows the correct file. Opening the project again in XCode still shows the "old" code. What I had to do to fix this at least, was remove the source files and AppleScript from the project and then re-add them. The result from my primary account is still correct, 'spike', but still wrong in my secondary account, 2, but at least the source code is now correct at that particular line in both accounts. So what's going on here? Am I missing something or is XCode trippin'?
TIA


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: [Announcement] An Introduction to Programming OS X and Cocoa Workshop
  • Next by Date: "distccsched" eating cpu, running hot
  • Previous by thread: [Announcement] An Introduction to Programming OS X and Cocoa Workshop
  • Next by thread: "distccsched" eating cpu, running hot
  • Index(es):
    • Date
    • Thread