[Gambas-user] module/comp how to made like gambas normal
Tobias Boege
taboege at ...626...
Sun Oct 15 21:00:10 CEST 2017
On Sun, 15 Oct 2017, PICCORO McKAY Lenz wrote:
> i want to make a component that their rutines can be uses directly and not
> "module.subrutine(arg)" i like th use as "rutine(arg)"
>
> hoq cab i made that?
>
AFAIK real routines have to be built into the compiler so you can't add
them with just a component. However, you can make a module, say MyFunc,
and give it the special _call method [1]. The you can use the module name
like a function, i.e. call MyFunc(), and it will call the _call() method.
Regards,
Tobi
[1] http://gambaswiki.org/wiki/cat/special
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list