• 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: Looking for guidance on first Core Data / Document based app - file list within the document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for guidance on first Core Data / Document based app - file list within the document


  • Subject: Re: Looking for guidance on first Core Data / Document based app - file list within the document
  • From: Bill Cheeseman <email@hidden>
  • Date: Fri, 26 Aug 2005 06:36:56 -0400

on 2005-08-25 4:20 PM, William E. Jens at email@hidden wrote:

> Picture a document window with a single column NSTableView
> that will hold files (full file paths actually) along with an Add and
> Delete button. I understand how to delete items from the table, but I'm
> stuck on how to wire up the Add button so it pops up a browse panel to
> select files. I've read about NSOpenPanel, but I'm hung up on where to
> call it from.

You could write your own action method to take the place of the -add: or
-insert: action method that is normally connected to the Add button. Your
custom action method would call the appropriate NSOpenPanel methods, then
call the -add: or -insert: method, or the underlying -insertObject: method
from Core Data. In Interface Builder, you would disconnect the existing
-add: or -insert: method, then connect your new action method in its place.

You would normally implement your custom action method in a subclass of
NSWindowController for your window.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
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

References: 
 >Looking for guidance on first Core Data / Document based app - file list within the document (From: "William E. Jens" <email@hidden>)

  • Prev by Date: Re: How to Add & Remove Buttons from the NSPrintPanel
  • Next by Date: Re: Custom Framework imported automatically : possible ?
  • Previous by thread: Looking for guidance on first Core Data / Document based app - file list within the document
  • Next by thread: Problem with Core-Data relationship
  • Index(es):
    • Date
    • Thread