very simple NSRange q
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.