I’m writing an extension where I’ve created a class that extends St.BoxLayout
, to act as a panel in the extension’s dialog. I want to instantiate it from extension.js by calling it’s constructor and pass in information. Passing a simple value parameter produces the error:
Argument to the constructor of StatusPanel should be an object with properties to set
I expect I’ll need to call it like this:
const panel = new StatusPanel({param1: value});
What should the constructor look like? I’ve tried:
constructor(obj){
this.param1 = obj['param1'];
}
…but it produces the same error. Any help appreciated.