My WebPolicyDelegate always returns false for actionInformation test
My WebPolicyDelegate always returns false for actionInformation test
- Subject: My WebPolicyDelegate always returns false for actionInformation test
- From: Ken Tozier <email@hidden>
- Date: Sun, 7 Mar 2004 20:42:44 -0500
I'm trying to restrict my WebPolicyDelegate to only clicks in links,
but am having no luck getting the following test to work. I'm sure it's
a syntax problem, but Apple's documentation doesn't give any examples
on proper usage. (or at least I couldn't find them)
Here's the snippet:
id test = [actionInformation
objectForKey:@"WebActionNavigationTypeKey"];
"test" contains a valid object (an NSCFNumber) at this point, but
comparing to WebNavigationTypeLinkClicked
always yields false even when it's certain that a link has been
clicked. What's the correct way to make this comparison?
if ([actionInformation objectForKey:@"WebActionNavigationTypeKey"] ==
WebNavigationTypeLinkClicked))
{
[listener ignore];
/* do custom stuff here */
}
else
{
[listener use];
}
Thanks,
Ken
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.