Use of dgIndex

Peter M. Brigham, MD pmbrig at gmail.com
Mon Nov 7 19:49:42 EST 2011


On Nov 7, 2011, at 7:00 PM, Mike Bonner wrote:

> ...<snip>
> 
> *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"] is not empty then *
> *      put pDataArray["MiddleName"] & space after fld "DLabel" of me*
> *   end if*
> *   put  pDataArray["LastName"] after fld "DLabel" of me*
> *   put char 1 of fld "DLabel" of me into fld "HLabel" of me*
> *   set the vis of fld "HLabel" of me to false*
> *   set the vis of graphic "HBackground" of me to false*
> *   put the dgControl of me into theGrid*
> *   put the dgIndex of me into tindex*
> *   if tindex is empty then *
> *      put "error" into fld "HLabel" of me*
> *      set the vis of fld "HLabel" of me to true*
> *      set the vis of graphic "HBackground" of me to true*
> *   else*
> *      put the dgIndexes of theGrid into tlist*
> *      set itemdel to comma*
> *      put itemOffset(tindex,tlist) into myPosition*
> *      If the dgindex of me = 1 then *
> *         -- we have the first item so show a header*
> *         set the vis of fld "HLabel" of me to true*
> *         set the vis of graphic "HBackground" of me to true*
> *      else*
> *         put the dgline of me - 1 into previousIndex*
> *         --item (myPosition -1) of tlist into previousIndex*
> *         put the dgDataOfline[previousIndex] of me into theotherdata*
> *         put  theotherdata["firstName"] & return after msg*
> *         if the first char of theotherdata["FirstName"] <> the first char
> of pDataArray["FirstName"] then*
> *            -- we found a break so show a header*
> *            set the vis of fld "HLabel" of me to true*
> *            set the vis of graphic "HBackground" of me to true*
> *         end if*
> *      end if*
> *   end if*
> *end FillInData*

I'm curious, is there something in your email client, or in the copy-from-script-and-paste-into-email process that puts the asterisks before and after each line? It makes it hard to copy and paste such scripts to use them. Just wondering....

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig





More information about the use-livecode mailing list