Download Power Builder Tutorial 12.5 PDF

TitlePower Builder Tutorial 12.5
TagsDatabases World Wide Web Object (Computer Science) Scripting Language Component Based Software Engineering
File Size2.3 MB
Total Pages274
Table of Contents
                            About This Book
CHAPTER 1 Introduction to PowerBuilder
	What PowerBuilder is
	The PowerBuilder environment
	PowerBuilder objects
CHAPTER 2 About the PowerBuilder Tutorial
	Learning to build a client/server application
	Learning to build a .NET Web Forms application
	Learning to build a .NET Windows Forms application
	How you will proceed
		How long it will take
		What you will learn
	Setting up for the tutorial
LESSON 1 Starting PowerBuilder
	Create a new workspace
	Create a target
	Specify an icon for the application
	Change the size of the main window
	Run the application
LESSON 2 Customizing the PowerBuilder Environment
	Manipulate the System Tree window
	Open an object
	Manipulate views
	Set up the toolbars
LESSON 3 Building a Login Window
	Create a new window
	Add controls to the window
	Change the tab order on the window
	Code some Help events and preview the window
	Write the script to open the window
LESSON 4 Connecting to the Database
	Look at the EAS Demo DB database
	Run the Connection Object wizard
	Declare a global variable
	Modify the connection information
	Complete the login and logout scripts
	Run the application
LESSON 5 Modifying the Ancestor Window
	Add a library to the search path
	Create a new ancestor sheet window
	Add user events and event scripts
	Add scripts to retrieve data for the DataWindow controls
	Adjust a runtime setting for sheet window size
LESSON 6 Setting Up the Menus
	Modify the frame menu
	Create a new sheet menu
	Add menu scripts to trigger user events
	Attach the new menu and run the application
LESSON 7 Building DataWindow Objects
	Create and preview a new DataWindow object
	Save the DataWindow object
	Make cosmetic changes to the first DataWindow object
	Create a second DataWindow object
	Make cosmetic changes to the second DataWindow object
LESSON 8 Attaching the DataWindow Objects
	Attach the DataWindow object to the master DataWindow control
	Attach the DataWindow object to the detail DataWindow control
	Run the application
	Attach DataWindow objects to the Product window
	Run the application again
LESSON 9 Running the Debugger
	Add breakpoints in application scripts
	Run in debug mode
	Set a watch and a conditional breakpoint
LESSON 10 Exception Handling
	Add a new sheet window to the existing application
	Create user-defined exception objects
	Create a new user function and user event
	Call the methods and catch the exceptions
	Run the application
LESSON 11 Preparing the Application for Deployment
	Create the Project object
	Create the executable file
	Create a shortcut
	Test the executable file
	What to do next
LESSON 12 Converting the PowerBuilder Tutorial to a Web Forms Application
	Run the tutorial in PowerBuilder
	Make changes for a .NET Web Forms application
	Create a .NET Web Forms target and project
	Deploy a .NET Web Forms project
	Run the application from a Web browser
LESSON 13 Converting the PowerBuilder Tutorial to a Windows Forms Application
	Run the tutorial in PowerBuilder
	Copy resource files to the Solutions directory
	Create a .NET Windows Forms target and project
	Deploy and run the Windows Forms target
	Publish the application to a Web browser
	Install the application from a Web browser and run it
	Install the application on another computer
	Update the application
Index
                        
Document Text Contents
Page 1

Getting Started
PowerBuilder® Classic
12.5

Page 2

DOCUMENT ID: DC37772-01-1250-01

LAST REVISED: July 2011

Copyright © 2011 by Sybase, Inc. All rights reserved.

This publication pertains to Sybase software and to any subsequent release until otherwise indicated in new editions or technical notes.
Information in this document is subject to change without notice. The software described herein is furnished under a license agreement,
and it may be used or copied only in accordance with the terms of that agreement.

To order additional documents, U.S. and Canadian customers should call Customer Fulfillment at (800) 685-8225, fax (617) 229-9845.

Customers in other countries with a U.S. license agreement may contact Customer Fulfillment via the above fax number. All other
international customers should contact their Sybase subsidiary or local distributor. Upgrades are provided only at regularly scheduled
software release dates. No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic,
mechanical, manual, optical, or otherwise, without the prior written permission of Sybase, Inc.

Sybase trademarks can be viewed at the Sybase trademarks page at http://www.sybase.com/detail?id=1011207. Sybase and the marks listed
are trademarks of Sybase, Inc. ® indicates registration in the United States of America.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of
SAP AG in Germany and in several other countries all over the world.

Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.

Unicode and the Unicode Logo are registered trademarks of Unicode, Inc.

All other company and product names mentioned may be trademarks of the respective companies with which they are associated.

Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013
for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies.

Sybase, Inc., One Sybase Drive, Dublin, CA 94568.

Page 137

Lesson 5 Modifying the Ancestor Window

Getting Started 125

View the scripts inherited from the user object
Now you view the scripts the DataWindow controls inherited from
u_dwstandard.

1 Double-click the dw_detail DataWindow in the Layout view
or
Select dw_detail from the first drop-down list box in the Script view if
it is not already selected.

The Script view opens to the empty script for the dw_detail control’s
ItemChanged event.

Unscripted events are alphabetized separately from scripted events.
Scripted events are listed at the top of the drop-down list box. You will
next look at the dberror event, which contains an ancestor script, so you
need to scroll up in the event drop-down list box to find it.

2 Select dberror from the second drop-down list box in the Script view.

This script is also empty, but a purple script icon displays next to the event
name. This indicates that the ancestor control (u_dwstandard) has an
associated script.

Page 138

Create a new ancestor sheet window

126 PowerBuilder Classic

3 Select Edit>Go To>Ancestor Script from the menu bar
or
Select u_dwstandard in the third drop-down list box.

PowerBuilder displays the script for the DBError event in the Script view.
The ancestor script is read-only when it is accessed from the Script view
for one of its descendants.

4 Scroll through the window to view the database error-handling logic
defined for the DBError event.

The script suppresses the default error message that the DBError event
normally displays. Instead, it causes an appropriate message to be
displayed for each database error that might occur. The script makes calls
to user events that were declared for the user object.

Because you used the u_dwstandard object to define both DataWindow
controls in the window, this logic is automatically reused in both controls.

5 Select Edit>Go To>Descendant Script from the menu bar
or
Right-click inside the script area of the Script view.
Select Go To>Descendant Script from the pop-up menu.

The third drop-down list box again displays w_master_detail_ancestor, the
identifier of the object that contains the current control. The script for the
DBError event of this control (dw_detail) is still blank.

Page 273

Index

Getting Started 261

files 25
initialization file 101
setup 25

U
Update function 130
user events

adding scripts for 127
defining 127
triggering from menu scripts 145

user objects
about 17
using 118

V
variables

global 102
gnv_connect 102
instance 102
naming conventions 102

vertical scrollbars 123
view, types of

Design (DataWindow painter) 150
HTML Preview (DataWindow painter) 154
Layout 65
Object Details (Database painter) 94
Object Layout (Database painter) 93
Objects (Database painter) 91
Preview (DataWindow painter) 154
Properties 65
Script 78
Syntax (Select painter) 159
Table Layout (Select painter) 159
WYSIWYG (Menu painter) 135

views
docking 56
floating 56
manipulating 54
pinning 56
saving layout schemes 58
stacks 57

visual user objects 17

W
WHERE clause 161
Window painter, deleting a control 69
windows

about 12
ancestor 115
CommandButton controls on 75
creating 63
DataWindow controls on 117
deleting a control 69
Picture controls on 69
previewing 80
response 63
saving 63
size 42
StaticText controls on 71
tab order in 77

wizards
Connection Object 96
DataWindow 151
Project 217

workspaces 5

Similer Documents