Re: DataGrid Scrolling problem

2019-10-06 Thread Andrew Bell via use-livecode
Something seems to have changed in the datagrid code, because I have  
an old iOS device with a version of my software from over a year ago  
and it scrolls fine so I feel like the issue is with my scroller and  
DG2 (this stack pre-dates that change).


I tried Ralph's suggestion of adding 20px, but that wasn't close to  
enough extra cushion: the datagrid is showing all the items EXCEPT the  
last one (unless you scroll "past", but the scroller bounces back to  
showing items 1 to -2 of the datagrid).


Now, I do have a fixed height rows that are much larger than 20px (132  
to be exact). What came closer to working for me was to add an entire  
row to my dgFormattedHeight but this still cuts off the descenders of  
the last row of text.


   put 0,0,(the dgFormattedWidth of group "TSM"),(the  
dgFormattedHeight of group "TSM" + the dgProp["row height"] of group  
"TSM") into tContentRect

   mobileControlCreate "scroller", "listScroll"
   mobileControlSet "listScroll", "contentRect",tContentRect


--Andrew Bell



I always add 20 PXs to the formattedheight of the control. Then use that
result for item 4 of the contentrect to solve this. 20 seems to work on all
device resolutions I've tested although I'm sure that there is a formula
based on the device resolution that would create consistency between
devices.


Ralph DiMola




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: DataGrid Scrolling problem

2019-10-02 Thread Ralph DiMola via use-livecode
I always add 20 PXs to the formattedheight of the control. Then use that
result for item 4 of the contentrect to solve this. 20 seems to work on all
device resolutions I've tested although I'm sure that there is a formula
based on the device resolution that would create consistency between
devices.


Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Andrew Bell via use-livecode
Sent: Wednesday, October 02, 2019 3:30 PM
To: use-livecode@lists.runrev.com
Cc: and...@midwestcoastmedia.com
Subject: Re: DataGrid Scrolling problem

Now that you mention this, I see the same issue with 2 of my apps in the iOS
store that were built using LC 9.5. There is one item just "past" the bottom
of the datagrid that you can only see if you swipe beyond the end, but as
soon as you let go it snaps back to showing the 2nd to last item.

Seems more like this is an issue with the scroller than the datagrid itself.

--Andrew Bell


>
> Date: Wed, 2 Oct 2019 08:19:47 -0600
> From: "Mike for GDC" 
> Subject: DataGrid Scrolling problem
> Message-ID: <007d01d5792c$729cac90$57d605b0$@golddogcoffee.com>
>
> Hello,
>
> I have a problem with a datagrid.   I cannot see the last couple of rows
> when scrolling.  For instance if you have 100 lines and scroll to the 
> bottom of the grid you only get up to 98.  If you "hold" the scroll by 
> forcing the scroll to go to the bottom you can see lines 99 and 100 but
because you are
> holding the screen you cannot "select" either one of those lines.   When
you
> take your finger off the grid, the scroll immediately takes the last two
> lines off the screen and you can just see up to line 98 again.   Hope this
> description makes sense.
>
>
> Thanks.
>
> Mike
>



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid Scrolling problem

2019-10-02 Thread Andrew Bell via use-livecode
Now that you mention this, I see the same issue with 2 of my apps in  
the iOS store that were built using LC 9.5. There is one item just  
"past" the bottom of the datagrid that you can only see if you swipe  
beyond the end, but as soon as you let go it snaps back to showing the  
2nd to last item.


Seems more like this is an issue with the scroller than the datagrid itself.

--Andrew Bell




Date: Wed, 2 Oct 2019 08:19:47 -0600
From: "Mike for GDC" 
Subject: DataGrid Scrolling problem
Message-ID: <007d01d5792c$729cac90$57d605b0$@golddogcoffee.com>

Hello,

I have a problem with a datagrid.   I cannot see the last couple of rows
when scrolling.  For instance if you have 100 lines and scroll to the bottom
of the grid you only get up to 98.  If you "hold" the scroll by forcing the
scroll to go to the bottom you can see lines 99 and 100 but because you are
holding the screen you cannot "select" either one of those lines.   When you
take your finger off the grid, the scroll immediately takes the last two
lines off the screen and you can just see up to line 98 again.   Hope this
description makes sense.


Thanks.

Mike





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid Scrolling problem

2019-10-02 Thread Bob Sneidar via use-livecode
When I have datagrid display weirdness I do a couple things. First, I get the 
dgText of the datagrid to see if there isn't unexpected data there. I will also 
get the dgData to see if there aren't off keys. Once I had a bug in my code 
that put a key of 0 with an empty value. It didn't display, but it caused 
issues (can't remember what they were at the moment). 

Another thing I have done is recreate the datagrid. I wrote two functions to 
"backup" and restore a datagrid. I essentially create an array with all the 
properties I care about in a datagrid, then restore those settings to a new 
datagrid. 

Bob S


> On Oct 2, 2019, at 07:19 , Mike for GDC via use-livecode 
>  wrote:
> 
> Hello,
> 
> 
> 
> I have a problem with a datagrid.   I cannot see the last couple of rows
> when scrolling.  For instance if you have 100 lines and scroll to the bottom
> of the grid you only get up to 98.  If you "hold" the scroll by forcing the
> scroll to go to the bottom you can see lines 99 and 100 but because you are
> holding the screen you cannot "select" either one of those lines.   When you
> take your finger off the grid, the scroll immediately takes the last two
> lines off the screen and you can just see up to line 98 again.   Hope this
> description makes sense.
> 
> 
> 
> Thanks.
> 
> Mike
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid Scrolling problem

2019-10-02 Thread Bob Sneidar via use-livecode
Just tested here with a table style DG. Works fine LC 9.5 MacOS 10.14.6. 

Bob S


> On Oct 2, 2019, at 07:19 , Mike for GDC via use-livecode 
>  wrote:
> 
> Hello,
> 
> 
> 
> I have a problem with a datagrid.   I cannot see the last couple of rows
> when scrolling.  For instance if you have 100 lines and scroll to the bottom
> of the grid you only get up to 98.  If you "hold" the scroll by forcing the
> scroll to go to the bottom you can see lines 99 and 100 but because you are
> holding the screen you cannot "select" either one of those lines.   When you
> take your finger off the grid, the scroll immediately takes the last two
> lines off the screen and you can just see up to line 98 again.   Hope this
> description makes sense.
> 
> 
> 
> Thanks.
> 
> Mike

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


DataGrid Scrolling problem

2019-10-02 Thread Mike for GDC via use-livecode
Hello,

 

I have a problem with a datagrid.   I cannot see the last couple of rows
when scrolling.  For instance if you have 100 lines and scroll to the bottom
of the grid you only get up to 98.  If you "hold" the scroll by forcing the
scroll to go to the bottom you can see lines 99 and 100 but because you are
holding the screen you cannot "select" either one of those lines.   When you
take your finger off the grid, the scroll immediately takes the last two
lines off the screen and you can just see up to line 98 again.   Hope this
description makes sense.

 

Thanks.

Mike

 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Scrolling

2018-08-27 Thread Andrew Bell via use-livecode
I agree, and my clients have confirmed, that scrolling with dg2 is  
jerky compared to dg1. This isn't as noticeable when scrolling at a  
fast rate, but very evident at slower speeds.


https://quality.livecode.com/show_bug.cgi?id=20910

As Sannyasin mentioned, I can't go back to LC8 due to lack of iOS12  
compatibility (smooth scrolling is important, but not at the cost of  
the app not even launching).


--Andrew Bell



From: hlowe 
Subject: Re: Datagrid Scrolling
Message-ID: <1535212927416-0.p...@n4.nabble.com>

I agree. There has been a very significant deterioration in datagrid
scrolling performance since DG2 and LC9 were introduced. Based on feedback
from user testing we have delayed release of an important iOS app update
because DG scrolling was perceived to be unacceptably slow and visually
jerky. The currently released version of the app uses LC8, DG1 and Monte's
mergDatagridScroller code and it scrolls very smoothly.

DG2 is a wonderful update with many exciting new features. I do hope that
the scrolling performance issue can be addressed soon, so that we can take
advantage of the update.

Henry

Ascriva Health Informatics
https://www.ascriva.com




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Scrolling

2018-08-27 Thread Sannyasin Brahmanathaswami via use-livecode
I'm in a similar bind. Going back to 8 will up unacceptable. So many
problems with Android.
I have to stay with 9.01.RC2...But now i invested time  learing in DG...
so I can't release?

[He pounds his head on the desk.

"Oh Wow is me...after 2 years STILL can't release a decent Android app!"]

I guess I have abandon DG and go for with a manually built,
all-controls-on-the-same-front group,  method.

Unless HQ can give us a head up as to when 9.1 will be released?


On 8/25/18 6:02 AM, hlowe via use-livecode wrote:
> I agree. There has been a very significant deterioration in datagrid
> scrolling performance since DG2 and LC9 were introduced. Based on feedback
> from user testing we have delayed release of an important iOS app update
> because DG scrolling was perceived to be unacceptably slow and visually
> jerky. The currently released version of the app uses LC8, DG1 and Monte's
> mergDatagridScroller code and it scrolls very smoothly. 
>
> DG2 is a wonderful update with many exciting new features. I do hope that
> the scrolling performance issue can be addressed soon, so that we can take
> advantage of the update.
>
> Henry
>
> Ascriva Health Informatics
> https://www.ascriva.com



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Scrolling

2018-08-25 Thread hlowe via use-livecode
I agree. There has been a very significant deterioration in datagrid
scrolling performance since DG2 and LC9 were introduced. Based on feedback
from user testing we have delayed release of an important iOS app update
because DG scrolling was perceived to be unacceptably slow and visually
jerky. The currently released version of the app uses LC8, DG1 and Monte's
mergDatagridScroller code and it scrolls very smoothly. 

DG2 is a wonderful update with many exciting new features. I do hope that
the scrolling performance issue can be addressed soon, so that we can take
advantage of the update.

Henry

Ascriva Health Informatics
https://www.ascriva.com



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid Scrolling

2018-08-24 Thread Brian Milby via use-livecode
There were deeper engine changes to finish the accelerated rendering updates 
required to fully support DG2. I think that is scheduled for 9.1 now.

Thanks,
Brian
On Aug 24, 2018, 11:28 PM -0500, Sannyasin Brahmanathaswami via use-livecode 
, wrote:
> Scrolling the Datagrid on mobile is "terrible" (jerky, pixel by pixel)
>
> I thought this was fixed in Datagrid2?
>
> Maybe that hasn't been released?
>
> BR
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Datagrid Scrolling

2018-08-24 Thread Sannyasin Brahmanathaswami via use-livecode
Scrolling the Datagrid on mobile is "terrible" (jerky, pixel by pixel)

I thought this was fixed in Datagrid2? 

Maybe that hasn't been released?

BR

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Datagrid -- Scrolling on Mobile

2018-08-20 Thread zryip theSlug via use-livecode
Dear Swami,

Mobile scrollers should be natively added by the dg2 library when the stack
is executed inside a mobile device context. I've seen the corresponding
portion of code inside the dg2 library.

On Mon, Aug 20, 2018 at 5:09 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> I am slowly getting up to speed with datagrid, I understand structure, the
> scripts of the row group, can instantiate data etc.
>
> But, am I missing something?
>
> http://lessons.livecode.com/m/datagrid
>
> I can't find single lesson on implementing DG on mobile.
>
> Scrolling on mobile -- do we do it the same way as other groups?
>
> 1) turn off scroll bars
>
> 2) CreateScroller etc (mobile library)
>
> 3) Does does Datagrid have it's own "mobile magic" scroller.
>
> I use what looks like a "hackey" way to determine if a user is clicking
> on a group, or is scrolling the group. Is it same for the DataGrid?
>
> if abs(the mouseH - item 1 of sStartLoc) <= 10 and abs(the mouseV - item 2
> of sStartLoc) <= 10 then
>
> portal_setCurrent (the short name of this card)
>
> put the short name of the target into tRow
>
> set the itemDelimiter to "_"
>
> put item 1 of tRow into tLinkNo
>
> if tLinkNo is not a number then
>
> exit mouseup
>
> end if
>
> put fld (tLInkNo &"_" &"portal-link-label") into tRowName
>
> portal_DoRowLink tRowName
>
>
> BR
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Datagrid -- Scrolling on Mobile

2018-08-20 Thread Sannyasin Brahmanathaswami via use-livecode
I am slowly getting up to speed with datagrid, I understand structure, the 
scripts of the row group, can instantiate data etc.

But, am I missing something?

http://lessons.livecode.com/m/datagrid

I can't find single lesson on implementing DG on mobile.

Scrolling on mobile -- do we do it the same way as other groups?

1) turn off scroll bars

2) CreateScroller etc (mobile library)

3) Does does Datagrid have it's own "mobile magic" scroller.

I use what looks like a "hackey" way to determine if a user is clicking  on a 
group, or is scrolling the group. Is it same for the DataGrid?

if abs(the mouseH - item 1 of sStartLoc) <= 10 and abs(the mouseV - item 2 of 
sStartLoc) <= 10 then

portal_setCurrent (the short name of this card)

put the short name of the target into tRow

set the itemDelimiter to "_"

put item 1 of tRow into tLinkNo

if tLinkNo is not a number then

exit mouseup

end if

put fld (tLInkNo &"_" &"portal-link-label") into tRowName

portal_DoRowLink tRowName


BR


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: datagrid scrolling question

2018-08-05 Thread Douglas Ruisaard via use-livecode
OK.. the light bulb FINALLY went on .. I'm slow but, like the tortoise, I 
eventually "get there" (usually).  For some reason Brian's reply made me 
re-think how I could fetch the WiFi info query from *each* row, submit it to 
tsnet and then update each row in realtime.  I know, I know... that's what 
you've ALL been saying but I was interpreting that as processing ALL of the 
WiFi modules first *AND THEN* updating the WHOLE grid.  THAT would, of course, 
work but doing it one row at a time just wasn't penetrating the old noggin.

Works perfectly.  Thanks so much for your patience!  I reiterate, as has been 
done so many times to this group, how remarkably responsive and helpful this 
community is!

Douglas Ruisaard
Trilogy Software
(250) 573-3935

From: Brian Milby [mailto:br...@milby7.com] 
Sent: Sunday, August 05, 2018 8:22 AM
To: use-livecode@lists.runrev.com; Douglas Ruisaard
Subject: RE: datagrid scrolling question

You can get/put data from/into the grid one row at a time without needing to 
figure out the group name, so you could have it update in real time in your 
external button. You should be able to use the same behavior script (possibly 
with a slight modification) everywhere.

I’m not at a computer right now so I will work out an example later if someone 
else doesn’t beat me to it.

Thanks,
Brian


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: datagrid scrolling question

2018-08-05 Thread Douglas Ruisaard via use-livecode
Many thanks to one and all for the interesting responses ... particularly to 
Zryip for the extensive reply!

I may be coming at LC from a somewhat unusual direction.  The vast majority of 
my programming background was in very large, distributed servers running 
dedicated medical applications and system and instrumentation interfaces.  My 
specialty is interfacing various disparate systems with each other and the 
amount of "user-interactive" processing I have to do in that environment is 
extremely minimal.

Initially, I very successfully employed LC to develop background (i.e. NO user 
interaction whatsoever) tasks and used its marvelous cross-platform abilities 
to the fullest.  So, in essence, user-interaction is fairly "foreign" to me.

You all point out that datagrids *are*, fundamentally, a user-interactive 
device where I am looking for a way to use them as a processing tool, in 
and of themselves.  I *do* employ the user-interaction as well... as I 
initially mentioned, using the controls on each row (interactively) works very 
well.  But, due to my nature, I want to be able to optionally "automate" any 
user-level function and remove the "human" component for consistency and 
reliability.  Yes, I can process all of the wi-fi modules first and then 
populate the grid; but, if I may be flippant, it's FUN to watch as each row 
triggers, fetches and populates each row, one at a time.  Since I made the task 
capable of being interactive, this is similar as to why someone would use any 
animation to make their display interesting to a user.  Animation often does 
not contribute to actual functionality but it is FUN to watch.

Many times in this group, I read how users and contributors reference aspects 
of LC "under-the-hood".  I found it interesting that most of the responses 
primarily referenced WHAT *I* was doing, rather than WHAT the DG was doing... 
which is what I tried to emphasize... and I apologize if that intention wasn't 
clear.  I understand and am sincerely grateful for the goal-orientation of the 
responses.  However, topically (not necessarily typically), this group is no 
stranger to investigating and constructively criticizing how LC performs a 
function.  I'm OK with my wrapping pseudo-group name method ... I was simply 
wondering if anyone had an alternative to using the "send mouseUp" approach of 
calling rows outside of the DG, itself.

My challenge now is to find a way to "calculate" the number of "visible" rows 
displayed (particularly if I want to make the visible portion of the datagrid 
dynamically sizable), so I can formulate the "break" point for the group name 
wrapping.  I, again, would appreciate any help for that function.

I genuinely appreciate the assistance and look forward to future involvement 
with this group.  I also look forward to the day I can contribute solutions to 
some of the very challenging issues discussed... many of them still leave me in 
the dust.

Douglas Ruisaard
Trilogy Software
(250) 573-3935




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: datagrid scrolling question

2018-08-05 Thread zryip theSlug via use-livecode
 I am asking it to
> do... NOT an issue with "tsnet" (which is great!). So, taking the latter
> (your) approach, I'd lose the "real time" aspect and have to wait
> (#-of-modules * 1 second) before seeing any results. Currently that would
> be 8 seconds... not a *long* wait but annoying (in this age of microsecond
> responses). Expanding the project to more modules, obviously, increase the
> wait time... and I like the real-time display.
> >
> > However, this is as much a learning exercise as anything else... so I
> still would greatly appreciate if you or anyone could suggest an
> alternative methodology for issuing any sort of message to a datagrid, if
> there is one. Perhaps my method *is* the only one. THAT would be valuable
> information to have, as well.
> >
> > Douglas Ruisaard
> > Trilogy Software
> > (250) 573-3935
> >
> > From: Brian Milby [mailto:br...@milby7.com]
> > Subject: Re: datagrid scrolling question
> >
> > > My question is why use the button? Loop through the data in the grid
> and make the tsnet call manually for each line.
> > > If the button is calling a script outside of the DG, then you can use
> the same call.
> > > Then you don’t have to do any of those things to figure out the name
> of the row group.
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

RE: datagrid scrolling question

2018-08-05 Thread Brian Milby via use-livecode
You can get/put data from/into the grid one row at a time without needing to 
figure out the group name, so you could have it update in real time in your 
external button. You should be able to use the same behavior script (possibly 
with a slight modification) everywhere.

I’m not at a computer right now so I will work out an example later if someone 
else doesn’t beat me to it.

Thanks,
Brian
On Aug 5, 2018, 10:02 AM -0500, Douglas Ruisaard , wrote:
> Thanks very much for the reply.
> Good question .. made me think about why that won't work very well for me 
> (but it would, of course, work).
>
> The button on each row not only queries the associated wi-fi module, but the 
> "mouseUp" handler in the Behavior Script acquires a response back from each 
> module. That message gets put into one of the fields in the row... so even if 
> I didn't try to make a "mouseUp" call to within the row, I'd still want to 
> populate each of the row's fields with the returning result... which would, 
> of course, entail using the pseudo-group names again... *if* I wanted to 
> display the returning information for each row "in real time"... which I do.
>
> There are two simple solutions, one of which I have done. Expand the grid to 
> show all 8 rows and the scrolling issue disappears. Or ... as you suggest, 
> "acquire" each row's data "outside" of the grid and then just display the 
> complete set of data at once. Currently I do the former. Works very well on 
> my big desktop monitor but not very "practical" to port to my iPad or 
> Android... or any small display device.
>
> Another caveat is that each call to a wi-fi module take about 1 second to 
> complete. This is a function of the module and what I am asking it to do... 
> NOT an issue with "tsnet" (which is great!). So, taking the latter (your) 
> approach, I'd lose the "real time" aspect and have to wait (#-of-modules * 1 
> second) before seeing any results. Currently that would be 8 seconds... not a 
> *long* wait but annoying (in this age of microsecond responses). Expanding 
> the project to more modules, obviously, increase the wait time... and I like 
> the real-time display.
>
> However, this is as much a learning exercise as anything else... so I still 
> would greatly appreciate if you or anyone could suggest an alternative 
> methodology for issuing any sort of message to a datagrid, if there is one. 
> Perhaps my method *is* the only one. THAT would be valuable information to 
> have, as well.
>
> Douglas Ruisaard
> Trilogy Software
> (250) 573-3935
>
> From: Brian Milby [mailto:br...@milby7.com]
> Subject: Re: datagrid scrolling question
>
> > My question is why use the button? Loop through the data in the grid and 
> > make the tsnet call manually for each line.
> > If the button is calling a script outside of the DG, then you can use the 
> > same call.
> > Then you don’t have to do any of those things to figure out the name of the 
> > row group.
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

RE: datagrid scrolling question

2018-08-05 Thread Douglas Ruisaard via use-livecode
Thanks very much for the reply.
Good question .. made me think about why that won't work very well for me (but 
it would, of course, work).

The button on each row not only queries the associated wi-fi module, but the 
"mouseUp" handler in the Behavior Script acquires a response back from each 
module.  That message gets put into one of the fields in the row... so even if 
I didn't try to make a "mouseUp" call to within the row, I'd still want to 
populate each of the row's fields with the returning result... which would, of 
course, entail using the pseudo-group names again... *if* I wanted to display 
the returning information for each row "in real time"... which I do.

There are two simple solutions, one of which I have done.  Expand the grid to 
show all 8 rows and the scrolling issue disappears.  Or ... as you suggest, 
"acquire" each row's data "outside" of the grid and then just display the 
complete set of data at once.  Currently I do the former.  Works very well on 
my big desktop monitor but not very "practical" to port to my iPad or 
Android... or any small display device.

Another caveat is that each call to a wi-fi module take about 1 second to 
complete.  This is a function of the module and what I am asking it to do... 
NOT an issue with "tsnet" (which is great!).  So, taking the latter (your) 
approach, I'd lose the "real time" aspect and have to wait (#-of-modules * 1 
second) before seeing any results.  Currently that would be 8 seconds... not a 
*long* wait but annoying (in this age of microsecond responses).  Expanding the 
project to more modules, obviously, increase the wait time... and I like the 
real-time display.

However, this is as much a learning exercise as anything else... so I still 
would greatly appreciate if you or anyone could suggest an alternative 
methodology for issuing any sort of message to a datagrid, if there is one.  
Perhaps my method *is* the only one.  THAT would be valuable information to 
have, as well.

Douglas Ruisaard
Trilogy Software
(250) 573-3935

From: Brian Milby [mailto:br...@milby7.com] 
Subject: Re: datagrid scrolling question

> My question is why use the button? Loop through the data in the grid and make 
> the tsnet call manually for each line.
> If the button is calling a script outside of the DG, then you can use the 
> same call. 
> Then you don’t have to do any of those things to figure out the name of the 
> row group.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: datagrid scrolling question

2018-08-05 Thread zryip theSlug via use-livecode
Same remark than Mike, James and Jacque. When you have to change the value
of each row, populating the datagrid with a new data, seems to be the
better way to go.

Now for helping you with datagrids, I think you have to understand 2
importants concepts about datagrids:
- rows groups are created on the fly when you are scrolling the datagrid,
so they have no existence if you are not scrolling the datagrid (excepted
if the cache control option is activated, but this is another story). That
is explaining you have to scroll yourself the datagrid to be able to send
the click to the corresponding button
- the data displayed in the datagrid resides in an array named dgData. This
array is "multidimensional".
Basically the first key is representing the line, and the second key is
containing the values of the datagrid.
put "Row 1 First key value" into tDataA[1]["First key"]
put "Row 1 Second key value" into tDataA[1]["Second key"]
put "Row 2 First key value" into tDataA[1]["First key"]
put "Row 2 Second key value" into tDataA[1]["Second key"]

For a datagrid table we have an immediate graphical representation because
each keys are columns of the datagrid, and the fillindata handler located
in the default row script is doing the job for us of automatically populate
the column content.

First Key Second key
Row 1 First key value Row 1 Second key value
Row 2 First key value Row 2 Second key value

For datagrid form with more than one value key, the developer must take
care himself of binding the key to one of the controls of the form
template. So we could potentially have a key by control if required (or
more than a key for a control. We will see the interest below).

on FillInData pDataArray

set the text of field "Label" of me to pDataArray["label 1"]

end FillInData

By default if you are populating the datagrid by using the inspector (or by
using the dgText property), the first key will be "label 1", the second
"label 2", etc. But if you are populating the datagrid by using the dgData
array, the keys used will be the keys you have defined for your dgData. So
in our example: "First key" and "Second key"

An example of script for your "one checkbox, three fields and two buttons"
template, might looks like:

on FillInData pDataArray
set the text of field "Label1" of me to pDataArray["label 1"]
set the text of field "Label2" of me to pDataArray["label 2"]
set the text of field "Label3" of me to pDataArray["label 3"]
set the hilited of btn "Checkbox1" of me to (pDataArray["check box state"]
is "true")
end FillInData

With a dgData looking like:
put "My label 1 row 1" into tData[1]["label 1"]
put "My label 2 row 1" into tData[1]["label 2"]
put "My label 3 row 1" into tData[1]["label 3"]
put "true" into tData[1]["check box state"]
put "My label 1 row 2" into tData[2]["label 1"]
put "My label 2 row 2" into tData[2]["label 2"]
put "My label 3 row 3" into tData[2]["label 3"]
put "false" into tData[2]["check box state"]
set the dgData of grp "myDataGrid" to tData

Now, for some purpose, such as interacting with the row controls, it could
be interesting to have additional keys inside the data. Not I'm thinking a
click in a button is required in your case. But you might have the need to
hide or to disable a button of a specific row on the fly by clicking a
button outside of the datagrid.

In this case
1. we are changing the data for the row by using the
 set the dgDataOfIndex property (see the datagrid documentation
http://lessons.livecode.com/m/datagrid/l/7315-how-do-i-update-data-in-a-row)
2. And when the data for the row is populated in the FillInData we might
have a specific key for disabling the button:

on FillInData pDataArray
set the text of field "Label1" of me to pDataArray["label 1"]
set the text of field "Label2" of me to pDataArray["label 2"]
set the text of field "Label3" of me to pDataArray["label 3"]
set the hilited of btn "Checkbox1" of me to (pDataArray["check box state"]
is "true")
set the enabled of btn "Action1" of me to (pDataArray["button enabled"] is
"true")
end FillInData


Hope these few examples might help you a bit to better understanding
datagrids.

On Sun, Aug 5, 2018 at 5:12 AM, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I was thinking the same thing. I think the critical distinction is that
> datagrids are primarily display mechanisms, not really intended to be read
> directly. It's much easier to parse the original input data than to try to
> traverse the grid itself, which uses some tricks to appear as a continuous
> single control.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> On August 4, 2018 6:54:21 PM James At The Hale via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> I am a little lost here as to why this is a DG question as such.
>> Certainly being able to dynamically fill data within a row is 

Re: datagrid scrolling question

2018-08-04 Thread J. Landman Gay via use-livecode
I was thinking the same thing. I think the critical distinction is that 
datagrids are primarily display mechanisms, not really intended to be read 
directly. It's much easier to parse the original input data than to try to 
traverse the grid itself, which uses some tricks to appear as a continuous 
single control.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On August 4, 2018 6:54:21 PM James At The Hale via use-livecode 
 wrote:



I am a little lost here as to why this is a DG question as such.
Certainly being able to dynamically fill data within a row is a great UI 
feature when the user is directly interacting with a row.
But it seems you wish to completely fill particular values in all the rows 
from outside the DG.
In this case, why not operate directly on the DGdata, loop through the 
array, fill in all the required values and then send the whole array back 
to the DG?


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: datagrid scrolling question

2018-08-04 Thread James At The Hale via use-livecode
I am a little lost here as to why this is a DG question as such.
Certainly being able to dynamically fill data within a row is a great UI 
feature when the user is directly interacting with a row.
But it seems you wish to completely fill particular values in all the rows from 
outside the DG.
In this case, why not operate directly on the DGdata, loop through the array, 
fill in all the required values and then send the whole array back to the DG?

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: datagrid scrolling question

2018-08-04 Thread Brian Milby via use-livecode
My question is why use the button? Loop through the data in the grid and make 
the tsnet call manually for each line. If the button is calling a script 
outside of the DG, then you can use the same call. Then you don’t have to do 
any of those things to figure out the name of the row group.
On Aug 4, 2018, 5:39 PM -0500, Douglas Ruisaard via use-livecode 
, wrote:
> I sent a badly constructed message with this content (more or less) a few 
> days ago. I am re-posting it in the hope that anyone who tried to decipher 
> those two messages will give this another consideration.
>
> So pardon the repeat, but I'm quite sure someone from this group can lend me 
> a hand on this issue.
>
> Using LC v8.1.9 on Windows 7 pro
>
> Using a datagrid form, each row has 1 checkbox, 3 fields and 2 buttons.
>
> One of the buttons (the one I need assistance with), named "Query" calls the 
> "tsnet" library to query a remote WiFi module (esp8266) which returns the 
> status of one of its IO pins. Works like a charm on ALL rows, scrolled or 
> not... because (I reckon) the button is actually *IN* the grid, so there's no 
> issue with the group name (as will become clear in a moment).. it is always 
> "me".
>
> I also want to "automate" the queries (there are 8 such wifi modules 
> involved). So I have a button outside of the datagrid which selects each row 
> of the populated datagrid in a "repeat" statement and sends a "mouseUp" 
> message to the datagrid.
>
> What I discovered is that (apparently) I have to "manufacture" the group name 
> of each row to which I want to send the "mouseUp" message. So as I progress 
> through the populated rows of the grid the "pseudo" group name of each row 
> basically becomes the row number along with a prefix of "Row Template"... 
> i.e. row 1's group name/label is "Row Template 0001", row 2 is "Row Template 
> 0002", etc.
>
> Great... but once the grid starts to scroll, strange things start to happen. 
> The pseudo-group name will "wrap"... and where it wraps depends on the number 
> of rows which are initially visible on the grid.
>
> For example, if there are 8 populated rows and the DataGrid is sized to only 
> show 3 rows at a time, upon the initialization of the Datagrid, the "pseudo" 
> Row templates groups are named:
>
> row 1: "Row Template 0001"
> row 2: "Row Template 0002"
> row 3: "Row Template 0003"
> row 4: "Row Template 0004"
> row 5: "Row Template 0005"
> row 6: "Row Template 0001"
> row 7: "Row Template 0002"
> row 8: "Row Template 0003"
>
> this is demonstrated by putting a "put me" in the Behavior Script within the 
> MouseUp handler to which I am sending the "mouseUp" message in order to 
> "process" that row's content... i.e.
>
> on mouseUp
> put me
> ...do something
> end mouseUp
>
> What is interesting (and confusing at the same time), if I use a specific 
> "wrapping pattern" (such as the one described above) and mutually "wrap" the 
> name of the group to which I am about to send the "mouseUp" message, it 
> works! ... i.e. from within the button outside of the datagrid:
> ... (in this example, the serverList array holds the 8 wifi module names I 
> need to query with tsnet)
>
> put "" into pad
> put 0 into q
> repeat with y = 1 to (the number of lines in the keys of serverList)
> set the dgHilitedLines of group "DataGrid 1" to y
> add 1 to q
> if q > 5 then put 1 into q
> put char 1 to (4 - length(q)) of pad & q into z
> put char 1 to (4 - length(y)) of pad & y into z
> put "Row Template " & z into z
> send "mouseUp" to button "Query" of group z
> end repeat
>
> THIS is confusing because, although I am sending the same message to what 
> appears to be the same pseudo-group name, once the grid scrolls beyond row 5, 
> LC manages to know that I am actually referencing another grid row than the 
> one(s) with the same pseudo-group names.
>
> To scroll the grid, programatically, I used:
> set the dgHilitedLines of group "DataGrid 1" to y
> to accomplish this.
>
> I also tried the more "seemingly appropriate":
> dispatch "ScrollLineIntoView" to group "DataGrid 1" with pLine"
>
> but this command changes the highlight of one of my fields which I have 
> customized to have red text in case of an error. Regardless, using either 
> method for scrolling does NOT seem to have any effect on the wrapping of the 
> pseudo group name.
>
> Since this "wrap-point" changes based on the "amount" of the datagrid I 
> "expose", this doesn't lend itself to portable or supportable code.
>
> If I don't "wrap" my group names according to this sort of pattern, once my 
> code reaches the 6th line (in my example), I get a:
> " ... Chunk: can't find background), char 1 " error ... because "Row Template 
> 0006" does not exist... it is "Row Template 0001"
>
> No doubt I'm approaching this wrong but I'm trying to teach myself datagrids 
> and it's a struggle for this old brain!
> Is there another method for sending a "mouseUp" to a button on a datagrid 
> form row?
>
> Douglas Ruisaard
> 

datagrid scrolling question

2018-08-04 Thread Douglas Ruisaard via use-livecode
I sent a badly constructed message with this content (more or less) a few days 
ago.  I am re-posting it in the hope that anyone who tried to decipher those 
two messages will give this another consideration.

So pardon the repeat, but I'm quite sure someone from this group can lend me a 
hand on this issue.

Using LC v8.1.9 on Windows 7 pro

Using a datagrid form, each row has 1 checkbox, 3 fields and 2 buttons.

One of the buttons (the one I need assistance with), named "Query" calls the 
"tsnet" library to query a remote WiFi module (esp8266) which returns the 
status of one of its IO pins.  Works like a charm on ALL rows, scrolled or 
not... because (I reckon) the button is actually *IN* the grid, so there's no 
issue with the group name (as will become clear in a moment).. it is always 
"me".

I also want to "automate" the queries (there are 8 such wifi modules involved). 
 So I have a button outside of the datagrid which selects each row of the 
populated datagrid in a "repeat" statement and sends a "mouseUp" message to the 
datagrid.

What I discovered is that (apparently) I have to "manufacture" the group name 
of each row to which I want to send the "mouseUp" message.  So as I progress 
through the populated rows of the grid the "pseudo" group name of each row 
basically becomes the row number along with a prefix of "Row Template"... i.e. 
row 1's group name/label is "Row Template 0001", row 2 is "Row Template 0002", 
etc.

Great... but once the grid starts to scroll, strange things start to happen.  
The pseudo-group name will "wrap"... and where it wraps depends on the number 
of rows which are initially visible on the grid.

For example, if there are 8 populated rows and the DataGrid is sized to only 
show 3 rows at a time, upon the initialization of the Datagrid, the "pseudo" 
Row templates groups are named:

row 1:  "Row Template 0001" 
row 2:  "Row Template 0002"
row 3:  "Row Template 0003"
row 4:  "Row Template 0004"
row 5:  "Row Template 0005"
row 6:  "Row Template 0001"
row 7:  "Row Template 0002"
row 8:  "Row Template 0003"

this is demonstrated by putting a "put me" in the Behavior Script within the 
MouseUp handler to which I am sending the "mouseUp" message in order to 
"process" that row's content... i.e.

on mouseUp
put me
...do something
end mouseUp

What is interesting (and confusing at the same time), if I use a specific 
"wrapping pattern" (such as the one described above) and mutually "wrap" the 
name of the group to which I am about to send the "mouseUp" message, it works!  
... i.e. from within the button outside of the datagrid:
... (in this example, the serverList array holds the 8 wifi module names I need 
to query with tsnet)

put "" into pad
put 0 into q
repeat with y = 1 to (the number of lines in the keys of serverList)
   set the dgHilitedLines of group "DataGrid 1" to y
   add 1 to q
   if q > 5 then put 1 into q
   put char 1 to (4 - length(q)) of pad & q into z
   put char 1 to (4 - length(y)) of pad & y into z
   put "Row Template " & z into z
   send "mouseUp" to button "Query" of group z
end repeat

THIS is confusing because, although I am sending the same message to what 
appears to be the same pseudo-group name, once the grid scrolls beyond row 5, 
LC manages to know that I am actually referencing another grid row than the 
one(s) with the same pseudo-group names.

To scroll the grid, programatically, I used:
   set the dgHilitedLines of group "DataGrid 1" to y  
to accomplish this.

I also tried the more "seemingly appropriate":
   dispatch "ScrollLineIntoView" to group "DataGrid 1" with pLine" 

but this command changes the highlight of one of my fields which I have 
customized to have red text in case of an error.  Regardless, using either 
method for scrolling does NOT seem to have any effect on the wrapping of the 
pseudo group name.

Since this "wrap-point" changes based on the "amount" of the datagrid I 
"expose", this doesn't lend itself to portable or supportable code.

If I don't "wrap" my group names according to this sort of pattern, once my 
code reaches the 6th line (in my example), I get a:
" ... Chunk: can't find background), char 1 " error ... because "Row Template 
0006" does not exist... it is "Row Template 0001"

No doubt I'm approaching this wrong but I'm trying to teach myself datagrids 
and it's a struggle for this old brain!
Is there another method for sending a "mouseUp" to a button on a datagrid form 
row?

Douglas Ruisaard
Trilogy Software
(250) 573-3935



Douglas Ruisaard
Trilogy Software
(250) 573-3935




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


datagrid scrolling on second monitor

2017-08-08 Thread Bob Sneidar via use-livecode
Here's an odd one: Scrolling a datagrid down on an alternate monitor goes 
slowly with 8.1.6. Scrolling up goes even slower. Move the window to primary 
stack all seems normal again. 

Bob S



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Datagrid Scrolling is GLACIAL.

2016-02-23 Thread stephen barncard
Is there any trick to speed up a datagrid's scrolling?
I've come back to an old project started in stable 6 and I don't remember
it being so slow...

MACOS Yosemite latest versions of 8 and 7 - Mac Pro 5,1 17gigs ram

350 records  13 fields. Almost useless.

really slow. Is it time for the DG to be 'binary' ? Possible?

It's one of the coolest features and I'd love to use it.

???

Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


DataGrid Scrolling

2013-04-20 Thread Terence Heaford
I have a DataGrid with 8 columns and 20 rows being fed by a sqlite database.

Is it possible to improve the scrolling of the DataGrid which I find stutters
when compared to a native OSX NSTableView?


All the best

Terry

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid Scrolling

2013-04-20 Thread stephen barncard
I am sure there are some speed up tricks for the DataGrid but remember that
the DataGrid is written in Livecode (just in time compiled) with multiple
elements and NSTableview would be binary. Apples and Oranges.

8 column x 20 Rows shouldn't be a problem.  It's possible NSTableview would
use smooth scrolling but I don't think the DataGrid does.

just a guess.


On Sat, Apr 20, 2013 at 2:04 AM, Terence Heaford
t.heaf...@btinternet.comwrote:

 I have a DataGrid with 8 columns and 20 rows being fed by a sqlite
 database.

 Is it possible to improve the scrolling of the DataGrid which I find
 stutters
 when compared to a native OSX NSTableView?


 All the best

 Terry

 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode




-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: DataGrid Scrolling

2013-04-20 Thread Terence Heaford
Can anyone advise what these tricks involve.

It's a plain text table from an sqlite db.

Thanks

Terry

On 20 Apr 2013, at 10:19, stephen barncard stephenrevoluti...@barncard.com 
wrote:

 I am sure there are some speed up tricks for the DataGrid 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Linux - Datagrid scrolling stops; column label missing

2012-04-12 Thread Glen Bojsza
Hello,

I have an app that was built on OS X Livecdoe 4.6.4.

When standalones were generated we found that the Linux (CentOS 6.2)
version had some strange problems:

1. the vertical scroll for a datagrid sometimes fails. there are several
rows by when the user drags the vertical scroll bar the datagrid does NOT
scroll.. the bar moves but not the rows?

2. the vertical scroll up and down arrows also do nothing?

By refreshing the dgtext of the datagrid group things start to work
normally again until when it just stops working again (hard to reproduce
but it does fail regularly)

3. one of the three column labels disappeared except for the very first
letter.
- tried editing the clumn label using rev's ide but it would not do
anything to the letter .. not allow you to delete it or add to it
- tried Data Grid Helper and same problem.

Next step was to open the original file on CentoS Livecode 4.6.4 .

Not able to have problems 1 or 2 above fail in ide only in the standalone.

Fixed 3 above by pasting the full column name when the first letter was
selected.

Also, found in standalone (not the ide) that clicking a check box in a
datagrid sometimes does not register the associated message.

So, I am wondering if anyone else has come across these problems and if so
have any suggestions?

Also, wondering if the datagrid was built in the ide on CentOS and not OS X
if it will make a difference?

We found that sometimes moving a livecode stack from OS X to Linux some of
the script text has extraneous characters which need to be removed for the
script to work properly.

I am hoping these issues can / are resolved if not then Livecode is not
really supportable for Linux applications unless you don't use datagrids
IMHO.

thanks,

Glen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode