Swipe left/right on JS Form
Hi again,
I thought I would try one last thing and as a result was able to answer
my own question. Just adding the following line in the $init
“Calculate $cwind.$objs.InnerPagedPane.$width as
$cwind.$objs.InnerPagedPane.$width-1
… seems to make it all hunky-dory.
I will let you all know if I get it all working because hopefully it’s a
pretty cool UX!
Cheers,
Reg
On 21/11/17 6:48 am, Reg Paling wrote:
> Hi again,
>
> Replying to my own message because no-one seems to have picked up on
> the first question, so here is the second:
>
> As mentioned below I have a paged pane nested inside another paged
> pane on a JS form. I want the inner pane to open at page 2. I can
> sort of do this by setting the $currentpage of the paged pane to 2.
> But that only seems to work properly once the paged pane can receive
> some sort of event. When the inner paged pane is first displayed, it
> shows up as a blank rectangle. But then if I just touch the pane on
> my phone the fields appear. Similarly in the browser, if I just drag
> the edge of the browser window until I reach a breakpoint, then the
> pane is redrawn and all the fields appear. From then on, the trick I
> described below seems to work.
>
> I have tried all sorts of tricks in the $construct and $init of the
> form, to try to get the inner pane to “wake up”! Things like
> calculating its $visible as kTrue and then kFalse again, and so on.
> So far I haven’t found anything that works. Does anyone have a
> suggestion?
>
> Thanks,
> Reg
>
>
> On 20/11/17 6:16 pm, Reg Paling wrote:
>>
>> Hi all,
>>
>> I have a JS form where I want to enter a header and lines:- choose a
>> course and add students.
>>
>> I have a paged pane where the first page is for the header info
>> (course date etc), the second page is for the detail of one student,
>> the third page is for a list of students entered so far, and the
>> fourth is to finalise the entry.
>>
>> What I want to do is – when the user swipes left or right on the
>> details page, I want to show details for the next or previous line in
>> the list. Does anyone have a really good hint how to trap the swipe
>> left or right?
>>
>> (Actually, I have it sort of almost working using another paged pane
>> nested inside the main one. I have that paged pane’s
>> $scrolltochangepage set kTrue. That at least captures the swipes. I
>> have the details fields all on pane 2, so when a left swipe goes back
>> to pane 1, I subtract 1 from the StudentList.$line and go back to
>> page 2, and similar for a right swipe. But I am having problems
>> getting the form to open properly and show pane 2…)
>>
>> So the first question is, is there a better way to trap the swipes?
>>
>> Thanks,
>> Reg
>>
>
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com