wei-spring / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

[BUG] Derive All does not work. #884

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This always happens using the Designer and simulator - its 100% reproducible, 
and happens every time i use the designer. (don't know if it happens on real 
devices, always fix it with manual work-arounds in simulator first.)

What steps will reproduce the problem?
1.  Add a button or other component to a form
2.  give it a new UIID
3.  edit that style, e.g. give it a different alignment or padding which moves 
its position
3.  Run in simulator.
4.  A this point, the unselected button has the correct style, but if you press 
it or select it, you get no style so it "moves". (which is correct behavior)
5.  Goto the style (i.e. UIID) in the theme (only have one theme: Default).  
6.  Right click and select Derive All.
7.  Now it creates copies of your style under Selected,Pressed and Disabled.
8.  Save the Design.
9.  Rebuild the app.
10. Run the simulator.
11. You see the same problem as before, i.e. the selected and pressed styles 
are missing and the button behaves as though those states styles did not exist.
12. Go back to the designer and check the pressed and selected styles are there 
- they are and they correctly derive from the unselected style, they are just 
"invisible" to the app when running.

What version of the product are you using? On what operating system?
Win 7 Pro 64bit.
Designer v 1.1

Please provide any additional information below.
Workaround:

This problem is made significantly worse by the fact that if you delete one of 
the other states bad styles, it also deletes your "master" unselected states 
style.  So if you want to fix the issue, it is more work.  The answer seems to 
be to not derive styels, but to copy and paste the style into each state.  This 
is more work to edit later, but seems to work.

Original issue reported on code.google.com by hob...@gmail.com on 15 Sep 2013 at 9:44

GoogleCodeExporter commented 9 years ago
I have just tested this on an ipod touch 54GB 5th edition.

The "derived" states are not working on the device the same as not in the 
simulator.

Resorting to copy and paste rather than derive for all styles (about 50).

This is a lot of work.

Original comment by hob...@gmail.com on 15 Sep 2013 at 11:32

GoogleCodeExporter commented 9 years ago
In the test I just made, the unselected button has the alighment overridded, to 
make it Right.  In the "dervied" states, which have the Drive set to the 
unselected version, the aliment is not working, its still using left, even 
though alighment is being drived.

Original comment by hob...@gmail.com on 15 Sep 2013 at 11:40

GoogleCodeExporter commented 9 years ago
I have just tried it for background, and that wont derive either.

Original comment by hob...@gmail.com on 15 Sep 2013 at 11:50

GoogleCodeExporter commented 9 years ago
I have also noticed that often, when I save a changed res file, it doesnt 
triger a rebuild.  sometimes, I need to make a really drastic dummy change to 
force a rebuild so I can see a change in the simulator.  I frequencly close all 
my windows, and open eclipse and the res editor, it doesnt help.

Original comment by hob...@gmail.com on 15 Sep 2013 at 11:54

GoogleCodeExporter commented 9 years ago
I have just cut and paste the unselected state style over the top of the pure 
derived ones, and this works.  Derivation is completely broken (for me at 
least).

Original comment by hob...@gmail.com on 15 Sep 2013 at 11:55

GoogleCodeExporter commented 9 years ago
Found a crazy workaround which will probably tell you where the problem is.

You can close and open designer, reboot the machine etc. as many times as you 
want, your derived styles will not work.  But if you open each one in the 
desginer, change nothing, then hit save, then save the res file, magically, 
they work for the first time.

Original comment by hob...@gmail.com on 15 Sep 2013 at 12:36

GoogleCodeExporter commented 9 years ago
Odd. I think I fixed it in SVN. 
Doesn't F5 work in Eclipse?
We have a clean target in the Ant file I'm not sure how its mapped in Eclipse.

Original comment by shai.almog on 16 Sep 2013 at 8:27