Re: Use of dgIndex

2011-11-08 Thread Michael Doub
on mouseUp put the behavior of the dgProps["row template"] of grp "DataGrid" of card "Main" after msg end mouseUp returns the following: button id 1009 of stack "Data Grid Templates 1320264398269" ___ use-livecode mailing list use-livecode@lists.run

Re: Use of dgIndex

2011-11-08 Thread zryip theSlug
On Tue, Nov 8, 2011 at 2:24 PM, Michael Doub wrote: > I also tried using dgLine and it is not returning anything either.   > Obviously because of the invalid reference being returned in me. As explained and demonstrated in a previous reply, the dgLine property uses the dgIndex property for retur

Re: Use of dgIndex

2011-11-08 Thread zryip theSlug
On Tue, Nov 8, 2011 at 2:15 PM, Michael Doub wrote: > This is driving me crazy.    I  modified my real project code as well as my > test stack to use the following: > >   put the dgIndex of me into tindex >   put the dgIndexes of theGrid into tlist >   set itemdel to comma >   put itemOffset(tind

Re: Use of dgIndex

2011-11-08 Thread Michael Doub
I also tried using dgLine and it is not returning anything either. Obviously because of the invalid reference being returned in me. -= Mike ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe

Re: Use of dgIndex

2011-11-08 Thread Michael Doub
This is driving me crazy.I modified my real project code as well as my test stack to use the following: put the dgIndex of me into tindex put the dgIndexes of theGrid into tlist set itemdel to comma put itemOffset(tindex,tlist) into myPosition The test stack works fine, but in m

Re: Use of dgIndex

2011-11-07 Thread Pete
I was wondering the same thing. It probably is the italics, but I'm using gmail too so I would have thought it would have recognised that. No big deal. Pete Molly's Revenge On Mon, Nov 7, 2011 at 4:56 PM, Mike Bonner wrote: > ah, I betcha I know what it is. I

Re: Use of dgIndex

2011-11-07 Thread Mike Bonner
Oh yep, I didn't catch the dgindex check for the first one. ## yep, dgline is the way to go. I am not sure that you can assume that dgIndex of me = 1 is equivalent to dgLine of me = 1. So I think the line: If the dgindex of me = 1 then needs to be: If myPosition of me = 1 then or if the

Re: Use of dgIndex

2011-11-07 Thread Michael Doub
I think both methods will work. I was having problems with dgLine as well so I found that dgIndexes returns the indexes in the order that they were displayed. So itemOffset is essentially returning dgLine. I am not sure that you can assume that dgIndex of me = 1 is equivalent to dgLine of

Re: Use of dgIndex

2011-11-07 Thread Mike Bonner
ah, I betcha I know what it is. I italicised the script portion and bet whatever client you use doesn't recognize it. Either way, heres the script again no italics. on FillInData pDataArray put empty into fld "DLabel" of me if pDataArray["FirstName"] is not empty then put pDataArray["F

Re: Use of dgIndex

2011-11-07 Thread Mike Bonner
Hmm. its just gmail and they weren't and aren't there when I paste. As far as I know gmail doesn't do this so i'm not sure where they came from. On Mon, Nov 7, 2011 at 5:49 PM, Peter M. Brigham, MD wrote: > On Nov 7, 2011, at 7:00 PM, Mike Bonner wrote: > > > ... > > > > *on FillInData pDataArray

Re: Use of dgIndex

2011-11-07 Thread Peter M. Brigham, MD
On Nov 7, 2011, at 7:00 PM, Mike Bonner wrote: > ... > > *on FillInData pDataArray* > * put empty into fld "DLabel" of me* > * if pDataArray["FirstName"] is not empty then * > * put pDataArray["FirstName"] & space after fld "DLabel" of me* > * end if* > * if pDataArray["MiddleName"]

Re: Use of dgIndex

2011-11-07 Thread Mike Bonner
Theres a couple other things you'll have to track down to make this work. You are using dgdataofindex as your comparison, but if I understand how the datagrid works in this respect that will use the internal index which doesn't necessarily represent the visual (sorted) order of the data, so the co

Re: Use of dgIndex

2011-11-07 Thread Michael Doub
That that did the trick. I still get confused on these references. Thanks Mike On 2011-11-07, at 6:26 PM, zryip theSlug wrote: > On Tue, Nov 8, 2011 at 12:12 AM, Michael Doub wrote: >> Can someone explain to me where you are able to use the dgLine and dgIndex >> properties? In the script

Re: Use of dgIndex

2011-11-07 Thread Pete
dgIndex is a property of a line in the datagrid, not of the datagrid itself. So: put the dgIndex of me into tindex should take care of it. Pete Molly's Revenge On Mon, Nov 7, 2011 at 3:12 PM, Michael Doub wrote: > Can someone explain to me where you are able

Re: Use of dgIndex

2011-11-07 Thread zryip theSlug
On Tue, Nov 8, 2011 at 12:12 AM, Michael Doub wrote: > Can someone explain to me where you are able to use the dgLine and dgIndex > properties?   In the script below I am falling into the condition where no > value is being returned for dgIndex.   Do I have a syntax problem? Mike, me not repre

Use of dgIndex

2011-11-07 Thread Michael Doub
Can someone explain to me where you are able to use the dgLine and dgIndex properties? In the script below I am falling into the condition where no value is being returned for dgIndex. Do I have a syntax problem? Thanks Mike on FillInData pDataArray put the dgControl of me into t