Manual reset of a counter?


Author
Message
Blackadder
Blackadder
Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)
Group: Forum Members
Posts: 280, Visits: 147

Hi,


I was just getting ready to write a test script when I thought that this question might have been by someone competent before.


Suppose you have a counter


<counter COUNTER_items>
/ items = (1, 2, 3, 4)
/ select = noreplace
</counter>


and Inquisit has already drawn items "1" and "3" from the counter. What I'd like to accomplish is to manually reset the counter within an expression so that it is "refilled" again, i.e., in it's initial state with all four elements present.


My idea was to just add an item to the counter via expressions, then delete this item again and hope, Inquisit resets the counter whenever something happens to its item contents. Will this work? Is there another solution?


Bye, Malte.



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Actually the solution is to use the reset() function:


/ ontrialend = [reset(counter.mycounter)]


~Dave


Blackadder
Blackadder
Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)
Group: Forum Members
Posts: 280, Visits: 147

Thanks, Dave. That's why I loved Sean's idea of making the whole expression thing more OO-style. Everything neatly in place...


Bye, Malte.


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

That's why I loved Sean's idea of making the whole expression thing more OO-style. Everything neatly in place...


Not really getting the connection here, tbh...


Blackadder
Blackadder
Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)Supreme Being (26K reputation)
Group: Forum Members
Posts: 280, Visits: 147

Well, I searched the counters sections in the help but did not find anything helpful there. With member functions, I should have found someting like counter.reset() there. I just did not think of going through the functions list.


Bye, Malte.


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Thanks for the clarification. I have to admit that -- personally -- I'm divided on the subject of making things strictly object-oriented. From a programmer's perspective: Would be nice to have, but I don't consider it a top priority. Also, I'm divided on the subject of OO vs. procedural vs. structural vs. whatever programming approaches altogether, but that's a different story. However, from a practical perspective, I'm pretty much opposed to the idea of adding methods on objects. (A) It will introduce a lot of confusion for less experienced users who don't have any real concept of methods, member functions, etc.. People will inevitably mix up methods with properties and so on. (B) In order to preserve backward compatibility, the current functions architecture would at least have to be included in addition to the OO based architecture, resulting in even more potential sources of confusion.


~Dave


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search