Re: Animating source view design advice.

2012-06-07 Thread Demitri Muna
Hi,

Thanks Corbin for the reply. For some reason I completely forgot that 
NSOutlineView was a subclass of NSTableView. Yes, of course that is the best 
(and should have been obvious!) solution.

Cheers,
Demitri

---

On May 30, 2012, at 2:57 PM, Corbin Dunn wrote:

 On May 30, 2012, at 11:37 AM, Demitri Muna thatsanicehatyouh...@me.com 
 wrote:
 
 Just because I hate orphaned questions (as no one answered), I thought I'd 
 answer my own question.
 
 Most examples that use Core Data/bindings/array controllers use a table view 
 as the source view, but I wanted something more flexible with my own custom 
 view that involved a little animation. Although NSTableCellView makes this a 
 little easier, it still felt shoehorned into a table view.
 
 Really? Why? It fits quite perfectly with the view based tableview.
 
 I think the best answer is the realization that I don't need a table view at 
 all to use the machinery above,
 
 I think the best solution is to use a view based NSOutlineView with variable 
 row heights and custom background drawing on the NSTableRowView.
 
 FWIW, Xcode uses NSOutlineView (non-view based at the current time).

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Animating source view design advice.

2012-05-30 Thread Demitri Muna
Just because I hate orphaned questions (as no one answered), I thought I'd 
answer my own question.

Most examples that use Core Data/bindings/array controllers use a table view as 
the source view, but I wanted something more flexible with my own custom view 
that involved a little animation. Although NSTableCellView makes this a little 
easier, it still felt shoehorned into a table view. I think the best answer is 
the realization that I don't need a table view at all to use the machinery 
above, and that one can simply have an array of NSViews managed by an array 
controller (in a scroll view). Everything else (e.g. master/detail, bindings) 
just falls into place after that. The most illustrative example was mmalc's 
Graphics Bindings, located here:

http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

Although that link will only be valid for about a month before MobileMe ends. :)

Cheers,
Demitri
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Animating source view design advice.

2012-05-30 Thread Corbin Dunn

On May 30, 2012, at 11:37 AM, Demitri Muna thatsanicehatyouh...@me.com wrote:

 Just because I hate orphaned questions (as no one answered), I thought I'd 
 answer my own question.
 
 Most examples that use Core Data/bindings/array controllers use a table view 
 as the source view, but I wanted something more flexible with my own custom 
 view that involved a little animation. Although NSTableCellView makes this a 
 little easier, it still felt shoehorned into a table view.

Really? Why? It fits quite perfectly with the view based tableview.

 I think the best answer is the realization that I don't need a table view at 
 all to use the machinery above,

I think the best solution is to use a view based NSOutlineView with variable 
row heights and custom background drawing on the NSTableRowView.

FWIW, Xcode uses NSOutlineView (non-view based at the current time).

corbin


 and that one can simply have an array of NSViews managed by an array 
 controller (in a scroll view). Everything else (e.g. master/detail, bindings) 
 just falls into place after that. The most illustrative example was mmalc's 
 Graphics Bindings, located here:
 
 http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
 
 Although that link will only be valid for about a month before MobileMe ends. 
 :)
 
 Cheers,
 Demitri
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/corbind%40apple.com
 
 This email sent to corb...@apple.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Animating source view design advice.

2012-05-27 Thread Demitri Muna
Hi,

I would like to create a source view like Xcode 4's project navigator view. It 
will have parent views (e.g. the project) with a twist down triangle that, 
when clicked, will reveal the contents (e.g. files) in an animation that slides 
down. Many of these parent views can exist at the top level. When one is 
revealed, the ones below will slide down as well.

What is the best way to implement this? Is a table view with NSTableCellView's 
a reasonable approach? I'm wondering if that is the case since the items (when 
opened) will easily have differing heights depending on the number of children. 
Is an NSOutlineView more appropriate here (at least I get the sliding animation 
for free). One complication is that I'd like to be able to select the parent 
view in the same way that you can in Xcode (that brings up the project/targets 
inspector) to bring up a summary detail view.

I don't need a full implementation (not that I'd turn it away if one is 
available!), but a high-level view of the best approach to do this would be 
greatly appreciated!

Cheers,
Demitri
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com