CPCollectionView : items resizing/repositioning behavior

56 views
Skip to first unread message

Thomas Balthazar

unread,
Nov 28, 2009, 2:03:54 PM11/28/09
to objec...@googlegroups.com
Hi,

I spent some time playing with CPCollectionView, and I guess it
doesn't resize/reposition its subviews (items) the way it should.

I know that there are some differences between the Cappuccino and the
Cocoa implementation of CollectionView, so I'd like to share my
thoughts here before I possibly try to propose a patch.

Here is an example (a modified version of this example is linked below) :
http://j.mp/5Oq9Di

See how the 4 collection views are created here :
http://gist.github.com/244514

My remarks about the example :
- 1st collection view : it has a MaxNumberOfColumns set to 1. I guess
that the 3 views should be aligned to the left instead of remaining
centered

- 2nd collection view : it has no MaxNumberOfColumns set, the Min and
Max item size have been set. If you resize your browser to make it
wider, you can see that the views are growing until the remaining
space is wide enough to contain another view, then they are resized to
their minimum size. I guess that the views should grow to their
maximum size then stop being resized.

- 3d collection view : same as previous, but no Max Item size set.
Here, if you make your browser window wider, I guess the view should
fill the whole width of the CollectionView

- 4th collection view : here, the collection view has a Min Item size,
but no Max Item size, and the MaxNumberOfColumns set to 1. I guess
that the views should fill the whole width of the collection view

And here is a modified example, that behaves the way I think it should :
http://j.mp/8JEfnB

Please share your thoughts.

Thanks!
Thomas.

Ross Boucher

unread,
Nov 28, 2009, 3:04:12 PM11/28/09
to objec...@googlegroups.com
Are you documenting the way the Cocoa NSCollectionView works, or describing some new way that you wished the Cappuccino one conformed to?

--

You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To post to this group, send email to objec...@googlegroups.com.
To unsubscribe from this group, send email to objectivej+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/objectivej?hl=en.



Thomas Balthazar

unread,
Nov 28, 2009, 6:26:24 PM11/28/09
to objec...@googlegroups.com
As far as I know, it's the way it works in Cocoa, and it's also the
way I would like it to work in Cappuccino.
Here are 4 small Cocoa projects that illustrate how it works in Cocoa :
http://dl.dropbox.com/u/40466/tmp/cappuccino/TestsNsCollectionView.zip

And that's what I tried to replicate in my second example :
http://j.mp/8JEfnB

What do you think?
Reply all
Reply to author
Forward
0 new messages