• 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
iTunes user rating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iTunes user rating


  • Subject: iTunes user rating
  • From: "Alan Smith" <email@hidden>
  • Date: Tue, 23 May 2006 18:01:49 -0400

I have downloaded and implemented SFHFRatingCell. My code:

in - (void)awakeFromNib

   SFHFRatingCell *starCell = [[SFHFRatingCell alloc] initImageCell:
[NSImage imageNamed: @"star.tif"]];
   [starCell setContinuous: YES];
   [starCell setHighlightedImage: [NSImage imageNamed:
@"star_highlighted.tif"]];
   [starCell setMaximumRating: [NSNumber numberWithInt: 5]];
   [[pluginTable tableColumnWithIdentifier: @"rating"] setDataCell: starCell];
   [starCell release];

Works fine. My code for setting the value of the cell:
'stars' is an id object.

   NSString    *identifier = [aTableColumn identifier];

   //If the user is trying to set the on/off of the plugin, go ahead, allow it
   if ([identifier isEqualToString:@"onOff"])
   {
       pluginClass *plugin = [tableItems objectAtIndex:rowIndex];
       [plugin takeValue:anObject forKey:identifier];
   }
   else if ([identifier isEqualToString:@"rating])
   {
       stars = anObject;
   }

Code for displaying the cell:

   if ([[aTableColumn identifier] isEqualToString:@"menu"])
   {
       [aCell setObjectValue:stars];
   }

That's it. It displays fine but if I switch from my app to another app
and back again, it crashes and gives a SIGBUS error. I'm missing
something but I don't know what. If only there was some documentation
with SFHFRatingCell.

Thanks, Alan

On 5/21/06, Alexander Griekspoor <email@hidden> wrote:
Hi, coincidentally I wanted to implement an iTunes rating indicator
today as well, and all of this has already been done by Buzz Andersen.
He also shows how to prevent column dragging, works awesome:
http://www.scifihifi.com/cocoalicious/
BSD license, thanks a bunch Buzz!!!
Cheers,
Alex



*********************************************************
                     ** Alexander Griekspoor **
*********************************************************
               The Netherlands Cancer Institute
               Department of Tumorbiology (H4)
          Plesmanlaan 121, 1066 CX, Amsterdam
                     Tel:  + 31 20 - 512 2023
                     Fax:  + 31 20 - 512 2029
                     AIM: email@hidden
                     E-mail: email@hidden
                 Web: http://www.mekentosj.com

Windows is a 32-bit patch to a 16-bit shell for an 8-bit
operating system, written for a 4-bit processor by a 2-
bit company without 1 bit of sense.

*********************************************************


_______________________________________________ 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



--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
_______________________________________________
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: NSPredicate and NOT IN and array
  • Next by Date: NSMatrix with NSTextFieldCells
  • Previous by thread: Re: iTunes user rating
  • Next by thread: Re: iTunes user rating
  • Index(es):
    • Date
    • Thread