300 likes | 316 Views
Learn how to extend your iSeries application using the Designer and Macro Editor tools. Design new forms, add business rules, and improve workflow.
E N D
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)
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
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.
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/sizeset the anchor byselecting it last
Application Extension - Designer • Format menu • Align controls • Size controls • Spacing • Horizontal • Vertical • Centering • Order on panel • Controls are threedimensional • Uses layering • Send objects backward/forward
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.
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.
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.
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.
Application Extension – Macro Editor • Events • Accessed viaDesigner • Forms • OnReceive • OnSend • OnOpen • OnClose • Controls • OnClick • OnChange • OnOption
Application Extension – Macro Editor • Events – Online Help
Start Skip Loop End Application Extension – Macro Editor • Writing a macro
Application Extension – Macro Editor Actions • Actions
Application Extension – Macro Editor • Actions – Online Help
Application Extension – Macro Editor • Conditions Conditions
Application Extension – Macro Editor • Labels • GotoMacro • RunMacro • Documentation Label
Application Extension – Macro Editor • Comments Comments
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.
Application Extension – Macro Editor • Expressions • Settings for properties • Set conditions in macros • Action arguments • Set Criteria • Define calculated fields Expressions
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))
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.
Application Extension – Object Oriented System • Objects • Have - • Properties • which can be read/modified by - • Macros • which are driven by - • Events
Application Extension – Object Model • System object • your PC • App object • newlook • Form object • Current screen • Clipboard object • Windows clipboard
Application Extension – Object Model • Objects and Controls – Online Help
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
Application Extension – Object Model • Events and Timers • OnReceive • OnRefresh • OnOption • OnSend • OnTimer • TimerCount – how many • TimerInterval – how often
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.
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
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.
Workshop 5 newlook 8 Training