Easy. Create an instance of a NSButton:
NSButton *myButton = [[NSButton alloc] initWithFrame:nsRectOfButton];
Then add it to your view:
[view addSubview:myButton];
of course you might want to edit the image, title, style of the
button, so check in NSControl and NSButton docs for the
Hi all
I'm trying to make a lateral sidebar that is similar to Mail.app's or
iTunes'. It all works well with a NSOutlineView with the Data source
display option, but I was wondering how could I get the single items
to draw the equivalent of the unread count for folders in Mail.app's
There seems to be a missing method in NSOutlineView.
You can know an item is expanded only if its parent is expanded (so
that the item itself is visible).
This is problematic if you want to cache the current list of expanded
items. Instead of just iterating through the item hierarchy when
On Mar 2, 2008, at 12:02 AM, Stéphane Sudre wrote:
An I missing something and is there a way to know which items are
expanded (either visible or not)?
How about NSOutlineViewItemWillExpandNotification
NSOutlineViewItemWillCollapseNotification, and the associated delegate
methods?
j
Hello!
I want to retrieve the path to the currently played file in iTunes. I
thought scripting bridge would be the perfect tool for this, however
i've run into some problem. I have this code:
iTunesApplication *iTunes = [[SBApplication alloc]
initWithBundleIdentifier:@com.apple.iTunes];
Unless Stephane plans on manually tracking the expanded items himself, I
don't see how this answers his original question—and I think it's a
valid question, too.
j o a r wrote:
On Mar 2, 2008, at 12:02 AM, Stéphane Sudre wrote:
An I missing something and is there a way to know which items
On Mar 1, 2008, at 8:35 PM, Kyle Sluder wrote:
On Sat, Mar 1, 2008 at 9:01 PM, Adam R. Maxwell [EMAIL PROTECTED]
wrote:
Thanks, but I think you're misinterpreting the example :). The
object
has a single NSMachPort ivar, added to the some thread's runloop.
When a notification arrives on a
On Mar 1, 2008, at 7:28 PM, Hannes Petri wrote:
iTunesApplication *iTunes = [[SBApplication alloc]
initWithBundleIdentifier:@com.apple.iTunes];
iTunesTrack *currentTrack = [iTunes currentTrack];
if ([currentTrack isKindOfClass:[iTunesFileTrack class]]) {
…
}
The problem is,