tracking problem
#1

Hii .. it's a little bit hard to explain, so I'll do my best and please if you dont understand comment and I'll try to explain more.
While making a system I came to a point where I have to list items from a Database table collumn into a Dialog (type list) then I need to react depending on which item the player has choosen .. the problem is that all I still have in OnDialogResponse is the index of the choosen dialog item (listitem) .. if someone have an idea .. please post it .. if you dont understand something please post and I'll try to explain more.
I thought of creating an array at the time of showing the dialog and save the primary keys on it in the order of apparition but the problem I was facing is the size of this array .. I also believe there is an easier way as I saw this working perfectly in other servers.
Thanks
Reply
#2

You get the listitem and the inputtext. I'm sure those two are enough.

Can you describe what's the problem and what you're trying to do so we'll be able to help you more?
Reply
#3

the listitem is the index of the dialog item .. what I need to know is which line of the database the player selected as the dialog list items are fetched from the database.
Edit: also there is no inputtext in a dialog list
Reply
#4

What do you mean by "which line of the database"?

If you show 25 items and the player selected the 10th, then you know which row they selected.
Reply
#5

Quote:
Originally Posted by Konstantinos
View Post
What do you mean by "which line of the database"?

If you show 25 items and the player selected the 10th, then you know which row they selected.
then I know that he selected the item which index is 9 from the dialog list .. not the Row related to that item in the database table I fetched these items from when showing the dialog.. you see what I mean ?
Reply
#6

Everytime you select a listitem, inputtext holds the text of that index.

I cannot understand you very well, an example of code would be a good start as I'm not aware of what you actually load from the database (name, ids etc).
Reply
#7

Quote:
Originally Posted by Konstantinos
View Post
Everytime you select a listitem, inputtext holds the text of that index.
That's the information I needed .. thanks +rep
Reply
#8

Update: it worked .. I edited the items so they contain the Row ID then I used string functions to retrieve it back from inputtext.. thanks for giving me the key Konstantinos .. You always do it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)