NSImageView Drop

Hi there,

I’m really ashamed to ask my question, as I’ve found other forums already discussing it, but I didn’t understand it fully, so if someone would be so extremely kind to explain it (step by step) to me, I would very, very, grateful.

I’ve an “AppDelegate.applescript”.
All I want is that if the user drags an image into my NSImageView, I can get the source of that image.
How do I do that?

TechExpertHD said: (http://macscripter.net/viewtopic.php?id=37889)

(Me again)
But I don’t understand it fully…

Does that mean I should just add an “blabla.applescript” file?
Or should a insert another “on TheScript”, “end script” in my already existing “AppDelegate.applescript”?

Which app delegate? My “AppDelegate.applescript”? (That sounded rather stupid).

Ehh. Library?
I could only find the “File Template-, Code Snippet-, Object- and Media Library” in the bottom-right corner.

I do realize my questions are rather weird and for you probably obvious, but I would be grateful if you were to answer them.

Thanks in advance,

Isaiah van Hunen

Model: iMac
AppleScript: 2.4.3
Browser: Google Chrome
Operating System: Mac OS X (10.7)

Hi Isaiah

The correct advice will depend on the version of Xcode that you are using. There are major differences between version 3 and version 4.

You seem like someone that is willing to figure things out, so my very short and lazy reply would be to look at the following link.

http://allancraig.net/index.php?option=com_docman&task=doc_download&gid=14&Itemid=100

This is a full project that you can check out. It basically does exactly what you are looking for. Download it and check out how the whole project is structured.
Also, check out the rest of the above site, it has a few other great example.

Good Luck

Regards

PJ

Preferably a separate file.

Yes.

Click on your image view, show the Identity Inspector, and change the Custom Class to your new class name.

I’m so sorry…
I already got it by now…
Dunno why it didn’t work before though.
For others, I used this description: