• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Henry McGilton <email@hidden>
  • Date: Wed, 26 Jul 2006 11:43:56 -0700



On Jul 26, 2006, at 11:37 AM, Brad Bumgarner wrote:

In the following code I get a warning at the line indicated with the arrow ("--->"). The warning is:

"warning: assignment from incompatible pointer type." I thought using an "id" declaration would avoid this kind of thing.


-(NSArray *)shiftObjectsInArray: (NSMutableArray *)anArray { int x;


Remove the asterisk.
==========================
                         |
                         |
                         |
                         V

id *roller;



if ([anArray count] > 0) {
---> roller = [anArray lastObject];
for (x = [anArray count]; x = 1; x--) {
[anArray replaceObjectAtIndex: x withObject: [anArray objectAtIndex: x-1]];
}
[anArray replaceObjectAtIndex: 0 withObject: roller];
return anArray;
} else {
return nil;
}
}

Cheers, ........ Henry


===============================+============================ Henry McGilton, Boulevardier | Trilithon Software Objective-C/Java Composer | Seroia Research -------------------------------+---------------------------- mailto:email@hidden | http://www.trilithon.com | ===============================+============================


_______________________________________________ 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
  • Follow-Ups:
    • Re: (no subject)
      • From: Brad Bumgarner <email@hidden>
References: 
 >(no subject) (From: Brad Bumgarner <email@hidden>)

  • Prev by Date: (no subject)
  • Next by Date: Re: Document not opened at launch? -- [SOLVED]
  • Previous by thread: (no subject)
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread