• 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: IKImageView selection issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IKImageView selection issue


  • Subject: Re: IKImageView selection issue
  • From: Graham Cox <email@hidden>
  • Date: Fri, 6 Feb 2009 14:40:19 +1100


On 6 Feb 2009, at 2:14 pm, Christian Graus wrote:

OK - that makes some sense, excepting that if I don't set the delegate, and just define the methods, they don't get called at all. Also, all the delegates are useless to me, b/c none of them fire when the selection has been made, only when the box is initially created. I've set the delegate to be the class that contains it and resolved my overall issue, but I cannot get a mouseUp event from the IKImageView, without which, I don't see how to respond to the end of a selection action, as opposed to the start of it ?


I'm beginning to get a glimmer of what you're trying to do. Maybe you could help me out and just tell me?

I can't see what the delegate's methods are in the documentation I have, so maybe I'm not up to date. But I'm sort of guessing that - selectionRectAdded: is a delegate method. Where did you find out about it?

Incidentally while the pattern I mentioned of both the object and its delegate implementing <foo> it's not necessarily always the case, in fact it's not that common, though I have seen it. The infinite loop potential is one good reason for not organising code that way. So just adding a delegate method to the class itself isn't guaranteed to be called, and in fact is unlikely.

Anyway, you make a selection and you want to find out at the end of that what it is. I see no method to obtain that rect (enhancement request time? Seems like a sensible thing to want to do, though I think the design philosophy of IKImageView is that it's self contained - it performs the necessary crop or whatever for you, and you just get the modified image back). If overriding mouseUp: doesn't fire, that suggests to me that IKImageView is handling its own tracking loop, in which case overriding mouseDown:, and calling super will give you a place to respond at the end of the tracking loop.

Another thing to note is that Apple, with some of their more recent classes, are expecting you to use KVO or bindings to observe changes. Not that I can see a property that you could observe for this, but I'm not looking that hard - after all it's not my problem ;-)

And what's drag and drop to do with this? Maybe if you could take a bit more care to explain a) what you're trying to do and b) what you've tried then maybe some things might fall into place.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: IKImageView selection issue
      • From: Christian Graus <email@hidden>
References: 
 >IKImageView selection issue (From: Christian Graus <email@hidden>)
 >Re: IKImageView selection issue (From: Graham Cox <email@hidden>)
 >Re: IKImageView selection issue (From: Christian Graus <email@hidden>)

  • Prev by Date: Re: Simple memory problem
  • Next by Date: Re: Needed : set class for Cocoa
  • Previous by thread: Re: IKImageView selection issue
  • Next by thread: Re: IKImageView selection issue
  • Index(es):
    • Date
    • Thread