Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
coronasdk-textfield
Advanced tools
Readme
Dressed-up native textfields for the Corona SDK
Setup lua-loader and then just npm install coronasdk-textfield
local TextField = require("coronasdk-textfield")
local function loginform (width, sendbutton)
local group = display.newGroup()
local uid = TextField:new("User name", width, {returnKey = "next"})
group:insert(uid)
local pwd = TextField:new("Password", width, {returnKey = "send", isSecure = true})
group:insert(pwd)
pwd.y = uid.y + uid.contentHeight
local function newvalue ()
if #uid:value() > 0 and #pwd:value() > 0 then
sendbutton:show()
else
sendbutton:hide()
end
end
uid:on("change", newvalue)
pwd:on("change", newvalue)
uid:on("submit", function ()
if #uid:value() < 1 then
uid:focus()
else
pwd:focus()
end
end)
pwd:on("submit", function ()
if #uid:value() < 1 then
uid:focus()
elseif #pwd:value() < 1 then
pwd:focus()
else
authenticate(uid:value(), pwd:value())
end
end)
sendbutton:on("release", function ()
pwd:emit("submit")
end)
function group:reset ()
uid:reset()
pwd:reset()
end
return group
end
The above example shows most of the functions and events in the API. There are a few more options in :new ()
(see the code).
And you could choose interfere with some action when the textfield gets focused, e.g.:
local function focus (field)
if 16 ~= group.y then
transition.to(group, {
time = 400,
transition = easing.outExpo,
y = 16,
onComplete = function () field:start() end
})
else
field:start()
end
end
uid:on("focus", focus)
pwd:on("focus", focus)
Notice that you then have to call :start()
to kick off the keyboard input functionality. If there's no listener for the "focus"
event, the keyboard gets kicked off automatically.
focus ()
functionFAQs
Dressed-up native textfields for the Corona SDK
The npm package coronasdk-textfield receives a total of 0 weekly downloads. As such, coronasdk-textfield popularity was classified as not popular.
We found that coronasdk-textfield demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.