• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Howto find the Outlet name Of a drag destination? OR Howto update model with Drag and Drop in the cocoa dialect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Howto find the Outlet name Of a drag destination? OR Howto update model with Drag and Drop in the cocoa dialect?


  • Subject: Howto find the Outlet name Of a drag destination? OR Howto update model with Drag and Drop in the cocoa dialect?
  • From: Steven Harms <email@hidden>
  • Date: Wed, 22 Sep 2004 09:58:47 -0700

Hi,

I have 10 drag destinations in a MyDocument that can be updated by dragging from another window (separate NIB, an Image browsing utility)

I have the visuals working right, but I realized I need to update my model to reflect what's in the drag destinations so that I may archive it easily.

I would like to store the status of the document containing these drag destinations in an NSMutable dictionary with the key set to the name of the IBoutlet.

I.e. in MyDocument.h I have

IBOutlet MyImageView * dragDest1;
IBOutlet MyImageView * dragDest2;
...


It currently works like this:
- MyImageView's concludeDragOperation sends a notification that the MyDocument listens for with itself as the object: argument
- I would then like MyDocument, upon receiving this notification to extract a key property from MyImageView (namely, the image's name) and then store it as the value to a key named after the outlet name.


Thus, if i dragged "mars.jpg" from an image browsing NIB, and dropped it into dragDest1 i would like to update the model (in this case an NSDictionary) to do:

[modelDictionary setObject: [[[notification object] image]name] forKey: @"dragDest1"];

Is there a way to do this ? Or is there a more-Cocoa-ish way of approaching it?

Thanks!

Steven
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: sheetDidDismiss selector no good from NSBeginAlertSheet
  • Next by Date: Re: Hacking the Finder with APE to turn the proxy icon into a drop target..
  • Previous by thread: Re: Initialize NSArray with C array?
  • Next by thread: Newbie: My first app, how to?
  • Index(es):
    • Date
    • Thread