Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Creating a Demo Project for Convenient Database Access

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102241] Creating a Demo Project for Convenient Database Access
  • From: BenT <brtubb at pdmusic.org>
  • Date: Sun, 2 Aug 2009 06:00:30 -0400 (EDT)

As of Verion 6, several data collection were added for which the
Manipulate funcion's documentation even shows an example of accessing
conveniently.

In attempting to do this, the following code similar to that in the
Documentation Center works

Manipulate[ElementData[name, property],
{name, ElementData[]},
{{property, "DiscoveryYear"}, ElementData["Properties"]},
SaveDefinitions -> True]

But trying to generalize it to also allow ANY database to be selected
with this code --

Manipulate[database[name,property],
{{database,ElementData},f},
{{name,"Helium"},database[]},
{{property,"DiscoveryYear"},database["Properties"]},
SaveDefinitions->True,
ControlType->PopupMenu,
Initialization:>
(f={GraphData,PolyhedronData,ChemicalData,ElementData,
AstronomicalData,CountryData,CityData,FinancialData,
WordData,DictionaryLookup}
)
]

-- is not working for varius reasons, among others because once a name
and/or property is set, then when a database is changed, it
immediately generates an error, since each database has its own unique
set of names and properties, including that some even represent
graphic objects!

Can anyone suggest any modifications to minimize, if not eliminate
such errors, or would time be better spent just creating separate
DemoProjects with specific databases in use only?



  • Prev by Date: Re: Creating a Random Function to Select an Irrational
  • Next by Date: Re: Assume and $Assumptions and Results
  • Previous by thread: Re: Re: Re: A Sum-like notation for iteration
  • Next by thread: Re: Hacking Wolfram|Alpha