Skip to content

Instantly share code, notes, and snippets.

@geoffgarside
Created March 25, 2009 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save geoffgarside/85760 to your computer and use it in GitHub Desktop.
Save geoffgarside/85760 to your computer and use it in GitHub Desktop.
// 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