Re: Guidance for learner
Re: Guidance for learner
- Subject: Re: Guidance for learner
- From: "Barry" <email@hidden>
- Date: Wed, 27 Jun 2007 16:04:40 +0100
Alan
Thanks for the helpful advice
I have a subclass of NSDocumentController as my delegate, so now I have
@interface MyDocController : NSDocumentController
{
NSArray *dataFiles;
}
@end
and the code you provided is in the init method of MyDocController .
I need to access this data from each MyDocument (subclass of NSDocument) so
I havewithin my 'readFromData' method
int i=1;
NSData *data=[[MyDocController dataFiles] objectAtIndex: i];
const char *p;
p=[data bytes];
I'm sure you can see a problem.
One: Does dataFiles (the NSArray) know that it's Objects are NSData Objects
?
If not, how do I coerce it (sorry, using C++ terminology here)
Similarly, [data bytes] returns a void* which needs coercing to byte*
All help welcome
Barry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden