AW: Passing a field reference parameter

Rudolf Bargholz rudolf at bargholz.ch
Thu Sep 26 06:23:04 UTC 2024


Hi Martin,

I do not really understand what you want to do here, but what you might mean, is that you cannot use a field reference in the called method that persists the method call. In cases like this, you need to create an instance variable of type item reference in the recipient method/object, and then 

Set reference myInstRef as pFieldReferenceParam

You then use the myInstRef in the recipient object/method, and changing the value of the myInstRef in the recipient will also change the values in the previous caller object instance. This will remain the case even after your method call has been processed, as the original caller variable will be linked to the myInstRef instance variable in the recipient object, similar to a pointer.

Regards

Rudolf Bargholz

-----Ursprüngliche Nachricht-----
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> Im Auftrag von Martin Obongita via omnisdev-en
Gesendet: Mittwoch, 25. September 2024 23:26
An: Andy Hilton <andyh at totallybrilliant.com>; OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Cc: Martin Obongita <martin.obongita at yahoo.com>
Betreff: Re: Passing a field reference parameter

I take that back. Actually, in OS11 there is a difference. I noticed that if you pass a field reference, it does not refresh the $dataname property of an object. It could be a bug because in OS10.22 it works fine.



Sent from Yahoo Mail for iPhone


On Thursday, September 26, 2024, 12:03 AM, Andy Hilton <andyh at totallybrilliant.com> wrote:

I don’t believe there is any difference - the end result is the same as far as I am aware
I would put it down to author’s choice !

Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870 
Phone (UK) : 0207 193 8582
Web : www.totallybrilliant.com 
Helpdesk : https://totallybrilliantsoftware.supportsystem.com/
Email : andyh at totallybrilliant.com

On Sep 25, 2024, at 4:33 PM, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
Hi,
I'm a great fun of passing field reference parameters. It is an easy way of setting values, doing some calculations and getting the results back without the need of a return value.
But sometimes I keep asking myself, when is it necessary to pass a field reference and when should a return value on "quit method" be used instead?
I'd be happy to hear the proper way of working with field ref param.
Thanks.
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 





_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 


More information about the omnisdev-en mailing list