Unexpected data grid messages

Pete pete at mollysrevenge.com
Mon May 23 14:22:08 EDT 2011


Hi Keith,
I agree it would be nice to link dg's to their template in both
directions(there is a property of the dg that points to its template but not
the other way round).  Unfortunately, it's not quite as simple as it seems
since it's possible to have multiple dg's reference the same template (as
long as the format is the same of course).

I believe there is a message that happens when a dg is created (don;t
remember it's name) so it should be possible to write a handler for it to,
for example, set a custom property of the template card to the longd or ids
of the dg it references.  Come to think of it, I might look into that
further.


Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Mon, May 23, 2011 at 10:42 AM, Keith Clarke <
keith.clarke at clarkeandclarke.co.uk> wrote:

> ...thanks Mike & Pete for the steer on this. It turned out to be an orphan,
> undeleted data grid template. I found this by checking through all my data
> grids' row templates - and yes, then renaming the template card's long IDs
> to match the 'parent' data grid whilst I was at it!
>
> Is it only me who would find it really useful to have the option to have
> data grid template cards automatically track the long ID of their 'parent'
> data grid? Maybe there are good reasons for not having them work that way,
> but manual house-keeping is something I like to avoid if possible.
>
> It might also be nice when copying a data grid to be able to force the
> cloning of the template card to a new one (which then tracks the long ID of
> the new data grid) - but I'm not greedy, auto-tracking would be enough for
> now! :-)
> Best,
> Keith..
>
> On 23 May 2011, at 17:33, Pete wrote:
>
> > Sounds like there may still be some code somewhere on the card that is
> > trying to access the deleted datagrid.
> >
> > I don't think the existence of a template for a deleted datagrid would
> cause
> > any problems but probably would be a good idea to tidy it up. Don't
> delete
> > the Datagrid Templates substack unless you have no other datagrids
> anywhere
> > in your app, just delete the card in it that relates to the deleted
> > datagrid.  I don't think there is a link in the template card to its
> related
> > datagrid so this might take some detective work to track down.  I've
> started
> > renaming my datagrid template cards to something that tells me which
> > datagrid they relate to.
> >
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> >
> >
> >
> >
> > On Mon, May 23, 2011 at 8:48 AM, Keith Clarke <
> > keith.clarke at clarkeandclarke.co.uk> wrote:
> >
> >> Hi folks,
> >> When I open one particular card, I get the message box open with the
> >> following...
> >>
> >> 89,8775,50,dgAlternatingRows
> >> 77,8775,50
> >> 456,8775,38
> >> 380,8775,9
> >> 572,8775,1
> >> 253,8759,1
> >> 241,8759,1,_DrawAlternatingRows
> >> 353,0,0,button id 1005 of group id 1004 of card id 1002 of stack
> >> "/Applications/LiveCode
> >> 4.6.1.app/Contents/Tools/Toolset/revdatagridlibrary.rev"
> >> 573,87,1
> >> 253,86,1
> >>
> >> This looks to be data grid-related but the data grid on this card has
> >> long-since been deleted.
> >> Any idea what might be triggering this and how to stop it?
> >> Best,
> >> Keith..
>
>
> _______________________________________________
> 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