Being a starter in Cocoa Programming, I would like to know using the existing NSTableView can one be able to achieve Disclosure Button? Or one has to follow NSOutlineview?
From the above picture, on selecting the list view and getting a Folder[Super view] and getting the children using a Disclosure button
Also can a registered Mac Developer get Finder app's sample code?
Thanks
NSOutlineView is just a subclass of NSTableView, so yes just use NSOutlineView to use the disclosure button.
Check out the docs for how to use it.
And no, Apple never released the source code for Finder.
Related
Dropbox has a wonderful new dropdown view for their menubar app. I have failed to find similiar cocoa examples to duplicate this type of view. NSMenuItem seems to be for basic lists. Any pointers in the right direction?
It's not a NSMenuItem. It is a NSStatusItem that resides in the systemwide NSStatusBar. The distinction is important, because NSStatusItems can call just about any method on any given object of your application when they're clicked.
I suspect that their NSStatusItem triggers an action that displays a borderless window.
You can find more information about status items in the Status Bar Programming Topics document.
how can i go about making a custom NSMenu for a menulet such as this?
Is this an NSMenu or is it a borderless window and if so how would i go about this?
Thanks!
It's an app running running on the OSX status bar.
See Status Bar Programming at Apple. Also, NSStatusBar and NSStatusItem
This SO post has some additional pointers:
How to create a Menubar application for Mac
More specifically it could be an NSPopover, an NSWindow, or even NSStatusItem.view's custom view. In the case of an NSWindow (often a utility form of NSPanel) (or the NSPopover) you would manually open the window when the status item is clicked, using the status item's -(void)setAction and -(void)setTarget. If you use a custom view for the status item, this would be done in -mouseDown:.
Check out this post - I found it useful.
Look at the documentation for NSStatusItem. I believe you can have it display a view instead of a standard NSMenu which is what it looks like they are doing in that image.
I am becoming one sad stackoverflow-er (not flower ) :S
I would like to know the explicit steps required to add a UITableViewController as the detail view of a splitViewController using xCode and Interface Builder. This is an iPad application, so it does not have to run on the iPhone
I have gone through a number of tutorials that create UISplitViews, so I understand the concept. But each of these tutorials add a webview, or simple view controller that shows an image.
The left side of the split view shows a list of menu items that I can customize. that's the popover. no problem.
the right side needs to be a UITableViewController that I an descend and ascend that will have menu items based on the button clicked on the left hand popover.
I also looked this link - http://www.cimgf.com/2010/05/24/fixing-the-uisplitviewcontroller-template/ but the discussion appears to note that it's a "hack" rather than an recognized workflow.
anyone help a brother programmer out? steps are appreciated.
regards,
Edard
Check out any of the examples on the net. Then take the detailViewController and turn it into a UITableViewController.
Alternatively, you can check out the UISplitViewController Class Reference.
Does anybody know of any XCode extensions or ways to create the Split View based application seen in Cocoa Touch in Cocoa for use in a Mac application?
Examples I've seen are "Reeder for mac" and the latest Twitter Application in the App Store.
Any help is greatly appreciated, thanks
Cocoa has an NSSplitView class which can be used in Interface Builder, and you can always create custom split views or use open source ones such as RBSplitView or the one available in BWToolkit.
What additional functionality are you looking for that isn't provided by the already-available NSSplitView?
Reeder for Mac seems to use a simple NSSplitView with 3 subviews. (To create a split view with 3 views, drag the usual NSSplitView into a window or view in InterfaceBuilder, then drag an additional NSView into the NSSplitView in the "Outline Mode" of your IB document's window.)
I was told that the application:openFile: delegate method for NSApp would allow my application to open files by dropping them into the dock, but does this also apply to NSStatusItems in the menu bar? I would like to know before trying to implement.
It does not. If you want this behavior, you'll have to roll your own custom view for the status item.