Changing the identifier of a widget in a stack?
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Changing the identifier of a widget in a stack?
Is there a way to change the <identifier> of a widget that has already been added to a stack? I just registered my developer id on the public version of the extension store and I it will require changing the <identifier> I've used on widgets I've built thus far. The problem is I've already added the widgets to stacks I'm working on. Anyway to update them without having to recreate?
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Re: Changing the identifier of a widget in a stack?
@trevordevore: Hmmm - at the moment no... The 'kind' property for widgets is 'read-only' because strictly-speaking you can't change the kind of the widget (the internal serialized data a widget holds is only pertinent to the type is created as).
In the future we will probably need to add a way to 'redirect' one widget kind to the renamed version - for example if a widget goes from being community to dual-licensed with its own commercial domain; or ownership of the widget maintenance changes.
For now, I'll file a enhancement request for an internal command to do the renaming - unsupported and only to be used 'if you know what you are doing'.
In the future we will probably need to add a way to 'redirect' one widget kind to the renamed version - for example if a widget goes from being community to dual-licensed with its own commercial domain; or ownership of the widget maintenance changes.
For now, I'll file a enhancement request for an internal command to do the renaming - unsupported and only to be used 'if you know what you are doing'.
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: Changing the identifier of a widget in a stack?
That works. Thanks.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Re: Changing the identifier of a widget in a stack?
I've filed this as: http://quality.runrev.com/show_bug.cgi?id=14942
Of course, on reflection I wonder if 'kind' should be read-write... If the OnLoad mechanism for the new kind throws an error for the data it has, the engine can just bind it as if there is no backing data. So, one option might be to make 'kind' read-write, and then it would be a simple loop in script to rekindify the widgets on a stack.
Of course, on reflection I wonder if 'kind' should be read-write... If the OnLoad mechanism for the new kind throws an error for the data it has, the engine can just bind it as if there is no backing data. So, one option might be to make 'kind' read-write, and then it would be a simple loop in script to rekindify the widgets on a stack.
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: Changing the identifier of a widget in a stack?
I like the sound of that. Losing the backing data makes sense if the new kind isn't compatible.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder