check box selection in data grid and on a separate card

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: check box selection in data grid and on a separate card

Post by Simon » Fri Feb 28, 2014 7:21 am

Yes! It is wrong.
What would be the itemDel?
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: check box selection in data grid and on a separate card

Post by keram » Fri Feb 28, 2014 7:23 am

itemDel would be tab
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: check box selection in data grid and on a separate card

Post by keram » Fri Feb 28, 2014 7:26 am

So you mean in order for it to work properly I have to remove leading 0 from the gMySelectedLineNrs ?
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: check box selection in data grid and on a separate card

Post by Simon » Fri Feb 28, 2014 7:29 am

2 = 002 --Yes
2 is among the items of 002 003 004 --No
002 is among the items of 002 003 004 --Yes

Think about that for a bit.
So you mean in order for it to work properly I have to remove leading 0 from the gMySelectedLineNrs ?
No, but you cannot use "is among the items of"
Think up a repeat loop were you can use "="
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: check box selection in data grid and on a separate card

Post by keram » Fri Feb 28, 2014 7:33 am

Thanks Simon, :)

I'll look at it later today and come back if necessary,

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: check box selection in data grid and on a separate card

Post by keram » Fri Feb 28, 2014 11:03 am

Hi Simon,
Simon wrote:Think up a repeat loop were you can use "="
Something like this?

Code: Select all

   repeat for each item i in gMySelectedLineNrs
      if gCurentIndex =  i then
         set the hilite of btn "Check" to "true"
      else
         set the hilite of btn "Check" to "false"
      end if
   end repeat
----------------------

I tried another solution:
Removed the leading 0 from the main data table from which all the other variables in the stack derive their values. It's simpler and quicker and in this way I will avoid possible problems with items.

Now the checkboxes in the "All Lines" and "My Selection"view get proper hilites when the checkbox on the "oneline" card is toggled.
To get it working the other way I had to add this to the cd "oneline":

Code: Select all

   put empty into gMySelectedLineNrs
   repeat for each line i in gMySelection
      if item 2 of i is "true" then
         put item 1 of i & tab after gMySelectedLineNrs 
      end if
   end repeat
----------------------

Now I will be more alert on items...

Thanks again for all your help :)

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Post Reply