Re: folder content as model for NSTableView
Re: folder content as model for NSTableView
- Subject: Re: folder content as model for NSTableView
- From: j o a r <email@hidden>
- Date: Fri, 15 Feb 2008 11:56:17 -0800
On Feb 15, 2008, at 11:30 AM, Torsten Curdt wrote:
I'd assume I would have to come up with a FolderController extending
either NSObjectController or NSController. Or extend
NSArrayController and fill the array from the folder.
I wouldn't subclass these classes for that purpose. Create a class
that represents a folder at a given path and give the instances of
that class a "contents" property, then bind that property to the array
controller of your table view.
In general the problem I see is that the model could change
"underneith". A file could have been deleted/added outside the
application and not through the controller. Of course I could poll
the directory for changes ...or is there a way to register to
receive file modification events?
See the docs for FSEvents.
j o a r
_______________________________________________
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