Re: DataGrid anomaly?

2018-04-11 Thread Ian McKnight via use-livecode
Thanks Bob - that works fine.

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
card.

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 <
use-livecode@lists.runrev.com> wrote:

> Also what happens when you step through the code?
>
> Bob S
>
>
> > On Apr 11, 2018, at 06:53 , Ian McKnight via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > createTabbedDataList
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Regards


Ian McKnight

iangmckni...@gmail.com
===


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid anomaly?

2018-04-11 Thread Bob Sneidar via use-livecode
Also what happens when you step through the code?

Bob S


> On Apr 11, 2018, at 06:53 , Ian McKnight via use-livecode 
>  wrote:
> 
> createTabbedDataList


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid anomaly?

2018-04-11 Thread Bob Sneidar via use-livecode
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
   return tCardID
end getParentCard

Bob S


> On Apr 11, 2018, at 06:53 , Ian McKnight via use-livecode 
>  wrote:
> 
> createTabbedDataList


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode