Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
RE: Custom Controls and collections and all that
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Custom Controls and collections and all that



Hi Bryan,

I would have replied sooner but you you didn't send your followup to me. I only just checked the archives.

On Wed, 30 Jul 2003 08:31:58 -0600
"Pietrzak, Bryan" < email@hidden >

I think the one thing that I'd like a bit more detail on is the exact interaction of the control record and the original value/mix/max fields and the collection during initCtl, as well as the variation. It's not 100% clear to me when it's safe to begin using GetControlMaximium, or must I always access it via the collection from within the CDEF?

I know for sure that if your original value is greater than your original max that calling GetControlValue will reset that value to the max which is useless if you use special initial values. Most of my CDEFs don't bother with them and I write my own routines for setting getting values via Set/GetControlData with my own tags and a data structure stored via Set/GetControlDataHandle.

I'm not sure what the OS does if the max is less than the min, but it doesn't matter.

You only need to read the collection once, in the initCnt message. It won't be sent with any other message. When your ControlCNTLToCollectionProc is called it is passed the values you put in the original CNTL or the values you put in the nib. As far as I know this is the only way to guarantee getting the original values. The var code is passed in the same old way, the OS has no reason reason to change it. I don't read the var code from the collection, there's no need.

If you do use the given min/max/val though, get your original values from the collection, then set the min/max/val the way you want them to continue. After that everything should work as expected. And, BTW, another significant twitch is if you have controls with some type of dial that spins around using an action proc to live update, the OS doesn't call it periodically any more so you will have to use a timer.

Cheers Geoff %^>
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.