application extension in this presentation… –about extending your underlying iseries...

30
Application Extension In this presentation… About extending your underlying iSeries application. Using Designer to extend your application. Introduction to the Macro Editor and how you can use it to extend your iSeries application. About the newlook object model Printing File Transfer (FTP)

Upload: margaretmargaret-mccarthy

Post on 24-Dec-2015

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension

• In this presentation…– About extending your underlying iSeries application.– Using Designer to extend your application.– Introduction to the Macro Editor and how you can use it to extend your

iSeries application.– About the newlook object model– Printing– File Transfer (FTP)

Page 2: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension

• Extending newlook– Refers to extending your iSeries application by adding new

functionality. The key tools used are: Rules, Designer and the Macro Editor. They can assist you in:

• Designing new forms.• Splitting complex iSeries screens into multiple GUI panels.• Add business rules to extend the behavior of existing applications.• Remove redundant steps to improve workflow.

• Key newlook tools– Designer– Macro Editor

Page 3: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension - Designer

• Visual development tool

• Forms– Create new forms using Designer and the Macro Editor. Forms contain

controls.

• Controls – Graphical objects such as a text boxes or command buttons that you

place on a form using Designer. Controls are used to display data, perform an action, or make the screen easier to read. Controls contain properties.

• Properties– A named attribute of an control or object. Properties define

characteristics such as size, color, and screen location, or the state of an object, such as enabled or disabled.

Page 4: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension - Designer

• Designer grid– Tools/Show Grid

• Field selection– Left-click– Multiple fields

• CTRL+left-click• Drag select

– Set the anchor• To group align/size

set the anchor byselecting it last

Page 5: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension - Designer

• Format menu– Align controls– Size controls– Spacing

• Horizontal• Vertical • Centering

– Order on panel• Controls are three

dimensional• Uses layering• Send objects backward/forward

Page 6: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension - Designer

• Properties Window• Display

– Press F4– Right-click & select properties– Select View/Properties Window

• Colors– Black – default value– Black bold – changed value– Use Default button to reset values

– default All or Default one property.

Page 7: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Macro Editor– The Macro Editor, along with Designer is used to both add new

functionality (extend) and integrate newlook with other desktop applications, such as MS Word and Excel.

Page 8: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Macros– A set of one or more actions that perform a particular action, e.g. open

a new form or window. Macros are used to automate common tasks.– Programming language– Actions

• Parameters– Labels– Conditions

• A condition is a logical expression. A macro may follow different paths depending on whether the condition is true or false.

– Macros are stored in the shared or user.sid file.

Page 9: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• newlook programming (Macros)• Events

– An event is an action recognized by a screen or a control. Event-driven applications execute code in response to an event.

– Trigger.  

• Macros– Run a series of actions.

• Actions• Expressions

– Any combination of operators, constants, literal values, functions and names of fields, controls, and properties that evaluates to a single value.

• Functions– A procedure that returns a value and that can be used in an

expression. You can select a function using the Expression Builder or just type one.

Page 10: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Events– Accessed via

Designer– Forms

• OnReceive• OnSend• OnOpen• OnClose

– Controls• OnClick• OnChange• OnOption

Page 11: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Events – Online Help

Page 12: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Writing a macro

End

Start

Loop

Skip

Page 13: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Actions Actions

Page 14: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Actions – Online Help

Page 15: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• ConditionsConditions

Page 16: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Labels– GotoMacro– RunMacro– Documentation

Label

Page 17: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• CommentsComments

Page 18: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Expressions– Any combination of:

• Operators• Constants• Literal values• Functions• Names of:

– Fields– Controls– Properties

– That evaluates to a single value

– You can use expressions as settings for many properties and action arguments; to set criteria or define calculated fields, and to set conditions in macros.

Page 19: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Expressions– Settings for properties– Set conditions in macros– Action arguments– Set Criteria– Define calculated fields Expressions

Page 20: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Macro Editor

• Expressions– Simple

• = price * quantity– Complex

• Retrieve the current time of day Time(Now() *HH:nn:ss*)

• Formatted string for display in a message box="2 + +1 = " & 2 + +1 & Chr(13) & "2 + -3 = " & 2 + -3 & Chr(13) & "2 + 3.1 = " & 2 + 3.1 & Chr(13) & "2.9 + 3.1 = " & 2.9 + 3.1 & Chr(13) & "2 + ""3.4"" = " & 2 + "3.4" & Chr(13) & "2 + ""1abc"" = " & 2 + "1abc" & Chr(13) & "2 + ""abc"" = " & 2 + "abc”

– Determine and set system colors Iif(System.Colors < 256, RGB(0, 128, 128), RGB(51, 102, 153))

Page 21: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Expression Builder

• Expression Builder– The Expression Builder helps you build expressions. It is available by

clicking the Build button ( ) wherever you want to create an expression, e.g. in the Condition column of the Macro Editor.

– Expressions are typically made up of three fundamental types – constants, functions and variables.

– You can use the Expression Builder below to create an expression if you do not wish to type it directly in the Macro Editor.

Page 22: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Object Oriented System

• Objects– Have -

• Properties– which can be read/modified by -

• Macros– which are driven by -

• Events

Page 23: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Object Model

• System object– your PC

• App object– newlook

• Form object– Current screen

• Clipboard object– Windows clipboard

Page 24: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Object Model

• Objects and Controls – Online Help

Page 25: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Object Model

• Objects model referencing

• Constants– Alpha: “This is a string”– Numeric: 976

– Naming Conventions– Variables & Object Names– E.g. varCustomerCode– E.g. txtUsername

– Functions– Trim(“ abc “, “a”)

• This would return the string “bc”

• Objects properties– App.id– ActiveForm.Message– ActiveControl.Visible– CustomerName.Caption– Logo.Picture

– The default syntax to reference is always

– ObjectName.ObjectProperty– Eg. ActiveForm.Caption

Page 26: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Object Model

• Events and Timers– OnReceive– OnRefresh– OnOption– OnSend– OnTimer– TimerCount – how many– TimerInterval – how often

Page 27: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – Printing

• Printing in TCP/IP environments– Telnet printer pass-through

• direct support using newlook• Available with the enhanced Telnet server in OS/400 V3R2 +• Attach local/network printer device to iSeries and run over native TCP/IP• Connect via Printer Connection in newlook• Spool data that appears in the specified OUTQ will be printed to nominated

client/network printer– Line Printer Request/Line Printer Daemon (LPR/LPD)

• Allows the iSeries to send/receive data across a TCP/IP network• support via 3rd party LPR/LPD software applications

– Direct OS/400 TCP/IP printer support • Uses the iSeries PCL/PJL TCP/IP printer driver• Sends spooled files directly to any TCP/IP network attached printer that

accepts the HP PCL/PJL printer languages• Non-direct support using newlook

– IBM Redbookhttp//:www.redbooks.ibm.com/abstracts/sg245190.html

– See “Printing with newlook” White Paper.

Page 28: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Application Extension – FTP

• FTP– FTP (File Transfer Protocol) is a

platform-independent protocol to allow sharing of files between disparate computer systems on a TCP/IP network such as the Internet or an intranet.

• newlook FTP– newlook file transfer provides a

graphical interface to allow you to easily manipulate and transfer files on a remote computer system using FTP protocol. You can:

• Upload local files• Download remote files

Page 29: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

Summary

• newlook can be used to extend your underlying iSeries application.• The key tools used in extending your application are Designer, Macro

Editor and the Expression Builder. • You can use newlook to create new forms, add controls and configure

properties.• Designer is a visual development tool based on WYSIWG and drag and

drop functionality. • The Macro Editor (macros) is the key programming tool used to extend

your underlying iSeries application.• newlook offers a number of printing solutions to allow you to print spool

files on local or network printers.

Page 30: Application Extension In this presentation… –About extending your underlying iSeries application. –Using Designer to extend your application. –Introduction

newlook 8 Training

Workshop 5