set the dgText back to datagrid

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

Post Reply
doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

set the dgText back to datagrid

Post by doobox » Thu Jun 05, 2014 11:55 am

Hi there,

I am puzzling why this much simplified example of what i am trying to achieve does not work...

So in this simplified example i am grabbing the dgText and presuming i can simply restore it from the variable at a later date..?

Code: Select all

on mouseUp
   put the dgText of group "DataGrid 1" into virginData
   set the dgText of group "Datagrid 1" to virginData
   set the dgHilitedLines of group "DataGrid 1" to 1
end mouseUp

The dg text looks like this (shortened, there are around 600 lines) :
Spaces you see are tab delimiters:

Code: Select all

<font='FontAwesome'>&#61506;</font>    Adjust
<font='FontAwesome'>&#61506;</font>    Adjust
<font='FontAwesome'>&#61506;</font>    Adjust
<font='FontAwesome'>&#61506;</font>    Adjust
<font='FontAwesome'>&#61506;</font>    Adjust

So running the handler just appears to clear out the data grid and not the expected result of repopulating it with a copy of the original data..?
Kind Regards
Gary

https://www.doobox.co.uk

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: set the dgText back to datagrid

Post by Klaus » Thu Jun 05, 2014 1:11 pm

Hi Gary,

just made a little test with exactly your "mouseup" handler and it worked as exspected!?


Best

Klaus

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: set the dgText back to datagrid

Post by doobox » Thu Jun 05, 2014 1:36 pm

I neglected to mention i am using 6.7, so i wonder if this is a bug. Unless you just tested with a few lines in the dgData, rather than the 600 or so.
I will need to test this in 6.6.2 and see what happens there.
Thanks for looking though Klaus, gets me closer to understanding why i am seeing the issue, it has to be one of the 2 things i mention above i guess.
Kind Regards
Gary

https://www.doobox.co.uk

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: set the dgText back to datagrid

Post by Klaus » Thu Jun 05, 2014 1:40 pm

Aha, OK, please note the version you use (if not the latest stable release) next time, thanks.

And remember: a DP is a DP 8)

Post Reply