• 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
Need help, trying to populate a plain Table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help, trying to populate a plain Table


  • Subject: Need help, trying to populate a plain Table
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 19 Aug 2014 09:35:05 +1000

G'day again scripters.

This is probably the last hurdle for my app.

I've got a table that has to contain a fixed set of data, so I can't use an Array Controller.

I cannot work out how to populate the table. I've researched, and only come up with the Apple Table page. Here

From which I got this…

tell my displaySessionsTable to tableView_setObjectValue_forTableColumn_row_({my displaySessionsTable}, {item 1 of eachItem as text}, {"sessionsName"}, {x as integer})


I get a 'unrecognized selector sent to instance' error.

I've entered 'sessionsName' in the Identifier and Description items of the Identity Inspector.

Anyone know if I'm on the right track, and what the error means please?

Regards

Santa


on SetUpSessionDisplayData()
set pathToDataFolder to path to documents folder as text
tell application "Finder"
try
set checkFolder to pathToDataFolder & "ADJ Documents" as text
set everyFileToCheck to name of (every file of folder checkFolder whose (name starts with ("ADJ " as text)))
set SessionDataInitial to {}
repeat with eachFile in everyFileToCheck
set workingFilePath to POSIX path of (pathToDataFolder & "ADJ Documents:" & eachFile as text)
try
set nowReadList to current application's NSDictionary's dictionaryWithContentsOfFile_(workingFilePath)
set allTheSettings to nowReadList's NSDatesSavingData
set checkStartDateTimeNSDate to allTheSettings's startDateTimeNSDateData
set checkFinishDateTimeNSDate to allTheSettings's finishDateTimeNSDateData
set displayASStartTime to ((extras's fordNSDateToASDate_(checkStartDateTimeNSDate)) as date) as text
set displayAsFinishTime to ((extras's fordNSDateToASDate_(checkFinishDateTimeNSDate)) as date) as text
set eachSessionEntry to {}
set end of eachSessionEntry to eachFile
set end of eachSessionEntry to displayASStartTime
set end of eachSessionEntry to displayAsFinishTime
set end of SessionDataInitial to eachSessionEntry
end try
end repeat
set SessionsInOrderArray to {}
set theTotalCount to count of SessionDataInitial
repeat
set lowestFlag to 1
repeat with eachSession from 1 to count of SessionDataInitial
set checkSession to item eachSession of SessionDataInitial
if checkSession ≠ "" then
try
set checkStart to checkSession's NSDateStart
if eachSession as integer = 1 then
set compareStartDate to checkStart
else
if checkStart's compare_(compareStartDate) < 0 then
set lowestFlag to eachSession as integer
set compareStartDate to checkStart
end if
end if
end try
end if
end repeat
set end of SessionsInOrderArray to item lowestFlag of SessionDataInitial
if (count of SessionsInOrderArray) as integer ≥ theTotalCount as integer then exit repeat
set removeItemList to {}
repeat with x from 1 to count of SessionDataInitial
if x ≠ lowestFlag then set end of removeItemList to item x of SessionDataInitial
end repeat
set SessionDataInitial to removeItemList
end repeat
set x to 1
repeat with eachItem in SessionsInOrderArray
say 1
tell my displaySessionsTable to tableView_setObjectValue_forTableColumn_row_({my displaySessionsTable}, {item 1 of eachItem as text}, {"sessionsName"}, {x as integer})
set x to x + 1
say 2
end repeat
on error errmsg
display dialog "SetUpSessionDisplayData " & errmsg
end try
end tell
end SetUpSessionDisplayData
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Need help, trying to populate a plain Table
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Using shell script's xattr
  • Next by Date: Re: Need help, trying to populate a plain Table
  • Previous by thread: Using shell script's xattr
  • Next by thread: Re: Need help, trying to populate a plain Table
  • Index(es):
    • Date
    • Thread