Could not find a tree control for the tree - angular-material

I am facing an error for sample code I am using angular 6 and angular material for application design:
<mat-tree>
<mat-tree-node> parent node </mat-tree-node>
</mat-tree>
Error Message:
Error: Could not find a tree control for the tree
any help much appreciated.

The documentation on Material Angular is not super clear about it...
You need tho specifie a [treeControl]="nestedTreeControl" of the type NestedTreeControl<FileNode>;
If you go to Material Angular Tree Component and check the code you will understand easily.

In case you really want to work with a flat tree then this error also appears when you accidentally use <mat-nested-tree-node> instead of <mat-tree-node>.

Related

Use Beamer package with Get package

So In general everything works for me, nevertheless I get an error in my console regarding Getx & Beamer types
Expected a value of type 'GetNavConfig', but got one of type
'RouteInformation'
I think that I know where the RouteInformation comes from:
List<BeamPage> buildPages(
BuildContext context, RouteInformationSerializable state) {
return [HomePage.beamLocation];
}
it is an argument of the buildPages() method, that has to be implimented due to the abstract Beamer class.
On the other hand I think that the
GetMaterialApp
expects a GetNavConfig, but gets a RouteInformation. Im not really sure whether the things that I interpreted are correct. So I have no idea how to do something against the error. How could I fix the problem?
Well, since you're trying to rely on the beamer package instead of the Getx routing management feature, then you do not need the GetMaterialApp, you need to just use the MaterialApp, and for the beamer you need to use the MaterialApp.router.
Getx is a package that offers separate features, you could get state management and dependency injection... working fine without GetMaterialApp.
However, this means that you will not be allowed to use navigation methods such as Get.to() and Get.toNamed(), you cannot use the Get.context, and you cannot use the Getx's bottom sheet and dialogs.

How can find what is included in the #containment annotation?

How can find what is included in the #containment annotation? I can not find that in the documentation online, that refers only to grammar-spec and nothing more? I'm talking about trying to obtain information/facts from the M3 model..
As an example:
scheme=="java+variable" or some other condition is used in a comprehesion to filter, how do you know what can be used to find certain thing??
Thanks
The documentation is not complete, but these pages are relevant:
http://tutor.rascal-mpl.org/Rascal/Libraries/lang/java/m3/m3.html#/Rascal/Libraries/analysis/m3/Core/Core.html
http://tutor.rascal-mpl.org/Rascal/Libraries/lang/java/m3/m3.html
I would also have a look at the code in these files:
https://github.com/cwi-swat/rascal/blob/master/src/org/rascalmpl/library/lang/java/m3/Core.rsc
https://github.com/cwi-swat/rascal/blob/master/src/org/rascalmpl/library/lang/java/m3/AST.rsc
They can be found in the rascal navigator view in Eclipse as well. In particular the core file contains all to know about the relations and locations in the java m3 model.

cakephp highchart fatal error while rendering

Here I am, again. With another question concerning cakephp-2.5 and the plugin 'highcharts'.
I've been looking at the demo's an all the different things I could find were the extendings from the controllers. But... that isn't required because it's a plug, am I right?
So, I have included th plugin to my loadings inside the bootstrap file, and when I'm trying to render my HighChart I'm receiving the following error;
Error: Chart: "1" could not be found. Ensure that Chart Name is the same string that is passed to $this->HighCharts->render() in your view.
But the demos are working fine! Any idea what I f*cked up? The names are the same, I even renamed them to 'asd' ( both! ) and it still doesn't work. ^^"
I know this is an incredibly late response but for the benefit of those still experiencing problems with this, the CakePHP 2.* Highcharts plugin has been updated and is compatible up to CakePHP version 2.5.7.
Do note however that in order to maintain product name consistency throughout the repo, all previous references to "HighCharts" have been changed to "Highcharts" and "high_charts" is now simply "highcharts" . So for eg. you now have to call $this->Highcharts->render() where before you would have used $this->HighCharts->render().
The plugin was not yet compatible with CakePHP 2.5. Right now as we speak the developer is working on a new release for 2.5. :)
In CakePHP 2.5, you can avoid the error above and render your chart by calling it.
For example from within index() within your controller, use:
$this->bar();
In this example, bar() is the name of the function containing your chart.

Domain.GetDomainsById not working in Umbraco 6

I'm trying to get the language from the current node but are unable to get this working.
umbraco.cms.businesslogic.web.Domain.GetDomainsById(
umbraco.uQuery.GetCurrentNode().Id
).Id
This will return 0 at all times. Any advice where to start looking or are there other methods to acquire the current language id, thanks!
After some extensive digging in the well functioning dictionary classes I found the UmbracoCultureDictionary library that contains useful stuff like this
new umbraco.MacroEngines.UmbracoCultureDictionary().Language.id
Currently obsoleted and the referenced class Umbraco.Web.Dictionary.DefaultCultureDictionary is Internal, hence the following approach is probably the most compatible at the moment
umbraco.cms.businesslogic.language.Language.GetByCultureCode(
System.Threading.Thread.CurrentThread.CurrentUICulture.Name
).id
umbraco.cms.businesslogic.language.Language.GetByCultureCode(
System.Threading.Thread.CurrentThread.CurrentUICulture.Name
).FriendlyName
umbraco.cms.businesslogic.language.Language.GetByCultureCode(
System.Threading.Thread.CurrentThread.CurrentUICulture.Name
).CultureAlias

Is it possible to inline Web_UI components?

I have a habit of taking things to the extreme...
I also like the idea of wrapping structural sections of the site in custom semantic wrappers.
So when I started building web_ui components I ended up with something like this in my main entry page:
<x-container_fluid>
<x-header_fluid>
<x-site_header>
</x-site_header>
</x-header_fluid>
<x-old_browser>
</x-old_browser>
<x-home>
</x-home>
<x-footer_fluid>
<x-site_footer>
</x-site_footer>
</x-footer_fluid>
</x-container_fluid>
This works like a charm with the one exception being that on each page load the time lapse between 'Page Load' and 'Content Load' causes the browser to flash white until the controls render.
I 'think' my only option is to back off the dime a bit and move the structural bits back into the root page and instead add 'loading...' type placeholders anywhere there is a control that requires render/init cycles.
I'm wondering if there is any way (opt in?) to get the components to compile their templates into the hosting page at build time?
Any and all suggestions welcome!!
I'm wondering if there is any way (opt in?) to get the components to compile their templates into the hosting page at build time?
Not sure if this is going to give you exactly what you need but it is a very interesting lazy-loading technique that just may help:
http://googlecode.blogspot.co.uk/2009/09/gmail-for-mobile-html5-series-reducing.html
http://jsperf.com/stripoutcommentblock
Tom

Resources