• 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
Popup Menu Button & Sort Descriptors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Popup Menu Button & Sort Descriptors


  • Subject: Popup Menu Button & Sort Descriptors
  • From: Thaddeus Cooper <email@hidden>
  • Date: Mon, 27 Mar 2006 15:18:12 -0800

Hello All --

I have a popup menu button that is bound to an NSManagedObject that has a displayOrder attribute and another attribute (the real data). I use the display order to have a consistent display of the values by binding sortDescriptors of the NSArrayController to a method that looks like:

- (NSArray *) foobarSortDescriptor {
NSSortDescriptor *sortDescriptor;
NSArray *theArray;

sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"displayOrder" ascending:YES] autorelease];
theArray = [NSArray arrayWithObject:sortDescriptor];
return(theArray);

}


When the button comes up, the preloaded values are in the correct order each time -- but the "No Value" entry is always at the bottom of the list. I tried setting the default value in the CoreData model to be -1 so that it would be the lowest value item in the list -- but it still shows up at the bottom. Does anyone have any advice how to get the "No Value" entry to show up at the top?

Thanks very much.

--Thaddeus O. Cooper
(email@hidden)
_______________________________________________
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


  • Prev by Date: Draw a single bitmap multiple times into an NSView?
  • Next by Date: Re: Draw a single bitmap multiple times into an NSView?
  • Previous by thread: Re: Draw a single bitmap multiple times into an NSView?
  • Next by thread: Core Data: objectRegisteredForID: vs objectWithID: question / Cross store relationship problem
  • Index(es):
    • Date
    • Thread