So I have a widget I created that I am currently using in several stacks. How do I test and install changes to a widget without messing up my stacks?
Let me give an example... I have a widget where I needed to add "pass onMouseMove" in the script in order to make it move (obviously). So my procedure:
1. Closed and removed from memory all stacks
2. Open builder and uninstalled the existing widget
3. Tested my revision
4. Installed the new version
5. Reopened a stack that was using it
When I reopened the stack , the widget doesn't draw correctly, it just appears as a translucent square. All of the properties in the widget are cleared out. This causes errors to get thrown usually related to the missing properties.
So how do I test and update widgets that I already have installed and used?
Updating a widget in use
Updating a widget in use
Greg (pink) Miller
MadPink, LLC
I'm Mad, Pink and Dangerous to Know
MadPink, LLC
I'm Mad, Pink and Dangerous to Know
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Updating a widget in use
Insert step 4b: Close and restart LiveCode.
If this doesn't help make sure your OnLoad handler is downward compatible,
that is use always a keys-check:
p.s. Did you think of the incompatibility of LC 8/LC 9 widgets?
If this doesn't help make sure your OnLoad handler is downward compatible,
that is use always a keys-check:
Code: Select all
public handler OnLoad(in pP as Array)
if <key> is among the keys of pP then
...
end if
end handler
shiftLock happens
Re: Updating a widget in use
okay, restarting Livecode definitely was the step I needed
Greg (pink) Miller
MadPink, LLC
I'm Mad, Pink and Dangerous to Know
MadPink, LLC
I'm Mad, Pink and Dangerous to Know