Quickstart
From REAL Software Documentation
Contents |
Real Studio Quickstart
Welcome to Real Studio!
Real Studio is a cross-platform object-oriented application builder. It is made up of a rich set of graphical user interface objects, a modern object-oriented language, an integrated debugger, and a cross-platform compiler. Together they make up Real Studio’s Integrated Development Environment or IDE.
With the graphical user interface, you can build your application’s interface simply by dragging and dropping interface objects into the application’s windows and dialogs. We will show you how easy it is in this QuickStart. Real Studio provides you with all the tools you need to build virtually any application you can imagine.
This QuickStart is for people who are new to programming and new to Real Studio. It will give you a gentle introduction to the Real Studio development environment, lead you through the development of a real application, and show you what kinds of other applications can be built with Real Studio. You will build a simple web browser. It uses Real Studio’s built-in HTML Viewer control to display web pages. It should take you 15-20 minutes to complete this Quickstart.
Presentation Conventions
The Quickstart uses screen snapshots taken from the Windows and Macintosh versions of Real Studio. Real Software also offers a Linux version of Real Studio. The interface design and feature set are identical on all platforms, so the differences between platforms are cosmetic and have to do with the differences between the Windows 7/Vista Aero interface, Mac OS X Leopard, and the Linux graphic user interfaces.
Italic type is used to emphasize the first time a new term is used and to highlight important concepts. In addition, titles of books, such as Real Studio User’s Guide, are italicized.
When you are instructed to choose an item from one of Real Studio’s menus, you will see something like “choose File ↠ New Project”. This is equivalent to “choose New Project from the File menu.”
Starting Real Studio
If you haven’t done so already, double-click the Real Studio application icon.
In a few moments, New Project dialog box appears. You can build for three different types of applications or begin from a prebuilt template. The types are:
- Desktop: The application will run on a Windows, Macintosh, and/or Linux computer. It has a graphical user interface and the user interacts with the application with the mouse and keyboard.
- Console: The application will run on a Windows, Macintosh, and/or Linux computer, but it has no graphical interface. The user interacts with it with the terminal/command line. The user's mouse does not play a role.
- Web: The application is published on the internet via a web server such as Apache or Microsoft Internet Information Server 7. The user interacts with it via a web browser application such as Firefox, Safari, or Chrome.
The New Project dialog also lets you use a predefined template that gives you a starting point for specific types of applications. They are listed below these three options and are user-customizable. They are not shown in this illustration.
This Quickstart shows you how to build a Desktop application, so select Desktop and click Choose. The companion Web Tutorial introduces you to the Web application. See that document for an introduction to Real Studio’s Web application generator.
In a few moments, the Real Studio Window Layout Editor appears. This is where you design your application’s windows.
The Window Layout Editor
You use the Window Layout Editor to design the user interface for the application. It is divided into three panes.
- The Window Editing area: The center pane is the Window Editing area. It shows the window and previews how it will look in the application. You can reposition the window by dragging its Title bar. In this illustration, the window is blank because you haven’t added any interface items yet.
- The Controls pane: The pane on the left lists the controls or interface elements that you can add to a window. You design the window by dragging controls from the list to the window.
- The Properties pane: The pane on the right shows the properties of the selected item in the Window editing area. Properties are characteristics of a control or window. Examples are its name, its width and height, and its location. In this illustration, the window is selected (it has selection handles), so the Properties pane shows the properties of the window.
The contents of the Properties pane changes as you click a different item in the Window Editing area. You change a property by entering a new value in the field to the right of a field label and pressing Enter on the keyboard.
The QuickStart Project
In the Quickstart you will build a web browser application that lets you enter a URL in its location field. It renders the web page using Real Studio’s HTML rendering control. In Real Studio, the finished application looks like this:
The application uses three Real Studio controls to do all of its work. They are the:
- TextField: Used to enter text. You type the URL into the TextField at the top of the window.
- Pushbutton: Used to trigger an action. You click the Pushbutton to load the URL into the browser.
- HTMLViewer: Used to render HTML. It displays the URL that you entered into the TextField.
When you run the application and display a URL, it looks like this:
Building the Application’s Interface
Your first task is to create the application’s window. You do this by simply dragging controls from the Controls Pane into the Window Editing area and positioning them. The Window Layout editor includes alignment guides that make it easy to position controls precisely. So let’s get started.
|
Your interface is complete! We now only need to set some properties of the controls and add a line of code that will display the URL in the viewer.
Setting Properties
The next step is to set some properties of these controls. We need to rename all the controls so that they are easy to refer to in code. You should give each object a meaningful name at the start of the project.
We also need to add a caption to the PushButton. The caption is the text that appears inside the PushButton. The default label is “Untitled”, but that won’t do. We will change its caption so that it indicates its functionality.
Finally, we need to set some properties of the controls so that they behave properly when the user resizes the window. Since the user will need to resize the window to show a full web page, we need to tell the controls to grow or shrink automatically when the window is resized.
Let’s start with the window. We want to replace the default window title of “Untitled” and make the window resizable. Users will need to resize the window so that a web page displays properly.
|
Setting the Properties of the PushButton
We have three properties to set:
- The Name of the control,
- The caption that appears inside the pushbutton. This is not the same as the Name property. The Name is the name used to refer to the control in code, while the label (the Caption property) is the text that is displayed inside the PushButton.
- The “Lock...” properties that lock the control into place so that it moves to the right when the window is enlarged.
|
Setting properties of the HTMLViewer
This time we need to rename the HTMLViewer and lock it to the window’s sides so that it resizes properly when the window is resized.
|
The interface for the application is now complete! The last step is to add a line of code that sends the URL that is entered into the TextField to the HTMLViewer. It will establish the web connection and display the page. For that, we use Real Studio's Code Editor.
Real Studio’s Code Editor
Adding Code to the Application
The application is almost complete. We only need to add one line of code to the project that sends the URL that the user enters into the TextField to the HTMLViewer. This line of code is associated with the PushButton control and it runs automatically when the user pushes the button. Real Studio takes care of figuring out when that event happens, so all you need to do is add the code.
|
That's it! The application is complete.
Contextual Help
You may have noticed a couple of features that provide context-sensitive help in the Code Editor. First, the Tips bar tries to tell you the syntax of a command whenever it can.
Place the insertion point in the “LoadURL” term in the Code Editor. The Tips bar changes to show you the syntax for LoadURL.
“HTMLViewer” is the type of control that owns the command and the “(url as String)” portion is the information that the command requires. The Tips bar tells you that the required information must be a string or else the command won’t work. Also, you must include the url or the command will fail.
- You’ve also noticed that the Code Editor tries to complete what you are typing. For example, if you type “Browser.” and press Tab when the three dots appear, it will display a large drop-down list of all possible terms that complete the expression. If you continue by typing an “L”, it will narrow down the list to the valid items that begin with the letter “L”.
When the drop-down appears, you can navigate up or down with the Up and Down arrow keys. When the desired item is highlighted, press Enter to select it. Using the Autocomplete feature often will cut down on spelling and syntax errors.
Saving and Testing the Application
Before running the new application, we should save the project to disk.
|
What’s Next
The QuickStart has introduced you to the Real Studio IDE. You’ve learned how to design windows and add code to objects. In the Tutorial, you work with another type of control, a ListBox, and add error checks to your code. Later on, you will learn about Real Studio’s Menu Editor, its integrated debugger, and its cross-compiler, which allows you to build for up Windows, Macintosh, and Linux platforms from the same code base. All of these topics are covered in detail in the Real Studio Users Guide. The Language Reference is the reference for all items used in programming.
We recommend that you next work through the Tutorial and then explore the Users Guide for a comprehensive description of the Real Studio IDE.






