290 views
in GUI Development by

I have a Property "Time" and several slot-methods, which are attached to it with:

attachobserver <slot-method>, ^Time;

Also I am invoking several notifyobservers with a KeyHandler and a slot-method with the code:

notifyobservers ^Time;

As a result the attached slot-methods are invoked.

But the problem is when I invoke 15-30 notifyobservers in a row, the attached slot-methods aren't invoked anymore.

1 Answer

0 votes
by

The notifyobservers statement triggers the given property or object in order to notify all observers, which have been previously attached to the affected property or object.

The notification of all observers is done via postsignal. A postsignal statement records a pending signal to an object for a deferred delivery. The signal is delivered immediately before the screen update is performed.

The pending signals are delivered strictly in the order, in which the corresponding postsignal statements are executed. Multiple signals to the same slot will be always merged together and delivered as a single signal. If a signal is already pending for the delivery, the postsignal statement does not record it twice - it moves the recorded signal to the end of the list of pending signals only.

With other words: A sequence of notifyobservers referring to the same property will result in one notification (until the next screen update happens).

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...