Confusing toolbox behaviour

25/08/2008 - 16:47 von Michael Gerbracht | Report spam
Sorry, it's me again with another toolbox question:

I have created a res file with a number of windows (auto-create and
auto-show set to no). Now I have a table which contains three names of the
windows in the template. And I have a loop which cycles through this table
and tries to create the windows and store the object IDs.

If I run this loop just normaly I only get one out of three object IDs.
For debug purposes I entered a print command[1] so that the object ID is
printed. If I run this the first object ID is not set but No. 2 and No.3
are set. If I execute the loop again setting only the IDs that are still
empty then it works. But if I remove the print command it fails again.

Let me repeat:

a) Without print command inside loop:

1. Run

ID(1) = -
ID(2) = <some ID>
ID(3) = -

2. Run

ID(1) = -
ID(2) = <some ID>
ID(3) = -

and so on...

b) With print command:

1. Run

ID(1) = -
ID(2) = <some ID>
ID(3) = <some ID>

2. Run

ID(1) = <some ID>
ID(2) = <some ID>
ID(3) = <some ID>

ok, all IDs available...



So I wonder why this is. What I could think of:
1) Is there a special order of creating objects from the template file?
2) Should I always create an object and then show it before a second
onject can be created?
3) To me it seems a little bit like a timing issue. However, I tried to
replace the print command with a waiting loop (up to 10 sec) but this did
not help.

For me this is very confusing and I don't know how to debug this problem.
I hope somebody might have experienced something similar before...

thanks you very much,
Michael

[1] The print command opens an error box on the screen which stops
multitasking - this might be important.
 

Lesen sie die antworten

#1 Michael Gerbracht
26/08/2008 - 10:38 | Warnen spam
Tut mir leid, falsche Gruppe, hat nix mit dem Mac zu tun. In dem Fall war
wohl die toolbox nicht die einzige mit konfusem Verhalten ;-)

Michael

Ähnliche fragen