[Gambas-user] With (can we use it?)

Bruce Steers bsteers4 at gmail.com
Thu Nov 10 01:29:25 CET 2022


On Thu, 10 Nov 2022, 00:17 BB, <adamnt42 at gmail.com> wrote:

>
> On 10/11/22 10:36 am, Bruce Steers wrote:
>
> Can we use With or is it a private internal only thing reserved for
> specific commands?
>
> If it's private could it's usage be made public with a way to retrieve the
> With data?
>
> Thanks
> BruceS
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>
> You sure can use it anywhere
>
>
> With MyClass
>
>     .Ahab=12
>
> End With
>
>
> or
>
> With MyClass.Subclass
> With Mylass._hiddensubclass  ' !! very handy
> With MyClass.Subclass.Subclass2....
>
>
> I think that the only things that don't work / aren't supported are
>
> With MyClass!someproperty
> With MyClass["someproperty"]
>
>
> Go at it! It's saved about 3mm of my fingers over the years.
>
> b
>
> p.s. With within a With isn't a good idea
>
> Aah sorry I meant with a function call.

Like
Shell "command" With aEnvArray

Funny as soon as I posted this I wondered if I even need it now as I think
I can use an optional arg instead 🙄

Thanks anyway 😎
Respects
BruceS


>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221110/8fe7427a/attachment.htm>


More information about the User mailing list