Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matchmaker - Searching through a list?

Status
Not open for further replies.

thisisrickhere

Technical User
Apr 24, 2004
1
AU
I've completed the interface and the basics, but now it's time to come get some project specific advice. It’s a simple matchmaker little app that asks the user questions about what preferences they have for a prospective partner (Hair Colour, Eyes Colour, Body Type, Location etc) and it returns some matches from a small “database” (I’m guessing its going to be a list, right?) from which they can contact that person if they wish via email.

To give you an example of what I’ve done so far, please visit my site:
And for the director file, download:

From what I can see, there are three stages. Please see the above links to see what I mean.
1.) Collect true or false statements and place them in global variables (see below)
2.) Search through a list (see below) and find those matches with attributes that the user has selected by comparing the list to the variables
3.) Displaying the matches with a thumbnail picture, which then links to the users full details.


As I’m new to lingo, I’m not sure if I have set this up right. But, basically we’ve got a whole bunch of variables witch are true or false:

global gMale, gFemale
global gHairBrown, gHairBlonde, gHairRed
global gSlim, gAverage, gCuddly
global gEyesBrown, gEyesBlue, gEyesGreen
global gDesert, gRainforest

What I’m missing is the lingo which takes these values, and searches through this ( database to output the search result with thumbnails. The user can then click on the thumbnail to bring up a larger picture along with some more details. Click the next button again, and then you’ve got the contact page which just sends them an email.

To tell you the truth, I’ve got no idea how this can be done… apart from setting up a list and then… yep, I’ve lost it. No idea :)

Any thoughts and ideas on how I can actually get this working, is most appreciated!

Cheerio,

Rick.
 
First of all your globals should be: gGender, gBody, gHair, gEyes, gLocation etc. instead.

Put your data in a Property List. The list would be this format:
[[#name:"Linda Moore", #gender:"Female", #body:"Cuddly" ... ], [#name:"Barbara Taylor", #gender:"Female", #body:"Cuddly" ...] ...]

Then compare the value of a global and the value of matching property. i.e. if gGender = "Female" and theList[1][#gender] = "Female" then the 1st person in the list matches the gender requirement, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top