Professional Web Applications Themes

[Newbie] TabView how to - Mac Programming

Hi i'm writing a simple editor and i try to use NSTabView. The problem is this : how can i programmaticaly open a new tab and insert a NSTextView with scroll support ? When my user open a new file i'm able to initialize a new tabItem with a NSTextView inside, but it hasn't scroll bar :( Please help me Wezzy...

  1. #1

    Default [Newbie] TabView how to

    Hi i'm writing a simple editor and i try to use NSTabView. The problem
    is this : how can i programmaticaly open a new tab and insert a
    NSTextView with scroll support ? When my user open a new file i'm able
    to initialize a new tabItem with a NSTextView inside, but it hasn't
    scroll bar :(

    Please help me

    Wezzy

    Wezzy Guest

  2. #2

    Default Re: [Newbie] TabView how to

    In <vl_Ua.26651$sj6.586948tornado.fastwebnet.it> Wezzy wrote:
    > Hi i'm writing a simple editor and i try to use NSTabView. The problem
    > is this : how can i programmaticaly open a new tab and insert a
    > NSTextView with scroll support ? When my user open a new file i'm able
    > to initialize a new tabItem with a NSTextView inside, but it hasn't
    > scroll bar :(
    An NSTextView doesn't have a scroll bar. An NSScrollView has a scroll
    bar. If you want a scrollable text view, make an NSScrollView and put an
    NSTextView inside it. m.

    PS This has nothing to do with TabView.

    --
    matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  3. #3

    Default Re: [Newbie] TabView how to

    In <gaeVa.27631$sj6.608593tornado.fastwebnet.it> Wezzy wrote:
    > matt neuburg wrote:
    >
    >> An NSTextView doesn't have a scroll bar. An NSScrollView has a scroll
    >> bar. If you want a scrollable text view, make an NSScrollView and put
    >> an NSTextView inside it. m. PS This has nothing to do with TabView.
    >>
    >
    > Yes i've understand it but how can i put the NSTextView in
    > NSScrollView ?? i'm not able to do it!
    You make an NSScrollView, you make an NSTextView, and then you call
    setDoentView. m.


    --
    matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  4. #4

    Default Re: [Newbie] TabView how to

    matt neuburg wrote:

    > You make an NSScrollView, you make an NSTextView, and then you call
    > setDoentView. m.
    >
    Well i try something like this but it doesn't work!

    NSScrollView *scroller;
    NSTabViewItem * item;

    scroller = [[NSScrollView alloc] init];
    [scroller setDoentView:[[NSTextView alloc] init]];

    item = [[NSTabViewItem alloc] init];
    [item setView:scroller];

    [myTabView addTabViewItem:item];

    Can you tell me where is my error ?

    Thanks a lot for your time
    Wezzy
    Wezzy Guest

  5. #5

    Default Re: [Newbie] TabView how to

    In <z9jVa.28412$sj6.618635tornado.fastwebnet.it> Wezzy wrote:
    > matt neuburg wrote:
    >
    > scroller = [[NSScrollView alloc] init];
    That's not how you create an NSScrollView. Read the docs. Hint: an
    NSScrollView is an NSView. m.

    --
    matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  6. #6

    Default Re: [Newbie] TabView how to

    matt neuburg wrote:
    > In <z9jVa.28412$sj6.618635tornado.fastwebnet.it> Wezzy wrote:
    >> matt neuburg wrote:
    >>
    >> scroller = [[NSScrollView alloc] init];
    >
    > That's not how you create an NSScrollView. Read the docs. Hint: an
    > NSScrollView is an NSView. m.
    >
    Ok now i go to read everything about NSView!

    Can you sugguest me a good Cocoa book?

    Thanks a lot
    Wezzy
    Wezzy Guest

  7. #7

    Default Re: [Newbie] TabView how to

    In <yRrVa.28621$sj6.626359tornado.fastwebnet.it> Wezzy wrote:
    > matt neuburg wrote:
    >
    >> In <z9jVa.28412$sj6.618635tornado.fastwebnet.it> Wezzy wrote:
    >>> matt neuburg wrote:
    >>>
    >>> scroller = [[NSScrollView alloc] init];
    >>
    >> That's not how you create an NSScrollView. Read the docs. Hint: an
    >> NSScrollView is an NSView. m.
    >>
    >
    > Ok now i go to read everything about NSView!
    >
    > Can you sugguest me a good Cocoa book?
    The docs that come with Cocoa are excellent (and getting better). m.

    --
    matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  8. #8

    Default Re: [Newbie] TabView how to

    In message <vl_Ua.26651$sj6.586948tornado.fastwebnet.it>, Wezzy <Fabioest.it>
    wrote:
    >
    > Hi i'm writing a simple editor and i try to use NSTabView. The problem
    > is this : how can i programmaticaly open a new tab and insert a
    > NSTextView with scroll support ? When my user open a new file i'm able
    > to initialize a new tabItem with a NSTextView inside, but it hasn't
    > scroll bar :(
    >
    > Please help me
    >
    > Wezzy
    >
    That's because an NSTextView is usually put inside an NSScrollView...

    -Laurent.
    --
    ================================================== ===============
    Laurent Daudelin Logiciels Nemesys Software
    mailto:laurent.daudelinihatespam.net <http://nemesys.dyndns.org>
    Replace ihatespam with verizon to reply
    +++++++++++ Sent using an Apple Newton MessagePad 2100 ++++++++++

    Laurent Daudelin Guest

Similar Threads

  1. A newbie with a newbie question
    By dusty_davis@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 5
    Last Post: October 14th, 07:54 AM
  2. Newbie Needs Help!
    By starfishbaby in forum Macromedia Flash Player
    Replies: 1
    Last Post: September 14th, 06:40 PM
  3. newbie ill q
    By Curt Laven in forum Adobe Illustrator Windows
    Replies: 0
    Last Post: July 14th, 01:40 AM
  4. newbie help please!!!!!!!!!
    By GC in forum PHP Development
    Replies: 3
    Last Post: September 11th, 02:04 PM
  5. Please help the Newbie
    By Stingray in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 0
    Last Post: July 18th, 06:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139