[Gambas-user] protected for a variable inherited from a class
Jussi Lahtinen
jussi.lahtinen at gmail.com
Fri Apr 21 03:55:08 CEST 2023
Works fine here..?
All your declared classes are descendants of class1, so they should get
access to the value of iVar.
If you want to count out descendants (IE grant access only to class2 [this
is not what was asked for]), then you must replace this:
"If Me Is Class2 Then"
by this:
"If Object.Class(Me).Name = "Class2" Then"
Jussi
On Fri, Apr 21, 2023 at 4:15 AM BB <adamnt42 at gmail.com> wrote:
> @Jussi
> On 21/4/23 7:27 am, Jussi Lahtinen wrote:
>
> Here is a way to do what you want, but I don't really like it. See the
> attachment.
>
> Jussi
>
>
> 8<
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
> No, I don't think that achieves the goal. See attached.
>
> b
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230421/e7ba8c73/attachment.htm>
More information about the User
mailing list