0
Not a bug

Only one element is allowed to increment a counter. Why no sharing?

SeanB 11 years ago updated by Alin Alexandru Matei 11 years ago 0
I have 3 items, tapping on them should increment a single counter.  I gave up on also checking the state of the counter. I just wanted another button to do that. But now I can't even get a shared counter to increment. Why can't they share the same counter?

All 3 - shoes, shorts, shirt are identically setup in Action Manager. Only one of them works. This makes no sense. It does not matter if I nest the counter actions under single Tap>Move, or move the Tap>Move down, or nest it under the counters.

Image 152

Answer

Answer
Not a bug
I tried to recreate this situation but everything worked great.
Here is a sample app for this:
345 - Same counter.zip
One question: what version and what build number is your InteractBuilder?
Answer
Not a bug
I tried to recreate this situation but everything worked great.
Here is a sample app for this:
345 - Same counter.zip
One question: what version and what build number is your InteractBuilder?
Windows IB 3.4.2 build 343 and IB 3.4.352 (the latest).

Yep, your demo works for me. Question - do you set the counter to zero somehow when the page loads? I don't see an action for that on the cars or the counter itself.

As soon as I got the new build I set up my counters again, same steps as yours, BUT they are chained to a move action. Could my book page just be corrupted, or it be because of the move action? I was getting erratic behavior that tells me something was corrupted.

I'm pushing ahead and don't have a copy of this page anymore, so I'm fine if you want to call it corrupt and close the bug.
Yeah I just added tap>moves to the 3 cars, chained the counters to them, works like a charm.

I think it works on simple pages.

I was just setting up my page again with these counter actions, identical to yours, and the first item did not work. The second item I added CounterAdd and CounterDisplay in the regular actions panel, then clicked the Actions manager and my CounterAdd is not there. close it, the regular panel shows Action Set: 3 of 3.

I will email you this page.
Ok I will have a look at the page you will send me.
Thanks, please if you have time try to add the counterAdd and counterDisplay on the 3 clothing items also on that page. You'll need to add a counter. I am following your actions in your example, but it's just not happening. Driving me crazy, I have other counters working elsewhere.
Just emailed you the solution for this. Let me know if you need anymore help and thank you for your feedback.
Thanks, got it and responded. Great intersections!

One thing that threw me off, even in your example, my counter was not visible thanks to another element "blocking" it even though that element was on a lower layer.
Strange, when I opened the app the counter was not blocked by the other element. When you get the chance try reinstalling InteractBuilder, and let us know if this situation is still visible.
I think I just need to get a mac!
This has been very helpful, thanks Alin!!