[Gambas-user] Omitting brackets () on a method call

T Lee Davidson t.lee.davidson at gmail.com
Fri Sep 3 18:26:01 CEST 2021


On 9/3/21 10:39 AM, Bruce Steers wrote:
> Is there a method to enable or is it just some things that let you use () in a method call or not?
> 
> Like for example I can call
> 
> MyObject.Refresh()
> Or
> MyObject.Refresh
> 
> Both work.
> 
> I'm finding all my methods NEED brackets() or i get an error.
> 
> cheers all :)
> BruceS

If a method returns a value, it is necessary to use the brackets. Otherwise, you will receive the internal handle of the method 
instead of the value returned by the method.


-- 
Lee


More information about the User mailing list