• 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: NSPathControl w/ popups and icons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPathControl w/ popups and icons


  • Subject: Re: NSPathControl w/ popups and icons
  • From: Shane <email@hidden>
  • Date: Sat, 31 Jul 2010 19:44:49 -0500

I'm trying to create an NSPathControl where there are several items
(components) within the row and each item (component) is a popup menu.
And then I would populate each of those popups w/ items. But I'm
having a problem in understanding if that's how it really works.

I'm playing around w/ the following code. Can anyone offer guidance on
using NSPathControl?


	NSPathComponentCell *cell1 = [[NSPathComponentCell alloc] init];
	[cell1 setTitle:@"cell 1"];
	[networkComponents addObject:cell1];

	NSPathComponentCell *cell2 = [[NSPathComponentCell alloc] init];
	[cell2 setTitle:@"cell 2"];
	[networkComponents addObject:cell2];

	NSMenu *pathMenu = [[NSMenu alloc] initWithTitle:@"Main"];
	NSMenuItem *pathItems = [[NSMenuItem alloc] initWithTitle:@"item #1"
action:nil keyEquivalent:@""];
	NSMenuItem *pathItems2 = [[NSMenuItem alloc] initWithTitle:@"item #2"
action:nil keyEquivalent:@""];
	[pathItems setSubmenu:pathMenu];
	[pathItems2 setSubmenu:pathMenu];

	[networkPathControl setMenu:pathMenu];

	// setStringValue works, but its' only 1 single popup that's empty unless
        // I click on it, then I see the string values
	//[networkPathControl setStringValue:@"cell 3 / cell 4"];

	//[networkPathControl setPathComponentCells:networkComponents];
	//[networkPathControl setBackgroundColor:[NSColor blueColor]];
	//[networkPathControl setNeedsDisplay:YES];
_______________________________________________

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

References: 
 >NSPathControl w/ popups and icons (From: Shane <email@hidden>)
 >Re: NSPathControl w/ popups and icons (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: QTKit Question
  • Next by Date: Re: loading French strings being in English language
  • Previous by thread: Re: NSPathControl w/ popups and icons
  • Next by thread: Moderator - Reminder, NDA is in effect for Xcode 4
  • Index(es):
    • Date
    • Thread