Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting a property for a Databrowser element




On Jun 8, 2006, at 1:30 PM, Mike Caveman Lehmann wrote:

hi guys,
I have a single column list-view data browser, and I'm trying to
inactivate some of the items.  It seems to me that I should (per item
ID) set the value of kDataBrowserItemIsActiveProperty, but I can't
seem to figure out how to set this property, either because I'm not
looking in the right places or because I'm barking up the wrong tree.
Any hints/advice/boo-urns?

Others have already shown you how to address this, so I just want to make sure you don't have a misconception about DataBrowser. DataBrowser is a display widget, nothing more. You need to maintain all state information about DataBrowser items somewhere outside of DataBrowser. Then, when DataBrowser needs to draw an item, it can ask for any information it needs. DataBrowser will cache data, but you should think of it as cached data, not data storage, which is why the only way to update what DataBrowser draws is to tell DataBrowser the item's information needs to be updated.


For example, if you have a list of 500 items and 10 are currently visible, and you tell DataBrowser that all items need to be updated in one column, DataBrowser will ask for the current information as it redraws the 10 visible items, but it will leave the other 490 items marked as needing to be updated if and when they need to be drawn. If you scroll the list later, DataBrowser will request the current information for the newly visible items.

Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >setting a property for a Databrowser element (From: "Mike \"Caveman\" Lehmann" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.