On Tue, Jan 10, 2012 at 5:48 AM, Oliver Sims <
[email protected]> wrote:
> In Mark's userDlg.rex drag-drop sample program, there's a method
> "mapWindowPoints".
> The code is:
>
> say 'Mouse position before map:' p
> self~mapWindowPoints(self~DlgB~hwnd, p)
> say 'p after map:' p
>
> The parameter p is changed by the method implementation.
>
> The parameter 'p' is what Corba IDL calls an "inout" parameter - it serves
> to provide data to the method and the method also uses it to return data to
> the caller. This is the first time I've seen this in Object Rexx. So I
> wondered if it's intended to keep this behavior, or to change it so that it
> returns data in the usual way?
>
>
It's intended to be this way. "returns data in the usual way" seems a
little bit of a questionable statement to me. According to who is the
"usual" way? <grin>
This type of method, transforming some object, is common in the new methods
I've introduced in ooDialog.
In places where it is used, and mapWindowPoints() is a good example, the
existing values of the object are not needed, it is the transformed values
that are needed. There is no need to have 2 separate objects. In
addition, it allows the method to return a success indicator for methods
where the data returned does not have an obvious failure value. In this
case it returns false on failure.
--
Mark Miesfeld
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel