• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Help!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help!


  • Subject: Help!
  • From: Michael Robinson <email@hidden>
  • Date: Mon, 1 Sep 2008 21:38:54 +1200

Hi

I need to use a NSTableView to control data input by the user. The table has two columns, labeled "Title" and "Content". The number of columns is fixed.

I've read what I can find on the internet, but a lot of it goes way over my head (I'm fairly new at ObjC and xCode -- coming from Java).

I understand (from assorted hints I've seen online) that one may use a NSDictionaryController to handle data input/output/display/saving etc from a table.

I really have no idea how to do this, and haven't found a tutorial that speaks to my tiny brain.

I was hoping one of you Cocoa masters would have a tip or two?

This is what I've got:

a bunch of code that works (it creates html for a webpage based on user selection/input). a NSTextArea, NSTextField and NSTableView that are currently inert.

A NSDictionaryController sitting idle.

I want it to store data in key(title)value(content) pairs. Initially there are no key/vals, until the user creates a new entry. This should be handled by a little '+' button that I've placed below the NSTableview. Removal of the entries should be handled buy the '-' button at its side.

I feel confident that I could do all this, if I had any idea where to start. How do I "link" the NSDict... to my *.m *.h files so that I can save/load/ otherwise manipulate the data? How do I shove data into the nsdict....? Is it even an instance of nsdictionary? Do I need to make an NSMutableDictionary and somehow introduce them to each other?

Any help would be appreciated, I'm stuck in a bit of a hole here.

Thanks,

Mike


We build our computer (systems) the way we build our cities: over time, without a plan, on top of ruins


	-- Ellen Ullman

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Help!
      • From: Joshua Pennington <email@hidden>
  • Prev by Date: Re: Code Example: FunTextField
  • Next by Date: Increasing NSTextView's height
  • Previous by thread: Re: Image in NSOutlineView
  • Next by thread: Re: Help!
  • Index(es):
    • Date
    • Thread