TAILIEUCHUNG - Creating Applications with Mozilla-Chapter 7. Extending the UI with XBL- P2

Tham khảo tài liệu 'creating applications with mozilla-chapter 7. extending the ui with xbl- p2', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 7. Extending the UI with XBL- P2 The code you see here is not necessary in this binding but it shows you the format for executing code in the destructor. Destructors are great to use when you have loaded a component in the binding and want to set the variable representing the component to null to avoid memory leaks. If you have a lot of bindings that load and then unload components while a Mozilla session is still running a significant amount of memory can be eaten up unless you take this kind of step. . Properties Like Java properties an XBL property has getters and setters so they can behave differently when you read or write data. Here is a subset of properties used in this binding property name value readonly true getter return getter property property name uppercase readonly true onget return property name backgroundColor getter return getter setter val return val setter property At this point the characteristics of properties to watch out for include the readonly attribute the getter and setter elements and the existence of a val keyword that is used internally for accessing a property s current value. For your reference this binding s property extracts are used for getting the value of the input field returning an uppercase version of the inputted text and getting or setting the input field s background color. . Methods Methods in XBL are self-contained functions represented by the method tag and encapsulated within the implementation element. They usually provide a binding object with a specific function like copying and saving some data or showing and hiding widget controls. Like properties they can be called from within the binding from another binding that subclasses that binding and directly from the bound element. method name clear body body method method name setValue parameter name .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.