Re: Update on dictionary request
Re: Update on dictionary request
- Subject: Re: Update on dictionary request
- From: Art Isbell <email@hidden>
- Date: Mon, 17 Feb 2003 10:18:40 -1000
On Monday, February 17, 2003, at 05:31 AM, Ken Foust wrote:
previous question:
I see on many website that you have a scrollable city and country user
input field
such as
_______ city _________ state or country
I would assume there is a importable dictionary containing this
infomation
is there ? and if so where can I find the one for world cities and
countries???
Updated question?
I now assume that this would have to be in the form of a emodeled
program that you would import when setting up you database!! Unless
the datebase program is smart enough to search the dictionary?
You bind popup buttons or browsers to arrays of cities and states or
countries. You can populate these arrays in a number of ways: from a
Java Properties file, from an arbitrary file, hard-code in your Java
code, fetch from a database. The challenge is to find a good source of
these data. Once you've found that source, you can use it to create a
file that's read at runtime, create NSArray's in your Java code, or
create and populate database tables.
I would think that hard-coding this info in Java is the least
appealing because any change would require code recompilation.
A Java Properties file doesn't support lists of data natively, but
entering such data in property list (plist) format would allow you to
use NSPropertyListSerialization methods to automatically parse plist
strings into NSArrays. The same would apply to any arbitrary data file.
If a database is being accessed by your app anyway, I'd probably
consider creating and populating database tables. It's certainly
common to associate other database data with city, state, and country
data, so keeping it all in a database makes managing such relationships
easy.
Art
http://homepage.mac.com/aisbell/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.