Hybrid View

  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    9
    Vote Rating
    0
    cantorh is on a distinguished road

      0  

    Default Using custom classes

    Using custom classes


    Hi,
    I have a toolbar with a text field and two buttons that I’ve made into a class in Designer. I’d like to use this class throughout my project. How does one reuse a class?

    -thanks,
    Hugo.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,098
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    If the toolbar is already a top level class you just need to drag that toolbar into the component you want to use it in.

    You will then be prompted with a link, copy and move dialog. You will want to choose link.

    If your toolbar is not yet a top level class, you can right click on it and choose promote to class. You can then link that toolbar to as many other places you would like.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    9
    Vote Rating
    0
    cantorh is on a distinguished road

      0  

    Default


    Thanks for the reply. That’s exactly what I was trying to do, I created a toolbar in a grid, promoted it to a class and dragged the promoted class into another grid. However, when I looked in the generated code, I noticed the toolbar was added as an item instead of a docked item, a docked toolbar was my intent. I ended up starting over, creating the toolbar in a grid, promoting the toolbar and dragging the original toolbar into my other grids. That seemed to reuse the custom toolbar class.
    -thanks,
    Hugo

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,098
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Hugo -

    I'm not sure of the original workflow you used and whether or not there was a bug there.

    If you are able to reproduce something that you think is acting improperly, please let us know.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    154
    Vote Rating
    3
    coolfish is on a distinguished road

      0  

    Default


    I reckon I have something similar going on, thread below:

    http://www.sencha.com/forum/showthre...omething-wrong

Thread Participants: 2