Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Friedrich Weber
On 04/04/2024 12:59, Thomas Lamprecht wrote: > Am 04/04/2024 um 12:10 schrieb Friedrich Weber: >> Maybe we could do: >> >> ```js >> extraRequestParams: {}, >> >> constructor: function(conf) { >> let me = this; >> me.extraRequestParams = Ext.clone(me.extraRequestParams); >>

Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Stefan Sterz
On Thu Apr 4, 2024 at 12:54 PM CEST, Stefan Sterz wrote: > On Thu Apr 4, 2024 at 12:10 PM CEST, Friedrich Weber wrote: > > On 04/04/2024 11:23, Stefan Sterz wrote: > > > -- >8 snip 8< -- > > >>> > > >>> i did a quick an dirty test and using a constructor like this seems to > > >>> rule out this

Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Thomas Lamprecht
Am 04/04/2024 um 12:10 schrieb Friedrich Weber: > Maybe we could do: > > ```js > extraRequestParams: {}, > > constructor: function(conf) { > let me = this; > me.extraRequestParams = Ext.clone(me.extraRequestParams); > me.initConfig(conf); > me.callParent();

Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Stefan Sterz
On Thu Apr 4, 2024 at 12:10 PM CEST, Friedrich Weber wrote: > On 04/04/2024 11:23, Stefan Sterz wrote: > > -- >8 snip 8< -- > >>> > >>> i did a quick an dirty test and using a constructor like this seems to > >>> rule out this class of bug completelly: > >>> > >>> ```js > >>> constructor:

Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Friedrich Weber
On 04/04/2024 11:23, Stefan Sterz wrote: > -- >8 snip 8< -- >>> >>> i did a quick an dirty test and using a constructor like this seems to >>> rule out this class of bug completelly: >>> >>> ```js >>> constructor: function(conf) { >>> let me = this; >>> me.extraRequestParams =

Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Stefan Sterz
-- >8 snip 8< -- > > > > i did a quick an dirty test and using a constructor like this seems to > > rule out this class of bug completelly: > > > > ```js > > constructor: function(conf) { > > let me = this; > > me.extraRequestParams = {}; > > me.initConfig(conf); > >

Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Friedrich Weber
On 04/04/2024 10:22, Stefan Sterz wrote: > On Wed Apr 3, 2024 at 11:10 AM CEST, Friedrich Weber wrote: >> Currently, `Proxmox.window.Edit` initializes `extraRequestParams` to >> an object that, if not overwritten, is shared between all instances of >> subclasses. This bears the danger of modifying

Re: [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-04 Thread Stefan Sterz
On Wed Apr 3, 2024 at 11:10 AM CEST, Friedrich Weber wrote: > Currently, `Proxmox.window.Edit` initializes `extraRequestParams` to > an object that, if not overwritten, is shared between all instances of > subclasses. This bears the danger of modifying the shared object in a > subclass instead of

[pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params

2024-04-03 Thread Friedrich Weber
Currently, `Proxmox.window.Edit` initializes `extraRequestParams` to an object that, if not overwritten, is shared between all instances of subclasses. This bears the danger of modifying the shared object in a subclass instead of overwriting it, which affects all edit windows of the current