QtAlexander
16th November 2010, 17:56
Hello there, my fellow programmers!
Yes, I'm newbie. Okay, straight too it.
This isn't a programming error, as much as a lack of understanding of where I go next.
I'm making a program, and among other things, I need to be able to generate a dynamic list during runtime based on parameters which change.
I want to generate a list of options for the user to choose from, during runtime. This is necessary, because the program needs to propose the best fit as often as possible.
It's a GPS system, where the user has to pick a predefined "area", or address as the one he occupies. This is done (as opposed to automatically choosing the closest one) because of the margin for fault in such GPSes.
I've written a class for the addresses, and will have each address as a unique object with a unique position data set.
These need to be proposed to the user based on the distance between himself and their position data. Simple calculation, but how do I code this without going into a "if / else if" frenzy?
It's really necessary to modulate it, since I might need about 200 of these objects.
Also, modulating the code would naturally allow me to add more of these address objects later without going into a fit of corrections.
Please help me in the right direction of generally what programming methods I would use here.
Thanks!
Best regards, QtAlexander
Yes, I'm newbie. Okay, straight too it.
This isn't a programming error, as much as a lack of understanding of where I go next.
I'm making a program, and among other things, I need to be able to generate a dynamic list during runtime based on parameters which change.
I want to generate a list of options for the user to choose from, during runtime. This is necessary, because the program needs to propose the best fit as often as possible.
It's a GPS system, where the user has to pick a predefined "area", or address as the one he occupies. This is done (as opposed to automatically choosing the closest one) because of the margin for fault in such GPSes.
I've written a class for the addresses, and will have each address as a unique object with a unique position data set.
These need to be proposed to the user based on the distance between himself and their position data. Simple calculation, but how do I code this without going into a "if / else if" frenzy?
It's really necessary to modulate it, since I might need about 200 of these objects.
Also, modulating the code would naturally allow me to add more of these address objects later without going into a fit of corrections.
Please help me in the right direction of generally what programming methods I would use here.
Thanks!
Best regards, QtAlexander