• 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: Custom Views and Dragging ... [ with attitude ]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Views and Dragging ... [ with attitude ]


  • Subject: Re: Custom Views and Dragging ... [ with attitude ]
  • From: J Nozzi <email@hidden>
  • Date: Wed, 21 Apr 2004 22:35:01 -0400

<ANGRY RANT>
First, let me say I'm a bit annoyed by the responses some people receive on this list when they ask a valid question. Allan, I'm not specifically attacking you, but your response wasn't particularly helpful. See below.

Newbies posting "how do I start XCode" questions notwithstanding, valid questions should not be met with brain-dead RTFM-like responses - especially when someone states up-front that he or she DID RTFM and to please not respond with RTFM ...

What gets me even angrier is when someone asks a valid question and is met with "What? Why would you want to do this? Why? MY GOD, WHY?!"

Never mind why! Unless the person is clearly heading down the wrong path, answer the question or leave the reply button alone. Just because someone's doing something differently doesn't mean you'd never want to do it. Apple frequently walks right through their own guidelines to achieve the next 'wow' interface. Unless what a person proposes is completely unworkable or totally preposterous, give them the benefit of doubt and try to answer the question ... or leave it alone.

Finally, I end this rant with the following point: If people understood the documentation, there would be no need for books and discussion forums, now would there? This is a forum for questions, so please drop the superior attitude and answer them the best you can or point them to better resources.
</ANGRY RANT>

<PUBLIC APOLOGY>
My sincere apologies to those of you who consistently take the time to help even the most brain-dead of us when we're way off course. You are the reason this mailing list is a valuable resource. I don't claim to be perfect - just ask my other half - but I know I'm not the only one who gets annoyed by unhelpful responses. Sorry to bother you with THIS. ;-) I *know* I'm going to catch flack for this, but if I have to be the jerk to state it, so be it.
</PUBLIC APOLOGY>


On Apr 21, 2004, at 8:33 PM, Allan Odgaard wrote:

See http://developer.apple.com/documentation/Cocoa/Conceptual/DrawViews/ index.html


As I specifically stated in my original post, I have read this several times over. I'm clearly missing a concept or two. I admit it's probably quite immediately obvious to 90% of those who've read it, but it's just not clicking. I'll restate: Would you know of any *other* resources that further explain this?

- How to *properly* make a custom NSView subclass draggable ONLY within the bounds of a superview (I'm using NSContainsRect([superView bounds], rect) as a hit test).
- How to drag and drop a custom view between two different superviews (okay, this one is probably well-explained, I just don't get it).

Huh??? When do you need to do these things? and why? Normally the user drags around a simple image, it could depict some custom view, but it is not the actual view you drag around.


Think of iMovie. First, you'd want to drag a custom view (they call it a 'slide') representing a clip to the timeline track. While dragging to position a clip within the track, it stays within the track (doesn't move vertically) until the pointer is well away from the track, then it becomes a 'slide' again. It doesn't make sense to allow it to be positioned on top of the scrubber or the viewer ... That is the most clear-cut example of when and why you'd need to do these things. I don't want to do exactly this, but iMovie does combine all these individual behaviors in one app - an Apple app at that.

As to your answer about dragging, I suppose that's exactly what I'd need to do to accomplish the effect referenced in the second question above. When reading the documentation, I for some reason thought that was just 'one way' of doing it, but thought you'd actually physically move the custom view. Perhaps that is an incorrect assumption and I thank you for pointing out that obvious mistake on my part. Seriously. ;-)

Actually using iMovie and playing with it, I can see that the original view remains in the clip palette until it's dropped on the timeline, then it is 'moved'. But now what about the confining-to-the-timeline question? The method I'm using (the NSContainsRect() hit test thing) doesn't seem right.

Again, I'd REALLY appreciate someone directing me to further reading on all this. At *least* a different perspective. I can't stress enough how things can be hard to grasp for some people until it's explained a little differently ...

Regards,

- J
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • [Moderator] Re: Custom Views and Dragging ... [ with attitude ]
      • From: mmalcolm crawford <email@hidden>
    • Re: Custom Views and Dragging ... [ with attitude ]
      • From: Allan Odgaard <email@hidden>
References: 
 >Custom Views and Dragging ... (From: J Nozzi <email@hidden>)
 >Re: Custom Views and Dragging ... (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re[2]: IOKit - USB from Cocoa
  • Next by Date: Re: Custom Views and Dragging ... [ with attitude ]
  • Previous by thread: Re: Custom Views and Dragging ...
  • Next by thread: Re: Custom Views and Dragging ... [ with attitude ]
  • Index(es):
    • Date
    • Thread