[Gambas-devel] Proper way to the current object

Benoît Minisini gambas at ...1...
Sat Feb 11 20:24:48 CET 2012


Le 11/02/2012 20:23, Benoît Minisini a écrit :
> Le 09/02/2012 15:56, Randall Morgan a écrit :
>> Hi Benoit,
>>
>> I am a bit perplexed. I have some code that works and some that
>> doesn't...
>
> If a method or a property returns a "GslComplex", then its signature
> must use "GslComplex;" (or just "GslComplex" in a return value
> signature). Do not use "o", this is an anonymous object that you should
> use only if the method or property returns any object.
>
> And when you receive an object reference through GB_OBJECT, you must use
> GB.CheckObject() to check it (to ensure it is not null).
>
> Regards,
>

Another point: Use NULL and not a void string for methods returning 
nothing, and/or having no arguments.

-- 
Benoît Minisini




More information about the Devel mailing list