Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 16 of 16 total
Thread Tcheckbox not working on IOS
Thu, May 14 2015 11:55 AMPermanent Link

Matthew Jones

Kane Jun wrote:

> How can i delete my own post?

You cannot on this server. But I think it good that it is here, as it
helps us all learn what to do, and what not to do.
Thu, May 14 2015 2:18 PMPermanent Link

Raul

Team Elevate Team Elevate

<< Kane Jun wrote:
Please disregard all
I did it for some reason but let me check my coding.
Thank you for everything, evertbody.
>>

The touch events (i.e. Touch Start) only triggers on mobile so when running in windows desktop the browsers do not trigger it so there it worked ok since your code never ran.

Raul
Fri, May 15 2015 10:10 AMPermanent Link

Kane Jun

EZ-Tech, Inc

Raul wrote:

<< Kane Jun wrote:
Please disregard all
I did it for some reason but let me check my coding.
Thank you for everything, evertbody.
>>

The touch events (i.e. Touch Start) only triggers on mobile so when running in windows desktop the browsers do not trigger it so there it worked ok since your code never ran.

Raul

Hi Raul and everybody

I worked around with following code and everything works fine.

If I comment out whole procedure (as Metthew suggested), then android phone does not work .
So added one line for iphone.



var     c:tcheckbox;

          c:=tcheckbox.create(self);
          c.caption:=a[i];
          c.tag:=d; inc(d);
          c.font.color:=clblack;
          c.layout.position:=lptopleft;
          c.layout.consumption:=lcbottom;
          c.layout.reset:=true;
          c.parent:=orderdetailform.scrollpanel1;
          c.selectionstate:=ssunselected;
          c.margins.left:=20;
          c.width:=160;
          c.ontouchstart:=CheckBox1TouchStart(c,false,false,false,0,0);




procedure Torderdetailform.CheckBox1TouchStart(Sender: TObject; ShiftKey, CtrlKey, AltKey: Boolean; X, Y: Integer);
begin
 if application.isios then exit; //<===== I added this line
 if tcheckbox(sender).selectionstate=ssselected then
    tcheckbox(sender).selectionstate:=ssunselected
 else
    tcheckbox(sender).selectionstate:=ssselected;
end;
Fri, May 15 2015 11:33 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kane,

<< I worked around with following code and everything works fine. >>

Yes, but it's not a good solution.  You should get rid of the OnTouchStart
event handler altogether - you don't need it.  The check box will work fine
on Android/iOS without it.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, May 15 2015 12:29 PMPermanent Link

Kane Jun

EZ-Tech, Inc

"Tim Young [Elevate Software]" wrote:

Kane,

<< I worked around with following code and everything works fine. >>

Yes, but it's not a good solution.  You should get rid of the OnTouchStart
event handler altogether - you don't need it.  The check box will work fine
on Android/iOS without it.

Tim Young
Elevate Software

Tim

Thanks

I know it's a temporary solution.

but this is the only way I know of that works.

I will  fix it when we have final release
Fri, May 15 2015 1:23 PMPermanent Link

Raul

Team Elevate Team Elevate

<<
Uli Becker wrote:
Application.IsAndroid / Application.IsIOS defined in webui still work
(actually they call "IsPlatformAndroid" /  "IsPlatformIOS").
>>

Thanks - did not notice those. However they are part of a class so unless i'm missing something obvious you cannot call them direct but have to got thru an instance of TInterfaceManager.

Raul
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image