PDA

View Full Version : [FIXED] Build 360: Removal of override doesn't remove requires reference in application



smcguire36
4 Apr 2012, 10:44 AM
My colleague and I ran across an interesting bug today in build 360.

We have a designer project (ExtJS 4.x) that has a panel with an override. The override is listed in the requires section of the application class. We then removed the override from that class because we had moved the custom code we had in it to another class. After saving the project, we compared the generated code to the code that we have in our web development workspace and noticed that the reference in the 'requires' section of the application class for the override that we just deleted was still listed.

We then closed the designer and reopened it and the errant reference was now gone. It looks like you are not cleaning up the application references when deleting an override file but you are cleaning it up when you are loading/opening the project.

I don't have a designer project to upload that shows the problem but I have been able to reproduce the problem using these steps:


Create a ExtJS 4.x designer project.
Add a panel to the project.
Create an override for the panel.
Verify that the override is now in the application.requires array.
Delete the override for the panel.
Verify that the override is STILL in the application.requires array.
Save the designer project.
Close the designer project.
Reopen the designer project.
Verify that the override is NOW gone from the application.requires array.


I would think that the expected behavior would be that the reference in the application.requires array would be deleted as soon as the override is deleted.

aconran
4 Apr 2012, 10:53 AM
I believe you that there may be a bug here. However following the above steps at step 6, the override is gone.

How are you deleting the override? Are you going to the Panel and clicking remove override?

smcguire36
5 Apr 2012, 7:13 AM
Yes, that is how I was deleting the override.

Hmmm. Interesting. I loaded the designer just now to retest and it worked correctly this time. After removing the override I clicked on the application item in the project inspector and the code does not show the override item in the requires list now.

I just realized what I did differently this time. This time I neglected to save the project before removing the override. So to confirm, I created the override on my panel then I SAVED the project AND then clicked on application item to show the following:



Ext.application({
requires: [
'WageViolation.view.override.MyPanel'
],

views: [
'MyPanel'
],
autoCreateViewport: true,
name: 'WageViolation'
});


Then I went back to my panel, removed the override then went back to the application again and it STILL showed the requires section as shown above!

If I create the override, view the application then remove the override (without saving the project first) it DOES properly delete the requires item from the application.

And I can reproduce this each and every time I try it.

aconran
5 Apr 2012, 7:27 AM
Thanks, we'll take a look.