-
25 Feb 2012 6:23 PM #1
Containers lose ability to edit name (missing "designer" tab)
Containers lose ability to edit name (missing "designer" tab)
See the two below screenshots.
I have lost the "designer" tab on a sub-container and I am no longer able to edit the containers name.
I have also attached the xds file where this was having issues.
I am using build 298
-
26 Feb 2012 7:02 PM #2
in other words, I am unable to set userClassName on anything besides the top most container... making work with controllers impossible.
-
27 Feb 2012 9:56 AM #3
This is correct behavior as designed.
userClassName is what you have specified to generate as the top level class. In raw javascript coding you would be creating a subclass here.
Are you looking for itemId in order to reference it via a controlQuery?
#myItemIdAaron Conran
@aconran
Sencha Architect Development Team
-
7 Mar 2012 9:16 PM #4
Same issue - description of what I am trying to accomplish
Same issue - description of what I am trying to accomplish
First, I'm new to this forum. If I'm not supposed to reply to closed threads, please scold me but do so lightly. I learn quickly and try not to do the same thing wrong twice :-)
I have noticed the same issue in Sencha Designer. I will explain briefly what I am trying to do and hopefully you can tell me if there's a better approach to doing it.- Starting from a blank Sencha Touch project I drag a carousel into an iphone layout
- The Carousel is now called "MyCarousel"
- Next I drag 2 Panels into the Project Inspector and onto "MyCarousel" so that they appear nested below the Carousel.
- The Panels are now called "MyPanel" and "MyPanel1"
- I would like to rename "MyCarousel" to something more identifiable within the Designer and eventually in the code. (But mostly for while in the designer)
- I can do this by Editing the userClassName and the name that shows up in the Project Instpector changes to match.
- I would like to rename "MyPanel" and "MyPanel1" to something more itendifiable as well.
- Unfortunately I cannot, userClassName is not exposed for the nested panels which I put below the Carousel
- If I drag the Panel up to the top level below "Views" I can then rename it. After that I can then put it back below the Carousel. But that seems like a lot of work and could be error prone if I get more complex.
My second instinct is to ask whether there is another way to go about doing this? For example, being new to the designer and having used many others in the past, it was natural to me to try to drag and drop the Panel onto the Carousel because intuitively the Carousel will be containing or hosting these Panels.
So, a final problem / question summary would be as follows:- How can I rename my UI elements in the Designer?
- Am I correctly understanding the intended functionality?
- Is there a different way to go about this?
- Starting from a blank Sencha Touch project I drag a carousel into an iphone layout
-
8 Mar 2012 8:27 AM #5
userClassName is used to generate the classname that you as a user would define for the javascript class the designer will create.
Each top level instances generates its own javascript class. Child items do not generate their own javascript classes.
If you want to provide an identifier to each of the child items, the proper way of doing this is by setting itemId.Aaron Conran
@aconran
Sencha Architect Development Team
-
9 Mar 2012 7:09 AM #6
Know that you can also set Id but it's not recommended approach. See http://docs.sencha.com/touch/2-0/#!/...ent-cfg-itemId for more details on this
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
-
11 Mar 2012 8:54 AM #7
Let me start by saying I now completely understand the code side of the story. The explanation from aconran was quite helpful. Thanks also to Phil for the additional comment. As that ID is not recommended I would definitely avoid it.
However, the root of the reason for my original question was not the code side. My concern is how to organize and understand on the visual designer side inside Sencha Designer.
In my original question I tried to stay away from making an assumption about the designers behavior, but based on the above posts, it seems safe to assume that the designers visual indicator is directly tied to a classname. Thus, visual elements without a classname will not receive, or be able to receive, any significant indicator that will differentiate them from one another.
Please see the attached screen fragment from the Project Inspector. It shows there are 7 panels in the carousel. They are names MyPanel, MyPanel1, MyPanel2, MyPanel3, MyPanel4, MyPanel5, MyPanel6. Visually, that looks bad. It conveys no information to me about the makeup and layout of my project. For example, visually I cannot tell things like: Which one contains the layout I am interested in? What order are the panels in?
However, I can drag those Panels up into the top level, give them class names, then drag them back under the carousel where they belong. The Project Inspector now looks like in the second attachment. I can now see visually the order of the panels and what's within them.
However, my concern is that since the class name is so closely tied to the visual name in the IDE am I going to be causing problems if I do this?
Regardless of whether it causes a problem or not, it seems to me like we need a way to be able to visually name our graphical elements as I imaging a sufficiently large project would make this all the more important.
Thanks for any help and guidance.
-
12 Mar 2012 9:23 AM #8
In these cases you should be using itemId.
There are cases that we have discussed about creating a designer specific label configuration that does not correlate to code at all but is just for a visual label. The only place that i can think of off the top of my head this would relevant for is proxies.Aaron Conran
@aconran
Sencha Architect Development Team
-
12 Mar 2012 9:53 AM #9
OK, got it. Thanks!
I tried the item ID and it worked just fine.
appreciate the help.
-
11 Apr 2012 11:46 AM #10
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote