BTW I stumbled over this, because we have stress tests clicking behaviors, which were never enabled. Since an id is never requested for the behavior, our tests fail with 'Cannot find behavior with id..." instead of "behavior not enabled ...".

Sven

On 10/29/2013 04:34 PM, Sven Meier wrote:
Hi,

I don't understand Behaviors#internalAdd(Behavior):

    private void internalAdd(final Behavior behavior)
    {
        component.data_add(behavior);
        if (behavior.getStatelessHint(component))
        {
            getBehaviorId(behavior);
        }
    }

Why does it register the behavior for an id if its stateless? Shouldn't that be done in the opposite? Why isn't it done lazily when needed only?

Note that the condition has flipped back and forth a few times in the commit history. Now each simple AttributeModifier is put into the BehaviorIdList, although the id is never used for it.

@marting + igor: Any thoughts?

Sven

Reply via email to