Obscure Object Referencing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Obscure Object Referencing

Niggemann, Bernd via use-livecode
Hi all.

I just noticed by accident I can use something like this and it works:

dispatch populateRecord to group cDGName of stack cSubStack

cDGName is "dgDevices" and cSubstack is "Devices". Notice the absence of a card reference! Apparently, even though the owner of the datagrid group is the card it's on, this doesn't matter to the parser! I wonder what would happen if I had another card with a datagrid with the same name on it, if it would reference that datagrid if it was the currentCard of that stack, or if it would reference the first datagrid in the stack with that name? I think I'll give it a try!

Bob S


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Obscure Object Referencing

Niggemann, Bernd via use-livecode
Yes indeed, it references the datagrid on the currentCard! If there is no such object on the current card, then even if there is one on another card that is not the currentCard, it throws an error, as you would expect!

That is actually quite cool.

Bob S


> On Jun 7, 2018, at 08:54 , Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Hi all.
>
> I just noticed by accident I can use something like this and it works:
>
> dispatch populateRecord to group cDGName of stack cSubStack
>
> cDGName is "dgDevices" and cSubstack is "Devices". Notice the absence of a card reference! Apparently, even though the owner of the datagrid group is the card it's on, this doesn't matter to the parser! I wonder what would happen if I had another card with a datagrid with the same name on it, if it would reference that datagrid if it was the currentCard of that stack, or if it would reference the first datagrid in the stack with that name? I think I'll give it a try!
>
> Bob S


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Obscure Object Referencing

Niggemann, Bernd via use-livecode
yeah it is Bob.....its one of the reasons why livecode is so flexible and
such a joy to work with.

On Thu, Jun 7, 2018 at 12:00 PM, Bob Sneidar via use-livecode <
[hidden email]> wrote:

> Yes indeed, it references the datagrid on the currentCard! If there is no
> such object on the current card, then even if there is one on another card
> that is not the currentCard, it throws an error, as you would expect!
>
> That is actually quite cool.
>
> Bob S
>
>
> > On Jun 7, 2018, at 08:54 , Bob Sneidar via use-livecode <
> [hidden email]> wrote:
> >
> > Hi all.
> >
> > I just noticed by accident I can use something like this and it works:
> >
> > dispatch populateRecord to group cDGName of stack cSubStack
> >
> > cDGName is "dgDevices" and cSubstack is "Devices". Notice the absence of
> a card reference! Apparently, even though the owner of the datagrid group
> is the card it's on, this doesn't matter to the parser! I wonder what would
> happen if I had another card with a datagrid with the same name on it, if
> it would reference that datagrid if it was the currentCard of that stack,
> or if it would reference the first datagrid in the stack with that name? I
> think I'll give it a try!
> >
> > Bob S
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode