27 Feb 2012 2:08 PM #1
Designer does not store functions with exported components
When I export a component and then import it into another project, the Basic Functions do not appear with it. The event handlers do come over however.
Create a new component,
Add a Basic Function
Export the component
Import into a new project.
Add component to a view.
Look at code for new component. You will see that it does not include the basic function defined above.
27 Feb 2012 2:14 PM #2
Never mind, just realized what's going on here.
The functions are still in the js file that actually defines the component, they just don't show up on the designer anymore. Makes sense.
Sorry for the confusion.
27 Feb 2012 10:52 PM #3
In general I think your right to think they should show up in Designer.Phil Strong
28 Feb 2012 6:45 AM #4
Yeah, probably to reduce confusion, and it was weird too because the event handler did show up and was able to be modified, which I don't think is a good thing either, it means that updates to the base Component won't be reflected in the other projects that use it.
If I have a component that has a click handler in it to do something specific for the component, and I use it in another project, the handler gets put directly into the implementation of the new project. If I later change the click handler in the component, the new project still has the old implementation hardcoded into it.
28 Feb 2012 8:21 PM #5
19 Mar 2012 1:37 PM #6
Hi Bob, thanks for reporting the issue. We have tried reproducing this in a current development build and can't make the issue occur; the function is persisted correctly and re-appears in the inspector after importing. If there are any additional details required to reproduce the issue please let us know, otherwise we'll resolve this as having been fixed already.Jason Johnston
Sencha Architect Development Team