Dart confusing TYPE error - html

I am building a web application using dart with web_ui.
Everything was working fine until i added the web_ui pub, and now, when I am trying to run a build.dart file I get an error:
Uncaught Error: type 'AttributeName' is not a subtype of type 'String' of 'name'.
What does this mean?
From what I understand, this means there is somewhere an instance named 'name' of class 'AttributeName' that is extending 'String' class.
I searched my entire project and there is nowhere a class named 'AttributeName', nowhere an instance of 'name'.
I have the latest Dart editor and SDK:
Dart Editor version 0.4.7_r21658
Dart SDK version 0.4.7.5_r21658
EDIT:
this is my build.dart file:
import 'package:web_ui/component_build.dart';
import 'dart:io';
void main() {
build(new Options().arguments, ['web/menyplattan.html']);
}
Also, i updated all the pubs

This message looks like web_ui is failing a type check.
The similar SO question MarioP links to has a stacktrace showing this message coming from within the web ui library itself.
Do you have an xmlns attribute in your html?
Have a look at this web-ui issue.
AttributeName is defined within the html5lib library. Perhaps web-ui is expecting a newer version of this library but getting an older one. Make sure you've done a pub install. You can also try deleting your packages folder and doing a fresh pub install.
This could be caused by out-of-date packages, but it could also be a bug in web-ui. See if you can get a stacktrace and file a bug report, or post it on the web-ui mailing list.

Related

Error when running google heat map in flutter

I'm new to flutter and I'm trying to use this plugin to create a heat map in googlemap google_maps_flutter_heatmap 0.1.1+2
But everytime I run the code, this error appears. I already added the APK KEY to the manifest file and tried flutter clean but its still the same.
E:\~MobileDev\flutter project\myproject\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:32: error: constructor GoogleMapsPlugin in class GoogleMapsPlugin cannot be applied to given types;
flutterEngine.getPlugins().add(new io.flutter.plugins.googlemaps.GoogleMapsPlugin());
^
required: Registrar
found: no arguments
reason: actual and formal argument lists differ in length
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
EDIT:
I tried removing another plugin which is google_maps_flutter: ^0.5.30 . And now it works. Does this mean there are conflicts between this two plugins? Is there anyway I can use them both?
Yes you are correct there are conflicts between the two packages because the name GoogleMaps exists in both packages: google_maps_flutter_heatmap and google_maps_flutter.
If you want to use both of the packages, you will need to import these packages using 'as prefix' to differentiate them from each other. For example:
import "package:google_maps_flutter/google_maps_flutter.dart" as gmaps;
import "package:google_maps_flutter_heatmap/google_maps_flutter_heatmap.dart" as heatmap;
Then you can declare the GoogleMap by prepending one of the prefixes you use. Let's say, you want to use the GoogleMap inside of google_maps_flutter package. Then it will go like this:
gmaps.GoogleMap(
initialCameraPosition: _initialLocation,
),

Fsharp CSV parsing

I'm trying to get this to work
http://fsharp.github.io/FSharp.Data/library/CsvFile.html
But to me it seems like tha CsvFile class and the CSVextionson are removed of the Data lib
I'm running it on Manjaro (Arclinux system)
I'm using the mono compiler (fsharpc)
I got the dotnet core lib
So nothing should be wrong
please help
EDITED
Code
open FSharp.Data
let msft = CsvFile.Load("https://github.com/kam1986/Data-Science-project/blob/master/news_sample.csv")
It is placed in a .fsx file
get hte error message
Fake News.fsx(3,14): error FS0039: The value, namespace, type or module 'CsvFile' is not defined.

Unable to find ProcessingReport class in the Json-schema-validator 2.1.6 but the method JsonSchema.validate returns an object of that type

I am trying to validate a json schema using the json-schema-validator 2.1.6. The class JsonSchema has a method validate(jsonfile) which returns the class ProcessingReport but there is no as ProcessingReport or i am not able to spot it. I tried with 2.1.8 as well but same issue. Can anyone who has used it before pt out what i am missing ?
ProcessingReport report; // No such Class is present in the jar
report = schema.validate(good);
This code is given in one of there examples.
I got the jar from here . I was looking for the version 2.0.1 (which is the stable version) but there was no binary available of that version so i am forced to use a development version.
The ProcessingReport class is present in json-schema-core ( http://fge.github.io/json-schema-core/stable/index.html )
You'll need to add https://github.com/fge/json-schema-core binaries to your path.

Unable to parse JSON error using Twitterizer TwitterStatus.Show method

Running this code:
var statusResponse = TwitterStatus.Show(tweet.Id);
gives an error message: Unable to parse JSON in the statusResponse object and the ResponseObject comes back as null.
Not sure how to fix this. Any ideas?
I run into the same issue today. It seems that you reference a newer version of Newtonsoft.Json in your project (or maybe an other NuGet package included it).
The problem can be fixed by using the Newtonsoft.Json 4.0.5.0 library that is shipped with the Twitterizer project. It needs to be that exact version.

Error: Access of undefined property JSON ... but it IS there

I am developing a Flash application (Flash Player 11 as target platform) that uses the AS3 Facebook API, which in turn uses as3corelib JSON functionality. Or at least it should do so.
However, in spite of including the latest version (.93) of the as3corelib.swc, I still get the "Error: Access of undefined property JSON". I also tried including the sources directly, to no avail.
Any ideas what I am doing wrong?
As I said, the *.swc is definitely included. As is the source code (all at the correct path).
Edit:
I have a more specific error message:
Error: Can not resolve a multiname reference unambiguously. JSON (from C:\Coding\FlashDevelop\Tools\flexsdk\frameworks\libs\air\airglobal.swc(JSON, Walker)) and com.adobe.serialization.json:JSON (from C:\flash_test\lib\as3corelib.swc)) are available.
I know that JSON is included in AIR, but I do not target AIR, so why does it try include the airglobal.swc?
Your problem is that Flash Player 11 and onwards has native JSON support, so the JSON class you are including is likely colliding with the one from as3corelib. Hence the ambiguity problem.
Try removing as3corelib entirely and see what happens.
Specify the full path to the class. Example, code:
...
var jsonData:Object = JSON.decode(loader.data);
...
will be
...
var jsonData:Object = com.adobe.serialization.json.JSON.decode(loader.data);
...