A simple condition?

For questions about using Classic.

Post » Mon Jan 19, 2009 11:05 pm

How do I determine whether among all instances there exists an instance with key set to specific value? It has to be a condition. Like this: [code:2ckfbmej]NEGATIVE (Exists? Hashtable("Key")="Test")[/code:2ckfbmej]
I would like a clean and simple solution rather than having to devise a bulky workaround.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Jan 20, 2009 6:01 pm

for each "my object"
+"my object" private variable "key" = "yes"

>do actions
B
37
S
19
G
18
Posts: 613
Reputation: 10,231

Post » Tue Jan 20, 2009 8:42 pm

That is what I was not looking for, I was hoping for a system expression or an evaluation that checks if ANY object instance has a certain key with exact value, but oh well, I'll have to go with a workaround, which requires a whole event and is rather unwieldy.

Hmm, come to think of it, I'll need some sort of 'search' function after all... that searches all hashtables for an exact key and/or value. Might as well create a function especially for that.

Thanks, though!
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests