Page 1 of 1
Changing the identifier of a widget in a stack?
Posted: Fri Mar 13, 2015 4:42 pm
by trevordevore
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?
Re: Changing the identifier of a widget in a stack?
Posted: Fri Mar 13, 2015 5:18 pm
by LCMark
@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'.
Re: Changing the identifier of a widget in a stack?
Posted: Fri Mar 13, 2015 5:19 pm
by trevordevore
That works. Thanks.
Re: Changing the identifier of a widget in a stack?
Posted: Fri Mar 13, 2015 5:34 pm
by LCMark
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.
Re: Changing the identifier of a widget in a stack?
Posted: Fri Mar 13, 2015 5:38 pm
by trevordevore
I like the sound of that. Losing the backing data makes sense if the new kind isn't compatible.