Re: Mobile Scroller

2021-06-30 Thread Tom Glod via use-livecode
Just confirming that this has been solved, putting the
mobilescroller commands in the resizestack handler is the solution.
What I did was I put "resizestack" to be called from "orientationchanged",
which for some reason it seemed like a good idea at the time :/

Thanks Ralph.

Tom



On Sat, Jun 19, 2021 at 10:43 PM Tom Glod  wrote:

> Hi Ralph... Thanks for those tips I will test to see if I can make it
> work.
>
> On Fri, Jun 18, 2021, 10:23 PM Ralph DiMola via use-livecode, <
> use-livecode@lists.runrev.com> wrote:
>
>> Tom,
>>
>> Orientationchanged happens before the screen is actually rotated. This is
>> why your scroll regions are not correct. Put your code in the resizestack
>> handler. I delete and recreate the scroller, I don't remember if that is
>> needed or I just started doing it that way. Scrollers work for me on both
>> iOS and Android. If you are able to come up with your magic numbers that
>> will make it scroll to the same place you must do a send in time for the  2
>> "mobileControlSet"s for both vScroll and hScroll. I use 100ms
>>
>> That being said although all my apps support both portrait and landscape
>> I use Orientationchanged very very rarely but when you need it it's
>> invaluable.
>>
>>
>> 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 Tom Glod via use-livecode
>> Sent: Friday, June 18, 2021 9:23 PM
>> To: How to use LiveCode
>> Cc: Tom Glod
>> Subject: Re: Mobile Scroller
>>
>> Ralph, it's in the orientationchanged handler
>>
>> Brian Thanks. !!!
>>
>>
>> On Fri, Jun 18, 2021, 4:18 PM Brian Milby via use-livecode, <
>> use-livecode@lists.runrev.com> wrote:
>>
>> > I have this working in SivaSiva for the stories module on Android.  It
>> > locks up on iOS so I have rotation disabled for now.  In my use case,
>> > the group is essentially the full screen with an image that is being
>> > moved around.  I’ll try to find the specific scripts tonight.
>> >
>> > Thanks,
>> > Brian
>> >
>> > Sent from my iPhone
>> >
>> > > On Jun 18, 2021, at 3:06 PM, Ralph DiMola via use-livecode <
>> > use-livecode@lists.runrev.com> wrote:
>> > >
>> > > Tom,
>> > >
>> > > What handler are you doing this in?
>> > >
>> > > 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 Tom Glod via use-livecode
>> > > Sent: Friday, June 18, 2021 2:51 PM
>> > > To: How to use LiveCode
>> > > Cc: Tom Glod
>> > > Subject: Mobile Scroller
>> > >
>> > > Hi Folks,
>> > >
>> > > I implemented a MobileControl "Scroller" to scroll a group.  Works
>> great.
>> > > However when I change the orientation, it no longer works correctly.
>> > >
>> > >
>> > >   - I tried to just update the properties relating to the rect
>> > >   - deleting / recreating
>> > >
>> > >
>> > > mobileControlSet "CardContentScroller","visible",true
>> > >
>> > > mobileControlSet "CardContentScroller","rect",the rect of *group*
>> > > "Card Content" of this card of me
>> > >
>> > > *put* 0,0,the width of *group* "Card Content" of this card of me,the
>> > > formattedHeight of *group* "Card Content" of this card of me into
>> > > tContentRect
>> > >
>> > > mobileControlSet "CardContentScroller","contentRect",tContentRect
>> > >
>> > > mobileControlSet "CardContentScroller","vIndicator",true
>> > >
>> > >
>> > > but it still isn't updating properly.
>> > > Not sure what i'm doing wrong.
>> > >
>> > > The code runs on the orientationChanged message
>> > >
>> > > Please help.
>> > >
>> > > Thanks,
>> > >
>> > > --
>> > > Tom Glod
>> >

Re: Mobile Scroller

2021-06-19 Thread Tom Glod via use-livecode
Hi Ralph... Thanks for those tips I will test to see if I can make it
work.

On Fri, Jun 18, 2021, 10:23 PM Ralph DiMola via use-livecode, <
use-livecode@lists.runrev.com> wrote:

> Tom,
>
> Orientationchanged happens before the screen is actually rotated. This is
> why your scroll regions are not correct. Put your code in the resizestack
> handler. I delete and recreate the scroller, I don't remember if that is
> needed or I just started doing it that way. Scrollers work for me on both
> iOS and Android. If you are able to come up with your magic numbers that
> will make it scroll to the same place you must do a send in time for the  2
> "mobileControlSet"s for both vScroll and hScroll. I use 100ms
>
> That being said although all my apps support both portrait and landscape I
> use Orientationchanged very very rarely but when you need it it's
> invaluable.
>
>
> 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 Tom Glod via use-livecode
> Sent: Friday, June 18, 2021 9:23 PM
> To: How to use LiveCode
> Cc: Tom Glod
> Subject: Re: Mobile Scroller
>
> Ralph, it's in the orientationchanged handler
>
> Brian Thanks. !!!
>
>
> On Fri, Jun 18, 2021, 4:18 PM Brian Milby via use-livecode, <
> use-livecode@lists.runrev.com> wrote:
>
> > I have this working in SivaSiva for the stories module on Android.  It
> > locks up on iOS so I have rotation disabled for now.  In my use case,
> > the group is essentially the full screen with an image that is being
> > moved around.  I’ll try to find the specific scripts tonight.
> >
> > Thanks,
> > Brian
> >
> > Sent from my iPhone
> >
> > > On Jun 18, 2021, at 3:06 PM, Ralph DiMola via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > Tom,
> > >
> > > What handler are you doing this in?
> > >
> > > 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 Tom Glod via use-livecode
> > > Sent: Friday, June 18, 2021 2:51 PM
> > > To: How to use LiveCode
> > > Cc: Tom Glod
> > > Subject: Mobile Scroller
> > >
> > > Hi Folks,
> > >
> > > I implemented a MobileControl "Scroller" to scroll a group.  Works
> great.
> > > However when I change the orientation, it no longer works correctly.
> > >
> > >
> > >   - I tried to just update the properties relating to the rect
> > >   - deleting / recreating
> > >
> > >
> > > mobileControlSet "CardContentScroller","visible",true
> > >
> > > mobileControlSet "CardContentScroller","rect",the rect of *group*
> > > "Card Content" of this card of me
> > >
> > > *put* 0,0,the width of *group* "Card Content" of this card of me,the
> > > formattedHeight of *group* "Card Content" of this card of me into
> > > tContentRect
> > >
> > > mobileControlSet "CardContentScroller","contentRect",tContentRect
> > >
> > > mobileControlSet "CardContentScroller","vIndicator",true
> > >
> > >
> > > but it still isn't updating properly.
> > > Not sure what i'm doing wrong.
> > >
> > > The code runs on the orientationChanged message
> > >
> > > Please help.
> > >
> > > Thanks,
> > >
> > > --
> > > Tom Glod
> > > Founder & Developer
> > > MakeShyft R.D.A (www.makeshyft.com)
> > > Mobile:647.562.9411
> > > ___
> > > 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/li

RE: Mobile Scroller

2021-06-18 Thread Ralph DiMola via use-livecode
Tom,

Orientationchanged happens before the screen is actually rotated. This is why 
your scroll regions are not correct. Put your code in the resizestack handler. 
I delete and recreate the scroller, I don't remember if that is needed or I 
just started doing it that way. Scrollers work for me on both iOS and Android. 
If you are able to come up with your magic numbers that will make it scroll to 
the same place you must do a send in time for the  2 "mobileControlSet"s for 
both vScroll and hScroll. I use 100ms

That being said although all my apps support both portrait and landscape I use 
Orientationchanged very very rarely but when you need it it's invaluable.


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 
Tom Glod via use-livecode
Sent: Friday, June 18, 2021 9:23 PM
To: How to use LiveCode
Cc: Tom Glod
Subject: Re: Mobile Scroller

Ralph, it's in the orientationchanged handler

Brian Thanks. !!!


On Fri, Jun 18, 2021, 4:18 PM Brian Milby via use-livecode, < 
use-livecode@lists.runrev.com> wrote:

> I have this working in SivaSiva for the stories module on Android.  It 
> locks up on iOS so I have rotation disabled for now.  In my use case, 
> the group is essentially the full screen with an image that is being 
> moved around.  I’ll try to find the specific scripts tonight.
>
> Thanks,
> Brian
>
> Sent from my iPhone
>
> > On Jun 18, 2021, at 3:06 PM, Ralph DiMola via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Tom,
> >
> > What handler are you doing this in?
> >
> > 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 Tom Glod via use-livecode
> > Sent: Friday, June 18, 2021 2:51 PM
> > To: How to use LiveCode
> > Cc: Tom Glod
> > Subject: Mobile Scroller
> >
> > Hi Folks,
> >
> > I implemented a MobileControl "Scroller" to scroll a group.  Works great.
> > However when I change the orientation, it no longer works correctly.
> >
> >
> >   - I tried to just update the properties relating to the rect
> >   - deleting / recreating
> >
> >
> > mobileControlSet "CardContentScroller","visible",true
> >
> > mobileControlSet "CardContentScroller","rect",the rect of *group* 
> > "Card Content" of this card of me
> >
> > *put* 0,0,the width of *group* "Card Content" of this card of me,the 
> > formattedHeight of *group* "Card Content" of this card of me into 
> > tContentRect
> >
> > mobileControlSet "CardContentScroller","contentRect",tContentRect
> >
> > mobileControlSet "CardContentScroller","vIndicator",true
> >
> >
> > but it still isn't updating properly.
> > Not sure what i'm doing wrong.
> >
> > The code runs on the orientationChanged message
> >
> > Please help.
> >
> > Thanks,
> >
> > --
> > Tom Glod
> > Founder & Developer
> > MakeShyft R.D.A (www.makeshyft.com)
> > Mobile:647.562.9411
> > ___
> > 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
>
> ___
> 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


___
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: Mobile Scroller

2021-06-18 Thread Tom Glod via use-livecode
Ralph, it's in the orientationchanged handler

Brian Thanks. !!!


On Fri, Jun 18, 2021, 4:18 PM Brian Milby via use-livecode, <
use-livecode@lists.runrev.com> wrote:

> I have this working in SivaSiva for the stories module on Android.  It
> locks up on iOS so I have rotation disabled for now.  In my use case, the
> group is essentially the full screen with an image that is being moved
> around.  I’ll try to find the specific scripts tonight.
>
> Thanks,
> Brian
>
> Sent from my iPhone
>
> > On Jun 18, 2021, at 3:06 PM, Ralph DiMola via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Tom,
> >
> > What handler are you doing this in?
> >
> > 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 Tom Glod via use-livecode
> > Sent: Friday, June 18, 2021 2:51 PM
> > To: How to use LiveCode
> > Cc: Tom Glod
> > Subject: Mobile Scroller
> >
> > Hi Folks,
> >
> > I implemented a MobileControl "Scroller" to scroll a group.  Works great.
> > However when I change the orientation, it no longer works correctly.
> >
> >
> >   - I tried to just update the properties relating to the rect
> >   - deleting / recreating
> >
> >
> > mobileControlSet "CardContentScroller","visible",true
> >
> > mobileControlSet "CardContentScroller","rect",the rect of *group* "Card
> > Content" of this card of me
> >
> > *put* 0,0,the width of *group* "Card Content" of this card of me,the
> > formattedHeight of *group* "Card Content" of this card of me into
> > tContentRect
> >
> > mobileControlSet "CardContentScroller","contentRect",tContentRect
> >
> > mobileControlSet "CardContentScroller","vIndicator",true
> >
> >
> > but it still isn't updating properly.
> > Not sure what i'm doing wrong.
> >
> > The code runs on the orientationChanged message
> >
> > Please help.
> >
> > Thanks,
> >
> > --
> > Tom Glod
> > Founder & Developer
> > MakeShyft R.D.A (www.makeshyft.com)
> > Mobile:647.562.9411
> > ___
> > 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
>
> ___
> 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: Mobile Scroller

2021-06-18 Thread Brian Milby via use-livecode
I have this working in SivaSiva for the stories module on Android.  It locks up 
on iOS so I have rotation disabled for now.  In my use case, the group is 
essentially the full screen with an image that is being moved around.  I’ll try 
to find the specific scripts tonight.

Thanks,
Brian

Sent from my iPhone

> On Jun 18, 2021, at 3:06 PM, Ralph DiMola via use-livecode 
>  wrote:
> 
> Tom,
> 
> What handler are you doing this in?
> 
> 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 Tom Glod via use-livecode
> Sent: Friday, June 18, 2021 2:51 PM
> To: How to use LiveCode
> Cc: Tom Glod
> Subject: Mobile Scroller
> 
> Hi Folks,
> 
> I implemented a MobileControl "Scroller" to scroll a group.  Works great.
> However when I change the orientation, it no longer works correctly.
> 
> 
>   - I tried to just update the properties relating to the rect
>   - deleting / recreating
> 
> 
> mobileControlSet "CardContentScroller","visible",true
> 
> mobileControlSet "CardContentScroller","rect",the rect of *group* "Card
> Content" of this card of me
> 
> *put* 0,0,the width of *group* "Card Content" of this card of me,the
> formattedHeight of *group* "Card Content" of this card of me into
> tContentRect
> 
> mobileControlSet "CardContentScroller","contentRect",tContentRect
> 
> mobileControlSet "CardContentScroller","vIndicator",true
> 
> 
> but it still isn't updating properly.
> Not sure what i'm doing wrong.
> 
> The code runs on the orientationChanged message
> 
> Please help.
> 
> Thanks,
> 
> --
> Tom Glod
> Founder & Developer
> MakeShyft R.D.A (www.makeshyft.com)
> Mobile:647.562.9411
> ___
> 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

___
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: Mobile Scroller

2021-06-18 Thread Ralph DiMola via use-livecode
Tom,

What handler are you doing this in?

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 Tom Glod via use-livecode
Sent: Friday, June 18, 2021 2:51 PM
To: How to use LiveCode
Cc: Tom Glod
Subject: Mobile Scroller

Hi Folks,

I implemented a MobileControl "Scroller" to scroll a group.  Works great.
However when I change the orientation, it no longer works correctly.


   - I tried to just update the properties relating to the rect
   - deleting / recreating


mobileControlSet "CardContentScroller","visible",true

mobileControlSet "CardContentScroller","rect",the rect of *group* "Card
Content" of this card of me

*put* 0,0,the width of *group* "Card Content" of this card of me,the
formattedHeight of *group* "Card Content" of this card of me into
tContentRect

mobileControlSet "CardContentScroller","contentRect",tContentRect

mobileControlSet "CardContentScroller","vIndicator",true


but it still isn't updating properly.
Not sure what i'm doing wrong.

The code runs on the orientationChanged message

Please help.

Thanks,

--
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Mobile:647.562.9411
___
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


Mobile Scroller

2021-06-18 Thread Tom Glod via use-livecode
Hi Folks,

I implemented a MobileControl "Scroller" to scroll a group.  Works great.
However when I change the orientation, it no longer works correctly.


   - I tried to just update the properties relating to the rect
   - deleting / recreating


mobileControlSet "CardContentScroller","visible",true

mobileControlSet "CardContentScroller","rect",the rect of *group* "Card
Content" of this card of me

*put* 0,0,the width of *group* "Card Content" of this card of me,the
formattedHeight of *group* "Card Content" of this card of me into
tContentRect

mobileControlSet "CardContentScroller","contentRect",tContentRect

mobileControlSet "CardContentScroller","vIndicator",true


but it still isn't updating properly.
Not sure what i'm doing wrong.

The code runs on the orientationChanged message

Please help.

Thanks,

-- 
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Mobile:647.562.9411
___
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: Mobile Scroller Advice

2021-04-14 Thread Brian Milby via use-livecode
Thanks to a little off list help from Jacque, I was able to get this
working.  Here's the key piece:

   wait 10 milliseconds -- Panos workaround, bug #18924
   mobileControlSet pName, "hScroll", the hScroll of control pName
   mobileControlSet pName, "vScroll", the vScroll of control pName

The workaround in the bug report actually says wait 0 ms, but I found that
I had to increase it a bit for it to work on my test Pixel (I didn't try to
see how low I could go though).  I'm replying to myself to put the
information out there in case someone is searching the archives.

Thanks all,
Brian

On Wed, Apr 14, 2021 at 12:43 PM Brian Milby  wrote:

> It starts zoomed out with the whole image showing.  A tap will zoom in
> about 25% each time until fully zoomed in (pixel match to display).  The
> idea is that the image will zoom from the center instead of from the
> top/left.  No transition effects are currently used.
>
> At each size, the user can scroll around the entire image.  (It would
> actually be best to zoom around what is currently visible, but that is easy
> once I figure out the other piece.)
>
> The issue is that if viewing a very wide panorama, then jumping to the
> left side isn’t very appealing.
>
> Currently I do delete and recreate the scroller for each zoom, it just
> didn’t work right with the image centered in the group.
>
> Thanks,
> Brian
>
> Sent from my iPhone
>
> > On Apr 14, 2021, at 12:10 PM, J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I'm a little confused. Do you want the zoom to happen within a group
> with a scroller?
> >
> > I've done this a different way. Delete any existing scroller, lock the
> screen, resize the image and its group, unlock the screen with a visual
> effect like zoom in or whatever. Then recreate the scroller at the new
> group size.
> >
> > Is that what you're asking?
> > --
> > Jacqueline Landman Gay | jac...@hyperactivesw.com
> > HyperActive Software | http://www.hyperactivesw.com
> >> On April 13, 2021 10:31:58 PM Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> Greetings on this lovely Tuesday evening.  I'm in need of a little
> mobile
> >> scroller wisdom.
> >>
> >> I'm working on an app that runs on mobile devices (Apple and Android).
> We
> >> are presenting an image and have enabled the ability for the user to
> tap on
> >> the image to zoom in.  Everything is working except the only way that I
> >> have been able to get the scroller to work reliably is to place the
> image
> >> at the top/left of the group.  What we would really like to do is keep
> the
> >> image centered on the screen as it expands.
> >>
> >> It may be totally obvious, but before I spend a bunch of time throwing
> >> darts and hoping for a bullseye, I thought it would be good to at least
> ask
> >> for a little help.
> >>
> >> Thanks for any assistance you can provide,
> >> 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
> >
> >
> >
> >
> > ___
> > 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: Mobile Scroller Advice

2021-04-14 Thread Brian Milby via use-livecode
It starts zoomed out with the whole image showing.  A tap will zoom in about 
25% each time until fully zoomed in (pixel match to display).  The idea is that 
the image will zoom from the center instead of from the top/left.  No 
transition effects are currently used.

At each size, the user can scroll around the entire image.  (It would actually 
be best to zoom around what is currently visible, but that is easy once I 
figure out the other piece.)

The issue is that if viewing a very wide panorama, then jumping to the left 
side isn’t very appealing.

Currently I do delete and recreate the scroller for each zoom, it just didn’t 
work right with the image centered in the group.

Thanks,
Brian

Sent from my iPhone

> On Apr 14, 2021, at 12:10 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I'm a little confused. Do you want the zoom to happen within a group with a 
> scroller?
> 
> I've done this a different way. Delete any existing scroller, lock the 
> screen, resize the image and its group, unlock the screen with a visual 
> effect like zoom in or whatever. Then recreate the scroller at the new group 
> size.
> 
> Is that what you're asking?
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>> On April 13, 2021 10:31:58 PM Brian Milby via use-livecode 
>>  wrote:
>> 
>> Greetings on this lovely Tuesday evening.  I'm in need of a little mobile
>> scroller wisdom.
>> 
>> I'm working on an app that runs on mobile devices (Apple and Android).  We
>> are presenting an image and have enabled the ability for the user to tap on
>> the image to zoom in.  Everything is working except the only way that I
>> have been able to get the scroller to work reliably is to place the image
>> at the top/left of the group.  What we would really like to do is keep the
>> image centered on the screen as it expands.
>> 
>> It may be totally obvious, but before I spend a bunch of time throwing
>> darts and hoping for a bullseye, I thought it would be good to at least ask
>> for a little help.
>> 
>> Thanks for any assistance you can provide,
>> 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
> 
> 
> 
> 
> ___
> 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: Mobile Scroller Advice

2021-04-14 Thread J. Landman Gay via use-livecode
I'm a little confused. Do you want the zoom to happen within a group with a 
scroller?


I've done this a different way. Delete any existing scroller, lock the 
screen, resize the image and its group, unlock the screen with a visual 
effect like zoom in or whatever. Then recreate the scroller at the new 
group size.


Is that what you're asking?
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On April 13, 2021 10:31:58 PM Brian Milby via use-livecode 
 wrote:



Greetings on this lovely Tuesday evening.  I'm in need of a little mobile
scroller wisdom.

I'm working on an app that runs on mobile devices (Apple and Android).  We
are presenting an image and have enabled the ability for the user to tap on
the image to zoom in.  Everything is working except the only way that I
have been able to get the scroller to work reliably is to place the image
at the top/left of the group.  What we would really like to do is keep the
image centered on the screen as it expands.

It may be totally obvious, but before I spend a bunch of time throwing
darts and hoping for a bullseye, I thought it would be good to at least ask
for a little help.

Thanks for any assistance you can provide,
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





___
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


Mobile Scroller Advice

2021-04-13 Thread Brian Milby via use-livecode
Greetings on this lovely Tuesday evening.  I'm in need of a little mobile
scroller wisdom.

I'm working on an app that runs on mobile devices (Apple and Android).  We
are presenting an image and have enabled the ability for the user to tap on
the image to zoom in.  Everything is working except the only way that I
have been able to get the scroller to work reliably is to place the image
at the top/left of the group.  What we would really like to do is keep the
image centered on the screen as it expands.

It may be totally obvious, but before I spend a bunch of time throwing
darts and hoping for a bullseye, I thought it would be good to at least ask
for a little help.

Thanks for any assistance you can provide,
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: Mobile scroller misaligned

2019-10-25 Thread Ralph DiMola via use-livecode
J,

Sorry I meant send this to you last time you asked and got sidetracked, then 
spaced out and forgot. After creating the scroller do a send in time to a 
handler to set the non-zero scroll. I use .5 seconds but less might work.

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 
J. Landman Gay via use-livecode
Sent: Friday, October 25, 2019 3:21 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Mobile scroller misaligned

I am still struggling with native scroller alignment when the scroll must be 
set to something other than zero. Since I've asked here twice with little 
response, maybe I just need to know more about how scrollers work under the 
hood. Panos? Anyone?

* If I set the vScroll or hScroll of a scroller, are any messages sent? 
Does this affect the underlying LC group in any way?

* Right now, I'm setting the scroll of a LC group and then setting up a native 
scroller to use the same scroll. This fails. Should I be reversing the process, 
and set the scroller's scroll first followed by the LC group scroll? That's 
kind of how it works when scrollerDidScroll is called. I wasn't able to get 
this to work but maybe I missed something.

For testing, I copied a card from the real project with the same scroller 
scripts. I could not set the scroll in the handler that created the scroller, 
but I could set it later after the creation handler finished. But in the real 
project, identical scripts fail. I can't trace why.

I've been tring to fix this for a couple of months now, so any info would be 
appreciated.

On 9/27/19 3:04 PM, J. Landman Gay via use-livecode wrote:
> I must be doing something wrong, I still can't get a mobile scroller 
> to align at anything other than zero. It fails on scrollers placed 
> over either images or scrolling fields.
> 
> I have a list field with a lot of lines, grouped, with the group 
> shorter than the field.
> 
> On mobile (Android in my case) a handler sets the hilitedLine of the 
> field and scrolls the group to display it. I create a native scroller 
> on the group and set the vScroll to the same scroll as the group. I 
> can't get the scroller to align correctly.
> 
> The list shows on demand, so the scroller has to be created when the 
> group becomes visible, and has to match the group's current scroll.
> 
>mobileControlSet pName, "vScroll", tVScroll -- fails unless it's 
> zero
> 
> Has anyone done this successfully? I'm pretty sure there's something 
> wrong with my script.
> 


-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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


___
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: Mobile scroller misaligned

2019-10-25 Thread J. Landman Gay via use-livecode
I am still struggling with native scroller alignment when the scroll 
must be set to something other than zero. Since I've asked here twice 
with little response, maybe I just need to know more about how scrollers 
work under the hood. Panos? Anyone?


* If I set the vScroll or hScroll of a scroller, are any messages sent? 
Does this affect the underlying LC group in any way?


* Right now, I'm setting the scroll of a LC group and then setting up a 
native scroller to use the same scroll. This fails. Should I be 
reversing the process, and set the scroller's scroll first followed by 
the LC group scroll? That's kind of how it works when scrollerDidScroll 
is called. I wasn't able to get this to work but maybe I missed something.


For testing, I copied a card from the real project with the same 
scroller scripts. I could not set the scroll in the handler that created 
the scroller, but I could set it later after the creation handler 
finished. But in the real project, identical scripts fail. I can't trace 
why.


I've been tring to fix this for a couple of months now, so any info 
would be appreciated.


On 9/27/19 3:04 PM, J. Landman Gay via use-livecode wrote:
I must be doing something wrong, I still can't get a mobile scroller to 
align at anything other than zero. It fails on scrollers placed over 
either images or scrolling fields.


I have a list field with a lot of lines, grouped, with the group shorter 
than the field.


On mobile (Android in my case) a handler sets the hilitedLine of the 
field and scrolls the group to display it. I create a native scroller on 
the group and set the vScroll to the same scroll as the group. I can't 
get the scroller to align correctly.


The list shows on demand, so the scroller has to be created when the 
group becomes visible, and has to match the group's current scroll.


   mobileControlSet pName, "vScroll", tVScroll -- fails unless it's zero

Has anyone done this successfully? I'm pretty sure there's something 
wrong with my script.





--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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


Mobile scroller misaligned

2019-09-27 Thread J. Landman Gay via use-livecode
I must be doing something wrong, I still can't get a mobile scroller to 
align at anything other than zero. It fails on scrollers placed over 
either images or scrolling fields.


I have a list field with a lot of lines, grouped, with the group shorter 
than the field.


On mobile (Android in my case) a handler sets the hilitedLine of the 
field and scrolls the group to display it. I create a native scroller on 
the group and set the vScroll to the same scroll as the group. I can't 
get the scroller to align correctly.


The list shows on demand, so the scroller has to be created when the 
group becomes visible, and has to match the group's current scroll.


  mobileControlSet pName, "vScroll", tVScroll -- fails unless it's zero

Has anyone done this successfully? I'm pretty sure there's something 
wrong with my script.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Move several fields by a mobile scroller to allow to enter text into the lower fields

2019-06-15 Thread J. Landman Gay via use-livecode
I usually move the group up to the top of the card on keyboardActivated and 
back down on keyboardDeactivated, but if you have a lot of fields or groups 
that can be a pain. There's a bug report /feature request to add card 
scrolling which would be the ideal way to fix the problem but it hasn't 
happened yet.


It used to be that acceleratedRendering would auto-scroll the field into 
view but that was an unintentional bug that was fixed. Sometimes it was 
handy though.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On June 15, 2019 7:46:05 PM Matthias Rebbe via use-livecode 
 wrote:



Hi,

i am working on an app which also contains several cards with forms. The 
problem is that the lower fields are covered by the keyboard.
There´s a lesson from 2012 which describes how to create a scrolling group 
using a native scroller. Is it still the way to go or are there other 
possibilities?


Matthias



___
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

Move several fields by a mobile scroller to allow to enter text into the lower fields

2019-06-15 Thread Matthias Rebbe via use-livecode
Hi,

i am working on an app which also contains several cards with forms. The 
problem is that the lower fields are covered by the keyboard.
There´s a lesson from 2012 which describes how to create a scrolling group 
using a native scroller. Is it still the way to go or are there other 
possibilities?

Matthias



___
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: Setting mobile scroller hScroll fails

2019-05-30 Thread J. Landman Gay via use-livecode

On 5/29/19 6:22 PM, Monte Goulding via use-livecode wrote:

The max scroll will be the formattedWidth of the group - the width of the group 
unless you have unboundedHScroll true. I_think_  if it’s false then the engine 
will automagically clamp that though.


I tried that but it didn't scroll to the far edge, so I set it back to 
using the formattedwidth of the group as the hscroll.


I'll try to set up a sample stack later and put it in the bug database.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Setting mobile scroller hScroll fails

2019-05-30 Thread J. Landman Gay via use-livecode
Whenever someone says "math" my eyes kind of glaze over and my brain 
shuts off. I'm using your sample script to resize the group so it 
expands to the screen edges, which works great. I'm not sure how to 
change the scroller so it works with that setup, but I did wonder if 
scrollers were limited to the card size and that might be why it wasn't 
working.


I think I'll write it up as Monte suggested, though I'm not sure whether 
to call it a bug, a feature request, or just impossible.



On 5/29/19 5:29 PM, Brian Milby via use-livecode wrote:

I think it is going to take some math but the scroller should be set for the 
area within the card rect since the areas left/right are not going to be 
responsive to the scroller.

Thanks,
Brian
On May 29, 2019, 2:01 PM -0500, J. Landman Gay via use-livecode 
, wrote:

Thanks Monte, I did over-summarize. I'm not sure why it's going wrong,
but it sounds like it's something I'm doing. I have a standard
"createScroller" handler that I've been using for years, but I've never
had to set the hScroll before. It's always been zero.

In this case, I set the hScroll of the group to the formattedWidth of
the group, which may be wrong. The engine seems to compensate though and
sets the scroll as far as it should go. Then I call "createScroller" and
pass the name of the group. The handler:

command createScroller pName
-- pName = the long ID of a grp
put the rect of control pName into tRect
put the hScrollBar of control pName into tHScroller
put the vScrollBar of control pName into tVScroller
put the hScroll of control pName into tHScroll
put the vScroll of control pName into tVScroll
set the hScrollBar of control pName to false -- remove fld scrollbars
on mobile
set the vScrollBar of control pName to false
mobileControlCreate "scroller", pName
mobileControlSet pName, "rect", tRect
put ("0,0," & (the formattedwidth of control pName) & "," & the
formattedheight of control pName) into tContentRect
mobileControlSet pName, "contentRect", tContentRect
mobileControlSet pName, "hScroll", 0
mobileControlSet pName, "vScroll", 0
mobileControlSet pName, "hIndicator", tHScroller
mobileControlSet pName, "vIndicator", tVScroller
mobileControlSet pName, "hScroll", tHScroll
mobileControlSet pName, "vScroll", tVScroll
mobileControlSet pName, "visible", true
end createScroller

I initialize both the group and the scroller to 0 before doing anything
else, because when I wrote it I couldn't get them to align correctly
otherwise. I should also probably mention that I'm using fullscreenMode
"showAll" and the group is expanded beyond the borders of the card to
fill the screen; i.e., it probably has a negative left margin and a
wider right margin. When the scroller finally does scroll (after
resetting itself) it scrolls too far at the left side by the number of
pixels between the screen left and the card left, and cuts off the same
amount on the right side.

Can you see what I should change?


On 5/28/19 6:33 PM, Monte Goulding via use-livecode wrote:

Hi Jacque

I’m thinking you are over summarising what you are doing here. For example, I 
expect you mean to set the hScroll of the group to the formattedWidth - the 
width of the group. Are you setting the contentRect appropriately before 
setting the hScroll of the scroller?

Cheers

Monte


On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode 
 wrote:

I want to verify this is a bug and not just me.

I'm creating a mobile scroller over a group. I want the group to initially 
display with its hScroll all the way to the right. I'm doing this:

zoom the group out to fill the screen
create a mobile scroller with the same rect
set the hScroll of the group to its formattedWidth
set the hScroll of the scroller to the scroll of the group

If I insert an answer command to show the scroller's hScroll it reports the 
correct number. But the scroller always acts like its scroll is 0, and it won't 
scroll to the left at all. But scrolling it to the right zaps both it and the 
group to zero and after that it scrolls normally.

I've also tried not setting the group's scroll and just setting the scroller 
alone, thinking it might trigger the scrollerDidScroll handler, but it doesn't.

If I don't set any hScroll at all on either the group or the scroller, all is 
well.

Has anyone else seen this?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.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



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsub

Re: Setting mobile scroller hScroll fails

2019-05-29 Thread Monte Goulding via use-livecode


> On 30 May 2019, at 5:01 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> Thanks Monte, I did over-summarize. I'm not sure why it's going wrong, but it 
> sounds like it's something I'm doing. I have a standard "createScroller" 
> handler that I've been using for years, but I've never had to set the hScroll 
> before. It's always been zero.
> 
> In this case, I set the hScroll of the group to the formattedWidth of the 
> group, which may be wrong.

The max scroll will be the formattedWidth of the group - the width of the group 
unless you have unboundedHScroll true. I _think_ if it’s false then the engine 
will automagically clamp that though.

> The engine seems to compensate though and sets the scroll as far as it should 
> go. Then I call "createScroller" and pass the name of the group. The handler:
> 
> command createScroller pName
>  -- pName = the long ID of a grp
>  put the rect of control pName into tRect
>  put the hScrollBar of control pName into tHScroller
>  put the vScrollBar of control pName into tVScroller
>  put the hScroll of control pName into tHScroll
>  put the vScroll of control pName into tVScroll
>  set the hScrollBar of control pName to false -- remove fld scrollbars on 
> mobile
>  set the vScrollBar of control pName to false
>  mobileControlCreate "scroller", pName
>  mobileControlSet pName, "rect", tRect
>  put  ("0,0," & (the formattedwidth of control pName) & "," & the 
> formattedheight of control pName) into tContentRect
>  mobileControlSet pName, "contentRect", tContentRect
>  mobileControlSet pName, "hScroll", 0
>  mobileControlSet pName, "vScroll", 0
>  mobileControlSet pName, "hIndicator", tHScroller
>  mobileControlSet pName, "vIndicator", tVScroller
>  mobileControlSet pName, "hScroll", tHScroll
>  mobileControlSet pName, "vScroll", tVScroll
>  mobileControlSet pName, "visible", true
> end createScroller
> 
> I initialize both the group and the scroller to 0 before doing anything else, 
> because when I wrote it I couldn't get them to align correctly otherwise. I 
> should also probably mention that I'm using fullscreenMode "showAll" and the 
> group is expanded beyond the borders of the card to fill the screen; i.e., it 
> probably has a negative left margin and a wider right margin.
> When the scroller finally does scroll (after resetting itself) it scrolls too 
> far at the left side by the number of pixels between the screen left and the 
> card left, and cuts off the same amount on the right side.
> 
> Can you see what I should change?

I’m really not sure at this stage. Have you tried logging the x,y values you 
get in scrollerDidScroll? This may need a simple stack to reproduce it and an 
email to support so we can figure out what’s up. 

Cheers

Monte
___
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: Setting mobile scroller hScroll fails

2019-05-29 Thread Brian Milby via use-livecode
I think it is going to take some math but the scroller should be set for the 
area within the card rect since the areas left/right are not going to be 
responsive to the scroller.

Thanks,
Brian
On May 29, 2019, 2:01 PM -0500, J. Landman Gay via use-livecode 
, wrote:
> Thanks Monte, I did over-summarize. I'm not sure why it's going wrong,
> but it sounds like it's something I'm doing. I have a standard
> "createScroller" handler that I've been using for years, but I've never
> had to set the hScroll before. It's always been zero.
>
> In this case, I set the hScroll of the group to the formattedWidth of
> the group, which may be wrong. The engine seems to compensate though and
> sets the scroll as far as it should go. Then I call "createScroller" and
> pass the name of the group. The handler:
>
> command createScroller pName
> -- pName = the long ID of a grp
> put the rect of control pName into tRect
> put the hScrollBar of control pName into tHScroller
> put the vScrollBar of control pName into tVScroller
> put the hScroll of control pName into tHScroll
> put the vScroll of control pName into tVScroll
> set the hScrollBar of control pName to false -- remove fld scrollbars
> on mobile
> set the vScrollBar of control pName to false
> mobileControlCreate "scroller", pName
> mobileControlSet pName, "rect", tRect
> put ("0,0," & (the formattedwidth of control pName) & "," & the
> formattedheight of control pName) into tContentRect
> mobileControlSet pName, "contentRect", tContentRect
> mobileControlSet pName, "hScroll", 0
> mobileControlSet pName, "vScroll", 0
> mobileControlSet pName, "hIndicator", tHScroller
> mobileControlSet pName, "vIndicator", tVScroller
> mobileControlSet pName, "hScroll", tHScroll
> mobileControlSet pName, "vScroll", tVScroll
> mobileControlSet pName, "visible", true
> end createScroller
>
> I initialize both the group and the scroller to 0 before doing anything
> else, because when I wrote it I couldn't get them to align correctly
> otherwise. I should also probably mention that I'm using fullscreenMode
> "showAll" and the group is expanded beyond the borders of the card to
> fill the screen; i.e., it probably has a negative left margin and a
> wider right margin. When the scroller finally does scroll (after
> resetting itself) it scrolls too far at the left side by the number of
> pixels between the screen left and the card left, and cuts off the same
> amount on the right side.
>
> Can you see what I should change?
>
>
> On 5/28/19 6:33 PM, Monte Goulding via use-livecode wrote:
> > Hi Jacque
> >
> > I’m thinking you are over summarising what you are doing here. For example, 
> > I expect you mean to set the hScroll of the group to the formattedWidth - 
> > the width of the group. Are you setting the contentRect appropriately 
> > before setting the hScroll of the scroller?
> >
> > Cheers
> >
> > Monte
> >
> > > On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode 
> > >  wrote:
> > >
> > > I want to verify this is a bug and not just me.
> > >
> > > I'm creating a mobile scroller over a group. I want the group to 
> > > initially display with its hScroll all the way to the right. I'm doing 
> > > this:
> > >
> > > zoom the group out to fill the screen
> > > create a mobile scroller with the same rect
> > > set the hScroll of the group to its formattedWidth
> > > set the hScroll of the scroller to the scroll of the group
> > >
> > > If I insert an answer command to show the scroller's hScroll it reports 
> > > the correct number. But the scroller always acts like its scroll is 0, 
> > > and it won't scroll to the left at all. But scrolling it to the right 
> > > zaps both it and the group to zero and after that it scrolls normally.
> > >
> > > I've also tried not setting the group's scroll and just setting the 
> > > scroller alone, thinking it might trigger the scrollerDidScroll handler, 
> > > but it doesn't.
> > >
> > > If I don't set any hScroll at all on either the group or the scroller, 
> > > all is well.
> > >
> > > Has anyone else seen this?
> > >
> > > --
> > > Jacqueline Landman Gay | jac...@hyperactivesw.com
> > > HyperActive Software | http://www.hyperactivesw.com
> > >
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.co

Re: Setting mobile scroller hScroll fails

2019-05-29 Thread J. Landman Gay via use-livecode
Thanks Monte, I did over-summarize. I'm not sure why it's going wrong, 
but it sounds like it's something I'm doing. I have a standard 
"createScroller" handler that I've been using for years, but I've never 
had to set the hScroll before. It's always been zero.


In this case, I set the hScroll of the group to the formattedWidth of 
the group, which may be wrong. The engine seems to compensate though and 
sets the scroll as far as it should go. Then I call "createScroller" and 
pass the name of the group. The handler:


command createScroller pName
  -- pName = the long ID of a grp
  put the rect of control pName into tRect
  put the hScrollBar of control pName into tHScroller
  put the vScrollBar of control pName into tVScroller
  put the hScroll of control pName into tHScroll
  put the vScroll of control pName into tVScroll
  set the hScrollBar of control pName to false -- remove fld scrollbars 
on mobile

  set the vScrollBar of control pName to false
  mobileControlCreate "scroller", pName
  mobileControlSet pName, "rect", tRect
  put  ("0,0," & (the formattedwidth of control pName) & "," & the 
formattedheight of control pName) into tContentRect

  mobileControlSet pName, "contentRect", tContentRect
  mobileControlSet pName, "hScroll", 0
  mobileControlSet pName, "vScroll", 0
  mobileControlSet pName, "hIndicator", tHScroller
  mobileControlSet pName, "vIndicator", tVScroller
  mobileControlSet pName, "hScroll", tHScroll
  mobileControlSet pName, "vScroll", tVScroll
  mobileControlSet pName, "visible", true
end createScroller

I initialize both the group and the scroller to 0 before doing anything 
else, because when I wrote it I couldn't get them to align correctly 
otherwise. I should also probably mention that I'm using fullscreenMode 
"showAll" and the group is expanded beyond the borders of the card to 
fill the screen; i.e., it probably has a negative left margin and a 
wider right margin. When the scroller finally does scroll (after 
resetting itself) it scrolls too far at the left side by the number of 
pixels between the screen left and the card left, and cuts off the same 
amount on the right side.


Can you see what I should change?


On 5/28/19 6:33 PM, Monte Goulding via use-livecode wrote:

Hi Jacque

I’m thinking you are over summarising what you are doing here. For example, I 
expect you mean to set the hScroll of the group to the formattedWidth - the 
width of the group. Are you setting the contentRect appropriately before 
setting the hScroll of the scroller?

Cheers

Monte


On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode 
 wrote:

I want to verify this is a bug and not just me.

I'm creating a mobile scroller over a group. I want the group to initially 
display with its hScroll all the way to the right. I'm doing this:

zoom the group out to fill the screen
create a mobile scroller with the same rect
set the hScroll of the group to its formattedWidth
set the hScroll of the scroller to the scroll of the group

If I insert an answer command to show the scroller's hScroll it reports the 
correct number. But the scroller always acts like its scroll is 0, and it won't 
scroll to the left at all. But scrolling it to the right zaps both it and the 
group to zero and after that it scrolls normally.

I've also tried not setting the group's scroll and just setting the scroller 
alone, thinking it might trigger the scrollerDidScroll handler, but it doesn't.

If I don't set any hScroll at all on either the group or the scroller, all is 
well.

Has anyone else seen this?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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



___
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




--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Setting mobile scroller hScroll fails

2019-05-28 Thread Monte Goulding via use-livecode
Hi Jacque

I’m thinking you are over summarising what you are doing here. For example, I 
expect you mean to set the hScroll of the group to the formattedWidth - the 
width of the group. Are you setting the contentRect appropriately before 
setting the hScroll of the scroller?

Cheers

Monte

> On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> I want to verify this is a bug and not just me.
> 
> I'm creating a mobile scroller over a group. I want the group to initially 
> display with its hScroll all the way to the right. I'm doing this:
> 
> zoom the group out to fill the screen
> create a mobile scroller with the same rect
> set the hScroll of the group to its formattedWidth
> set the hScroll of the scroller to the scroll of the group
> 
> If I insert an answer command to show the scroller's hScroll it reports the 
> correct number. But the scroller always acts like its scroll is 0, and it 
> won't scroll to the left at all. But scrolling it to the right zaps both it 
> and the group to zero and after that it scrolls normally.
> 
> I've also tried not setting the group's scroll and just setting the scroller 
> alone, thinking it might trigger the scrollerDidScroll handler, but it 
> doesn't.
> 
> If I don't set any hScroll at all on either the group or the scroller, all is 
> well.
> 
> Has anyone else seen this?
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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


___
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: Setting mobile scroller hScroll fails

2019-05-27 Thread JJS via use-livecode
Something similair with 2 fields, of which one did scroll (vertical) and 
the other not, Although the script for both was the same except for some 
naming to distinguish them.


Did not have time to upon it further.

(on Android)

Op 27-5-2019 om 00:03 schreef J. Landman Gay via use-livecode:

I want to verify this is a bug and not just me.

I'm creating a mobile scroller over a group. I want the group to 
initially display with its hScroll all the way to the right. I'm doing 
this:


zoom the group out to fill the screen
create a mobile scroller with the same rect
set the hScroll of the group to its formattedWidth
set the hScroll of the scroller to the scroll of the group

If I insert an answer command to show the scroller's hScroll it 
reports the correct number. But the scroller always acts like its 
scroll is 0, and it won't scroll to the left at all. But scrolling it 
to the right zaps both it and the group to zero and after that it 
scrolls normally.


I've also tried not setting the group's scroll and just setting the 
scroller alone, thinking it might trigger the scrollerDidScroll 
handler, but it doesn't.


If I don't set any hScroll at all on either the group or the scroller, 
all is well.


Has anyone else seen this?



___
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


Setting mobile scroller hScroll fails

2019-05-26 Thread J. Landman Gay via use-livecode

I want to verify this is a bug and not just me.

I'm creating a mobile scroller over a group. I want the group to 
initially display with its hScroll all the way to the right. I'm doing this:


zoom the group out to fill the screen
create a mobile scroller with the same rect
set the hScroll of the group to its formattedWidth
set the hScroll of the scroller to the scroll of the group

If I insert an answer command to show the scroller's hScroll it reports 
the correct number. But the scroller always acts like its scroll is 0, 
and it won't scroll to the left at all. But scrolling it to the right 
zaps both it and the group to zero and after that it scrolls normally.


I've also tried not setting the group's scroll and just setting the 
scroller alone, thinking it might trigger the scrollerDidScroll handler, 
but it doesn't.


If I don't set any hScroll at all on either the group or the scroller, 
all is well.


Has anyone else seen this?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Swipe gestures on a mobile scroller

2016-11-20 Thread J. Landman Gay
I wish. :) I'm hoping the LC team will fix it. Apparently that would 
solve problems for a lot of us.



On 11/20/16 3:53 PM, Scott Morrow wrote:

Jacque,

I had intermittent luck with touchMove as well. I was using it to
swipe open a “delete” button. In the app that uses this feature there
is another way to accomplish the same thing so I settled for
intermittent.

Selfishly, hoping it was something I did wrong and that you would
solve it  :- )

— Scott

On Nov 20, 2016, at 11:34 AM, J. Landman Gay
 wrote:

On 11/20/16 12:36 PM, Paul Hibbert wrote:

It is only a workaround implemented by intercepting the
scrollerDidScroll message


I just tried both Scott's touchMove solution and Paul's
scrollerDidScroll suggestion but neither seem to work on Android.

I'm not surprised there was no scrollerDidScroll message, because
the field width fits the scroller contentRect, so there is nothing
to scroll. It may be working on iOS because there you have a
"bounce" option which allows overscrolling. Android doesn't have
that.

I had hopes for the touchMove solution because that message does
fire sporadically but it failed also. In my tests yesterday I saw
that the message fired fitfully, but even when it did the mouse
position was wrong. I attributed that to the fact that I was
logging the coords to a field, but maybe there's more to it because
after a few responses the logging stopped completely.

-- Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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



___ 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




--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Swipe gestures on a mobile scroller

2016-11-20 Thread Scott Morrow
Jacque,

I had intermittent luck with touchMove as well. I was using it to swipe open a 
“delete” button. In the app that uses this feature there is another way to 
accomplish the same thing so I settled for intermittent. 

Selfishly, hoping it was something I did wrong and that you would solve it  :- )

—
Scott
> On Nov 20, 2016, at 11:34 AM, J. Landman Gay  wrote:
> 
> On 11/20/16 12:36 PM, Paul Hibbert wrote:
>> It is only a workaround implemented by intercepting the scrollerDidScroll 
>> message
> 
> I just tried both Scott's touchMove solution and Paul's scrollerDidScroll 
> suggestion but neither seem to work on Android.
> 
> I'm not surprised there was no scrollerDidScroll message, because the field 
> width fits the scroller contentRect, so there is nothing to scroll. It may be 
> working on iOS because there you have a "bounce" option which allows 
> overscrolling. Android doesn't have that.
> 
> I had hopes for the touchMove solution because that message does fire 
> sporadically but it failed also. In my tests yesterday I saw that the message 
> fired fitfully, but even when it did the mouse position was wrong. I 
> attributed that to the fact that I was logging the coords to a field, but 
> maybe there's more to it because after a few responses the logging stopped 
> completely.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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


___
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: Swipe gestures on a mobile scroller

2016-11-20 Thread J. Landman Gay

On 11/20/16 12:36 PM, Paul Hibbert wrote:

It is only a workaround implemented by intercepting the scrollerDidScroll 
message


I just tried both Scott's touchMove solution and Paul's 
scrollerDidScroll suggestion but neither seem to work on Android.


I'm not surprised there was no scrollerDidScroll message, because the 
field width fits the scroller contentRect, so there is nothing to 
scroll. It may be working on iOS because there you have a "bounce" 
option which allows overscrolling. Android doesn't have that.


I had hopes for the touchMove solution because that message does fire 
sporadically but it failed also. In my tests yesterday I saw that the 
message fired fitfully, but even when it did the mouse position was 
wrong. I attributed that to the fact that I was logging the coords to a 
field, but maybe there's more to it because after a few responses the 
logging stopped completely.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Swipe gestures on a mobile scroller

2016-11-20 Thread Paul Hibbert

> On Nov 20, 2016, at 11:03 AM, J. Landman Gay <jac...@hyperactivesw.com> wrote:
> 
> does that mean the hscroll property of the mobile scroller must be true?

Just tried this simplified version and it works fine too:

on scrollerDidScroll hOffset, vOffset // Scroll Detect //
 
   if hOffset <0 then ##-->> Detects the Horiz swipe <<--##
  moveBack
   else if hOffset >0 then
  moveForward
   end if
   
   set the vScroll of group "scrollArea" to vOffset ##-->> Scroll the field 
vertically <<—##

end scrollerDidScroll

___
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: Swipe gestures on a mobile scroller

2016-11-20 Thread Paul Hibbert

> On Nov 20, 2016, at 11:03 AM, J. Landman Gay <jac...@hyperactivesw.com 
> <mailto:jac...@hyperactivesw.com>> wrote:
> 
> does that mean the hscroll property of the mobile scroller must be true?

No, the hScroll prop is still false, you are just detecting and using 
(diverting) the information that the scrollerDidScroll message would have used 
to set the hScroll, but it never gets set.

This is the handler:

on scrollerDidScroll hOffset, vOffset // Scroll or Swipe Detect //
 
   if the hScroll of group "scrollArea" <0 then ##-->> Detects the Horiz swipe 
<<--##
  moveBack
   else if the hScroll of group "scrollArea" >0 then
  moveForward
   end if
   
   set the vScroll of group "scrollArea" to vOffset ##-->>  Scroll the field 
vertically <<—##

end scrollerDidScroll


It is just a workaround, and it’s not perfect, but may keep you going until the 
main problem is fixed.

Paul
___
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: Swipe gestures on a mobile scroller

2016-11-20 Thread J. Landman Gay

On 11/20/16 12:36 PM, Paul Hibbert wrote:



On Nov 19, 2016, at 8:06 PM, J. Landman Gay
<jac...@hyperactivesw.com> wrote:

I'm not sure how it could work, since the horizontal scroll of my
field is always zero. It doesn't scroll horizontally at all.


The actual hScroll of the field isn’t set, only the vScroll is set in
this example, but it can detect that you are attempting to scroll
horizontally and so you can use that info to initiate a swipe.

It is only a workaround implemented by intercepting the
scrollerDidScroll message, you don’t need to ‘set' the scroll sent by
the message, but you can detect it and use it to swipe.


Right, but does that mean the hscroll property of the mobile scroller 
must be true? Right now mine's false so I assumed it wouldn't even try 
to detect scrolling horizontally. I can change that setting of course.


But your solution and Scott's are very similar so it must work. I'll 
experiment with both. Thanks for the ideas, both of you, but I sure wish 
we could use a simple mouseUp to detect it. It would save a lot of trouble.



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Swipe gestures on a mobile scroller

2016-11-20 Thread Paul Hibbert

> On Nov 19, 2016, at 8:06 PM, J. Landman Gay  wrote:
> 
> I'm not sure how it could work, since the horizontal scroll of my field is 
> always zero. It doesn't scroll horizontally at all.

The actual hScroll of the field isn’t set, only the vScroll is set in this 
example, but it can detect that you are attempting to scroll horizontally and 
so you can use that info to initiate a swipe.

It is only a workaround implemented by intercepting the scrollerDidScroll 
message, you don’t need to ‘set' the scroll sent by the message, but you can 
detect it and use it to swipe.

Paul
___
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: Swipe gestures on a mobile scroller

2016-11-20 Thread Scott Morrow
I used touchMove and found it at least partially reliable for horizontal swipes 
on iOS (not tried on Android)
Something like:

global gHorizontalSwipeDistance
local lMouseStartH
local lMouseStartV


-- put 80 into gHorizontalSwipeDistance -- depending on the resolution during 
startup

on touchStart pID
   put the mouseV into lMouseStartV
   put the mouseH into lMouseStartH
end touchStart

on touchMove pTouchID, pTouchH, pTouchV
   -- see if there was a horizontal swipe
   if (abs(pTouchH - lMouseStartH) > gHorizontalSwipeDistance) AND\
   (abs(pTouchV - lMouseStartV) < gVerticalSwipeDistance) then
  -- they swiped

   end if
end touch


Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web   http://elementarysoftware.com/
email sc...@elementarysoftware.com
office 1-800-615-0867
--








> On Nov 19, 2016, at 8:13 PM, J. Landman Gay <jac...@hyperactivesw.com> wrote:
> 
> BTW, there appears to be a related bug that got fixed:
> <http://quality.livecode.com/show_bug.cgi?id=16239>
> 
> MouseUp wasn't being sent when a native scroller was active. It looks like 
> they fixed that one but forgot to check related swipe mouseUps. Hopefully the 
> team can use the same fix again.
> 
> 
> On 11/19/16 10:06 PM, J. Landman Gay wrote:
>> Well, it's good to know I'm not alone I guess. ;) I just wish I'd asked
>> earlier, before I spent some hours tracking down the problem. I'd like
>> to think the omission of mouseUp/touchEnd messages was an oversight,
>> since we do get all the other mouse messages.
>> 
>> I haven't tried Paul's workaround. I'm not sure how it could work, since
>> the horizontal scroll of my field is always zero. It doesn't scroll
>> horizontally at all.
>> 
>> The fix should really be in the engine though.
>> 
>> On 11/19/16 8:53 PM, Terry Judd wrote:
>>> Hi Jacque - I struggled with this for ages on an iOS and android app
>>> earlier in the year (vertical scrolling content with side-to-side
>>> swiping for navigation (a la iCal). After trying a truckload of
>>> different approaches (hacks) I mostly got it to work on iOS (I still
>>> got intermittent failures) and I eventually gave up altogether on
>>> android and used left and right buttons instead. Things might have
>>> improved then but based on your experience it sounds unlikely. Happy
>>> to dig out my hacky iOS code if that helps but engine level fixes
>>> would be better.
>>> 
>>> Terry...
>>> 
>>> Sent from my iPad
>>> 
>>>> On 20 Nov 2016, at 6:39 AM, J. Landman Gay
>>>> <jac...@hyperactivesw.com> wrote:
>>>> 
>>>>> On 11/19/16 2:18 AM, J. Landman Gay wrote: I have a native mobile
>>>>> scroller handling the vertical scroll of a field. I want to add
>>>>> swipe gestures to change cards. When swiping, I get a mouseDown,
>>>>> sporadic mouseMoves (the logging might be interfering, not sure,
>>>>> but after a couple they stop) and no mouseUp at all.
>>>>> 
>>>>> I tried using touchStart/touchMove/touchEnd instead and the
>>>>> result is the same. TouchStart always fires, touchMove is iffy,
>>>>> and touchEnd never happens.
>>>>> 
>>>>> Without the end message I can't calculate the direction. Plain
>>>>> taps work fine with either set of messages, I do get
>>>>> mouseUp/touchEnd if it's a tap. It's only swipes that don't
>>>>> report.
>>>>> 
>>>>> The scroller has its hScroll property set to false if that
>>>>> matters, as I don't want horizontal scrolling but I do want to
>>>>> track the touch direction.
>>>> 
>>>> The problem has apparently been around for quite some time:
>>>> <http://quality.livecode.com/show_bug.cgi?id=12419>
>>>> 
>>>> Anyone have a workaround?
>>>> 
>>>> -- Jacqueline Landman Gay | jac...@hyperactivesw.com
>>>> HyperActive Software   | http://www.hyperactivesw.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
>>> 
>>> 
>>> ___ use-livecode mailing
>>> list use-livecode@lists.runrev.com Please visit th

Re: Swipe gestures on a mobile scroller

2016-11-19 Thread J. Landman Gay

BTW, there appears to be a related bug that got fixed:
<http://quality.livecode.com/show_bug.cgi?id=16239>

MouseUp wasn't being sent when a native scroller was active. It looks 
like they fixed that one but forgot to check related swipe mouseUps. 
Hopefully the team can use the same fix again.



On 11/19/16 10:06 PM, J. Landman Gay wrote:

Well, it's good to know I'm not alone I guess. ;) I just wish I'd asked
earlier, before I spent some hours tracking down the problem. I'd like
to think the omission of mouseUp/touchEnd messages was an oversight,
since we do get all the other mouse messages.

I haven't tried Paul's workaround. I'm not sure how it could work, since
the horizontal scroll of my field is always zero. It doesn't scroll
horizontally at all.

The fix should really be in the engine though.

On 11/19/16 8:53 PM, Terry Judd wrote:

Hi Jacque - I struggled with this for ages on an iOS and android app
earlier in the year (vertical scrolling content with side-to-side
swiping for navigation (a la iCal). After trying a truckload of
different approaches (hacks) I mostly got it to work on iOS (I still
got intermittent failures) and I eventually gave up altogether on
android and used left and right buttons instead. Things might have
improved then but based on your experience it sounds unlikely. Happy
to dig out my hacky iOS code if that helps but engine level fixes
would be better.

Terry...

Sent from my iPad


On 20 Nov 2016, at 6:39 AM, J. Landman Gay
<jac...@hyperactivesw.com> wrote:


On 11/19/16 2:18 AM, J. Landman Gay wrote: I have a native mobile
scroller handling the vertical scroll of a field. I want to add
swipe gestures to change cards. When swiping, I get a mouseDown,
sporadic mouseMoves (the logging might be interfering, not sure,
but after a couple they stop) and no mouseUp at all.

I tried using touchStart/touchMove/touchEnd instead and the
result is the same. TouchStart always fires, touchMove is iffy,
and touchEnd never happens.

Without the end message I can't calculate the direction. Plain
taps work fine with either set of messages, I do get
mouseUp/touchEnd if it's a tap. It's only swipes that don't
report.

The scroller has its hScroll property set to false if that
matters, as I don't want horizontal scrolling but I do want to
track the touch direction.


The problem has apparently been around for quite some time:
<http://quality.livecode.com/show_bug.cgi?id=12419>

Anyone have a workaround?

-- Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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



___ 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







--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Swipe gestures on a mobile scroller

2016-11-19 Thread J. Landman Gay
Well, it's good to know I'm not alone I guess. ;) I just wish I'd asked 
earlier, before I spent some hours tracking down the problem. I'd like 
to think the omission of mouseUp/touchEnd messages was an oversight, 
since we do get all the other mouse messages.


I haven't tried Paul's workaround. I'm not sure how it could work, since 
the horizontal scroll of my field is always zero. It doesn't scroll 
horizontally at all.


The fix should really be in the engine though.

On 11/19/16 8:53 PM, Terry Judd wrote:

Hi Jacque - I struggled with this for ages on an iOS and android app
earlier in the year (vertical scrolling content with side-to-side
swiping for navigation (a la iCal). After trying a truckload of
different approaches (hacks) I mostly got it to work on iOS (I still
got intermittent failures) and I eventually gave up altogether on
android and used left and right buttons instead. Things might have
improved then but based on your experience it sounds unlikely. Happy
to dig out my hacky iOS code if that helps but engine level fixes
would be better.

Terry...

Sent from my iPad


On 20 Nov 2016, at 6:39 AM, J. Landman Gay
<jac...@hyperactivesw.com> wrote:


On 11/19/16 2:18 AM, J. Landman Gay wrote: I have a native mobile
scroller handling the vertical scroll of a field. I want to add
swipe gestures to change cards. When swiping, I get a mouseDown,
sporadic mouseMoves (the logging might be interfering, not sure,
but after a couple they stop) and no mouseUp at all.

I tried using touchStart/touchMove/touchEnd instead and the
result is the same. TouchStart always fires, touchMove is iffy,
and touchEnd never happens.

Without the end message I can't calculate the direction. Plain
taps work fine with either set of messages, I do get
mouseUp/touchEnd if it's a tap. It's only swipes that don't
report.

The scroller has its hScroll property set to false if that
matters, as I don't want horizontal scrolling but I do want to
track the touch direction.


The problem has apparently been around for quite some time:
<http://quality.livecode.com/show_bug.cgi?id=12419>

Anyone have a workaround?

-- Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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



___ 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




--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Swipe gestures on a mobile scroller

2016-11-19 Thread Terry Judd
Hi Jacque - I struggled with this for ages on an iOS and android app earlier in 
the year (vertical scrolling content with side-to-side swiping for navigation 
(a la iCal). After trying a truckload of different approaches (hacks) I mostly 
got it to work on iOS (I still got intermittent failures) and I eventually gave 
up altogether on android and used left and right buttons instead. Things might 
have improved then but based on your experience it sounds unlikely. Happy to 
dig out my hacky iOS code if that helps but engine level fixes would be better.

Terry...

Sent from my iPad

> On 20 Nov 2016, at 6:39 AM, J. Landman Gay <jac...@hyperactivesw.com> wrote:
> 
>> On 11/19/16 2:18 AM, J. Landman Gay wrote:
>> I have a native mobile scroller handling the vertical scroll of a field.
>> I want to add swipe gestures to change cards. When swiping, I get a
>> mouseDown, sporadic mouseMoves (the logging might be interfering, not
>> sure, but after a couple they stop) and no mouseUp at all.
>> 
>> I tried using touchStart/touchMove/touchEnd instead and the result is
>> the same. TouchStart always fires, touchMove is iffy, and touchEnd never
>> happens.
>> 
>> Without the end message I can't calculate the direction. Plain taps work
>> fine with either set of messages, I do get mouseUp/touchEnd if it's a
>> tap. It's only swipes that don't report.
>> 
>> The scroller has its hScroll property set to false if that matters, as I
>> don't want horizontal scrolling but I do want to track the touch direction.
> 
> The problem has apparently been around for quite some time:
> <http://quality.livecode.com/show_bug.cgi?id=12419>
> 
> Anyone have a workaround?
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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


___
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: Swipe gestures on a mobile scroller

2016-11-19 Thread Paul Hibbert

> On Nov 19, 2016, at 11:38 AM, J. Landman Gay  wrote:
> 
> Anyone have a workaround?


Kind of! I built an iOS app that needed to display some long fields of text, I 
built some pages based around this lesson:

http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field?id=94412-creating-a-native-scroller-to-scroll-a-field

I had the same problem with navigating cards using swipe gestures because the 
field covered the majority of the card, I managed to work around the problem by 
modifying the scrollerDidScroll handler to:

on scrollerDidScroll hOffset, vOffset
// When the user scrolls horizontally, navigate in the desired direction

if the hScroll of group "scrollArea" <0 then // Detect the horizontal swipe

   moveBack // Stack handler to move back to Index card

 else if the hScroll of group "scrollArea" >0 then

   moveForward // Stack handler to move to next card

end if

// When the user swipes vertically, scroll the displayed content

set the vScroll of group "scrollArea" to vOffset

end scrollerDidScroll

To make this work I had to set these properties on the text field;
traversalOn “false”
autoHilite “false”
lock text “true”
So this may not work if you need the user to be able to modify the text unless 
you can give them a method of changing between edit/navigate modes.

I’ve managed to update the lesson file, it's on dropbox, so if it helps here it 
is for you to test:
https://www.dropbox.com/s/ak234nlwbgfko3p/Scroll%20Test.livecode?dl=0 


It does seem to be reasonably reliable, but not if you tend to swipe too fast, 
I have’t tried it on Android though.

Paul
___
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: Swipe gestures on a mobile scroller

2016-11-19 Thread J. Landman Gay

On 11/19/16 2:18 AM, J. Landman Gay wrote:

I have a native mobile scroller handling the vertical scroll of a field.
I want to add swipe gestures to change cards. When swiping, I get a
mouseDown, sporadic mouseMoves (the logging might be interfering, not
sure, but after a couple they stop) and no mouseUp at all.

I tried using touchStart/touchMove/touchEnd instead and the result is
the same. TouchStart always fires, touchMove is iffy, and touchEnd never
happens.

Without the end message I can't calculate the direction. Plain taps work
fine with either set of messages, I do get mouseUp/touchEnd if it's a
tap. It's only swipes that don't report.

The scroller has its hScroll property set to false if that matters, as I
don't want horizontal scrolling but I do want to track the touch direction.



The problem has apparently been around for quite some time:
<http://quality.livecode.com/show_bug.cgi?id=12419>

Anyone have a workaround?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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


Swipe gestures on a mobile scroller

2016-11-19 Thread J. Landman Gay
I have a native mobile scroller handling the vertical scroll of a field. 
I want to add swipe gestures to change cards. When swiping, I get a 
mouseDown, sporadic mouseMoves (the logging might be interfering, not 
sure, but after a couple they stop) and no mouseUp at all.


I tried using touchStart/touchMove/touchEnd instead and the result is 
the same. TouchStart always fires, touchMove is iffy, and touchEnd never 
happens.


Without the end message I can't calculate the direction. Plain taps work 
fine with either set of messages, I do get mouseUp/touchEnd if it's a 
tap. It's only swipes that don't report.


The scroller has its hScroll property set to false if that matters, as I 
don't want horizontal scrolling but I do want to track the touch direction.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Mobile scroller

2016-08-19 Thread J. Landman Gay

On 8/19/2016 3:02 PM, Ralph DiMola wrote:

How can a mobile scroller be in layer behind a field control?


It isn't really, it just acts like that.


I see the scroller getting created and do its usual short flash of the
scroll indicators but you can't use it but instead it sends mouseup to the
field that goes to another card that has scrolling results and that scroller
works perfect on the new card. Scrollers on other cards also work perfect.
I've used the mobile scroller many many times with no problems.
I moved the scroller rect below the field for a test and it is on top of all
the other controls and scrolls the field above as expected.
This happens only on Android. iOS works as expected.


I had to deal with something similar on Android the other day. It wasn't 
quite the same setup as yours, but similar. I worked around it by 
handling touchStart and touchEnd to do the scrolling and let the mouseUp 
in the control handle taps. The mouseUp is paired with a mouseDown and 
only triggers a tap if the vertical difference is more than 10 pixels.


There may be something odd about the Android implementation. You might 
consider submitting your stack to the QCC, it was a puzzle for me too.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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


Mobile scroller

2016-08-19 Thread Ralph DiMola
OK Batman, riddle me this...

How can a mobile scroller be in layer behind a field control?

I see the scroller getting created and do its usual short flash of the
scroll indicators but you can't use it but instead it sends mouseup to the
field that goes to another card that has scrolling results and that scroller
works perfect on the new card. Scrollers on other cards also work perfect.
I've used the mobile scroller many many times with no problems.
I moved the scroller rect below the field for a test and it is on top of all
the other controls and scrolls the field above as expected.
This happens only on Android. iOS works as expected.

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



___
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


CanCancelTouches Kills Mobile Scroller?

2014-03-30 Thread Scott Rossi
Hey mobile dev folks:

I'm wondering if anyone has come across an issue iOS issue of a mobile
scroller becoming non-responsive if its canCancelTouches is set to false.

I've been working with LC 6.5.2 and 6.5.1, and an xCode 7.0 build.  Things
run fine in the simulator.  However, when run on a device (iPhone4s with
iOS7), multiple stacks, including RunRev's original mobile scroller demo
stack, exhibit the problem.  As soon as canCancelTouches is set to false,
the mobile scroller stops working -- no scroll indicators, an no
scrolling.  Setting canCancelTouches  to true restores scrolling.

This would seem to be a blocking problem for handing touchable controls
within a scrolling group, so I wanted to find out if anyone has come
across this before, and more importantly, how to get around it.

I'm preparing to test LC 6.6.0 and xCode 7.1, but thanks in advance for
any suggestions/confirmations.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




___
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: CanCancelTouches Kills Mobile Scroller?

2014-03-30 Thread Stephen MacLean
Hi Scott,

While I haven't had any need to set that property, I've had to use on occasion 
mobileClearTouches. 

Typically when I'm doing something with an iOS control, it can get unresponsive 
and the only way to get the app responding again is to use that.

Not really sure why, so not sure what to report.

Bugs the living daylights out of me because it means you usually have to tap 
the screen again.

Not sure this helps at all, but they might be related?

Best,

Steve MacLean


On Mar 30, 2014, at 4:42 PM, Scott Rossi sc...@tactilemedia.com wrote:

 Hey mobile dev folks:
 
 I'm wondering if anyone has come across an issue iOS issue of a mobile
 scroller becoming non-responsive if its canCancelTouches is set to false.
 
 I've been working with LC 6.5.2 and 6.5.1, and an xCode 7.0 build.  Things
 run fine in the simulator.  However, when run on a device (iPhone4s with
 iOS7), multiple stacks, including RunRev's original mobile scroller demo
 stack, exhibit the problem.  As soon as canCancelTouches is set to false,
 the mobile scroller stops working -- no scroll indicators, an no
 scrolling.  Setting canCancelTouches  to true restores scrolling.
 
 This would seem to be a blocking problem for handing touchable controls
 within a scrolling group, so I wanted to find out if anyone has come
 across this before, and more importantly, how to get around it.
 
 I'm preparing to test LC 6.6.0 and xCode 7.1, but thanks in advance for
 any suggestions/confirmations.
 
 Regards,
 
 Scott Rossi
 Creative Director
 Tactile Media, UX/UI Design
 
 
 
 
 ___
 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: CanCancelTouches Kills Mobile Scroller?

2014-03-30 Thread John Dixon
Scott...

Can't really answer your question as it is asked... All I can say is that I 
always have

   iphoneControlSet scrollID, delayTouches, true
   iphoneControlSet scrollID, canCancelTouches, true

bothe 'delayTouches'  'canCancelTouches' set to true and never seem to have a 
problem with scrollers.


 On Mar 30, 2014, at 4:42 PM, Scott Rossi sc...@tactilemedia.com wrote:
 
  Hey mobile dev folks:
  
  I'm wondering if anyone has come across an issue iOS issue of a mobile
  scroller becoming non-responsive if its canCancelTouches is set to false.
  
  I've been working with LC 6.5.2 and 6.5.1, and an xCode 7.0 build.  Things
  run fine in the simulator.  However, when run on a device (iPhone4s with
  iOS7), multiple stacks, including RunRev's original mobile scroller demo
  stack, exhibit the problem.  As soon as canCancelTouches is set to false,
  the mobile scroller stops working -- no scroll indicators, an no
  scrolling.  Setting canCancelTouches  to true restores scrolling.
  
  This would seem to be a blocking problem for handing touchable controls
  within a scrolling group, so I wanted to find out if anyone has come
  across this before, and more importantly, how to get around it.
  
  I'm preparing to test LC 6.6.0 and xCode 7.1, but thanks in advance for
  any suggestions/confirmations.
  
  Regards,
  
  Scott Rossi
  Creative Director
  Tactile Media, UX/UI Design

  
___
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


Mobile Scroller with Snapping?

2012-12-11 Thread Scott Rossi
Has anybody been able to set up a mobile scroller with scrolling that
snaps to a predefined distance?

I have a set of icons in a vertical scroller which I want to snap to a
multiple of the icon height once the scroller completely decelerates/stops
dragging.  Using 5.5.1, the routine I built works fine in the iOS simulator
but intermittently fails on an iPhone 4 in that the snap doesn't always
occur.  The code is apparently executing correctly, both scrollerEndDrag and
scrollerEndDecelerate messages are being received, but again apparently
intermittently.

I'm trying to submit this week so am under  the gun time-wise.  Thanks for
any suggestions.

Best Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


___
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