Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-1459 in a recent build.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Duluth, MN
    Posts
    126
    Vote Rating
    4
    badgerb1 is on a distinguished road

      0  

    Default Designer does not store functions with exported components

    Designer does not store functions with exported components


    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

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Duluth, MN
    Posts
    126
    Vote Rating
    4
    badgerb1 is on a distinguished road

      0  

    Default


    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

  3. #3
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,953
    Vote Rating
    65
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    In general I think your right to think they should show up in Designer.
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Duluth, MN
    Posts
    126
    Vote Rating
    4
    badgerb1 is on a distinguished road

      0  

    Default


    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

  5. #5
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,953
    Vote Rating
    65
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Quote Originally Posted by badgerb1 View Post
    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.
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  6. #6
    Sencha User jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    567
    Vote Rating
    20
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    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
    @lojjic
    Sencha Architect Development Team

Thread Participants: 2