Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Creating Applications with Mozilla-Chapter 8. XPCOM- P3
Đang chuẩn bị liên kết để tải về tài liệu:
Creating Applications with Mozilla-Chapter 8. XPCOM- P3
Vân Anh
35
16
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'creating applications with mozilla-chapter 8. xpcom- p3', 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 8. XPCOM- P3 8.2.1.3. Implementing the required XPCOM methods in JavaScript Once the definitions in the nsISimple interface are implemented you need to implement required methods and factories that make this JavaScript implementation class an XPCOM component. Recall that all XPCOM components must implement the nsISupports interface. Example 8-3 shows an implementation of Queryinterface specific to our new component. Queryinterface ensures that the correct interface nsISimple is used by matching the iid with the nsISimple interface that this component implements. If the interface doesn t match then the argument is invalid. In this case the exception Components.results.NS_ERROR_NO_INTERFACE is thrown which maps to the error code number 2147500034 and code execution is stopped. If the interface identifier parameter matches the interface then an instance of the implementation class object SimpleComponent with its interface is returned as a ready-to-use XPCOM component. In XPCOM every component you implement must have a QueryInterface method. Example 8-3. QueryInterface method for nsISimple interface QueryInterface function iid if iid.equals Components.interfaces.nsISimple iid.equals Components.interfaces.nsISupports throw Components.results.NS_ERROR_NO_INTERFACE return this The next requirement is to create a JavaScript object called Module. This module implements the methods needed for autoregistration and component return type objects. var Module firstTime true The Boolean firstTime is a flag used only when the component is initially registered registerSelf function compMgr fileSpec location type if this.firstTime dump first time registration of Simple JS component n this.firstTime false throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN The Component Manager can do a lot in the registration process but you have to add some logic for first time registration so the Component Manager has the information it needs. RegisterSelf is called at registration .
TÀI LIỆU LIÊN QUAN
Getting Started: Creating Applications with µVision
OSGi in Action: Creating Modular Applications in Java
Modular Java Creating Flexible Applications with OSGi and Spring
Programming in Go: Creating Applications for the 21st Century, Rough Cuts
Professional Flash Mobile Development: Creating Android and iPhone Applications
Ebook Developer’s Guide
The Creating Views
THIẾT KẾ CÁC ỨNG DỤNG GUI BẰNG WINDOWS FORMS
Ebook Professional android application development
HLSL and Pixel Shaders for XAML Developers
crossorigin="anonymous">
Đã 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.