NSSplitView iTunes Like

  • Hi to all,

    I would like to create a NSSplitView subclass iTunes like.
    How can I do?
    I need a tiny vertical line instead the big one I can find using IB
    and I would like to have as result a nice GUI like iTunes.
    Anyone knows where can I find some examples?

    Thank you all
    Yorh
  • You can find this information in many places by searching this
    list's archives, using Google, etc. It's a F.A.Q.

    http://www.cocoadev.com/index.pl?SplitViewBasics

      Read the above so you understand things a bit better, then:

    1 - Subclass NSSplitView.
    2 - Override -dividerThickness to return 1 (one pixel).
    3 - Override -drawDividerInRect: to fill the rect with your solid
    color (like grayColor or something similar).

      That's all there is to it - the rest is standard behavior / use of
    a split view which you can also learn by reading the documentation.

    --
    I.S.

    On Oct 25, 2006, at 10:51 AM, Yorh wrote:

    > Hi to all,
    >
    > I would like to create a NSSplitView subclass iTunes like.
    > How can I do?
    > I need a tiny vertical line instead the big one I can find using IB
    > and I would like to have as result a nice GUI like iTunes.
    > Anyone knows where can I find some examples?
    >
    > Thank you all
    > Yorh
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
    > 40gmail.com
    >
    > This email sent to <idiotsavant2005...>
  • On 25 Oct 2006, at 16:51, Yorh wrote:

    > I would like to create a NSSplitView subclass iTunes like.
    > How can I do?
    > I need a tiny vertical line instead the big one I can find using IB
    > and I would like to have as result a nice GUI like iTunes.

    I recommend RBSplitView (http://www.brockerhoff.net/src/rbs.html). It
    does exactly what you want, and works around some NSSplitView issues.

    Regards,

    Denis Defreyne

    --
    mail: <denis.defreyne...>
    web: http://stoneship.org/
  • On Oct 25, 2006, at 12:54 PM, Denis Defreyne wrote:
    > I recommend RBSplitView (http://www.brockerhoff.net/src/rbs.html).
    > It does exactly what you want, and works around some NSSplitView
    > issues.

      It's also extreme overkill for this rather simple requirement (a
    one-pixel divider). :-D RBSplitView is a great class, don't get me
    wrong, but if all someone needs is a basic change to a split view's
    divider, a do-it-all third-party class is completely unnecessary and
    only adds to possible bugs and complications.

      Do yourself a favor, Yorh, and learn how to do these simple things
    with NSSplitView (and any other existing Cocoa classes) yourself,
    rather than using third-party drop-in solutions to problems you don't
    really have. If, on the other hand, you need most or all of what
    RBSplitView has to offer, then by all means go for it, but you still
    need to do the basics on your own to figure out how the third-party
    code you're adding to your project actually works.

      For now, you can easily accomplish your goal with *very* few lines
    of code by subclassing NSSplitView and overriding those two methods I
    mentioned before. No need for a Swiss Army knife when a kitchen knife
    will do. ;-)

    --
    I.S.
  • Thanks,

    I read the documentation, but I think is better to use RBSplitView
    that is more complete than NSSplitView.
    I need more than 1 pixel divider of course, I need an automatic
    resize system and other features... so this is the reason why I'm
    planning to use RBSplitView.

    Thank you for your kind help
    Yorh

    On 25/ott/06, at 19:19, I. Savant wrote:

    > On Oct 25, 2006, at 12:54 PM, Denis Defreyne wrote:
    >> I recommend RBSplitView (http://www.brockerhoff.net/src/rbs.html).
    >> It does exactly what you want, and works around some NSSplitView
    >> issues.
    >
    > It's also extreme overkill for this rather simple requirement (a
    > one-pixel divider). :-D RBSplitView is a great class, don't get me
    > wrong, but if all someone needs is a basic change to a split view's
    > divider, a do-it-all third-party class is completely unnecessary
    > and only adds to possible bugs and complications.
    >
    > Do yourself a favor, Yorh, and learn how to do these simple
    > things with NSSplitView (and any other existing Cocoa classes)
    > yourself, rather than using third-party drop-in solutions to
    > problems you don't really have. If, on the other hand, you need
    > most or all of what RBSplitView has to offer, then by all means go
    > for it, but you still need to do the basics on your own to figure
    > out how the third-party code you're adding to your project actually
    > works.
    >
    > For now, you can easily accomplish your goal with *very* few
    > lines of code by subclassing NSSplitView and overriding those two
    > methods I mentioned before. No need for a Swiss Army knife when a
    > kitchen knife will do. ;-)
    >
    > --
    > I.S.
    >
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/list%
    > 40metagraphics.it
    >
    > This email sent to <list...>
  • On Oct 25, 2006, at 1:31 PM, Yorh wrote:
    > I need an automatic resize system

      Use what you like, of course, but even this is fairly simple. I
    assume you mean you want one of the panes to stay the same size when
    the window is resized. The -splitView:resizeSubviewsWithOldSize:
    delegate method is exactly what this is for; you don't even need to
    subclass and override. A quick example can be found on the
    cocoadev.com wiki.

      My point is this: It's always best to write targeted code rather
    than dropping in all-things-to-all-people code you don't fully
    understand. Your code and your skills as a developer will be better
    for it.

      Good luck with your project!

    --
    I.S.
  • Thank you again for your kind support.
    Yes I agree with you, the same thing was for me sockets ... I started
    my application using small sockets, now I wrote my own and all works
    perfect!

    ps: If you would like to know about my project you can write me :)

    Thanks
    Yorh

    On Oct 25, 2006, at 8:16 PM, I. Savant wrote:

    > On Oct 25, 2006, at 1:31 PM, Yorh wrote:
    >> I need an automatic resize system
    >
    >
    > Use what you like, of course, but even this is fairly simple. I
    > assume you mean you want one of the panes to stay the same size
    > when the window is resized. The -
    > splitView:resizeSubviewsWithOldSize: delegate method is exactly
    > what this is for; you don't even need to subclass and override. A
    > quick example can be found on the cocoadev.com wiki.
    >
    > My point is this: It's always best to write targeted code rather
    > than dropping in all-things-to-all-people code you don't fully
    > understand. Your code and your skills as a developer will be better
    > for it.
    >
    > Good luck with your project!
    >
    > --
    > I.S.
    >
    >
    >
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today