Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Advanced PowerBuilder

HomePrevious Lesson: Structures
Next Lesson: Calling Functions

The Message Object

Till now we talked about sending parameters to the window while opening it, but how does the opened window access those parameters? It is possible by the Message object. When you use functions like OpenWithParm(), the parameter value is stored in a Message object. A Message object is a built-in global object that can be used as a carrier for the parameter. You can send one of the following data types through the Message object:

Data Type

Stored in

String

Message.StringParm

Numeric

Message.DoubleParm

PowerBuilder Object

Message.PowerObjectParm

The parameter is stored in the relevant Message object attribute, depending on the data type of the parameter. You can then refer to the parameter in the calling object by using the Message. notation. For example:
// DataWindow idw_2_save //Instance variable
idw_2_save = Message.PowerObjectParm

A possible problem associated with the Message object is that, all currently running applications can generate messages, so there is a chance of the Message object being overwritten.

A solution to this problem is, to declare an instance or local variable in the called object and then in the very first statement of the object's open event, assign this variable with the Message object attribute.
HomePrevious Lesson: Structures
Next Lesson: Calling Functions

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com