• 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
very simple NSRange q
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

very simple NSRange q


  • Subject: very simple NSRange q
  • From: Ben Dougall <email@hidden>
  • Date: Mon, 11 Aug 2003 14:55:15 +0100

hiyer,

i used NSRange like this with no problems just recently:

NSRange range = {startofinfo, endofinfo-startofinfo+1};
NSData *tempdata;
tempdata = [pdfData subdataWithRange:range];


but now, in a separate situation, i'm trying to use them in a slightly different way but it's not happening.

in the object's @interface variable section:

NSRange data;

and in the object's init method:

data = {start, length};

and i get lot's of errors:
TempStreamObj.m:20: illegal expression, found `{'
TempStreamObj.m:20: illegal statement, missing `;' after `length'
TempStreamObj.m:22: illegal external declaration, found `return'
TempStreamObj.m:20: parse error before '{' token

how should initiate this range? also why is the first one working and the second one not?

thanks, ben.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: very simple NSRange q
      • From: "Alastair J.Houghton" <email@hidden>
    • Re: very simple NSRange q
      • From: Marc Weil <email@hidden>
  • Prev by Date: Making textured windows pretty
  • Next by Date: Re: GCC3?
  • Previous by thread: Re: Making textured windows pretty
  • Next by thread: Re: very simple NSRange q
  • Index(es):
    • Date
    • Thread