Multi library method calling

Mike Rowan michael.rowan3 at gmail.com
Thu Mar 30 23:59:06 UTC 2023


Hi Scotte
I find that if I include kFalse as the second parameter to $root.$libs.$add
it does not create a new library, and I can see that the library does in
fact include the method I wish to call.

It returns a valid reference to the second lib2, but both my calling
method and your suggestion result in a 'command without a valid method
name' error.

I'm stumped, though I have work around.

What I'm trying to avoid is having lib2.$construct calling $initialise
because that doesn't seem good practice.

Thanks for your interest.

Mike

On Fri, Mar 31, 2023 at 9:19 AM Scotte Meredith <spomacguy at gmail.com> wrote:

> > On Mar 30, 2023, at 3:23 PM, Mike Rowan <michael.rowan3 at gmail.com>
> wrote:
> >
> > I'd be very happy if someone would tell me the correct way to call a
> method
> > in another library.
> > Suppose I have 2 libraries internally named 'lib1' and 'lib2'.
> >
> > In lib1 I've tried:
> >
> > Do $root.$libs.$add(lFullPath,kfalse,lib2) Returns lRef
>
> This says "Create a new library". If you just created the library, its
> Startup_Task would be empty.
>
> Instead, try:
> Set reference lRef to $root.$libs.lib2
>
> Check your reference here. It should be pointing to the library.
>
> Then your next line should work.
>
>
> > Do lRef.Startup_Task.$initialise
> >
> > This successfully opens Library2, but refuses to call the Lib2
> Startup_Task
> > method.
> > Also tried different call:
> > Do lRef.$tasks.Startup_Task.$initialise
>
>
>
> Scotte Meredith
> spomacguy at gmail.com
> 509/998-0991
>
>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>


More information about the omnisdev-en mailing list