If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
Help requested with Jive/Lua/Applets again: popup messages
I found a different implementation of a popup message display (in the Screenshot applet), and put it into a standalone function. This version disappears after the specified number of milliseconds. I'm assuming the problem with the earlier version is in the 'showBriefly' method, but since the version below works I can worry about that later.
Code:
-- This is a simple on-screen message.
function mypopup(self, msg, millis)
local popup = Popup("toast_popup")
local group = Group("group", {
text = Textarea('toast_popup_textarea',msg),
})
popup:addWidget(group)
popup:addTimer(millis, function()
popup:hide()
end)
self:tieAndShowWindow(popup)
end
Help requested with Jive/Lua/Applets again: popup messages
I'm writing an applet for use on a Joggler running Jivelite under Ubuntu 18.04. The code from the Doomsday example in the wiki (here) seems to produce a popup message, but it stays on screen indefinitely, regardless of the number of milliseconds that I specify.
Code:
function warnMasses(self, warning)
log:info(self:string(warning))
-- create a Popup object, using already established 'toast_popup_text' skin style
local doomsday = Popup('toast_popup_text')
-- add message to popup
local doomsdayMessage = Group("group", {
text = Textarea('toast_popup_textarea',self:string(warning)),
})
doomsday:addWidget(doomsdayMessage)
-- display the message for 3 seconds
doomsday:showBriefly(3000, nil, Window.transitionPushPopupUp, Window.transitionPushPopupDown)
end
I've tried various values, in case the units aren't actually milliseconds, but the only way I can clear the message is to back out of the current window. The window behind the message stays active, and touching the popup message selects the menu item on the window behind.
I'm calling this function from within the checkbox function with a call of the type:
Code:
self:warnMasses("Warning" .. device)
Any ideas what I could be doing wrong? I noticed the same behaviour with an Applet that I did not write, so could there be an incompatibility with Ubuntu 18.04?
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: