G'day scripters
I'm using the following to save and retrieve the data (theData) for a Table.
I've tried to add 4 Arrays via bindings and the Array Controller, but while the data for the Arrays seems be be saved, I can't work out how to retrieve them.
Hopefully the following cut and paste code is understandable. The Table data is saved and retrieved OK.
Any advice appreciated, please
Regards
Santa
property theTempDaysArrayStore : missing value property theTempMonthsArrayStore : missing value property theTempWeeksArrayStore : missing value property theMonthDaysArrayStore : missing value all 4 bound to Array Controller
on saveData_(sender) set thetempData to current application's NSKeyedArchiver's archivedDataWithRootObject_(my theData) thetempData's writeToFile_atomically_(FILE_PATH, true) end saveData_
on importData_() try -- set openedFilePath to op's URLs()'s objectAtIndex_(0)'s |path|() set theArrayController's theData to setTheData_(current application's NSKeyedUnarchiver's unarchiveObjectWithFile_(File_Path)) on error errmsg display dialog errmsg end try end importData_
This sets up the Data to be stored for each entry, note the last 4 are Arrays
set anEntry to {theActiveColumn:theActiveStoreVariable,theStartDateColumn:theStartDateStoreVariable,theTypeColumn:theTypeStoreVariable,theDayStoreColumn:theDaysDisplay,theMonthsColumn:theMonthsDisplay,theWeeksColumn:theWeeksDisplay,theTextStoreColumn:theTextStoreVariable,theSpeakColumn:theSpeakStoreVariable,theVoiceColumn:theVoiceStoreVariable,theiTunesColumn:theiTunesStoreVariable,thePlaylistColumn:thePlaylistStoreVariable,thePlayListRandomColumn:thePlaylistRandomStoreVariable,theVolumeColumn:theVolumeStoreVariable,theDisplayFlagColumn:theDisplayFlagVariable,theMessageDisplayStoreColumn:theMessageDisplayStoreVariable,theTempDaysArrayStore:theHoldingDaysArray,theTempMonthsArrayStore:theHoldingMonthsArray,theTempWeeksArrayStore:theHoldingWeeksArray,theMonthDaysArrayStore:theHoldingMonthDaysArray} return anEntry
This is where I'm trying to retrieve the Arrays, nothing is logged.
log "Loading_________________"&return&return set my theHoldingDaysArray to (my theData's objectAtIndex_(tempRow)'s valueForKey_("theTempDaysArrayStore")) set my theHoldingMonthsArray to (my theData's objectAtIndex_(tempRow)'s valueForKey_("theTempMonthsArrayStore")) set my theHoldingWeeksArray to (my theData's objectAtIndex_(tempRow)'s valueForKey_("theTempWeeksArrayStore")) set my theHoldingMonthDaysArray to (my theData's objectAtIndex_(tempRow)'s valueForKey_("theMonthDaysArrayStore")) log "___________________"&return&return
This is data from one Array
|