[Gambas-user] auto-inherit Control.class

Bruce Steers bsteers4 at gmail.com
Sat Nov 4 19:13:34 CET 2023


On Sat, 4 Nov 2023 at 16:37, BB <adamnt42 at gmail.com> wrote:

>
> On 5/11/23 12:41 am, Bruce Steers wrote:
>
> I have tried to add a Control.class to my project and add a property to it.
>
> My expectation is by doing that then ALL controls should get the new
> property because all controls inherit Control.class?
>
> but it does not work.
>
> it does not work with UserControl.class either.
>
> Is there a way to add a property to everything by adding it to one class
> file?
>
> Respects
> BruceS
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
> No, somewhere from the mists of time : your Control class is loaded after
> all component classes have been loaded. That is so overriding a class
> works. Thus the symbol tables for components dont have you Control.class,
> they have the originals.
>

daaaag nabbit !!

Could something like this be possible Benoit?
My only other option is to create override files for every single
control/container :(

Could the interpreter realize auto-inheritance for Control.class so i can
add somethings to all controls in one go?

The reason is I am making a DBus control component that gives my
applications a dbus interface and can use Object methods ,
so far it uses GetProperty() SetProperty() and Call()

I wish for a way to add a DBusVisible property to EVERY Control/Container
so i can enable/disable as required in the ide..
I think possible security risk would be the case if the DBus port could
get/set any control.


Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231104/68405f91/attachment.htm>


More information about the User mailing list