Getting Started PowerBuilder 8
is a tutorial in which you build your first PowerBuilder. application. Part 3 … This chapter describes what you will do in the PowerBuilder tutorial and …
More PDF Content
Untitled Document Getting Started PowerBuilder 8 DOCUMENT ID: 37772-01-0800-01 LAST REVISED: June 2001 Copyright 1989-2001 by Sybase, Inc. All rights reserved. This publication pertains to Sybase database management 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, the Sybase logo, ADA Workbench, Adaptable Windowing Environment, Adaptive Component Architecture, Adaptive Server, Adaptive Server Anywhere, Adaptive Server Enterprise, Adaptive Server Enterprise Monitor, Adaptive Server Enterprise Replication, Adaptive Server Everywhere, Adaptive Server IQ, Adaptive Warehouse, AnswerBase, Anywhere Studio, Application Manager, AppModeler, APT Workbench, APT-Build, APT-Edit, APT-Execute, APT-FORMS, APT-Translator, APT-Library, Backup Server, ClearConnect, Client-Library, Client Services, Data Pipeline, Data Workbench, DataArchitect, Database Analyzer, DataExpress, DataServer, DataWindow, DB-Library, dbQueue, Developers Workbench, Direct Connect Anywhere, DirectConnect, Distribution Director, E-Anywhere, E-Whatever, Embedded SQL, EMS, Enterprise Application Studio, Enterprise Client/Server, Enterprise Connect, Enterprise Data Studio, Enterprise Manager, Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise Work Designer, Enterprise Work Modeler, EWA, Financial Fusion, Financial Fusion Server, Gateway Manager, ImpactNow, InfoMaker, Information Anywhere, Information Everywhere, InformationConnect, InternetBuilder, iScript, Jaguar CTS, jConnect for JDBC, KnowledgeBase, MainframeConnect, Maintenance Express, MAP, MDI Access Server, MDI Database Gateway, media.splash, MetaWorks, MySupport, Net-Gateway, Net-Library, ObjectConnect, ObjectCycle, OmniConnect, OmniSQL Access Module, OmniSQL Toolkit, Open Client, Open ClientConnect, Open Client/Server, Open Client/Server Interfaces, Open Gateway, Open Server, Open ServerConnect, Open Solutions, Optima++, PB-Gen, PC APT Execute, PC DB-Net, PC Net Library, Power++, power.stop, PowerAMC, PowerBuilder, PowerBuilder Foundation Class Library, PowerDesigner, PowerDimensions, PowerDynamo, PowerJ, PowerScript, PowerSite, PowerSocket, Powersoft, PowerStage, PowerStudio, PowerTips, Powersoft Portfolio, Powersoft Professional, PowerWare Desktop, PowerWare Enterprise, ProcessAnalyst, Report Workbench, Report-Execute, Replication Agent, Replication Driver, Replication Server, Replication Server Manager, Replication Toolkit, Resource Manager, RW-DisplayLib, RW-Library, S-Designor, SDF, Secure SQL Server, Secure SQL Toolset, Security Guardian, SKILS, smart.partners, smart.parts, smart.script, SQL Advantage, SQL Anywhere, SQL Anywhere Studio, SQL Code Checker, SQL Debug, SQL Edit, SQL Edit/TPU, SQL Everywhere, SQL Modeler, SQL Remote, SQL Server, SQL Server Manager, SQL SMART, SQL Toolset, SQL Server/CFT, SQL Server/DBM, SQL Server SNMP SubAgent, SQL Station, SQLJ, STEP, SupportNow, Sybase Central, Sybase Client/Server Interfaces, Sybase Financial Server, Sybase Gateways, Sybase MPP, Sybase SQL Desktop, Sybase SQL Lifecycle, Sybase SQL Workgroup, Sybase User Workbench, SybaseWare, Syber Financial, SyberAssist, SyBooks, System 10, System 11, System XI (logo), SystemTools, Tabular Data Stream, Transact-SQL, Translation Toolkit, UNIBOM, Unilib, Uninull, Unisep, Unistring, URK Runtime Kit for UniCode, Viewer, Visual Components, VisualSpeller, VisualWriter, VQL, WarehouseArchitect, Warehouse Control Center, Warehouse Studio, Warehouse WORKS, Watcom, Watcom SQL, Watcom SQL Server, Web Deployment Kit, Web.PB, Web.SQL, WebSights, WebViewer, WorkGroup SQL Server, XA-Library, XA-Server and XP Server are trademarks of Sybase, Inc. 3/01 Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. All other company and product names used herein may be trademarks or registered trademarks of their respective companies. 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., 6475 Christie Avenue, Emeryville, CA 94608. Contents iii About This Book ………………….. ix PART 1 WELCOME TO POWERBUILDER C H APT E R 1 Introduction to PowerBuilder………… 3 What PowerBuilder is ………………… 4The PowerBuilder environment ……….. 7PowerBuilder objects ………………. 12 C H APT E R 2 About the PowerBuilder Tutorial ………………. 19 Learning to build a client/server application ……………….. 20Learning to build a Web application …………….. 21How you will proceed ………………. 22 How long it will take …………… 22What you will learn ……………. 23 Setting up for the tutorial ………….. 24 PART 2 BUILDING A CLIENT/SERVER APPLICATION L ESS O N 1 Starting PowerBuilder ……………. 29 Create a new workspace………….. 30Create a target ………….. 33Specify an icon for the application ………………. 39Change the size of the main window …………… 41Run the application …………………. 43 L ESS O N 2 Customizing the PowerBuilder Environment ………….. 47 Manipulate the System Tree window …………… 48Open an object ………….. 50 Contents iv Manipulate views……….. 52 Add an extra Script view…………. 53Display view title bars………… 54Float and dock views…………. 55Manipulate tabbed views………… 56Save a view layout scheme………………….. 57Reset the default view layout scheme…………………. 58 Set up the toolbars ………………….. 59 Show labels on toolbar buttons …………….. 60Float the toolbars………………. 61Reposition the toolbars…………… 63 L E S SO N 3 Building a Login Window ………… 65 Create a new window ………………. 66Add controls to the window …………… 70 Add a Picture control …………. 72Add StaticText controls ………….. 74Specify properties of the StaticText controls ………… 75Add SingleLineEdit controls …………………. 77Specify properties of the SingleLineEdit controls ……………….. 78Add CommandButton controls ……………… 79Specify properties of the CommandButton controls ……………. 80 Change the tab order on the window …………… 81Code some Help events and preview the window ……………………. 82Write the script to open the window …………….. 85 Modify the frame window Open event …………………. 86Compile the script……………… 89 L E S SO N 4 Connecting to the Database ………… 91 Look at the EAS Demo DB database …………… 92 Look at the database profile for the EAS Demo DB database 94Look at table definitions in the EAS Demo DB database …….. 98 Run the Connection Object wizard…………….. 102Declare a global variable………… 105Modify the connection information …………….. 109 Modify the of_GetConnectionInfo function …………. 110Call the connection service manager ………………… 112 Complete the login and logout scripts ………… 115 Set up shortcuts for AutoScript……………. 116Add code to the OK button Clicked event ………….. 117Add code to the Cancel button Clicked event ………………….. 119Add code to the application Close event ……………. 120 Run the application ……………….. 122 Contents v LE SSO N 5 Modifying the Ancestor Window …………….. 123 Add DataWindow controls …………… 124 Add a library to the search path ………….. 126Add a DataWindow control for the master DataWindow ……. 128Add a DataWindow control for the detail DataWindow………. 131View the scripts inherited from the user object…………………. 132 Add user events and event scripts …………….. 134Add scripts to retrieve data for the DataWindow controls ………… 138Rebuild library objects ……………. 141 LE SSO N 6 Setting Up the Menus …………… 143 Modify the frame menu ………….. 144 Modify the File menu ……….. 145Enable Help menu items ……………………. 147 Create a new sheet menu …………… 149 Inherit and save a new menu ……………… 150Add items to the new menu ………………… 151Add a new toolbar for the new menu items ………… 153 Add menu scripts to trigger user events…………………… 155Attach the new menu and run the application …………… 157 LE SSO N 7 Building DataWindow Objects ………………… 161 Create and preview a new DataWindow object ………… 162Save the DataWindow object ……………………. 166Make cosmetic changes to the first DataWindow object ………….. 167Create a second DataWindow object…………. 169 Select the data source and style …………. 170Select the table and columns ……………… 171Define a retrieval argument ………………… 173Specify a WHERE clause …………………… 174View the DataWindow in the DataWindow painter ……………. 175Save the DataWindow object ……………… 178 Make cosmetic changes to the second DataWindow object …….. 179 Rearrange the columns ………… 180Align the labels and columns………………. 182Display the arrow for a dropdown DataWindow edit style ….. 183 Contents vi L E S SO N 8 Attaching the DataWindow Objects …………. 185 Attach a DataWindow object to the master DataWindow control . 186Attach the DataWindow object to the detail DataWindow control 188Run the application ……………….. 189Attach DataWindow objects to the Product window ………………… 192Run the completed application ………………….. 194 L E S SO N 9 Running the Debugger ………….. 197 Add breakpoints in application scripts ………… 198Run in debug mode ……………….. 202Set a watch and a conditional breakpoint ………………… 207 L E S SO N 1 0 Preparing the Application for Deployment…………….. 209 Create the Project object………… 210Create the executable file …………… 213Create a shortcut…………………… 215Test the executable file
PDF files Related to this topic:
- PowerBuilder Foundation Class Library User’s Guide TUTORIAL. Lesson 1. Generate demand for CFPs. …. The PowerBuilder...
- Crystal Reports in PowerBuilder Crystal Reports in PowerBuilder. Report Designer Component – Tutorial and...
- Getting Started PowerBuilder 11.0 Tutorial LESSON 13. Converting the PowerBuilder Tutorial to a Windows Forms....
- PowerBuilder 11.0 .NET Quick Reference Guide SQL Anywhere 10 (for samples and tutorials) … If you...
- An Overview of Oracle Collaboration Suite 10g ORACLE FLUFF / Oracle Collaboration Suite Handbook / Zapar /...
Processing your request, Please wait....