Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

PDF:

Feature

Using Third Party Web Controls

The New Web Control SDK

Issue: 11.1 (November/December 2012)
Author: Paul Lefebvre
Article Description: No description available.
Article Length (in bytes): 5,852
Starting Page Number: 89
RBD Number: 11114
Resource File(s):

Download Icon 11114project.zip Updated: Friday, January 4, 2013 at 2:53 PM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

WebControl SDK

Introduced in the newly available Real Studio 2012 Release 2, the WebControl SDK is a way for you to interface JavaScript controls (either 3rd party or ones you create yourself) with Real Studio.

The SDK does this by using a new class, WebControlWrapper, which provides events you can implement to hook up the JavaScript controls to Real Studio.

Creating an HTMLArea Control

One example of a control that you can create is an HTMLArea that displays arbitrary HTML (like WebHTMLViewer does), but also allows you to handle all the links that are clicked.

To get started with this, create a new web project and add a new class to the project (call it HTMLArea) setting its super to "WebControlWrapper". On this class, add a new public property called "HTML As String" to contain the actual HTML to display.

All controls created using the Web Control SDK need to have a namespace specified so that the code does not conflict with other code. You do this by adding a constant to the HTMLArea called "JavaScriptNamespace" and setting it to a value unique to you. I'll just use "Example" for now.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com