opentext™ gupta team developer
TRANSCRIPT
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
1
Team Developer 6
Quick Start
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
2
This document gives you an overview of the Team Developer 6.0. We will create a simple
application in the course of the "Quick Start" and run it against a SQLBase.
Part 1 deals with the handling of the outline editor. It is important to know that the right
mouse button, when creating the code, plays an important role. Equivalent functionality
offered practically at any point in the Outline would make sense at this point.
With practice you will find to cope in the "Outline" very quickly.
Part 2 shows step by step how to create an application. The "doing" will be certainly very
easy. We don’t do "Return Checking", this can be quickly added into the program code. The
application assumes that the database is started and that the application can access the
database.
It is important to show how the code is structured and that the code is "Event Driven".
In other words: the application is "Message-Driven". There are for example messages at
application starts, displaying forms, dialogs, button clicks, events within the applications
which send information to other parts of the application or start functions. These events are
defined in the message actions.
Please look at the complete documentation of the Team Developer. It certainly makes sense
to even look at a more complex sample application..
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
3
Part 1: Working with the Outline Editor
The Team Developer IDE
Image: The Outline Editor
Team Developer is based on a ‘special’ format of the generated code. This code is shown in the
Outline. This Outline shows the generated code structured and developers can easlily read this code.
It is immediately apparent whether the code defined global, local or external libraries.
Image: Empty Outline after the start of the Team Developers
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
4
Image: Create a new form
Images: Empty form
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
5
Image: Defining a local function
Image: Body of a user defined function
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
6
Image: Definition of the local variable
Image: Naming the new variables of type SQLHandle
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
7
Image: Create a variable of type String
Image: The actual function code is written in the section "Actions"
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
8
Image: Function
Image: Working with the Coding Assistent
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
9
Image: ToolTip for function parameters
Image: Other functions needed for the flow of the application
Image: parameter list of function SqlPrepareAndExecute(...)
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
10
Image: This is a typical function code
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
11
Image: Global Declarations
Image: Global Actions
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
12
Image: Control structures (If / Else;) Loop, While, Break,...)
Image: Example of a Pushbutton class with methods
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
13
Set the database system variables.
These system variables are set when the application starts and allow the login to the database
(SQLBase11. 6). Alternatively you can create a dialog, covering the user and password. These system
variables are set when the application starts and allows the login to the database (SQLBase11. 6).
A look at the outline, the actual source code shows the structure of the source code. We will
gradually add at a suitable place in the outline of other source code.
Set of system variables when the application starts
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
14
Part 2: First application
One first form:
This form should display all customer data in a grid. Let's start with the form. This form should
contain a table that displays the appropriate customer data.
The properties of the form can be defined in the Attribute Inspector
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
15
Attribute Inspector settings
Next we select from the control palette the grid control ( ) from and place it on the form:
Drag and drop of the control onto the form
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
16
Gird on the form
To this object, we set some attributes in the Attribute Inspector:
We are starting to write code to populate the grid with data...
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
17
In our case, we want to display the customer data when the form loads. Therefore, we will use the
message SAM_CreateComplete of the form to trigger a function that populates the form with data.
Let's start with the function:
Because this function only to this form is valid, we can define it in the local area of the form.
Outline Structure in the tree view
Now the outline for the function:
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
18
Source Code of the function
Now we have to execute our function on startup of the form:
Trigger function when the form is visible
We now ensure that we can stop the application:
To do this we place a button ( ) with drag and drop from the Control Panel on the form and label
it
:
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
19
Controls Palette and location on the form
Now, we set some properties in the Attribut Inspector:
Attibute Inspector settings for the button
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
20
We use the event SAM_Click of the button to exit the application:
Our first version of the application is ready for testing.
We have written 6 lines of code and we will now test our application in debug mode of the IDE. F7
will compile the code and start the application in debug mode:
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
21
Now we create a dialog for adding a new record:
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
22
We are now set some properties of the dialog:
Now we can begin to define the child objects to this dialog:
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
23
That's enough already to test our dialog. To do this we must activate it in the right place. We will
open it as "modal dialog", that means, the application waits until the dialog is closed.
We will open the dialog by clicking a Button:
Code at the Event On SAM_Click:
Now we will write code to center the dialog and to stop when the button is clicked.
Center the Dialog:
Center the dialog when it is displayed
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
24
Closesing the dialog
Now we can test our application again:
Now we must define yet the labels, text boxes, and so on.
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
25
We will get a new ID from the database when saving. Therefore we will protect the field against
editing:
We define two functions:
Calculate the next customer number. This function is defined as a local function within the
dialog "dlgNeu".
Store the data in the database. This function is defined as a local function of the dialog
"dlgNeu":
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
26
Now you must perform the functions in click of the "Save" buttons. We will issue a message
box when the record is saved. Also we set the button "Save" to "disabled", to not save again.
We will also ensure to refill the table so that the record in the table appears.
Now we run our application....
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
27
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
28
We did this example not yet to the following points:
1. Error handling
a. Is possible to connect to the database?
b. Is the SQL statement correct?
c. Is the transaction completed?
2. Control of user actions
a. Was data saved in database?
b. Was data changed by user?
c. Is it allowed to close dialog without saving changed data?
d. Is the data complete?
In addition we have not made thoughts about classes or in generally OOP.
The example returns but now enough opportunities to expand our application. Finally, there
is a screen shot, the show this application as a .NET WPF desktop application.
This includes only the build changed target Win32 to the equivalent .NET WPF desktop build.
.NET WPF Application:
Team Developer 6 – Quick Start Copyright Gupta Technologies 2012
29
Gupta Technologies
1420 Rocky Ridge Drive, Suite 380
Roseville, CA 95661
USA
Phone: 1.916.928.6400
Toll Free: 1.800.468.6439
Fax: 1.916.928.6404
Germany: +49 (0)89208039 – 158
United Kingdom: +44 (0)1753 245 510
France: +33 (0)1 34 58 28 30
COPYRIGHT © 2012. GUPTA TECHNOLOGIES. All rights reserved.
Gupta, the Gupta logo and Gupta NXJ are
registered trademarks of Gupta Technologies. Gupta Composer is a trademark of Gupta Technologies.
Java and J2EE are the trademarks or registered trademarks of
Sun Microsystems, Inc. in the United States and other countries.
All other company or product names are trademarks of their respective owners.