Skip to content

Instantly share code, notes, and snippets.

@caged
Forked from geoffgarside/gist:85760
Created March 25, 2009 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caged/85761 to your computer and use it in GitHub Desktop.
Save caged/85761 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 ([[KMLoginResponse class] isKindOfClass:[theResponse 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