PDA

View Full Version : Slowing down function calls


b4tch
07-26-2004, 04:16 PM
Hi all.

I've written a function that pulls values out of an xml file and uses them to populate combo box components. I know the function works, but if I have 2 calls to this function directly after one another, only the second combo box gets populated. I have put trace's in to make sure the function is actually getting called first time, and it is, but it is not being finished before being called again.

I was hoping someone could tell me how to tell the program to wait until the first call has completed before proceeding. I have tried putting a return value on the function and putting each call in a while (returnValue ==0) loop but to no avail.

Thanks for your time.

b4tch
07-26-2004, 04:52 PM
I've semi-sorted it. The problem i narrowed it down to was that the variable i was using to reference to the xml document was being overwritten on each call. So i'm passing in an extra parameter to the function which can be used for this, and therefore not overwriting any variables.

I realise it's not the most efficient/best way of doing things so if anyone has any other suggestions i'd be glad to hear them.