Closed jjjesus closed 11 years ago
I added the print lines to widget.lua and it looks like they show that MOAIKeyboard is nil?
function TextInput:onFocusIn(e)
TextInput.__super.onFocusIn(self, e)
if MOAIKeyboard then
MOAIKeyboard.setListener(MOAIKeyboard.EVENT_INPUT, self._onKeyboardInput)
MOAIKeyboard.setListener(MOAIKeyboard.EVENT_RETURN, self._onKeyboardReturn)
if MOAIKeyboard.setText then
MOAIKeyboard.setText(self:getText())
end
print("Calling MOAIKeyboard.showKeyboard()")
MOAIKeyboard.showKeyboard(self:getText())
else
print("No keyboard")
InputMgr:addEventListener(Event.KEY_DOWN, self.onKeyDown, self)
InputMgr:addEventListener(Event.KEY_UP, self.onKeyUp, self)
end
end
I/MoaiLog ( 6242): Draw: 5 I/MoaiLog ( 6242): No keyboard I/MoaiLog ( 6242): FocusIn!
MOAIKeyboard seems to be an object on the Windows host. On Android, I had to use MOAIKeyboardAndroid and particularly the showKeybaord, setText, and getText methods. And be aware that if you use the keyboard extensively while there is other lau/C++/java traffic, you can expect your app to terminate abnormally. The AKU call in the Android host needs to be synchronized. Once I did that, my app no longer crashes with keyboard activity.
Lynn (D)
On 8/9/2013 11:10 PM, John Jesus wrote:
I added the print lines to widget.lua and it looks like they show that MOAIKeyboard is nil?
function TextInput:onFocusIn(e) TextInput.__super.onFocusIn(self, e)
if MOAIKeyboard then MOAIKeyboard.setListener(MOAIKeyboard.EVENT_INPUT, self._onKeyboardInput) MOAIKeyboard.setListener(MOAIKeyboard.EVENT_RETURN, self._onKeyboardReturn) if MOAIKeyboard.setText then MOAIKeyboard.setText(self:getText()) end print("Calling MOAIKeyboard.showKeyboard()") MOAIKeyboard.showKeyboard(self:getText()) else print("No keyboard") InputMgr:addEventListener(Event.KEY_DOWN, self.onKeyDown, self) InputMgr:addEventListener(Event.KEY_UP, self.onKeyUp, self) end
end
I/MoaiLog ( 6242): Draw: 5 I/MoaiLog ( 6242): No keyboard I/MoaiLog ( 6242): FocusIn!
— Reply to this email directly or view it on GitHub https://github.com/makotok/Hanappe/issues/92#issuecomment-22433070.
First, I get a MOAIKeyboardAndroid. There is not it?
local MOAIKeyboard = MOAIKeyboardAndroid or MOAIKeyboardIOS
I will work with my Nexus7. However, there is a bug in the Android host.
It is necessary to synchronize the MoaiKeyboard.
I guess I had a pretty old hash from the moai-dev repo and it did not even have the MOAIKeyboardAndroid class in it.
However, the latest moai-dev repo does not build for Android. Even the STABLE branch does not build for Android. It makes me really start to hate MOAI.
Do you know of a stable build of moai-dev for Android that includes the MOAIKeyboardAndroid in it?
I found the same thing when I started (root would not build). So I dropped back to Version-1.4p0 as my build and it's been working as well as it's coded.
Lynn (D)
On 8/10/2013 1:47 AM, John Jesus wrote:
I guess I had a pretty old hash from the moai-dev repo and it did not even have the MOAIKeyboardAndroid class in it.
However, the latest moai-dev repo does not build for Android. Even the STABLE branch does not build for Android. It makes me really start to hate MOAI.
Do you know of a stable build of moai-dev for Android that includes the MOAIKeyboardAndroid in it?
https://github.com/moai/moai-dev
— Reply to this email directly or view it on GitHub https://github.com/makotok/Hanappe/issues/92#issuecomment-22434669.
If you want to try in the latest build, please refer to the following repository. Android also will work.
There is a big flaw Android host. I am creating a host of fast and stable.
I have created almost Android host. Operation of the keyboard would also stable at high speed.
However, it does not improve the way the build. I would recreate it with the Rake.
My keyboard (Samsung Galaxy S4, Android 4.2+) does not pop-up when I want to enter text into the widget.
I am running the build from flower-extensions.
I can see the "FocusIn!" callback is getting fired, but, because no keyboard, I can't enter anything into the TextInput.
Can you help me?