I apologize in advance for the length of this post. I've been going through the following lesson:
http://lessons.runrev.com/m/847/l/13672 ... y-keyboard
I have gotten a test application to function as it should in the ios simulator, but i'm unsure how to call out the the field that's been created....
Here is the code used in the lesson:
Code: Select all
local sinputId
on opencard
if environment() = "mobile" then
mobileControlCreate "input"
put the result into sinputID
mobileControlSet sinputID, "rect", "38,726,748,916"
mobileControlSet sinputID, "visible", "true"
mobileControlSet sinputID, "opaque", "true"
end if
end opencard
on keyboardActivated
mobileControlSet sinputID, "rect", "36,320,746,510"
set the rect of graphic "rectangle" to "36,320,746,510"
end keyboardActivated
on keyboardDeactivated
mobileControlSet sinputID, "rect", "38,726,748,916"
set the rect of graphic "rectangle" to "38,726,748,916"
end keyboardDeactivated
Code: Select all
local sinputId
on opencard
if environment() = "mobile" then
mobileControlCreate "input", "userName"
put the result into sinputId
mobileControlSet sinputId, "rect", "8,538,232,562"
mobileControlSet sinputId, "visible", "true"
mobileControlSet sinputId, "opaque", "true"
mobileControlSet sinputId, "label", "message"
end if
end opencard
on keyboardActivated
move graphic "inputback" to 160,304
move graphic "inputback2" to 160,259
mobileControlSet sinputId, "rect", "4,226,316,292"
end keyboardActivated
on keyboardDeactivated
mobileControlSet sinputId, "rect", "8,538,232,562"
move graphic "inputback2" to 160,700
move graphic "inputback" to 160,634
end keyboardDeactivated
I've created a button and used the following code, but have no luck thus far:
Code: Select all
on mouseUp
answer field "userName"
end mouseUp
Code: Select all
on mouseUp
answer mobileControl("userName")
end mouseUp
Code: Select all
on mouseUp
local sinputID
answer sinputID
end mouseUp
Neither of these, nor the other variations of these have yielded any result. I'm sure i'm missing something simple, but can't seem to figure out how to call out to the field that has been created.
Thank you in advance for any assistance (or resources) you can provide.
-Sean