First, I'm curious why you are not simpy setting the dgData to an array. But that aside, what is the name of your datagrid? The error is indicating there is no group by that name on the current card. Another thing that can throw you is if the stack is opened modally. Then it's not the topStack, so relative references will be for the currentCard of the topStack.
In your button try:
put getParentCard(the long id of me) into tThisCard
then when you refer to your datagrid use group "dgDataDisplay" of tThisCard (assuming it's on the same card as the button)
Put this handler in a library or in the script of your button:
function getParentCard pObjectID
put offset("card id", pObjectID) into tStartChar
put char tStartChar to -1 of pObjectID into tCardID
> On Apr 11, 2018, at 06:53 , Ian McKnight via use-livecode <[hidden email]> wrote:
I had tried referencing group "dgDataDisplay" of this card - but that
didn't work. So I need to be more precise in naming the card!
My stack is a plain vanilla stack with a few buttons and a dataGrid on one
When I step through the code the error occurs at line 155 but *only* when
its called with the other handlers in the main button. It doesn't fail when
the 'displayDataInDataGrid' handler is called from a different button.
As to why I didn't set the dgText to an array - I thought it had to be a
tabbed list (My array keys contain 2 or 3 sub keys and the main key needs
to be decoded to provide a date, which is displayed along with the stored
data and other info calculated on the fly)
Again - Many thanks for your help
On 11 April 2018 at 15:41, Bob Sneidar via use-livecode <
[hidden email]> wrote:
> Also what happens when you step through the code?
> Bob S
> > On Apr 11, 2018, at 06:53 , Ian McKnight via use-livecode <
> [hidden email]> wrote:
> > createTabbedDataList
> 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 >