• 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
NSPopupButton & URLs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopupButton & URLs


  • Subject: NSPopupButton & URLs
  • From: Jeremy Matthews <email@hidden>
  • Date: Sun, 27 Dec 2009 13:01:13 -0500

So I have an idea or two, but nothing graceful, so I wanted to know the best way of doing this....

I have an xcode 3.2.1 (10.6+ only project), which has a method that has an optional URL as a parameter. This is mostly a take on the calendarstore framework...I just want to offer the ability for users to include notes and urls from a short cocoa window, which includes some of our own project management info.

Currently, I have a nspopupbutton with some general values "Airbus", "Southwest", "Delta", etc...upon making the proper selection and clicking the "generate" button, it creates the event with said attributes, including the URL. So, I have a list of about 10 items in that popup, and a loooong if statement. Depending on the selectedItem of the nspopupbutton, it grabs the associated url and stuffs it into the method and returns the event.

Normally, I'd take a switch/case approach here, but I've been warned about doing so in Cocoa.

Any ideas?
It works fine now, but I know that there has to be a more graceful approach.

Thanks,
j
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSPopupButton & URLs
      • From: Ken Thomases <email@hidden>
    • Re: [Cocoa-students] NSPopupButton & URLs
      • From: Craig Williams <email@hidden>
    • Re: NSPopupButton & URLs
      • From: Matthew Lindfield Seager <email@hidden>
  • Prev by Date: Re: Programmatically creating a small check box
  • Next by Date: Re: dragging to trash folder problems
  • Previous by thread: Re: Programmatically creating a small check box
  • Next by thread: Re: NSPopupButton & URLs
  • Index(es):
    • Date
    • Thread