I understand that there was a previous email about this as well as a post in MacScript(er? ar?) too however, I am dealing with separate ASOC issues and might have not fully comprehended the prior resources.
Anyway, on to the actual issues.
I have two scripts. The first is my controller of which I want everything thrown into. The second is a subclass of "NSImageView" of which I have a performDragOperation_(sender) *function* (wrong terminology? Am I thinking C?). I want a variable that I set from performDragOperation in myImageWellScript to another function in myAppDelegate.
Note that I do not want to call performDragOperation like so: "tell class 'myImageWellScript' of current application to performDragOperation_(me)" because it is part of the API and has a right to complain of errors.
myImageWellScript:
on performDragOperation_(sender)
-- Get the file path
set pb to sender's draggingPasteboard()
set theFiles to pb's propertyListForType_("NSFilenamesPboardType")
set filePath to item 1 of (theFiles as list)
log theFiles as text
return true -- otherwise it doesn't happen
end performDragOperation_
I want the variable theFiles to be sent to myAppDelegate.
I tried a few things all of which failed.
set pathtoPicture to class "myImageWellScript"'s theFiles
tell class "myImageWellScript" of current application to set pathtoPicture to myImageWellScript's theFiles
tell class "myImageWellScript" of current application to set performDragOperation_(me)
tell class "myImageWellScript" of current application to set pathtoPicture to performDragOperation_(me)'s theFiles
I would absolutely love any help that any of you could provide.
--
Evan Schoffstall
Sent with Sparrow