• 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: Assigning to property with 'readonly' atribute not allowed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assigning to property with 'readonly' atribute not allowed


  • Subject: Re: Assigning to property with 'readonly' atribute not allowed
  • From: David Duncan <email@hidden>
  • Date: Mon, 27 Jun 2011 15:10:32 -0700

On Jun 27, 2011, at 3:05 PM, Fernando Aureliano wrote:

I' doing the implementation of AQGridView, and everything was going well.

But, now I'm getting the error below.

- (AQGridViewCell *) gridView: (AQGridView *)inGridView cellForItemAtIndex: (NSUInteger) index;
{
MagazineCell *cell = (MagazineCell *)[inGridView dequeueReusableCellWithIdentifier:@"cell"];
if (!cell) {
cell = [MagazineCell cell];
cell.reuseIdentifier = @"cell";
                //Assigning to property with 'readonly' atribute not allowed
}
cell.backgroundColor = [UIColor clearColor];
cell.selectionStyle = AQGridViewCellSelectionStyleGlow;
cell.edicaoLabel.text = [[edicoesArray objectAtIndex:index] name];
    cell.dataLabel.text = [[edicoesArray objectAtIndex:index] name];
return cell;
}


I tried to do this on head file

@property(nonatomic, readonly, copy) NSString *reuseIdentifier;


But still no work.

Someone can see the problem?

As the error said, you cannot assign a value to a readonly property, and the property is indeed declared readonly. The root issue would seem to be that your MagazineCell class doesn't allow you to specify a reuse identifier (as presumably you want to use a different one). The best way to fix the issue is to change it so that it can (as UITableViewCell only allows you to specify the reuse identifier on initialize).

Also as I finished writing this I noticed that this is going to the Xcode-Users list, for which this is quite off topic. This would have been better posted on Cocoa-Dev.
--
David Duncan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Assigning to property with 'readonly' atribute not allowed (From: Fernando Aureliano <email@hidden>)

  • Prev by Date: Assigning to property with 'readonly' atribute not allowed
  • Next by Date: CVS Support
  • Previous by thread: Assigning to property with 'readonly' atribute not allowed
  • Next by thread: CVS Support
  • Index(es):
    • Date
    • Thread