Yes - in fact I just checked it out too. I had rejected that approach
because I remember trying that way back in version 5  and never being able
to get it to work. Knowing this is possible much removes the need for my FR.
In fact it means it could simplify much if my existing code :)


On 26/1/07 13:07, "Jonathan Johnson" <[EMAIL PROTECTED]> wrote:

> 
> On Jan 26, 2007, at 6:52 AM, Daniel Stenning wrote:
> 
>> Nope. you cannot pass object references BYRef - in other words you
>> cannot
>> set a passed reference  INSIDE a method. You can set an intrinsic
>> variable
>> like that, but not a reference. Believe me I tried that ages ago.
> 
> Sure you can.
> 
> Function GetA( byref foo as AType ) as Boolean
> ...
> foo = a
> return true
> End Function
> 
> dim a as AType
> if GetA( a ) Then
>    ...
> End If
> 
> We use a similar technique as above for a particular circumstance in
> the IDE that used to be error prone, involving nil checks, isa
> checks, and more in several spots. However, we were able to use the
> above, combined with overriding, to create a very easy, error-proof
> way to get a reference to what we were looking for.
> 
> HTH,
> Jon
> 


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to