Spinner issue (not nb204!)

Hi,

from the last version nb204, when I open a spinner and I choose the last choosen item, the Spinner.AfterSelecting doesn’t trigger.

  • open Spinner
  • choose first item
  • Spinner.AfterSelecting triggers
  • open spinner
  • choose first item again
  • Spinner.AfterSelecting do not trigger

Spinner_test.aia (1.9 KB)

That is the one thing they haven't fixed in the latest release (note: it has always behaved like this)

See here:

I’m sure that before version nb204 if I chose an object and then I chose it again, the Spinner.AfterSelecting always worked.

On two different smartphone I have the same app compiled today and on March 11th.

The version compiled on March 11th has the correct behavior.

Nope, this has never worked.

Same app, same OS (Android 14).

After Spinner.AfterSelecting I center the map on the selected marker

First video right behavior (compiled one week ago)

Second video wrong behavior (compiled today)

Moreover changed the items alignment : old on the left, now centered…… why ???

Looks like you followed the Spinner Setup guide for the first video, but not the second (Choose Rider is the "Prompt" and not a Selection to be ignored).

Centered elements in the Spinner is now the default

In both videos I made test using DEMO2 item.

In the second video I set the prompt, but this is independent from the issue.

Please look at the .aia file in my first post.

In the .aia I didn’t set the prompt like in the first video, and it doesn’t work different from first video.

I think it is very simple to understand

  • import .aia from first post , compile and and check app : spinner doesn’t work well (select the third item, then select the third item for the second time and the “Spinner.AfterSelecting” does not trigger. Continue to select the third item and no trigger anymore until you select a different item)
  • look at first video. The spinner always works even I select the same item

So, something changed ………

I did, it does not follow my Spinner Setup guide

Also, you can now un-check visible for the spinner and afterSelecting will still fire.

Agreed, my guide should be easy to follow and replicate in your project.

As previously said, your first video clearly shows the Choose Rider selection being set on each invocation of the spinner, which must therefore be following the Spinner Setup approach.

Your second video appears to be clearing selections (no green highlight in radio button) but the Spinner Setup logic is not being applied (no first selection being set). I too have tried setting selectionIndex to 0 (which clears the green highlight) but this does not clear the previous item selected.

Spinner_test.aia (1.9 KB)

It would be preferable if the Spinner component allowed for clearing the radio button and the selection (by default) to overcome this issue and for us to avoid having to have a dummy selection. Maybe one day...

As far as I am aware, and am prepared to be advised differently by the powers that be, this issue has been with the Spinner component since AppInventor Day 1, it is not something that has just suddenly arisen with nb204 release.

now your explanation is clear.

In my “first video/old app” , setting the first fake element when spinner drops down “overwrite” previous selection.

I didn't understand, sorry

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.