views:

63

answers:

2

I'm experiencing some difficulties here.

I have a drop zone (custom view) with it's own class. Everything works great so far with it. The problem is that I can't get the result from the drop operation outside the class of the drop zone. I read everything I found in the net.

For instance, I would like my drop zone to count the lenght of the Array with the objects (files) dropped and set this number to a NSTextField. I know how to count the array, I don't know how to get this value and set it to the text field.

+1  A: 

Send the array to your controller (most probably by having your drop-zone view's header declare a delegate protocol and giving the drop-zone view itself a delegate property, and having the controller conform to that protocol and appoint itself as that delegate), and have your controller send the count to the text field.

Peter Hosey
That's kinda confusing. :)
Y. Georgiev
Y. Georgiev: What was confusing about it?
Peter Hosey
A: 

I'm really confused. I got the idea with sending the array to the controller. Maybe my english is too poor to deal with the whole explanation. I really won't bother anyone so only who want, please take a look at my test project. DOWNLOAD 2MB+

It should be great if you leave some comments.

Y. Georgiev
This should be an edit to your question, not a separate response.
Alexsander Akers
I didn't noticed, sorry about that.
Y. Georgiev