[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
subview bindings not working in NSBox with bound hidden attribute
Rick,
iCal and the like maintain their view manipulations with NSSplitView,
which lets you do some fancy things as far as managing which views are
displayed. I have not played specifically with the bindings API and
seen if NSSplitView responds as expected to the hidden binding, but you
can use the standard NSView -addSubview: and -removeSubview: calls
followed by an -adjustSubviews to your NSSplitView.
It would be interesting to see if the bindings implementation works
with this as well.
HTH,
David
-----
David Christensen
Founder and CTO
Yin Yan Software
On Mar 22, 2004, at 9:05 AM, Rick Hoge wrote:
>
> I'm trying to toggle the visibility of part of my user interface by
> making the elements I want to show or hide subviews of an NSBox and
> binding the hidden attribute of the box to a display attribute
> maintained by the window controller. This works in that the box and
> its subviews have their visibility toggled as expected, but the
> subviews (NSImageViews with values bound to NSImage instance
> variables) don't have any content. All the subviews and their
> bindings work fine if the hidden attribute of the superview (the box)
> is not bound.
>
> Any ideas on what might be going on here? I want to achieve something
> like the functionality in iCal where you can toggle visibility of the
> To-Do list. Is this a reasonable way of doing this? I also
> substituted an NSView for the NSBox and got the same problem.
>
> Thanks for any suggestions,
>
> Rick
>
> _______________________________________________
> MacOSX-dev mailing list
> MacOSX-dev@xxxxxxxxxxxxx
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>