Adding globally defined objects for Intellisense and linting to Monaco Editor in javascript/typescript - intellisense

I have a working Monaco editor in a React app that correctly underlines out javascript errors.
I am trying to register an object called data that I have defined as a JSON schema, so that:
Typing the letter 'd' in the code editor would prompt intellisense to suggest data
Intellisense would correctly suggest all the properties of the data object, and the properties of all of its child properties according to the JSON schema
The editor does not show an undefined variable error when data is used.
I have tried to use monarch to register data as a keyword but am only managing to handle the coloring and error handling, not the properties suggestion.
I also looked at registerDocumentSymbolProvider. registerCompletionItemProvider and registerDeclarationProvider (I think the last one will help with intellisense but not with getting rid of the undefined error) but I don't understand what the purpose of each are and the documentation only defines their usage with sentences like "registers a document symbol provider" which I haven't so far found very helpful.
Would appreciate any help with this. I am excited to use the more advanced features of this great tool but the steep learning curve and my inability to find information has left me pretty disheartened so far!

Related

Does the Highcharts-Vue wrapper support 'gauge' and 'heatmap' chart types?

https://github.com/highcharts/highcharts-vue
I don't see examples of these in the demo and there is nothing mentioned in the docs. I'm wondering if it is simply not possible or just not demoed because of their more complicated nature.
I will also need to use Charts appendData prototype to make a line chart real-time. Is this possible using the wrapper? I'm thrown by the following in the docs but not sure it it's directly related;
You can access the Chart object instance if necessary (e.g when need
to get some data or use any of Chart.prototype functions), by calling
specific Vue component instance chart field, but it is not supported
to update the chart using its built-in functions
Indeed, the highcharts-vue package supports all official modules included in Highcharts, so it's not necessary to produce every demo from demos site using Vue wrapper. I made the examples with gauge and heatmapseries specially for you, so please take a look on them.
I will also need to use Charts appendData prototype to make a line chart real-time. Is this possible using the wrapper?
A component is watching for changes on provided chart configuration, so if you will update your data (e.g by pushing new points into a series.data), then highcharts-vue will detect it, and automatically update the chart. That's the most recommended way of implementation. If you would like to use some Chart's or Series prototype functions, of course you can do that, but please note that causes inconsistency between the chart data and the data defined within component. Just need to access chart's reference like it is described in Chart object reference section.
Live examples:
https://codesandbox.io/s/vue-template-uqu1p (Gauge),
https://codesandbox.io/s/vue-template-8z2f5 (Heatmap)

Adding "properties" to objects in a Blender scene

I am just starting my dive into Blender coming mainly from Quake's Radiant. I am trying to research whether it will fit the need I have for a level editor replacement. So with that in mind, here is my question:
What is the best method for creating and storing a set of prefab "entity" objects such as health packs, ammo pickups, and "moveable" objects such that they have a set of "properties" that can be changed within Blender?
I have found this page, but I am still getting lost as to how to integrate them on a per object basis and achieve the desired result:
https://docs.blender.org/manual/en/dev/editors/properties_editor.html
Note: It is not my goal to use the Blender game engine - just attach values to things for me to export to my own engine.
Edit1: Found an article discussing the topic although it seems very outdated:
https://www.gamasutra.com/blogs/IwanGabovitch/20120524/171032/Using_Blender_3D_as_a_3d_map_editor_rather_than_programming_your_own_from_scratch.php
Example:
// entity 105
{
"inv_item" "2"
"inv_name" "#str_02917"
"classname" "item_medkit"
"name" "item_medkit_11"
"origin" "-150 2322 72"
"triggerFirst" "1"
"triggersize" "40"
"rotation" "0.224951 0.97437 0 -0.97437 0.224951 0 0 0 1"
}
While we can manually add custom properties to any object, these are added to the specific object so can be unique to each object.
A better way of integrating new properties is to use bpy.props, these can be added to an objects class in blender, this means every object will have the same properties available.
You can setup a custom panel to edit your properties, like this simple example. Both the properties and panel as well as your object exporter can be defined in an addon which you can have enable at startup so that it is available every time you run blender. An addon also makes it easier for you to share your game editor with others.
The link I found seems to be the best option and allow for the most flexibility. The source code for the Super Tux Kart plugins serve as a great reference implementation:
https://sourceforge.net/p/supertuxkart/code/HEAD/tree/media/trunk/blender_26/

What 'expression:' property in QML Item

I've inherited a collection of mostly undocumented QML code. I'm new to QML, and I'm struggling to understand this code. In particular, the construct
expression: "connected == false"
occurs frequently in various items, but I can't find any documentation on what this property does. It does not seem to be defined anywhere in the existing code collection, so I'm assuming it's part of QML, but I'm having no luck turning it up anywhere.
It looks as though all items using this construct are backed by C++ classes. However, "expression" is not defined as a QPROPERTY anywhere in the C++ code.
Nope, there's no such property in QML. You'll have to look into the QML file for the type that it's used in, or the C++ if it's declared there.

UWP Relativepanel bound to UiElement doesn't work like RelativePanel with propertie = UiElement

We are developing a Windows10 Universal App (UWP). We have huge issues related to how RelativePanel behave depending of syntax and pc.
We have dynamic data response from a web service and we have to display a dynamic structure of UI controls to render the GUI.
We are trying to use RelativePanels with child elements composed of ItemsControls rendering different type of sub data (Addresses, Phones, etc..).
The ItemTemplate of each ItemsControl' item is a Template composed of a RelativePanel.
Now, the weird stuff happened differently between design and runtime.
At design time, when we want to set Target UIElement of the RelativePanel, we can use the following syntax:
Ex: RelativePanel.Below="EntryMobileNumbers" or
Ex: RelativePanel.Below="{Binding ElementName=EntryMobileNumbers}" />
They are supposed to both work but they don't.
For some RelativePanels’ child elements, if we use the first syntax, the xaml designer bugs and display weird error message
about “value must be of type UIElement”.
Looked on forums for this type of Xaml error and it seems for some developers it’s better to use the second syntax with the Binding.
The good side of it is with that the design is not displaying the squigglys and the error BUT the pb is at Run-time;
the result is wrong and some elements are overlapping.
With syntax 2
With syntax 1
We have also different issues between dev pc’s. With the VS2015 Enterprise installed on all pc’s,
some are displaying squigglys or crash the Xaml Designer with Syntax 1 and some are not.
We also tried to update VS2015 with yesterday’s RC1. It fixed the issues on one of the Pc and not on the others.
PS. All samples out there are very simple. I would very happy to see a "real life" application.
Like e.g. Money from the store to see how layout are managed
RelativePanel.Above="{Binding ElementName=SubTitleDesktop}"
instead of
RelativePanel.Above="SubTitleDesktop"
and it will helps you get rid off errors

TypeScript Intellisense works differently if I define Object in Different Ways

I am trying to convert some existing JavaScript code by using TypeScript, One example I am using is to create Highcharts classes, the Highcharts definition is from https://github.com/borisyankov/DefinitelyTyped/blob/master/highcharts/highcharts.d.ts
We all know HighchartsOptions has a property title.
If I define the object in this way, I have intellisense
But if I define object this way
I don't have the intellisense.
Any specific reason why Visual Studio behaves differently?
It's just a bug. See this issue on CodePlex to track when it gets fixed.