[Gambas-user] _Get special sub

Fabien Bodard gambas.fr at ...626...
Wed Feb 12 11:21:36 CET 2014


Yes but...


I want to implement a ReportBoxShadow

for the ide the need is :

MyReportObject.BoxShadow = ReportBoxShadow["define"]

If i think for future ... boxshadow is an array

So i need to access each shadow this way :

MyReportObject.BoxShadow[0].XOffset =

For me ... yes there is the same name, but it is two different context
of access. I imagine Static part as a concatenate module in a class...
You can't use dynamic object because they can't exist in an external
module ... as well as in this static part. So Why this restriction ?.

It is not a usual use but i think it must be possible... at less for
the special subs (_get, _put, _call, _next)


For the time i will forget the array ... but think about it :-)





2014-02-11 23:59 GMT+01:00 Benoît Minisini <gambas at ...1...>:
> Le 11/02/2014 23:44, Fabien Bodard a écrit :
>> Why can't we declare two _Get function in a class ?
>>
>> One in static the other in instance ?
>>
>>
>>
>> STATIC PUBLIC FUNCTION _Get[sValue as string] as MySelf
>>    hMySelf as new MySelf
>>
>>    return MySelf
>> END
>>
>>
>> PUBLIC FUNCTION _Get[Index] as _MySubClass
>>    return aSubClass[index]
>> END
>>
>> Logically i must be possible ...
>>
>> --
>> Fabien Bodard
>>
>
> You can't, you have two methods with the same name.
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard




More information about the User mailing list