PDA

View Full Version : [FIXED] Designer does not store functions with exported components



badgerb1
27 Feb 2012, 2:08 PM
Hi all,

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.

To reproduce.
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.

Thanks
Bob

badgerb1
27 Feb 2012, 2:14 PM
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.

Thanks
Bob

Phil.Strong
27 Feb 2012, 10:52 PM
In general I think your right to think they should show up in Designer.

badgerb1
28 Feb 2012, 6:45 AM
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.

I.E.
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.

Thanks
Bob

Phil.Strong
28 Feb 2012, 8:21 PM
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 ot

This is by design, though I agree there is need to share "libraries" across projects and companies. Expect features like this later this year.

jjohnston
19 Mar 2012, 1:37 PM
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.