name resolution stinker

Sean Cole (Pi) sean at pidigital.co.uk
Thu Apr 12 12:08:01 EDT 2018


put the id of tCurrentCard into tCardID
put (there is a group id (the id of group tDataGrid of card id tCardID)
into tGroupExists
if not tGroupExists then next repeat

Sean Cole
*Pi Digital Productions Ltd*

On 12 April 2018 at 13:14, Mark Waddingham via use-livecode <
use-livecode at lists.runrev.com> wrote:

> I think the problem here is that you are mixing up to methods of
> referencing controls...
>
> You can either do:
>
>   there is a group tGroupName of ...
>
> As syntax *or* :
>
>   there is a tLongIdOfGroup
>
> The 'group' chunk expects a string which is a name of a group - it isn't
> the same as putting 'group' in front of the string.
>
> Try making tGridLongName with the word 'group' at the front (I think
> someone else suggested this) then that should work.
>
> Warmest Regards,
>
> Mark.
>
> Sent from my iPhone
>
> > On 11 Apr 2018, at 17:08, Bob Sneidar via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > Ok here is a real stinker.
> >
> > put quote & tDataGrid & quote && "of" && tCurrentCard into tGridLongName
> > put (there is a group tGridLongName) into tGroupExists
> > if not tGroupExists then next repeat
> >
> > tGridLongName resolves to:
> > "dgsites" of card id 1002 of stack "Sites" of stack
> "/Users/bobsneidar/Documents/Livecode Projects/Forms Generator 8/Forms
> Generator 8.livecode"
> >
> > When in the message box I type:
> > put there is a group "dgsites" of card id 1002 of stack "Sites" of stack
> "/Users/bobsneidar/Documents/Livecode Projects/Forms Generator 8/Forms
> Generator 8.livecode"
> >
> > I get true.
> >
> > But the code:
> > put (there is a group tGridLongName) into tGroupExists
> >
> > returns false. tGridLongName is not resolving in this statement.
> >
> > Is this another use case for DO?
> >
> > Bob S
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list