Skip to content

how to handle gotchas related to Property setDeferred  #281

@pixelzoom

Description

@pixelzoom

Over in #277, I encountered Property setDeferred for the first time. This feature seems to have gotchas that are not at all guarded.

For example, after a set, you may still get the old value:

> var x = new phet.axon.Property( 'foo' )
undefined
> x.setDeferred( true )
null
> x.value = 'bar'
"bar"
> x.value
"foo"

Should get() fail an assertion if it's called while this.isDeferred === true?

Are there other gotchas?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions