Page 2 of 6
Re: DataGrid2 - What do you like, what don't you like
Posted: Thu Dec 28, 2017 8:30 am
by FourthWorld
quailcreek wrote: Thu Dec 28, 2017 7:01 am
I was just thinking about the swipe grps not being found. I'll bet the swipe capability is mobile only.
Trackpads.
http://quality.livecode.com/show_bug.cgi?id=8446
Re: DataGrid2 - What do you like, what don't you like
Posted: Thu Dec 28, 2017 11:49 am
by MaxV
No, all functions are aviable on all OSes (theoretically).
See on windows:
http://quality.livecode.com/show_bug.cgi?id=20807
Re: DataGrid2 - What do you like, what don't you like
Posted: Thu Dec 28, 2017 8:43 pm
by quailcreek
MaxV,
In the the Behavior Script of the DG did you set up the workingRect? I think that's the problem. Before I figured out that I needed to set up the workingRect I had the same problem. WorkingRect was added to DG2 to take care of exactly what you're seeing.
I just tested it in the IDE and it works fine and so do swipes.
This is from the release notes.
Laying Out Rows
When positioning controls in your row behavior script, you can take into account any edit mode controls that have been overlaid onto the row by using the rows working rect. The working rect is
passed as the second parameter to the LayoutControl message that is sent to your row behavior
script.
on LayoutControl pControlRect, pWorkingRect
...
end LayoutControl
Here's how I handled it in mine:
Code: Select all
on LayoutControl pControlRect, pWorkingRect
local theFieldRect1,theFieldRect2
put the rect of field "Name" of me into theFieldRect1
put (item 1 of pWorkingRect + 75) into item 1 of theFieldRect1
put item 3 of pWorkingRect - 5 into item 3 of theFieldRect1
set the rect of field "Name" of me to theFieldRect1
put the rect of field "More" of me into theFieldRect2
put (item 1 of pWorkingRect + 75) into item 1 of theFieldRect2
put item 3 of pWorkingRect - 5 into item 3 of theFieldRect2
set the rect of field "More" of me to theFieldRect2
set the left of img "imageHolder" of me to (item 1 of pWorkingRect + 7)
set the height of fld "Name" of me to the formattedHeight of fld "Name" of me
set the height of fld "More" of me to the formattedHeight of fld "More" of me
set the top of fld "More" of me to (the bottom of fld "Name" of me + 6)
set the rect of graphic "GrayBackground" of me to pControlRect
end LayoutControl
Re: DataGrid2 - What do you like, what don't you like
Posted: Thu Dec 28, 2017 10:22 pm
by quailcreek
Richard,
I'm doing some testing in the IDE and I get this too when doing a reorder. However, if I do a swipe first, left or right, then the reorder works. Could you please try this and let me know the result. I'm thinking the DG2 isn't pre-populating the swipe controls.
FourthWorld wrote: Thu Dec 28, 2017 6:04 am
So now it populates, but I still can't run it - I get an error on line 22 of group "Row Template 003" - "can't find background":
if the vis of grp "DG2 Default Right Swipe Control" OR the vis of grp "DG2 Default Left Swipe Control" then
Re: DataGrid2 - What do you like, what don't you like
Posted: Fri Dec 29, 2017 12:48 am
by quailcreek
Re: DataGrid2 - What do you like, what don't you like
Posted: Fri Mar 16, 2018 3:06 am
by quailcreek
So I installed 9.0.0 rc1 and I'm seeing a problem and wanted to check if it's just me or if anybody else is seeing the same thing.
With 9.0.0 dp 11 when an existing DG was set to Enable Swipes it was automatically updated to a DG2 and the DG2 groups where added and visible in the Project Browser. With 9.0.0 rc1 the groups are added but are not visible in the Project Browser. They do show up with a new DG. Has anybody else seen this?
Re: DataGrid2 - What do you like, what don't you like
Posted: Mon Mar 19, 2018 7:55 pm
by quailcreek
Re: DataGrid2 - What do you like, what don't you like
Posted: Tue Mar 27, 2018 8:24 pm
by sphere
Just tried to find the setting to enable swipe, where is it?
I can see in the dgprop swipe for right and left.
But you really mean that when i open a stack with a DG1 it is automatically replaced for a DG2 with swipe functions?
So then i do not have to use a piece of script to be able to activate scrolling for that group? Like with DG1 which is terrible slow...
Re: DataGrid2 - What do you like, what don't you like
Posted: Tue Mar 27, 2018 8:39 pm
by quailcreek
There is no enable left or right swipe. I did put in an enhancement request for that though.
The Enable Swipes switch is in the DG PI of a form DG.
There is now in v9 DP11 and rc1 the built in scroller for DGs. It's all in the release notes.
Keep in mind that scrolling and swipe are different. Scrolling is for scrolling the DG up/down and left/right.
Swipe is for exposing buttons on the left and right of a DG row in a form DG only.
Re: DataGrid2 - What do you like, what don't you like
Posted: Tue Mar 27, 2018 9:01 pm
by sphere
Thanks Quailcreek.
Ok a lot of reading about the DG news.
Maybe i need to remove the lines for mobilescroller, perhaps it works negative now when it is already in the DG2, Going to test if this will help for smoother scrolling.
This was a stack created on an lc8.x.x and then needed those lines of course. But needed lc9 for the encryption improvements.
Great!
Re: DataGrid2 - What do you like, what don't you like
Posted: Tue Mar 27, 2018 9:05 pm
by quailcreek
My pleasure. Do you have your DG set to scrolling or static in the advanced tab of the IP? That could help with the scrolling.
Re: DataGrid2 - What do you like, what don't you like
Posted: Tue Mar 27, 2018 9:34 pm
by sphere
Just quickly checked, it is set to static.
So scrolling it will be then i guess.
As my RingyDingy will go (always to) early, i'm going sleepy now
Thanks, will test it out tomorrow.
Re: DataGrid2 - What do you like, what don't you like
Posted: Fri Mar 30, 2018 10:12 am
by sphere
Can't test, having problems with ADB, not recoqnizing my phone. Had problems with testing anyway then it worked and then it did'nt. Mostly had to push 3 times the TEST button before it worked. Several errors. I hate win10malware windows, where is my win7 ???
Already uninstalled and reinstalled those driver but still issues. Will report back when it's working again.
Re: DataGrid2 - What do you like, what don't you like
Posted: Sat Mar 31, 2018 2:12 pm
by sphere
So finally it seems to work again, what a hell that adb under win10.
I still get sveral error messages. Even INSTALL-FAILED-UPDATE_INCOMPATIBLE ??? it's the exact same stack.
So after a few times pushing it, then it works.
Well scrolling is not working at all, no matter the setting static, dynamic or scrolling.
So for now i leave my scrolling script/handler in place although it works terrible slow.
Re: DataGrid2 - What do you like, what don't you like
Posted: Sat Mar 31, 2018 11:02 pm
by quailcreek
Here's the scroller script I use. Always scrolls smoothly.
I set sTheDataGridName to the name of the DG in the preOpenCard handler.
Code: Select all
command createTheScroller
local sScrollerID, theWidth, theHeight
if environment() is not "mobile" then exit createTheScroller
if "theDataGrid" is not among the lines of mobileControls() then
mobileControlCreate "scroller", "theDataGrid"
put the result into sScrollerID
end if
mobileControlSet sScrollerID, "rect", (the rect of grp sTheDataGridName)
put the dgFormattedWidth of grp sTheDataGridName into theWidth
put the dgFormattedHeight of grp sTheDataGridName into theHeight
mobileControlSet sScrollerID, "hscroll", 0
mobileControlSet sScrollerID, "vscroll", 0
mobileControlSet sScrollerID, "contentRect", (0,0,theWidth,theHeight)
mobileControlSet sScrollerID, "visible", "true"
mobileControlSet sScrollerID, "canBounce", "false"
mobileControlSet sScrollerID, "pagingEnabled", "false"
mobileControlSet sScrollerID, "canScrollToTop", "true"
mobileControlSet sScrollerID, "delayTouches", "true"
mobileControlSet sScrollerID, "canCancelTouches", "false"
mobileControlSet sScrollerID, "declerationRate", "normal"
mobileControlSet sScrollerID, "lockDirection", "true"
mobileControlSet sScrollerID, "scrollingEnabled", "true"
mobileControlSet sScrollerID, "hIndicator", "false"
mobileControlSet sScrollerID, "vIndicator", "false"
-- set the dgvScroll of grp tScrollerGroup to 0
end createTheScroller
on scrollerBeginDrag
set the dgHilitedLine of grp sTheDataGridName to empty
-- mobileControlSet sScrollerId, "delayTouches", true
end scrollerBeginDrag
on scrollerEndDrag
set the dgHilitedLine of grp sTheDataGridName to empty
-- mobileControlSet sScrollerId, "delayTouches", false
end scrollerEndDrag
on scrollerDidScroll OffsetX, OffsetY
set the dgvScroll of grp sTheDataGridName to OffsetY
set the dgHScroll of grp sTheDataGridName to OffsetX
end scrollerDidScroll