View topic - Loading a Widget from a different Widget or Gadget



All times are UTC + 1 hour


Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 19 Mar 2012, 04:15 

Joined: 12 Jan 2012, 04:10
Is there a Spring command that will load/initialize a widget?

I am looking for the something like the widgetHandler:RemoveWidget(), but with the flexibility to add and initialize any widget (by name or id), once a gadget detects a specific event.

Thanks


Top
 Offline Profile  
 
PostPosted: 19 Mar 2012, 21:36 
Moderator

Joined: 19 May 2009, 20:10
super_g wrote:
Is there a Spring command that will load/initialize a widget?

Spring doesn't know about widget/gadgets. They are purely implemented inside the Lua environment.

Quote:
I am looking for the something like the widgetHandler:RemoveWidget(), but with the flexibility to add and initialize any widget (by name or id), once a gadget detects a specific event.


You might need to override the widget/gadget handler. Take a look at ZK, it implements it's own F11 list.


Top
 Offline Profile  
 
PostPosted: 21 Mar 2012, 01:27 

Joined: 12 Jan 2012, 04:10
I found an easy was to enable or disable widgets using the following Spring Commands:

Spring.SendCommands({"luaui enablewidget <widgetName>"})
Spring.SendCommands({"luaui disablewidget <widgetName>"})


Top
 Offline Profile  
 
PostPosted: 21 Mar 2012, 13:37 
Spring Developer

Joined: 16 Dec 2006, 20:59
Yes. Spring still does not know about the widgets though. These commands are sent to the lua environment and the magic happens there.


Top
 Offline Profile  
 
PostPosted: 21 Mar 2012, 19:16 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
Most often, users want a pragmatic answer. Your stringent technicalities may be exact from a rigorous point of view, but are irrelevant here.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.