290 views
in GUI Development by
Dear EmWi.

I hope to use a observer/notify for a line chart.

So, one property is required.

 

Is it recommanded to make a recordlist itself as property?

Or, add a simple additional bool property for observer/notify?

 

Of course, only observer/notify is required, the set/get function of property will be deleted for both cases.

 

Thanks in advance.

Jinho.

1 Answer

0 votes
by

Hello Jinho,

I don't really understand your application case. Generally the overhead of accessing a property is generated by the associated onget and/or onset methods whereby properties without the associated onget nor onset methods behave as if they were regular variables. The respective functions and function calls are omitted during the code generation. However:

1. Even if you have implemented an onget method with code limiting to return the current value of the property, such onget method is considered as not being necessary and is eliminated during the code generation.

2. Similarly, if you have implemented an onset method with code limiting to assign a new value to the property, the onset method is considered as not being necessary and is eliminated during the code generation.

3. In turn, if your project creates references to the property, the associated onget and onset methods are considered as required. This is true even if you have deleted the methods.

4. If you have deleted the onget or onset methods but they are required due to references to the property (item 3 above), Embedded Wizard will create internal onget and onset methods for this property implicitly.

Consequently using a property in attachobserver, notifyobservers, etc. implies the creation of a reference to this property. Thus, the onget and onset methods for such property are forced to exist and are used.

Another aspect is the overhead of using notifyobservers. All obervers existing at the moment are maintained in a global observer list. This list is evaluated every time you perform attachobserver, notifyobservers, etc. The more observers registered, the more time is needed to traverse the entire list. If you have few active observer, this should not be a problem. Please note, notifyobservers searches the list for entries corresponding to the subject of the notify operation. Then for every matching entry within the list, notifyobservers executes the postsignal operation. It enqueues the signal for later delivery.

Best regards

Paul Banach

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

...