Can anybody help with a setDoubleAction problem. I have started an ApplescriptObjC project that displays a window containing a multiple column table. When I double click on the window it only ever gives me the first line of the table. If I double click on a line in the table that does not contain an entry the subsequent double click works perfectly. I’m not sure how much code to display here, any help would save my sanity!
[code]property theData : {}
property tempList : {}
property firstWindow : missing value
property secondWindow : missing value
property theArrayController : missing value
property lineTable : missing value
property theDate : missing value
property theType : missing value
property theCategory : missing value
on buildList(theRecord)
set end of tempList to {theDate:text item 1 of theRecord,theType:text item 2 of theRecord,theCategory:text item 3 of theRecord, theOriginator:text item 4 of theRecord,theDescription:text item 5 of theRecord, theReference:text item 6 of theRecord, theValue:text item 7 of theRecord,theStatus:text item 8 of theRecord} – build list of required elements for display
theArrayController’s removeObjects:(theArrayController’s arrangedObjects()) – remove previous display
tell theArrayController to addObjects_(tempList) – load new display
secondWindow’s orderOut_(me)
firstWindow’s makeKeyAndOrderFront_(me)
tell lineTable to setDoubleAction_(“displaySelection:”)
end bulidList_
on displaySelection_(sender)
set theSelection to theArrayController’s selectedObjects() as list
–
set theDate to theDate of item 1 of theSelection – extract individual elements
set theType to theType of item 1 of theSelection
set theCategory to theCategory of item 1 of theSelection
end displaySelection_[/code]