Re: Dynamically Loading NSComboBox From a Database.
Re: Dynamically Loading NSComboBox From a Database.
- Subject: Re: Dynamically Loading NSComboBox From a Database.
- From: Chris Hanson <email@hidden>
- Date: Wed, 3 Apr 2002 19:44:00 -0600
At 1:35 PM -0800 4/2/02, Jim Murry wrote:
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.
Even if you can't get notifications from MySQL, you can still
de-couple the human interface to your application from the
application's data model. One way to do this would be to use a timer
to poll the database for changes, update your model from that if
necessary, and sync your human interface to the model.
My intent was to help you avoid writing an application where the user
clicks on a combo box and then sees the Spinning Cursor of Death for
several seconds while the database is queried. If you're using MySQL
locally rather than via a network maybe this won't be an issue, in
which case you should feel free to ignore me. ;)
Oh, and the comment I made about the combo box wasn't *specifically*
to you. It sounds like you have perfectly valid reasons for using
it. I've just had to deal with developers bringing applications over
from Windows and using combo boxes because they're available and
familiar, not because they're the best choice for their application's
human interface.
(A good topic for discussion on Apple-HI-Developers would be "When
should I use a combo box versus a popup menu?" Except the list isn't
around any more...)
-- Chris
--
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.