openField handler has no effect when entering an android native field widget (LC9.0.0 RC1)

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
drkosta
Posts: 34
Joined: Wed May 22, 2013 8:40 pm
Location: Stuttgart / Germany
Contact:

openField handler has no effect when entering an android native field widget (LC9.0.0 RC1)

Post by drkosta » Thu Mar 15, 2018 10:01 am

Hi there,

when I place an android native field widget on my card, I want the text which is in the field be deleted when entering this field. Everthing I tried did not led to desired result.

I even tried just with a simple script:

Code: Select all

on openField
answer "yeah"
end openField
the "textChanged" handler works like a charm.

Any ideas?

Best Regards

Kosta

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: openField handler has no effect when entering an android native field widget (LC9.0.0 RC1)

Post by LiveCode_Panos » Thu Mar 15, 2018 11:34 am

Hi drkosta,

This looks like a bug to me.

Does the following serve as a workaround in your use case? (put it in the card script)

Code: Select all

on keyboardactivated
   set the text of widget "myAndroidField" to empty
end keyboardactivated
Best,
Panos
--

drkosta
Posts: 34
Joined: Wed May 22, 2013 8:40 pm
Location: Stuttgart / Germany
Contact:

Re: openField handler has no effect when entering an android native field widget (LC9.0.0 RC1)

Post by drkosta » Thu Mar 15, 2018 1:48 pm

Hi Panos,

thanks for the fast response.

Unfortunately this handler do not work neither.

I played around with exitField and closeField and figured out that "closeField" message works "exitField" do not. And I'm not sure if closeField works like it was thought to work.

According to LC Dictionary "exitField" message is send when a field loses the focus but the content was not changed by user.

And "closedField" message should have been sent when user has changed the content. But entering the field end exiting without changes seems to send "closeField" message to the engine.

Regards

Kosta

drkosta
Posts: 34
Joined: Wed May 22, 2013 8:40 pm
Location: Stuttgart / Germany
Contact:

Re: openField handler has no effect when entering an android native field widget (LC9.0.0 RC1)

Post by drkosta » Sun Mar 18, 2018 9:05 pm

LiveCode_Panos wrote:
Thu Mar 15, 2018 11:34 am
Hi drkosta,

This looks like a bug to me.

Does the following serve as a workaround in your use case? (put it in the card script)

Code: Select all

on keyboardactivated
   set the text of widget "myAndroidField" to empty
end keyboardactivated
Best,
Panos
--
Shall I file a bug in quality.livecode.com?

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: openField handler has no effect when entering an android native field widget (LC9.0.0 RC1)

Post by LiveCode_Panos » Mon Mar 19, 2018 3:16 pm

Hi drkosta,

Yes please, that would be great.

I tested again and if I add the "keyboardactivated" handler in my card script, it fires every time I click on the native field and the keyboard appears. Not sure why you see different behavior.

RE the openfield message, it is a bug that it is not sent in your use case.

Kind regards,
Panos
--

drkosta
Posts: 34
Joined: Wed May 22, 2013 8:40 pm
Location: Stuttgart / Germany
Contact:

Re: openField handler has no effect when entering an android native field widget (LC9.0.0 RC1)

Post by drkosta » Mon Mar 19, 2018 3:43 pm

Hi Panos,

the keyboardaktivatet handler works in cardscript not in widget script.

But in cardscript I cannot determinate which field was used. There are lot of fields in my card an I want only the one on which was clicked to be deleted. But „mouseup“ messages neither send or received from widget.
Really confusing.

Regards

Kosta

Post Reply

Return to “Android Deployment”