• 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
Re: Newbie: Dynamically filling NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Dynamically filling NSTableView


  • Subject: Re: Newbie: Dynamically filling NSTableView
  • From: Ryan Harter <email@hidden>
  • Date: Sun, 25 Feb 2007 20:16:57 +0100

Thanks a lot Scott-

You were right in that I should have replied to the whole list, didn't even think of the "Reply to All" button. I think my problem with this topic is connecting the table to the array. My thought is that if I can connect the table to an array, all I should have to do is fill the array with NSStrings containing the file path, and an int value for the status icon(pending, working, finished) and send that to the table. Perhaps instead of the int value, if this goes directly to the table, it should be NSImage? I've followed a couple of tutorials on connecting arrays(as NSDataSource) to tables and then reloading the data in the table, but to no avail. I'm not sure why they didn't work(and don't have the links handy) as I don't know the correct procedure.

My thoughts are that the run loop should proceed like this:

1. User clicks the '+' button and an NSOpenPanel opens allowing the user to select files.
Drag and drop can be added later with NSPasteBoard, I think.
2. User selects item(s) and the paths are extracted, converted to NSStrings and added to the array connected to the table.
3. status is set to pending until the files are worked on.
4. NSTableView reloads data from the array and the file paths are displayed.


Let me know if you have any ideas.  Is this an accurate approach?

Thanks
Ryan

On Feb 25, 2007, at 08:16 , Scott Stevenson wrote:


On Feb 24, 2007, at 4:00 PM, Ryan Harter wrote:

I have an NSTableView that I want to hold the file names and a status icon for files a user can load into my program. The idea is that they will click the add button(or drag and drop in the future) and select input files, then they appear in the table. I really have no idea where to start(controller, datasource) so if anyone could point me in the right direction, that would be great.

Do you already know something about Cocoa and Objective-C and are just trying to learn about NSTableView specifically, or are you starting from absolute zero?


   - Scott
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40gmail.com


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Newbie: Dynamically filling NSTableView
      • From: Scott Stevenson <email@hidden>
References: 
 >Newbie: Dynamically filling NSTableView (From: Ryan Harter <email@hidden>)
 >Re: Newbie: Dynamically filling NSTableView (From: Scott Stevenson <email@hidden>)

  • Prev by Date: Reset toolbars on new release
  • Next by Date: Dragging file promises from an NSOutlineView
  • Previous by thread: Re: Newbie: Dynamically filling NSTableView
  • Next by thread: Re: Newbie: Dynamically filling NSTableView
  • Index(es):
    • Date
    • Thread