In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "what are the Flex data binding traps", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what are the Flex data binding traps" this article.
Flex data binding Trap
◆ Usingbindinginplaceofdirectassignment uses bindings where values are assigned directly
In one case, if you can successfully achieve the same effect without using binding and using direct assignment, you * do not use binding. I have seen many forms of this type of error.
The following code illustrates:
This code defines a text input box that binds private member variables to the text property of the text input box. It looks harmless, doesn't it? I often see these types of tags used in Flex applications. Flex's compiler automatically generates code to implement Flex data binding.
You will find that although you do not need to bind the text string because it is assigned once, the compiler still generates code to accommodate the conditions of the property Flex data binding. In addition, there are cases where you need to unbind after assignment, or remove the binding code to reduce overhead, but you will not be able to do so after using tags in MXML.
As a rule of thumb, you should avoid binding to a private variable.
In the above example, you can set the value directly to the input text box.
When you use direct assignment, you will greatly reduce your overhead because the compiler will no longer generate binding code that you do not need. As a general rule of thumb, do not use Flex data binding unless the value of your binding may or will definitely change.
These are all the contents of the article "what are the Flex data binding traps?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.