-
Notifications
You must be signed in to change notification settings - Fork 68
LCARS.delete
Aric edited this page Jun 24, 2019
·
5 revisions
Pass either the ID of an element/widget instance or the object itself under LCARS.active
to remove the item from memory. Before the object instance is deleted all of the attached delete functions of the element/widget will be triggered. This allows for custom internal cleanup, reference removals, etc...to happen before the object is removed from memory.
LCARS.delete('buttonSID0ewokltiq')
LCARS.delete(LCARS.active.buttonSID0ewokltiq)
{ type:'title', color:'text-green-4', text:'16:45:31', style:{'font-size':'50px', 'letter-spacing':'5px', 'margin-top':'0px', 'font-family':'LCARS Block'}, receiver:{ updateTime:function(time){ this.set('text', time); } }, arrive:function(){ lcars.app.systems.clock.init(); lcars.app.systems.clock.broadcast[this.data.id] = this.receiver.updateTime; }, delete:{ removeClockBroadcast:function(){ lcars.app.systems.clock.detach(this.data.id); } } },