• 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
Re: NSView subclasses with IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView subclasses with IB


  • Subject: Re: NSView subclasses with IB
  • From: Stephane <email@hidden>
  • Date: Thu, 24 Aug 2006 14:39:32 +0200


On Aug 24, 2006, at 12:54 PM, lisaia wrote:

I'm trying to implement a drag operation with an NSImageView (dragging images out of it) and for this created:

myImageView (from NSImageView) with cellClass method (which returns [myImageCell class])

myImageCell (from NSImageCell) with trackMouse method

Everything works fine if I create the view programmatically, but if I set a view of type myImageView in a window with IB, the trackMouse method of myImageCell isn't called. In the best case the cell of myImageView will be of class myImageCell at initialization time but not afterwards.
(Also put myImageView and myImageCell classes in IB file)


Does anybody know what's happening or where I can find help, particulary for IB (I followed "Control and Cell Programming Topics for Cocoa" rules)?

One solution is to implement initWithCoder: in the myImageView class so that you can replace the cell instance.


Another one is to create your own palette with your myImageView object so that the nib really contains a myImageCell instance.

Is there a better way to implement dragging?

A category which replaces the appropriate methods?

--
Stephane Sudre


_______________________________________________ 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
References: 
 >NSView subclasses with IB (From: lisaia <email@hidden>)

  • Prev by Date: Re: Non-ASCII NSTask arguments
  • Next by Date: Re: Bindings Problem: KVO Not Being triggered?
  • Previous by thread: NSView subclasses with IB
  • Next by thread: Problem in scrolling a window.
  • Index(es):
    • Date
    • Thread