On 09/26/2016 03:35 PM, Dietmar Maurer wrote:
>>                      win.show();
>> +                    win.on('destroy', me.reload);
>>                      me.close();
> 
> Sorry, but why does it make sense to reload a 'closed' window?
> 

the reload function here will reload the store parent grid

when the win window is defined, the parent component pass its own reload
function with context to the download window

// somewhere in the PVE.storage.ContentView             
// initComponent
                
                var reload = function() {
                         store.load();
                         me.statusStore.load();
                        };

                var win = Ext.create('PVE.storage.TemplateDownload', {
                    nodename: nodename,
                    storage: storage,
                    reload: reload
                });


I agree if we had me.reloadParent instead of me.reload the code would be
more readable, so if I will prepare a V2 with better naming

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to