• 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: AddressBook card view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AddressBook card view


  • Subject: Re: AddressBook card view
  • From: Vince DeMarco <email@hidden>
  • Date: Thu, 20 Jan 2005 14:05:33 -0800


On Jan 18, 2005, at 3:41 PM, Yann Bizeul wrote:



Looks to me like a view with a number of subviews in it.

AFAIK, it is not


The big difference is those multivalue controls - the label on the
left and the entries on the right. Delicious Library has something
like 'em too. Apple doesn't supploy those though so you'll have to
role one yourself. Beyond that it's pretty basic I think.

If this was subviews, each of them would have to be bigger to place the shadow, and that would be a headache to determine who get a click when it occures.
I was lucky enough to get some WWDC 2003 samples and video, and there was a session dedicated to this.
As said before, it is an NSTextView with markers, or some other way to flag the text, and decide according to mouse click position what is selectable or not, and dynamicaly draw a shadow around the selection.
Very good cocoa course !

This is exactly how we did it. The markers are markers in the NSTextViews attributed string. when the person clicks presses tab etc... the code basically searches for the next range of attributed string that has the correct markers.


Samething happens when the user wants to select something, look at the attributes of the string where the first part of the selection is then decide what to do.

The popups etc.. are all done using a custom NSCell subclass inserted into the text.

None of this is trivial, but also, no private APIs are needed to get this all working.

Vince


_______________________________________________ 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: 
 >AddressBook card view (From: Eric Friedman <email@hidden>)
 >Re: AddressBook card view (From: Guy English <email@hidden>)
 >Re: AddressBook card view (From: Yann Bizeul <email@hidden>)

  • Prev by Date: Re: AddressBook card view
  • Next by Date: Re: Binding problem
  • Previous by thread: Re: AddressBook card view
  • Next by thread: Re: AddressBook card view
  • Index(es):
    • Date
    • Thread