Re: problem with NSBrowser
Re: problem with NSBrowser
- Subject: Re: problem with NSBrowser
- From: Uli Kusterer <email@hidden>
- Date: Fri, 26 May 2006 18:40:38 +0200
Am 26.05.2006 um 17:32 schrieb Tom Wenger:
My application got a browser and i am able to load texts into into
it.But I
need to add another text into it.
But this remains the same string value in browser.What would i do
to load
the browser again with new vlues.
please give some examples.
I have a huge problem understanding what you're trying to do. Do
you speak another language in which you could try to explain what
you're trying to do, or can you provide more (and more precise)
information on what you're actually trying to do?
What kinds of "texts"? And how does something "remain the same
string value"? From your code I'd say you've hard-coded row 0, column
0 to show one string. So I'm not surprised if you don't get any other
strings. You could either hard-code more strings, or use an
NSMutableArray and add your strings to that, then use the row number
as the index for the array element to give a particular cell. Then
you can change that array to display other stuff in the browser.
Instead of an NSMutableArray, you may also want to use a class of
your own, with which you can better represent the hierarchy you're
probably trying to show...
That said, if you're just beginning with Cocoa, then NSBrowser
isn't really the right class to start with. You might want to start
with NSTableView or NSOutlineView first, those are easier to use, IMHO.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden