Skip to content

getObjects() sometimes returns 0 #172

Description

@dkadrikj

The getObjects() method sometimes returns 0 elements (empty list). I do not have all the details since, the code is production, and we can not replicate. But, it surely exists since a more users had complained about it.

Library version: 2.0.2

Activity

  1. mgod commented on Oct 7, 2015

    @mgod
    Contributor

    I should probably make a note of this somewhere in the docs as this is a known flaw in the design. The getObjects() call will be empty if you call it before the UI has had some cycles to update. getObjects() returns all objects that have tokens currently visible, so if the token field text has not had a chance to redraw with new tokens, they will not be returned.

    I would actually guess (as you can't replicate) that the field is not able to restore the tokens during configuration changes in your app. Try rotating the screen with tokens entered and see if that causes the problem.

  2. mgod commented on Mar 9, 2019

    @mgod
    Contributor

    Version 3.0.0 adds an addObjectSync method that should make sure the getObjects call is more accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions