Hello,
I have an object B which fills a buffer (NSData *) buf asynchronously.
From my class A, I want to instantiate B but A needs to know when the
buf buffer is ready.
I would like to know which mechanism I should use:
* Should I pass a pointer to the calling class to B and in B send a
message to A, like:
(in A:)
B *b = [[B alloc] initWithCaller: a];
- (void) dataReady: (NSData *) buf {doSomethingWith: buf;}
(in B:)
[a dataReady: buf]
* Should I use selectors? (how do I do that)
* Any other idea?
Thanks,
Sylvain.