• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
My WebPolicyDelegate always returns false for actionInformation test
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Parameter strings in URLs
  • Next by Date: Re: Using NSView as a template
  • Previous by thread: Re: Periodic waking from a "deep" sleep ?
  • Next by thread: My WebPolicyDelegate always returns false for actionInformation test
  • Index(es):
    • Date
    • Thread