• 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
Re: Dynamically Loading NSComboBox From a Database.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically Loading NSComboBox From a Database.


  • Subject: Re: Dynamically Loading NSComboBox From a Database.
  • From: Jim Murry <email@hidden>
  • Date: Tue, 2 Apr 2002 13:35:34 -0800

I have not been able to figure out how to get MySQL to notify my program when it gets changed by another computer. That was my initial approach, but could not figure that out so I was looking into this approach. I agree that there would be fewer calls to the database using your approach. If there are any suggestion on how to get a remote MySQL database to do notifications, I might be able to implement the NSComboBox properly.

I am using NSComboBox's since some people cannot type any quicker than a turtle and others that can type, can perform data entry much faster if they do not have to reach for the mouse.

As to using it because windows has it. I have always introduced Mac's to work by bringing my own to avoid windows.

On Monday, April 1, 2002, at 06:16 PM, Chris Hanson wrote:

At 3:51 PM -0800 4/1/02, Jim Murry wrote:
I would like to populate a NSComboBox just prior to displaying the possible items from a database. I do not know how to intercept the click so that I can dispose of the old data and display fresh data so that it would display the most recent changes.

It would be better to design your application to go the opposite direction: Update the contents of the menu whenever your data model changes. This way, you don't wind up with situations where the user clicks on the popup menu[1] and then waits for a database operation to time out.

In general, when doing Cocoa development you're better off trying to work within the framework and patterns it provides than you are trying to second-guess it.

-- Chris

[1] This is a general plea to developers: *Please* use a popup menu unless you specifically need a combo box. Don't just use a combo box because that's what you'd use on Windows or X11 or in Java; these platforms have combo boxes because they don't have real popup menus...

-- Chris Hanson | Email: email@hidden
bDistributed.com, Inc. | Phone: +1-847-372-3955
Mac OS X & WebObjects Consulting | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Dynamically Loading NSComboBox From a Database.
      • From: Chris Hanson <email@hidden>
    • Re: Dynamically Loading NSComboBox From a Database.
      • From: Alex Rice <email@hidden>
References: 
 >Re: Dynamically Loading NSComboBox From a Database. (From: Chris Hanson <email@hidden>)

  • Prev by Date: Dumb First Time Apple Scripting question. (kind of long. rtf)
  • Next by Date: Re: Dynamically Loading NSComboBox From a Database.
  • Previous by thread: Re: Dynamically Loading NSComboBox From a Database.
  • Next by thread: Re: Dynamically Loading NSComboBox From a Database.
  • Index(es):
    • Date
    • Thread