DYNAMIC in PB

Source: Internet
Author: User

The ancestor window w_a has a function Set (integer ).
The derived window w_a_desc has two functions: Set (integer) inherits the Fir Tree of the ancestor, and Set (string) is an overloaded function.
Suppose you open the window mywindow whose ancestor window is w_a

W_a mywindow

Open (mywindow)

The following is the difference between dynamic and static call of the Set function:

Mywindow. Set (1) is compiled correctly, because this function exists in the ancestor window.
Mywindow. Set ("hello") Compilation failed; no original function matching in w_a.
Mywindow. DYNAMIC Set ("hello") is correctly compiled because it is a dynamic. An error occurs during execution because the function cannot be found.

Two examples are provided for help .. I translated one for you .. You can see the next one.

Dynamic is a Dynamic call .. This method is slow .. And do not check for errors during compilation ..

This gives you flexibility and allows you to call functions or events in descendants that do not exist in the ancestor.

It can be used to call functions or events that exist in the Child Window but do not exist in the ancestor window, increasing elasticity ..

Different from post ..
Post is added to the event queue .. It is not necessarily executed immediately, but the post function or event must exist in this object .. If it is not compiled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.