SlideShare a Scribd company logo
Buliding Object-Oriented Applications in PowerBuilder  Module 11: Messaging Basics
Objectives Describe how objects communicate with each other Define direct and generic referencing Use pronouns Explain how to pass data between objects
Topics M essages Defined Method Resolution Uses of Messages References PowerBuilder Functions That Return References Reference Properties Generic Referencing Passing Information
Messages — Definition In object orientation, communication is performed via messages A message contains: A reference to the “receiving” object  The name of a “receiver” object method Values for arguments (optional) An assignment for a return value (optional)
Messages — Definition Examples: Events: li_rv = w_invoice.EVENT ue_Save( ) li_rv = w_invoice.TriggerEvent(“ue_Save”) Functions: ll_success = w_invoice.of_Update( ) li_rv = w_cust.of_Retrieve( )
Method Resolution If the object reference is omitted, PowerBuilder must resolve the method to invoke; the results may be unexpected Static methods verified at compile time Dynamic methods resolved at execution time Search process different for events and functions
Method Resolution for Functions If a reference is not provided, the search order is: Global external functions Global functions Current instance (object functions and local external functions) Ancestor(s) of the current instance
Method Resolution for Events If a reference is not provided, the search order is: Current instance  Parent object Parent ancestors From a control when TriggerEvent( ) / PostEvent( ) is used, search is confined to the control Providing a reference is more efficient and restricts the possibilities
Uses of Messages Messages between objects can: Request data Pass data Request services Initiate services
Message Example "Customer List"  CustomerDetail.of_ShowDetails(102)
References for Messages Direct referencing Pronouns PowerBuilder functions Class reference properties Generic referencing
Message Using Direct Reference Reference variable used during instantiation Window example: w_cust  lw_cust Open(lw_cust) lw_cust.of_SeqWrite( )
Message Using Direct Reference Window control example: $ PBExportHeader$w_cust.srw $ PBExportComments$Display customer details forward global type w_cust from Window end type type dw_data from datawindow within w_cust end type end forward ... global type w_cust from Window int X=836 int Y=372 int Width=1249 ... dw_data  dw_data end type global w_cust  w_cust ... on w_cust.create this.dw_data=create dw_data this.Control[]={ this.dw_data} end on ... on w_cust.destroy destroy(this.dw_data) end on Define subclass Define instance variable Instantiate and assign pointer Destroy
Message Using Direct Reference Can "directly" reference the control within any script in the window: dw_data.Retrieve(102) dw_data: Is an instance variable (property) of the window Data type is dw_data Is a reference for class dw_data that is instantiated at execution time Class dw_data is inherited from the system class DataWindow (control)
Using Pronouns and Properties in Messages Keywords in PowerBuilder Use to generically reference instances This Parent ParentWindow (menu property)
Messaging with the Pronoun This  Refers to the object that contains the message (in a script command) Avoids problems in variable / function resolution Can generically call a function without "hard coding" a reference variable: Close(This) This.Resize(20,30) w_cust.of_Update(This)
Messaging with the Pronoun Parent Refers to the object that "contains" the object that contains the message (in a script command) Standard control in a window, for example: Parent.of_Update(This) Control in a custom visual object, for example: Parent.of_CloseParent( ) Parent of a menu item is the level immediately "above" it: Parent.Hide( )
Messaging with the Property ParentWindow Used in menu scripts to refer to the window with which the menu is associated Data type is  window To trigger an event from a menu to its window, use either of the following: ParentWindow.TriggerEvent("ue_Save") ParentWindow.EVENT DYNAMIC ue_Save( )
Pronoun and Property Restrictions Cannot use dot notation to combine pronouns These statements will  not  compile: This.Parent.x = 7 Parent.Parent.Dynamic of_Save( ) ParentWindow can refer to only the properties and methods of the window it references — not controls in the window This statement will  not  compile: ParentWindow.cb_ok.enabled = TRUE
Functions That Return References A number of functions return references to objects and can be used for sending messages Here is a partial list: ParentWindow( )     GetActiveSheet( ) GetFirstSheet( )     GetNextSheet( ) GetFocus( )     GetApplication( ) GetParent( )     DraggedObject( )
References as Properties Some classes have properties that are reference variables for other objects MenuID – Property of window Control[ ] – Property of window, CVUO, and tab Item[ ] – Property of menu and menu item
MenuID Property of Window MenuID window property Variable of data type menu Populated when window is opened, if menu name is specified Window menu property has name of menu (string) Is there a menu for this window?   menu lm_temp lm_temp = This.MenuID IF IsValid(lm_temp) THEN ...
Control[ ] Property of Windows and CVUOs Array of reference variables Data type is windowcontrol Populated when window or CVUO is created Each element references a control within the parent object
Control[ ] Property of Windows and CVUOs Exported syntax for window: on w_cust.CREATE This.dw_detail = CREATE dw_detail This.dw_list = CREATE dw_list This.cb_1 = CREATE cb_1 This.Control[ ] = {This.dw_detail, this.dw_list, This.cb_1} end on
Data type of userobject Contains a reference for each tab page within the tab control: global uo_test_tabs uo_test_tabs on uo_test_tabs.create this.tab_3=create tab_3 this.tab_2=create tab_2 this.tab_1=create tab_1 this.Control[]={this.tab_3, this.tab_2, this.tab_1} end on Control[ ] Property of Tab
Item[ ] Property of Menu and Menu Item Contains a reference for each menu item in the next lower level: Can generically search for menu items with specific property values or set property values (for example, Visible) li_max = UpperBound(This.item) FOR li_ndx = 1 TO li_max This.item[li_ndx].Visible=TRUE ...
Generic Referencing Can use: Variables declared from an ancestor class Reference values returned by functions Pronouns For reference variable data types corresponding to an ancestor class:  Only properties of the ancestor class are available for the referenced object Only dynamically invoked methods of the descendent class can be used
Referencing Using Ancestor Data Types Example: window lw_temp Open(w_invoice) lw_temp = w_invoice Only properties of the Window system class can be used with lw_temp Only dynamically invoked methods can be used with lw_temp
Referencing Using Ancestor Data Types The instance can be referenced using either variable: window lw_temp1 lw_temp1 = w_invoice Local memory Global memory w_invoice  w_invoice w_invoice Class pool window  lw_temp1 instance of  w_invoice Instance pool
Generic Referencing Example Nested CVUOs can send a message to the window container Example: Close the window from a command button in a nested CVUO: // Function: of_Close( ) GraphicObject lgr_temp lgr_temp=This.GetParent( ) DO WHILE TypeOf(lgr_temp) <> Window!   lgr_temp = lgr_temp.GetParent( ) LOOP Close(lgr_temp)
Generic Referencing Example For a CommandButton in a CVUO to close the window container, use: Parent.of_Close( ) Notice that no reference is made to a specific object or class
Passing Data to a Method Data can be passed by: Value Reference ReadOnly Different behavior for standard data types versus object reference variables
Passing Data to a Method By  value  for standard data types: A copy is passed to the method Changes cannot be made to the original value By  value  for object references: A copy of the pointer is passed to the method Changes can be made to properties of the object Exception:  For structures, a copy of the structure is passed
Passing Data to a Method By  reference , for all data types: Method receives a pointer to the argument Changes can be made to the original value or object properties
Passing Data to a Method By  ReadOnly  for standard data types: Pointer to the data is passed Data value cannot be changed By  ReadOnly  for object references: Copy of reference Reference cannot be changed Values can change (even for structures)
Passing Variable Number of Arguments Three ways to pass multiple values in one argument to a method: Structures Custom user classes Any data type
Structures Can pass a variable number of arguments of more than one data type Define a structure of unbounded arrays: str_pass lstr_pass lstr_pass.i_arg [1] = 1 lstr_pass.s_arg [1] = &quot;Sam&quot; Parent.of_SeqWrite(lstr_pass)
Custom Class Versus Structure Define a custom class with properties like those of structure ( without  AutoInstantiate): n_cust  ln_cust ln_cust = CREATE n_cust ln_cust.is_name = &quot;Sam&quot; ln_cust.ii_key = 1 This.of_SeqWrite(ln_cust)
Custom Class Versus Structure Define a custom class with properties like those of structure ( with  AutoInstantiate) n_cust  ln_cust ln_cust.is_name = &quot;Sam&quot; ln_cust.ii_key = 1 This.of_SeqWrite(ln_cust) Unlike structures, methods are supported (regardless of AutoInstantiate)
Using the Any Data Type Generic data type Can hold value for standard data type or a data type corresponding to a class Uses standard assignment statement int li_hold = 7 any la_hold la_hold = li_hold
Using the Any Data Type Use ClassName( ) to determine the data type passed: // Function of_Save(any aa_pass) int li_hold boolean lb_hold CHOOSE CASE ClassName(aa_pass) CASE “integer” li_hold = aa_pass ... CASE “boolean” lb_hold = aa_pass ... END CHOOSE
Using the Any Data Type Can use when data type of argument can vary Must reassign to proper data type before using More resources required Compiler cannot perform normal error checking
Summary A message is a communication between objects.  A message consists of the address of the target object, the name of a method, and, optionally, information passed as values of arguments. Messages can be used to request data, pass data, request services, and initiate services. Direct messaging uses the reference variable that was used in the instantiation process.
Summary The pronouns This and Parent and the property ParentWindow are used to generically send a message. Some functions return a reference to an object that can be used in messaging. Some classes have properties that can be used for referencing.
Summary Arguments can be passed by value, reference, or as read-only. A variable number and type of arguments can be passed using structures, custom classes, and the Any data type as function arguments.
Summary Questions

More Related Content

What's hot

Web Design & Development - Session 6
Web Design & Development - Session 6Web Design & Development - Session 6
Web Design & Development - Session 6
Shahrzad Peyman
 
Visual Basic User Interface -IV
Visual Basic User Interface -IVVisual Basic User Interface -IV
Visual Basic User Interface -IV
Sharbani Bhattacharya
 
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 Dr Jammi Ashok - Introduction to Java Material (OOPs) Dr Jammi Ashok - Introduction to Java Material (OOPs)
Dr Jammi Ashok - Introduction to Java Material (OOPs)
jammiashok123
 
Oop14
Oop14Oop14
SQL express course for begginers
   SQL express course for begginers   SQL express course for begginers
SQL express course for begginers
Dmytro Hvozdov
 
Java awt
Java awtJava awt
Java awt
Arati Gadgil
 
Java swing
Java swingJava swing
Java swing
Arati Gadgil
 

What's hot (7)

Web Design & Development - Session 6
Web Design & Development - Session 6Web Design & Development - Session 6
Web Design & Development - Session 6
 
Visual Basic User Interface -IV
Visual Basic User Interface -IVVisual Basic User Interface -IV
Visual Basic User Interface -IV
 
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 Dr Jammi Ashok - Introduction to Java Material (OOPs) Dr Jammi Ashok - Introduction to Java Material (OOPs)
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 
Oop14
Oop14Oop14
Oop14
 
SQL express course for begginers
   SQL express course for begginers   SQL express course for begginers
SQL express course for begginers
 
Java awt
Java awtJava awt
Java awt
 
Java swing
Java swingJava swing
Java swing
 

Viewers also liked

Online Circles of Learning
Online Circles of Learning Online Circles of Learning
Online Circles of Learning
Mary Hillis
 
Online professional development journey
Online professional development journeyOnline professional development journey
Online professional development journey
Mary Hillis
 
Umgang mit Kollegen
Umgang mit KollegenUmgang mit Kollegen
Umgang mit Kollegen
lohoff
 
Intelligent Design
Intelligent DesignIntelligent Design
Intelligent Design
realjames
 
Html Y Javascript
Html Y JavascriptHtml Y Javascript
Html Y Javascript
oswchavez
 
Emotive variables presentation
Emotive variables presentationEmotive variables presentation
Emotive variables presentation
Mary Hillis
 
Booa8 Slide 01
Booa8 Slide 01Booa8 Slide 01
Booa8 Slide 01
oswchavez
 
Booa8 Slide 03
Booa8 Slide 03Booa8 Slide 03
Booa8 Slide 03
oswchavez
 
Using 21st century tools to explore 19th century literature
Using 21st century tools to explore 19th century literatureUsing 21st century tools to explore 19th century literature
Using 21st century tools to explore 19th century literature
Mary Hillis
 
Dh Music Awards
Dh Music AwardsDh Music Awards
Dh Music Awards
Dark_Hogwarts
 
Informal Writing
Informal WritingInformal Writing
Informal Writing
Mary Hillis
 
Subway's Move to the Asia-Pacific Market
Subway's Move to the Asia-Pacific MarketSubway's Move to the Asia-Pacific Market
Subway's Move to the Asia-Pacific Market
realjames
 
007's License to Sell
007's License to Sell007's License to Sell
007's License to Sell
realjames
 
Conflict Management Stages
Conflict Management StagesConflict Management Stages
Conflict Management Stages
realjames
 
Interações para um mundo em mudança
Interações para um mundo em mudançaInterações para um mundo em mudança
Interações para um mundo em mudança
Robson Santos
 
Estratégia para Desenvolvimento de Produtos Digitais
Estratégia para Desenvolvimento de Produtos DigitaisEstratégia para Desenvolvimento de Produtos Digitais
Estratégia para Desenvolvimento de Produtos Digitais
Robson Santos
 
Transport Problems And Solutions!
Transport  Problems And  Solutions!Transport  Problems And  Solutions!
Transport Problems And Solutions!
adtastic2001
 

Viewers also liked (18)

Online Circles of Learning
Online Circles of Learning Online Circles of Learning
Online Circles of Learning
 
Online professional development journey
Online professional development journeyOnline professional development journey
Online professional development journey
 
Umgang mit Kollegen
Umgang mit KollegenUmgang mit Kollegen
Umgang mit Kollegen
 
Intelligent Design
Intelligent DesignIntelligent Design
Intelligent Design
 
Html Y Javascript
Html Y JavascriptHtml Y Javascript
Html Y Javascript
 
Emotive variables presentation
Emotive variables presentationEmotive variables presentation
Emotive variables presentation
 
Booa8 Slide 01
Booa8 Slide 01Booa8 Slide 01
Booa8 Slide 01
 
Booa8 Slide 03
Booa8 Slide 03Booa8 Slide 03
Booa8 Slide 03
 
Using 21st century tools to explore 19th century literature
Using 21st century tools to explore 19th century literatureUsing 21st century tools to explore 19th century literature
Using 21st century tools to explore 19th century literature
 
Dh Music Awards
Dh Music AwardsDh Music Awards
Dh Music Awards
 
Malik
MalikMalik
Malik
 
Informal Writing
Informal WritingInformal Writing
Informal Writing
 
Subway's Move to the Asia-Pacific Market
Subway's Move to the Asia-Pacific MarketSubway's Move to the Asia-Pacific Market
Subway's Move to the Asia-Pacific Market
 
007's License to Sell
007's License to Sell007's License to Sell
007's License to Sell
 
Conflict Management Stages
Conflict Management StagesConflict Management Stages
Conflict Management Stages
 
Interações para um mundo em mudança
Interações para um mundo em mudançaInterações para um mundo em mudança
Interações para um mundo em mudança
 
Estratégia para Desenvolvimento de Produtos Digitais
Estratégia para Desenvolvimento de Produtos DigitaisEstratégia para Desenvolvimento de Produtos Digitais
Estratégia para Desenvolvimento de Produtos Digitais
 
Transport Problems And Solutions!
Transport  Problems And  Solutions!Transport  Problems And  Solutions!
Transport Problems And Solutions!
 

Similar to Booa8 Slide 11

Booa8 Slide 09
Booa8 Slide 09Booa8 Slide 09
Booa8 Slide 09
oswchavez
 
WPF Fundamentals
WPF FundamentalsWPF Fundamentals
WPF Fundamentals
Our Community Exchange LLC
 
User controls
User controlsUser controls
User controls
aspnet123
 
Booa8 Slide 04
Booa8 Slide 04Booa8 Slide 04
Booa8 Slide 04
oswchavez
 
08ui.pptx
08ui.pptx08ui.pptx
08ui.pptx
KabadaSori
 
Chapter 14
Chapter 14Chapter 14
Chapter 14
Terry Yoast
 
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development
Mahmoud Hamed Mahmoud
 
WPF - Controls &amp; Data
WPF - Controls &amp; DataWPF - Controls &amp; Data
WPF - Controls &amp; Data
Sharada Gururaj
 
ASP.NET MVC Controllers & Actions
ASP.NET MVC Controllers & ActionsASP.NET MVC Controllers & Actions
ASP.NET MVC Controllers & Actions
onsela
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonf
Nataliya Patsovska
 
M03 1 Structuraldiagrams
M03 1 StructuraldiagramsM03 1 Structuraldiagrams
M03 1 Structuraldiagrams
Dang Tuan
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Barry Gervin
 
Csharp
CsharpCsharp
Csharp
vinayabburi
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
Walid Ashraf
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOS
Make School
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2
Shahzad
 
Controllers & actions
Controllers & actionsControllers & actions
Controllers & actions
Eyal Vardi
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
Diego Grancini
 
Vb.net iv
Vb.net ivVb.net iv
Vb.net iv
argusacademy
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
jason hu 金良胡
 

Similar to Booa8 Slide 11 (20)

Booa8 Slide 09
Booa8 Slide 09Booa8 Slide 09
Booa8 Slide 09
 
WPF Fundamentals
WPF FundamentalsWPF Fundamentals
WPF Fundamentals
 
User controls
User controlsUser controls
User controls
 
Booa8 Slide 04
Booa8 Slide 04Booa8 Slide 04
Booa8 Slide 04
 
08ui.pptx
08ui.pptx08ui.pptx
08ui.pptx
 
Chapter 14
Chapter 14Chapter 14
Chapter 14
 
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development
 
WPF - Controls &amp; Data
WPF - Controls &amp; DataWPF - Controls &amp; Data
WPF - Controls &amp; Data
 
ASP.NET MVC Controllers & Actions
ASP.NET MVC Controllers & ActionsASP.NET MVC Controllers & Actions
ASP.NET MVC Controllers & Actions
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonf
 
M03 1 Structuraldiagrams
M03 1 StructuraldiagramsM03 1 Structuraldiagrams
M03 1 Structuraldiagrams
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
 
Csharp
CsharpCsharp
Csharp
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOS
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2
 
Controllers & actions
Controllers & actionsControllers & actions
Controllers & actions
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
 
Vb.net iv
Vb.net ivVb.net iv
Vb.net iv
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
 

More from oswchavez

Html Y Javascript
Html Y JavascriptHtml Y Javascript
Html Y Javascript
oswchavez
 
Booa8 Slide 12
Booa8 Slide 12Booa8 Slide 12
Booa8 Slide 12
oswchavez
 
Asp .Net Parte 1
Asp .Net Parte 1Asp .Net Parte 1
Asp .Net Parte 1
oswchavez
 
Booa8 Slide 07
Booa8 Slide 07Booa8 Slide 07
Booa8 Slide 07
oswchavez
 
Booa8 Slide 03
Booa8 Slide 03Booa8 Slide 03
Booa8 Slide 03
oswchavez
 
Booa8 Slide 02
Booa8 Slide 02Booa8 Slide 02
Booa8 Slide 02
oswchavez
 
Pb11 002 1 Metodologia
Pb11 002 1 MetodologiaPb11 002 1 Metodologia
Pb11 002 1 Metodologia
oswchavez
 
Pb11 002 0 Problematica
Pb11 002 0 ProblematicaPb11 002 0 Problematica
Pb11 002 0 Problematica
oswchavez
 
Pb11 003 Overview
Pb11 003 OverviewPb11 003 Overview
Pb11 003 Overview
oswchavez
 
P B11 001 Intro
P B11 001  IntroP B11 001  Intro
P B11 001 Intro
oswchavez
 
Pb110021 Metodologia
Pb110021 MetodologiaPb110021 Metodologia
Pb110021 Metodologia
oswchavez
 
Pb11002 Problematica
Pb11002 ProblematicaPb11002 Problematica
Pb11002 Problematica
oswchavez
 
IntroduccióN A Visual C
IntroduccióN A  Visual  CIntroduccióN A  Visual  C
IntroduccióN A Visual C
oswchavez
 
Net Windows Developer Parte 1
Net  Windows  Developer  Parte 1Net  Windows  Developer  Parte 1
Net Windows Developer Parte 1
oswchavez
 
Clase01 Generalidades De Las Estructuras
Clase01   Generalidades De Las EstructurasClase01   Generalidades De Las Estructuras
Clase01 Generalidades De Las Estructuras
oswchavez
 
Microsoft Ado
Microsoft AdoMicrosoft Ado
Microsoft Ado
oswchavez
 
IntroduccióN A Sql Server 2005
IntroduccióN A Sql Server 2005IntroduccióN A Sql Server 2005
IntroduccióN A Sql Server 2005
oswchavez
 
IntroduccióN A Visual C
IntroduccióN A Visual CIntroduccióN A Visual C
IntroduccióN A Visual C
oswchavez
 
Net Windows Developer Part 1
Net  Windows  Developer    Part 1Net  Windows  Developer    Part 1
Net Windows Developer Part 1
oswchavez
 
Expo Adrenalinux
Expo AdrenalinuxExpo Adrenalinux
Expo Adrenalinux
oswchavez
 

More from oswchavez (20)

Html Y Javascript
Html Y JavascriptHtml Y Javascript
Html Y Javascript
 
Booa8 Slide 12
Booa8 Slide 12Booa8 Slide 12
Booa8 Slide 12
 
Asp .Net Parte 1
Asp .Net Parte 1Asp .Net Parte 1
Asp .Net Parte 1
 
Booa8 Slide 07
Booa8 Slide 07Booa8 Slide 07
Booa8 Slide 07
 
Booa8 Slide 03
Booa8 Slide 03Booa8 Slide 03
Booa8 Slide 03
 
Booa8 Slide 02
Booa8 Slide 02Booa8 Slide 02
Booa8 Slide 02
 
Pb11 002 1 Metodologia
Pb11 002 1 MetodologiaPb11 002 1 Metodologia
Pb11 002 1 Metodologia
 
Pb11 002 0 Problematica
Pb11 002 0 ProblematicaPb11 002 0 Problematica
Pb11 002 0 Problematica
 
Pb11 003 Overview
Pb11 003 OverviewPb11 003 Overview
Pb11 003 Overview
 
P B11 001 Intro
P B11 001  IntroP B11 001  Intro
P B11 001 Intro
 
Pb110021 Metodologia
Pb110021 MetodologiaPb110021 Metodologia
Pb110021 Metodologia
 
Pb11002 Problematica
Pb11002 ProblematicaPb11002 Problematica
Pb11002 Problematica
 
IntroduccióN A Visual C
IntroduccióN A  Visual  CIntroduccióN A  Visual  C
IntroduccióN A Visual C
 
Net Windows Developer Parte 1
Net  Windows  Developer  Parte 1Net  Windows  Developer  Parte 1
Net Windows Developer Parte 1
 
Clase01 Generalidades De Las Estructuras
Clase01   Generalidades De Las EstructurasClase01   Generalidades De Las Estructuras
Clase01 Generalidades De Las Estructuras
 
Microsoft Ado
Microsoft AdoMicrosoft Ado
Microsoft Ado
 
IntroduccióN A Sql Server 2005
IntroduccióN A Sql Server 2005IntroduccióN A Sql Server 2005
IntroduccióN A Sql Server 2005
 
IntroduccióN A Visual C
IntroduccióN A Visual CIntroduccióN A Visual C
IntroduccióN A Visual C
 
Net Windows Developer Part 1
Net  Windows  Developer    Part 1Net  Windows  Developer    Part 1
Net Windows Developer Part 1
 
Expo Adrenalinux
Expo AdrenalinuxExpo Adrenalinux
Expo Adrenalinux
 

Recently uploaded

(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
Priyanka Aash
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
Anant Gupta
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
aslasdfmkhan4750
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
sunilverma7884
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
Zilliz
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
aakash malhotra
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
Priyanka Aash
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 

Recently uploaded (20)

(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 

Booa8 Slide 11

  • 1. Buliding Object-Oriented Applications in PowerBuilder Module 11: Messaging Basics
  • 2. Objectives Describe how objects communicate with each other Define direct and generic referencing Use pronouns Explain how to pass data between objects
  • 3. Topics M essages Defined Method Resolution Uses of Messages References PowerBuilder Functions That Return References Reference Properties Generic Referencing Passing Information
  • 4. Messages — Definition In object orientation, communication is performed via messages A message contains: A reference to the “receiving” object The name of a “receiver” object method Values for arguments (optional) An assignment for a return value (optional)
  • 5. Messages — Definition Examples: Events: li_rv = w_invoice.EVENT ue_Save( ) li_rv = w_invoice.TriggerEvent(“ue_Save”) Functions: ll_success = w_invoice.of_Update( ) li_rv = w_cust.of_Retrieve( )
  • 6. Method Resolution If the object reference is omitted, PowerBuilder must resolve the method to invoke; the results may be unexpected Static methods verified at compile time Dynamic methods resolved at execution time Search process different for events and functions
  • 7. Method Resolution for Functions If a reference is not provided, the search order is: Global external functions Global functions Current instance (object functions and local external functions) Ancestor(s) of the current instance
  • 8. Method Resolution for Events If a reference is not provided, the search order is: Current instance Parent object Parent ancestors From a control when TriggerEvent( ) / PostEvent( ) is used, search is confined to the control Providing a reference is more efficient and restricts the possibilities
  • 9. Uses of Messages Messages between objects can: Request data Pass data Request services Initiate services
  • 10. Message Example &quot;Customer List&quot; CustomerDetail.of_ShowDetails(102)
  • 11. References for Messages Direct referencing Pronouns PowerBuilder functions Class reference properties Generic referencing
  • 12. Message Using Direct Reference Reference variable used during instantiation Window example: w_cust lw_cust Open(lw_cust) lw_cust.of_SeqWrite( )
  • 13. Message Using Direct Reference Window control example: $ PBExportHeader$w_cust.srw $ PBExportComments$Display customer details forward global type w_cust from Window end type type dw_data from datawindow within w_cust end type end forward ... global type w_cust from Window int X=836 int Y=372 int Width=1249 ... dw_data dw_data end type global w_cust w_cust ... on w_cust.create this.dw_data=create dw_data this.Control[]={ this.dw_data} end on ... on w_cust.destroy destroy(this.dw_data) end on Define subclass Define instance variable Instantiate and assign pointer Destroy
  • 14. Message Using Direct Reference Can &quot;directly&quot; reference the control within any script in the window: dw_data.Retrieve(102) dw_data: Is an instance variable (property) of the window Data type is dw_data Is a reference for class dw_data that is instantiated at execution time Class dw_data is inherited from the system class DataWindow (control)
  • 15. Using Pronouns and Properties in Messages Keywords in PowerBuilder Use to generically reference instances This Parent ParentWindow (menu property)
  • 16. Messaging with the Pronoun This Refers to the object that contains the message (in a script command) Avoids problems in variable / function resolution Can generically call a function without &quot;hard coding&quot; a reference variable: Close(This) This.Resize(20,30) w_cust.of_Update(This)
  • 17. Messaging with the Pronoun Parent Refers to the object that &quot;contains&quot; the object that contains the message (in a script command) Standard control in a window, for example: Parent.of_Update(This) Control in a custom visual object, for example: Parent.of_CloseParent( ) Parent of a menu item is the level immediately &quot;above&quot; it: Parent.Hide( )
  • 18. Messaging with the Property ParentWindow Used in menu scripts to refer to the window with which the menu is associated Data type is window To trigger an event from a menu to its window, use either of the following: ParentWindow.TriggerEvent(&quot;ue_Save&quot;) ParentWindow.EVENT DYNAMIC ue_Save( )
  • 19. Pronoun and Property Restrictions Cannot use dot notation to combine pronouns These statements will not compile: This.Parent.x = 7 Parent.Parent.Dynamic of_Save( ) ParentWindow can refer to only the properties and methods of the window it references — not controls in the window This statement will not compile: ParentWindow.cb_ok.enabled = TRUE
  • 20. Functions That Return References A number of functions return references to objects and can be used for sending messages Here is a partial list: ParentWindow( )  GetActiveSheet( ) GetFirstSheet( )  GetNextSheet( ) GetFocus( )  GetApplication( ) GetParent( )  DraggedObject( )
  • 21. References as Properties Some classes have properties that are reference variables for other objects MenuID – Property of window Control[ ] – Property of window, CVUO, and tab Item[ ] – Property of menu and menu item
  • 22. MenuID Property of Window MenuID window property Variable of data type menu Populated when window is opened, if menu name is specified Window menu property has name of menu (string) Is there a menu for this window? menu lm_temp lm_temp = This.MenuID IF IsValid(lm_temp) THEN ...
  • 23. Control[ ] Property of Windows and CVUOs Array of reference variables Data type is windowcontrol Populated when window or CVUO is created Each element references a control within the parent object
  • 24. Control[ ] Property of Windows and CVUOs Exported syntax for window: on w_cust.CREATE This.dw_detail = CREATE dw_detail This.dw_list = CREATE dw_list This.cb_1 = CREATE cb_1 This.Control[ ] = {This.dw_detail, this.dw_list, This.cb_1} end on
  • 25. Data type of userobject Contains a reference for each tab page within the tab control: global uo_test_tabs uo_test_tabs on uo_test_tabs.create this.tab_3=create tab_3 this.tab_2=create tab_2 this.tab_1=create tab_1 this.Control[]={this.tab_3, this.tab_2, this.tab_1} end on Control[ ] Property of Tab
  • 26. Item[ ] Property of Menu and Menu Item Contains a reference for each menu item in the next lower level: Can generically search for menu items with specific property values or set property values (for example, Visible) li_max = UpperBound(This.item) FOR li_ndx = 1 TO li_max This.item[li_ndx].Visible=TRUE ...
  • 27. Generic Referencing Can use: Variables declared from an ancestor class Reference values returned by functions Pronouns For reference variable data types corresponding to an ancestor class: Only properties of the ancestor class are available for the referenced object Only dynamically invoked methods of the descendent class can be used
  • 28. Referencing Using Ancestor Data Types Example: window lw_temp Open(w_invoice) lw_temp = w_invoice Only properties of the Window system class can be used with lw_temp Only dynamically invoked methods can be used with lw_temp
  • 29. Referencing Using Ancestor Data Types The instance can be referenced using either variable: window lw_temp1 lw_temp1 = w_invoice Local memory Global memory w_invoice w_invoice w_invoice Class pool window lw_temp1 instance of w_invoice Instance pool
  • 30. Generic Referencing Example Nested CVUOs can send a message to the window container Example: Close the window from a command button in a nested CVUO: // Function: of_Close( ) GraphicObject lgr_temp lgr_temp=This.GetParent( ) DO WHILE TypeOf(lgr_temp) <> Window! lgr_temp = lgr_temp.GetParent( ) LOOP Close(lgr_temp)
  • 31. Generic Referencing Example For a CommandButton in a CVUO to close the window container, use: Parent.of_Close( ) Notice that no reference is made to a specific object or class
  • 32. Passing Data to a Method Data can be passed by: Value Reference ReadOnly Different behavior for standard data types versus object reference variables
  • 33. Passing Data to a Method By value for standard data types: A copy is passed to the method Changes cannot be made to the original value By value for object references: A copy of the pointer is passed to the method Changes can be made to properties of the object Exception: For structures, a copy of the structure is passed
  • 34. Passing Data to a Method By reference , for all data types: Method receives a pointer to the argument Changes can be made to the original value or object properties
  • 35. Passing Data to a Method By ReadOnly for standard data types: Pointer to the data is passed Data value cannot be changed By ReadOnly for object references: Copy of reference Reference cannot be changed Values can change (even for structures)
  • 36. Passing Variable Number of Arguments Three ways to pass multiple values in one argument to a method: Structures Custom user classes Any data type
  • 37. Structures Can pass a variable number of arguments of more than one data type Define a structure of unbounded arrays: str_pass lstr_pass lstr_pass.i_arg [1] = 1 lstr_pass.s_arg [1] = &quot;Sam&quot; Parent.of_SeqWrite(lstr_pass)
  • 38. Custom Class Versus Structure Define a custom class with properties like those of structure ( without AutoInstantiate): n_cust ln_cust ln_cust = CREATE n_cust ln_cust.is_name = &quot;Sam&quot; ln_cust.ii_key = 1 This.of_SeqWrite(ln_cust)
  • 39. Custom Class Versus Structure Define a custom class with properties like those of structure ( with AutoInstantiate) n_cust ln_cust ln_cust.is_name = &quot;Sam&quot; ln_cust.ii_key = 1 This.of_SeqWrite(ln_cust) Unlike structures, methods are supported (regardless of AutoInstantiate)
  • 40. Using the Any Data Type Generic data type Can hold value for standard data type or a data type corresponding to a class Uses standard assignment statement int li_hold = 7 any la_hold la_hold = li_hold
  • 41. Using the Any Data Type Use ClassName( ) to determine the data type passed: // Function of_Save(any aa_pass) int li_hold boolean lb_hold CHOOSE CASE ClassName(aa_pass) CASE “integer” li_hold = aa_pass ... CASE “boolean” lb_hold = aa_pass ... END CHOOSE
  • 42. Using the Any Data Type Can use when data type of argument can vary Must reassign to proper data type before using More resources required Compiler cannot perform normal error checking
  • 43. Summary A message is a communication between objects. A message consists of the address of the target object, the name of a method, and, optionally, information passed as values of arguments. Messages can be used to request data, pass data, request services, and initiate services. Direct messaging uses the reference variable that was used in the instantiation process.
  • 44. Summary The pronouns This and Parent and the property ParentWindow are used to generically send a message. Some functions return a reference to an object that can be used in messaging. Some classes have properties that can be used for referencing.
  • 45. Summary Arguments can be passed by value, reference, or as read-only. A variable number and type of arguments can be passed using structures, custom classes, and the Any data type as function arguments.