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: data source problem




On 9 Mar 2005, at 18:45, Jasper Van Proeyen wrote:

Hi,

I have a second nib in my ASS project with a window called "HighScores"
I use the "on will quit theObject" handler before the app quits, to store the defaults in my plist file.


My problem:
I want to save all the data from a table from the "HighScores" window to the plist, but I get a NSReceiverEvaluationScriptError when I try to get the data.
Here's my piece of code:
set creditsList to contents of every data cell of every data row of data source of table view "creditsScore" of scroll view "creditsScore" of window "HighScores"


My guess is that I should say somewhere in my code that window "HighScores" is in the second nib (not the MainMenu.nib), but I wouldn't have a clue how…
Any suggestions?

No, you don't have to specify which nib a window belongs to. Referencing the window by name as you are doing is enough.


... So on the face of it I can't see anything wrong with your code.

One suggestion. Make sure that "Release when closed" is UNCHECKED in the attributes for the window in Interface Builder. If it is checked, then when the window closes, as it will when you quit, then as far as the application is concerned the window won't exist, so a reference to the data source of the table of the window will indeed generate the NSReceiverEvaluationScriptError error.

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

This email sent to email@hidden
References: 
 >data source problem (From: Jasper Van Proeyen <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.