I'm working in Script Editor rather than Xcode at the moment. Borrowing from Shane Stanley's Dialog Toolkit Plus, I've got the following test field set up, but I can't seem to hook up the action handler to the text field and have it trigger continuously (or at all for that matter). It's been a while since I did some ASOC work in Xcode at my last job, but my memory of everything feels solid. What am I doing wrong here?
My end goal is to use this in the accessory view in Myriad Tables. I'm able to get the field into an acc view and attach that to the table/window, and it displays correctly and allows me to enter text, but the action doesn't seem to trigger... I'm stumped.
Code:
property Cocoa : current application
property testValue : missing value
on testAction(sender)
set my testValue to (sender's stringValue) as text
end testAction
set theField to (Cocoa's NSTextField's alloc()'s initWithFrame:{{0, 0}, {100, 22}})
tell theField
(its setEditable:true)
(its setBezeled:true)
its setAction:testAction
its setContinuous:true
its setTarget:me
its setDelegate:me
its setStringValue:""
end tell
My end goal is to use this in the accessory view in Myriad Tables. I'm able to get the field into an acc view and attach that to the table/window, and it displays correctly and allows me to enter text, but the action doesn't seem to trigger... I'm stumped.