TAILIEUCHUNG - Building OpenSocial Apps- P2

Building OpenSocial Apps- P2: Nhà phát triển của Thư viện Series từ Addison-Wesley cung cấp hành nghề lập trình với độc đáo, tài liệu tham khảo chất lượng cao hướng dẫn về các ngôn ngữ lập trình công nghệ mới nhất và họ sử dụng trong công việc hàng ngày của họ. Tất cả các sách trong thư viện của Nhà phát triển được viết bởi chuyên gia công nghệ các học viên những người có kỹ năng đặc biệt tại các tổ chức và trình bày thông tin một cách đó là hữu ích cho các lập trình viên khác | 24 Chapter 2 Getting Basic MySpace Data If the view name passed in is in the supported hash table if supported view Request to navigate to that view supported view This function takes in the name of the view to navigate to and then gets the list of currently supported views by calling . This function returns a hash table of objects keyed by the names of the views. If the list of supported views contains the specified view requestNavigateTo is invoked and the view object is passed in. To make use of the rNT function you might do something like this in the onclick handler of a button rNT That will cause the browser to navigate to the app s Canvas page. Error Handling JavaScript errors from apps seem to be an all-too-common occurrence but they don t have to be. Most developers don t expect errors to occur and so they don t test or prepare for them as a result but errors do best defense against them is to admit that yes they do occur and yes you need to be ready for them. OpenSocial offers a few functions you can use to deal with errors. In the following example we check for errors before we parse the response for data. If an error is found the response data isn t parsed. Check if the response had an error if it did log it and if it was an INTERNAL_ERROR attempt to retry the request @param data function requestHadError data Return true if data is null or undefined if data return true Check the for the global error flag if Find the specific that had the error var ri Please purchase PDF Split-Merge on to remove this watermark. Error Handling 25 if ri Output the error message log Check the error code an INTERNAL_ERROR can simply mean network congestion or MySpace server .

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.