Class 'ToolPanelComp' incorrectly implements interface 'IToolPanel'. Property 'init' is missing in type 'ToolPanelComp' - ag-grid

We are trying to use the enterprise version of ag-grid, but we have this error message. Thanks in advance.
ERROR in
node_modules/ag-grid-enterprise/dist/lib/toolPanel/toolPanelComp.d.ts(4,22):
error TS2420: Class 'ToolPanelComp' incorrectly implements interface
'IToolPanel'. Property 'init' is missing in type 'ToolPanelComp'.

I believe the error is resulting when trying to migrate to their latest v18.
Your problem might be solved with the help of their documentation. Please follow the below link and look for breaking changes:
https://www.ag-grid.com/ag-grid-changelog/?fixVersion=18.0.0
I guess your problem can be related to Ag-1800 specifically.
Hope it helps!

Related

Autofac RegisterAssemblyTypes tries to resolve all public types

Quick question: I've been using autofac with asp.net core in a project and I've noticed that it tries to resolve all types during configuration after updating it to the latest nuget package (going from Autofac.Extensions.DependencyInjection 5.0.1 to 7.0.2). Btw, here's the code that was being used to register the types:
builder.RegisterAssemblyTypes(typeof(Utilizador).Assembly)
.AsImplementedInterfaces()
.AsSelf();
Until now, I wasn't seeing this behavior. The problem with this new approach is that it will try to resolve types that will never be injected through DI. For instance, it complains about public classes that don't have public constructors event though those classes will never be created through DI.
Can someone point me to when this change happened?
Does this mean that now I must filter the types I need explicitly?
Thanks.
This is nothing new.
You can filter those out with something like below:
builder.RegisterAssemblyTypes(ThisAssembly)
.Where(type => type.GetConstructors(BindingFlags.Public).Any())
.AsImplementedInterfaces();

Getting error "self constructor arguments cannot reference unconstructed this" only if class is same name as class file

In a nutshell, if I define a constructor in a class thats named after the same name as the file itself, it returns the following area.
Some example code. Take the filename as ParseWebsiteData.scala for both.
This returns an error.
class ParseWebsiteData(url:String) {
}
This however, works fine.
class Foo(url:String) {
}
The only thing that I'm seeing as the issue are parser bugs from 2013, but this is the latest version of Eclipses's Scala IDE setup so I'm strongly thinking this is not the case, but turns out I'm wrong. Oops :(
As it's still an issue, what are the way(s) to avoid this occurring as I code in the future?
Well, can't tell the root cause but I was getting the same error in Scala Eclipse editor and I just did "project->clean" and it was gone!

MVC4 Add controller error

When I try to add a controller to my WebUI I get the following error:
'DTO.Games' is not part of the specified 'DAL.GamesEntities' class, and
the 'DAL.GamesEntities' class could not be modified to add a
'DbSet<DTO.Games>' property to it. (For example, the
'Dal.GamesEntities' class might be in a compiled assembly
I searched a before asking here but none of the solutions online helped me. I'm working DBFirst. Any code that could help solving this: ask and you shall receive.
Thanks in advance
CODE
Games.Context.cs (contains GamesEntities) - http://pastebin.com/rL9U2eTp

GWT: JsArray and JavaScript object

Am facing an issue while trying to implement an example given over a website.
One of the methods in a class has a signature like this -
private void updateTable(JsArray prices) {....}
And am trying to invoke this method from another method as -
updateTable(JsonUtils.safeEval(response.getText()));
while doing this am seeing a compilation error as -
The method updateTable(JsArray) in the type StockWatcher is not applicable for the arguments (JavaScriptObject)
Though I have just used the exact code displayed in the website, am seeing this error. Not sure what needs to be done. Please help.
The problem has been fixed by making the following change -
updateTable((JsArray)JsonUtils.safeEval(response.getText()));
introduced a casting in the above statement.

Autofac: Is there a hidden debug feature?

I remember I have read somewhere here in SO (maybe I was dreaming) that I can enable a "hidden" debug feature of Autofac, so that it can give me more information on what Autofac is doing in the background.
I asked because I just encountered a bug in my project. After I have added the following code into my AutofacModule:
builder.RegisterAssemblyTypes(typeof(MainWindowViewModel).Assembly)
.AssignableTo(typeof(ViewModelBase))
.EnableClassInterceptors()
.InterceptedBy(typeof(NotifyPropertyChangedInterceptor));
when compile, at:
using (var container = builder.Build())
{
...
}
Autofac throws:
System.NotSupportedException was unhandled. Parent does not have a default constructor. The default constructor must be explicitly defined.
But it didn't tell me which class does not have a default constructor (maybe I have missed something in the output window?). I ended up opened all my ViewModel classes one by one... to check if they have a default constructor.
So it would be wonderful for me if Autofac has a hidden debug feature. If not, is there an automatic way to find all classes which don't have a default constructor?
Thanks
(sorry for my English)
this isn't an Autofac exception - it looks like it might be a WPF one? If you can get the call stack from the debugger when the exception is thrown it should offer a clue.
Cheers!