Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// KMLoginResponse inherits from KMReponse
- (void)request:(KMRequest*)request didReceiveResponse:(KMResponse*)theResponse
{
[request release];
if ([delegate respondsToSelector:@selector(client:didReceiveResponse:)]) {
[delegate client:self didReceiveResponse:theResponse];
}
// I think this fails as theResponse comes in as a KMResponse
if ([theResponse isKindOfClass:[KMLoginResponse class]]) {
KMLoginResponse *r = (KMLoginResponse*)theResponse;
if ([delegate respondsToSelector:@selector(client:didLoginAsStaff:)]) {
[delegate client:self didLoginAsStaff:[r currentStaffMember]];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.