Hello:
I’m very new to Applescript studio and have a question that’s probably simple to answer, but I can’t seem to figure it out.
So, I have an application that I’m building that has no user data involved with it. The whole program is set up just to display a list of pre-defined numbers in a table. Per documentation provided I’ve learned how to add data via a button from text fields. I’ve also learned how to populate the table with data on “awake from nib” using “append”. But what has been plaguing me is how to change the data to a new data source via a button click???
So basically I want to have several property lists like:
property tableData : {{|name|:“Bart Simpson”, city:“Springfield”, zip:“19542”, age:12}, {|name|:“Ally McBeal”, city:“Boston”, zip:“91544”, age:28}, {|name|:“Joan of Ark”, city:“Paris”, zip:“53255”, age:36}, {|name|:“King Tut”, city:“Egypt”, zip:“00245”, age:45}, {|name|:“James Taylor”, city:“Atlanta”, zip:“21769”, age:42}}
which is displayed in a table view. Then I want to be able to change the list to a new property list lets say:
property tableData2 : {{|name|:“Judy Sorn”, city:“pork”, zip:“25789”, age:25}, {|name|:“Telly Sev”, city:“Austin”, zip:“21548”, age:45}, {|name|:“Bill Bradski”, city:“NYC”, zip:“23569”, age:88}, {|name|:“King Kong”, city:“Sudan”, zip:“74523”, age:95}, {|name|:“Jimmy Hendrix”, city:“San Fransico”, zip:“45698”, age:32}}
by clicking a button, then updating the table view to reflect the changes. ??? I’ve tried all kinds of methods to do this but nothing seems to work.
Any help would be great. Thanks in advance.
-d