dart,dart-polymer,paper-elements
I have the following code following the examples at https://github.com/dart-lang/polymer-core-and-paper-examples/blob/master/web/paper_dropdown.html and https://github.com/dart-lang/polymer-core-and-paper-examples/blob/master/web/paper_dropdown.dart EDITED .html <paper-dropdown-menu label='Click to select..' on-core-select='{{onCoreSelectCountryHandler}}'> <paper-dropdown class='dropdown'> <core-menu id='country' class='menu'> <template repeat='{{country in countries}}'>...

string,dart,diacritics,unaccent
I'm trying to convert some strings that are in Czech, Spanish, French etc. I'd like to take out the accent marks in the letters while keeping the letter. (E.g. convert é to e, č to c, Ž to Z, ñ to n) What is the best way to achieve this?...

eclipse,playframework-2.0,dart,dart-pub,typesafe-activator
I'm developing a relatively simple web app using play framework for the server and dart for the client. I'm using eclipse. Development and debug are fine on their own but how do to get them to work together? Play has its own web server (activator) that knows how to load...

dart,dart-polymer
Is it ok to access @observable variable directly from other object, without making it @published and defined as polymer element attribute? For example, I have a custom element, defined without any data binding: <my-element id="my"></my-element> and, on response to some external event in it's parent element, I can do something...

debugging,intellij-idea,dart
I would like to know if it is possible to debug a client side web application using IntelliJ Idea 14.1+. Until the moment I only have found some tutorials for Webstorm and IntelliJ Idea Ultimate Edition....

dart,httprequest
I need to set a custom header in my HttpRequest in order to use encryption in an S3 bucket. The header which I want to set the header x-amz-server-side​-encryption​-customer-algorithm but I always get an SyntaxError: An invalid or illegal string was specified. 'x-amz-server-side​-encryption​-customer-algorithm' is not a valid HTTP header field...

javascript,html,dart,polymer
You may know that I totally fell in love with Dart and Polymer and once again, I have a question addressing those two technologies. My application is a fairly compex polymer app written in Dart. There are some sort of "pages" whereas a page is shown once the user performed...

dart
When I run pub build, pub puts the compiled app into build/web. Is it possible to configure my pubspec.yaml file to change the default output directory to, say, prod? EDIT: I'm trying to avoid having to use the --output switch each time....

object,syntax,types,dart
I have the code if(querySelector('#username').value!="") and it is working. But Darteditor warns me, that the getter 'value' is not defined for the class 'Element'. I know, that what the querySelector returns is an InputElement and therefore, my question is only for reasons of beauty and to remove the warnings. How...

ajax,google-chrome,amazon-s3,dart,cors
I know guys, there are tons of questions about the Amazon S3 Buckets and CORS. But please, let me add mine. So I'm writing an application in Dart and I am performing an ajax request to a resource which is hosted on S3. I originally wanted to grab the first...

inheritance,dart,dart-editor,abstract-methods
I'm implementing an inheritance hierarchy in which derived-class construction consists only of a call to the base-class constructor. The base-class constructor then calls method(s) implemented only in the derived-class. I have a basic implementation, but DartEditor of course complains about the missing methods in the base class. How can I...

dart,dart-polymer,shadow-dom
I read Polymer API developer guide, but unfortunately it has examples only for JavaScript developers. Some examples I try to port into Dart, but in this case I get fail. Please, go to https://www.polymer-project.org/0.5/docs/polymer/polymer.html#global (Section Supporting global variables). Here is a clip from the documentation: elements.html <polymer-element name="app-globals"> <script> (function()...

dart,dart-polymer
I have a dart + polymer app, which I have uploaded to my home page. The entry point is not index.html. It works fine. I have now developed a home page, index.html, again in polymer and dart. Essentially, it's another app of course. It's n the same top level folder...

dart,dart-html,dart-unittest
I'm running dart test using test library. pub run test -p dartium When this command is executed I'm getting below error, I have dartium and dart sdk downloaded and in system path. Failed to start Dartium: No such file or directory Command: dartium --user-data-dir=/tmp/dart_test_cwDGGO ...

dart,google-cloud-endpoints
Can't use my model file generated with the discoveryapis_generator. It ask for a http.client to be used, but it's from dart:io, and i m trying to use it in a web app static YoupipeApi api = new YoupipeApi(new http.Client()); //cant work on webapp Failed to invoke tokenLoaded callback: Unsupported operation:...

postgresql,dart
To test my connection to the database I wanted to simply add some hard coded data to one table. Here is my approach. In the main.dart file there are only 2 problem related rows DatabaseUtility dbUtil = new DatabaseUtility('postgres', 'kewoziwa', 'auctionDB'); dbUtil.insertIntoUsers({'login': 'dartUser', 'password': 'passMePlease'}); In the first row I...

c,memory,dart,dart-native-extension
I'm learning to write a native extension and I noticed an odd occurrence. When I allocate a multidimensional array and access it like so: (excuse any messy C code and bad practices I might be using unless they're likely the cause of my error. My C is not-so-great) int table[rows][cols];...

dart
trying to block the execution within a setter until the filed value changes and i know that it will change within a few microseconds, to demonstrate the problem i wrote: import 'dart:async'; void main() { new Timer.periodic(new Duration(seconds:1),(t)=>print(Store.x)); new Timer.periodic(new Duration(seconds:3),(t)=>Store.x='initalized'); } class Store{ static String _x = null; static...

http,http-headers,dart
When using dart on the browser (no dart:io) is there a ready to use way, to convert the string returned by req.getAllResponseHeaders(), where req is a HttpRequest, into a dart Map. I was a bit surprised by the fact that there is no ready method here, since all http related...

mysql,dart
I'm trying to execute some queries which have a reference as foreign keys on each other, so I have to wait until the outer future is finished. This algorithm is placed inside a function which returns a future. Future<List<int>> newEntry(Session session) { bool success = true; List<int> error = Helpers.formatJsonAndEncodeUtf8(...

dart,dart-mirrors,dart2js,dart-sdk
The following code executes fine on the VM, but fails with "'_ListConstructorSentinel' is not a subtype of type 'int'" when converted to javascript via Dart2JS. I'm using "pub run test -p chrome " to run the code. import "dart:mirrors"; main() { TypeMirror tm = new TypeToken<List<String>>().typeMirror; (tm as ClassMirror).newInstance(const Symbol(""),...

security,authentication,websocket,dart,dart-html
I'm trying to establish an authenticated websocket connection, and this question is a sibling to similar question for server part. How I can add extra headers when I establish a websocket connection from browser? I'm trying to use dart:html's WebSocket object to connect to server requiring a header authentication: containing...

javascript,dart,google-chrome-app,content-security-policy
In my web page for Dart amount this script: <script src="https://test.net/test/test.js"></script> but when you launch the application it gives me the following error: Refused to load the script 'https://test.net/test/test.js' because it violates the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src'...

dart,dart-pub
I might be having a mental eclipse, but it's hard for me to do the simplest thing: write a simple library and use it. (I want to do this all locally, without publishing the library, etc.) I've browsed through the list of pub commands and none seems to install a...

dart
Given a class with final private field _bar: class Foo() { final Bar _bar; Foo({Bar bar}) : _bar = bar { //error: list cannot be used as setter, it is final _bar = new Bar(); } } Attempting to set it in the parameter list results in this error //error:...

javascript,dart
I've been trying to create methods dynamically from strings using Dart to no avail. String example: "(String str) => return str.length;". The idea is to allow users to create their own functions to apply to a given string. The only thing I've found is NoSuchMethod which does not seem to...

dart,dart-shelf
incompatibility when running dart rpc and shelf (with shelf_rpc) related to headers which are lists (and not Strings). It seems that there is an incompatibility when running dart rpc and shelf (with shelf_rpc) related to headers which are lists (and not Strings). Error thrown is ( for shelf[0.5.7], shelf_rpc[0.0.3], rpc[0.4.2]:...

dart
I have been trying this the whole day: I use initialize in several places in my library and then I have some example code in several HTML+Dart files. For one set of html+dart it works for another it does not - it simply never calls the init methods even when...

dart,future,dart-async
I'm trying to parse a HTML document, get all the image-sources and then add the size of all pictures together. Parsing the document works fine, so does getting the image-sources and getting their size. main(){ print("Please input an URL"); var url = stdin.readLineSync(); getImageUrls(url).then((list) { list.forEach((imageUrl) { getImageSize(imageUrl).then((r) { print("$imageUrl,...

dart
Is it possble to change the whay the logical or || statement is executed in dart. For example. I have the functions foo() and boo() which have a return type of bool. If i write (foo() || boo()) ? /* A */ : /* B */; and foo() returns true...

dart,dart-js-interop,resumablejs
I am trying to use resumable.js from Dart with this code: var rs = new JS.JsObject(JS.context['Resumable'], [new JS.JsObject.jsify({ 'target':context.server+'/upload' })]); files.forEach((file) { rs.callMethod("addFile",[file]); }); files variable is defined as List<File> (dart.html.File). When I check properties of rs object with these two lines: JS.context["console"].callMethod("log",[rs['opts']]); JS.context["console"].callMethod("log",[rs['files']]); I find that rs.opts are initialized...

javascript,html,css,browser,dart
The browser's default text highlight (selection) background color can be overridden, e.g.: ::selection { background: #ffb7b7; } And the color is browser/OS specific. Is there a way to read the browser's default value using JavaScript or Dart?...

postgresql,dart
I get the error 42601 when using postgresql I created the table using pgAdmin. The autogenerated code looks as follows. -- Table: posts -- DROP TABLE posts; CREATE TABLE posts ( post_id bigserial NOT NULL, title character varying(150) NOT NULL, description character varying(500), posted_at timestamp with time zone, last_edited timestamp...

asynchronous,dart
I did the Google Dart tutorial (pirate name badge: https://www.dartlang.org/codelabs/darrrt/) all the way through and it ran exactly as expected until I hit step 7 where I run the build on my normal browser. What happens is the page loads, but it never seems to complete the async download of...

javascript,arrays,dart
I try to get the id's from List of Maps in Dart. In JavaScript it would be something like this: var list = [{id:3, name:'third'}, {id:4, name:'fourth'}]; var result = list.map(function(x){return x.id;}); This should give the result [3, 4] Is there a simple way of doing this in Dart? So...

unit-testing,testing,dart,dart-polymer
How do you test Polymer elements using the new test library? Using the new test library to test a Dart Polymer element, I build my_element_test.html as prescribed. Please see my repo: polymer-dart-testing. No Polymer Initiation Passes my_element_test.html and my_element_test.dart (commenting out Polymer initiation) passes tests as expected: my_element_test.html <!doctype html>...

jquery,dart,bootstrap
I use dart call bootstrap modal window,and I want register a callback function ,but found the same problem other person mentioned before. here is jQuery code: $('#myModal').on('hidden.bs.modal',function (e) {....}) How can I write the same code in dart with dart:js, because package:js is deprecated; so I can't use callback function...

netbeans,dart,netbeans-8
The only information about creating a dart plugin from netbeans is this one: https://blogs.oracle.com/geertjan/entry/dart_and_netbeans_ide_7 Was this plugin ever created? where is the Soruce Code? Is there any other plan to integrate Dart to Netbeans?...

dart,polymer,dart-polymer
What the version Dart Polymer use (of the original Polymer project, eg 0.5 or 0.8 etc)? And where can I see it? I mean on which version Polymer.dart is based concerning the mainstream Polymer.js. For example recently Polymer (JS version) released 0.8 version with some breaking changes and features. I...

types,dart,jwt
I have a problem with the dart types when using the JwtSessionHandler. I wanted to integrate user authentication and sessions using this example application from the shelf_auth git repository as a guide. Unfortunately I get an error when running the application (no syntax errors are detected before running the application)...

dart,polymer,dart-polymer
Not able to reference dom elements. Most of the test case works except for the last expectation in ClickSignInButton when I want to make sure I can evaluate error message div when form is submitted without any data. expect(document.querySelector('qme-header').shadowRoot .querySelector('#headerErrorDiv'), isNotNull); always fails and headerErrorDiv is null even though its...

dart
I'm very new to dart, so don't judge me. :)) I just started to write a simple ToDo App in Dart. I want to add a button to the item, so i can delete it from the list. I add the button successfully, but don't get the click event working....

dart,dart-async
Hey have I read all I can find about futures, but I would like some more advice on proper usage. I am writing an API library, that bridges the gap between HTTP Requests and the app. So I use the future returned by HTTP in most cases, however sometimes the...

javascript,integer,dart,precision
I've been reading that the dart2js compiler doesn't support 64 bit integers. Is this because javascript doesn't have a representation for 64-bit integers and stores all numbers as 64-bit double precision values? If so, couldn't integer values simply be converted to the representation? If that is not the case, why...

dart,dart-pub
I am very new to Dart so bear with me. I completed the sample pirate badge project and did Pub Build - Minified as instructed. The generated build folder does not contain the packages/browser/dart.js and priatebadge.dart files that are referenced by piratebadge.html. When I view in the browser there are...

dart,dart-polymer,paper-elements
I am trying to select a paper-tab based on it's data-id attribute. I have the element but I cannot changed to selected property of the inner_tabview. I have a Polymer: <paper-tabs id="inner_tabview" noink="true"> <template repeat="{{item in tabNames}}"> <paper-tab data-id="{{item['id']}}"><h3>{{item['name']}}</h3></paper-tab> </template> </paper-tabs> And some Dart code behind it: selectTab(itemId) { PaperTab...

dart,dart-pub
I try to avoid Dart to generate symbolic links (to packages) in each folder/sub-folder. For example, in pubspec.yaml I add polymer package and run pub get. After that I got: Now each folder has packages symbolic link! As I understand it's because to ensure that we can use package:.. statement...

iframe,dart,postmessage
I know that the only way to communicate with an iframe is using the postMessage method as follow: iframe.contentWindow.postMessage("my message", window.location.href); but I would like to know how to receive data from the iframe after any change on it....

dart,command
Using the example here: http://www.dartdocs.org/documentation/args/0.13.0/index.html I'm trying to write a command line app, but I get NoSuchMethodError: method not found: 'options' when I try to use this example code. Why isn't options defined for the Command subclass instance? If I'm not supposed to use options then what am I supposed...

dart,dart-editor
I'm working on a little website using dart. I have one project for the server, and another for the client app (see picture below) In the server app I serve the client app from the client project like this runServer() { var staticHandler = createStaticHandler(r"C:\Users\Lukasz\dart\linkShepherdClient\web\", defaultDocument: 'linkShepherd.html',serveFilesOutsidePath: true); var handler...

dart,google-chrome-app,chromium,chrome-gcm
I'm trying to connect to the Google Cloud Messaging with this code in dart senderIds.add("api-project-testid"); chrome.gcm.register(senderIds).then(registerCallback); but I have this error: Exception: Uncaught Error: Profile was not signed in. I think that the error arises from the fact that chromium is not connected with any account. Does anyone know how...

data-binding,dart,polymer
I'm trying to create a form Polymer component where form elements are generated on the fly. I've looked, and so far the only way to bind the value attribute is by using .injectBoundHtml. This does not work with all component types, I'm trying to bind the value of a <textarea>,...

twitter-bootstrap,dart,bootjack
I'm using twitter bootstrap's CSS to create a standard bootstrap navbar and then calling Dropdown.use(); which makes the navbar work automagically. When I re-size the page or view it on mobile, the navbar displays this menu button which does nothing when you click on it. How would I go about...

javascript,dart
I just watched this introduction from the Dart Summit. During the talk, this code was put up: => new List.generate(100, (y) => renderLine(y)); I'm pretty sure I understand that line. The arrow function is new to me but okay - it looks a little coffee-esque. The point though, was changing...

dart,dart-polymer,paper-elements
I have found Migration guide (https://www.polymer-project.org/1.0/docs/migration.html). My Dart project does not use bower but pubspec.yaml and when I changed dependencies version for PaperElements I get message: paper_elements has no versions that match >=1.0.0 environment: sdk: '>=0.8.10+6 <2.0.0' dependencies: browser: '>=0.10.0+2' code_transformers: any core_elements: '>=0.6.0' dnd: any logging: '>=0.9.3' paper_elements: '>=1.0.0'...

android,dart,httprequest,api-design,dart-pub
I realized that currently there are at least three "official" Dart libraries that allow me to perform a HTTP request. What is more, three of those libraries (dart:io (class HttpClient), package:http and dart:html) have each a different, incompatible API. As of today, package:html does not offer this functionality, but on...

javascript,webview,dart,google-chrome-app
Dart doesn't show the alert dialog when I use a webview and show this error: : An alert dialog was blocked. (extensions::webViewEvents:225) : A confirm dialog was blocked. (extensions::webViewEvents:225) Does anyone know how to bypass the problem or how to catch the error? Thanks. Sorry for my bad English. Edit...

session,authentication,dart
I'm developing a Dart application that will need authentication and session control. I'm trying shelf_auth to do that, but the examples doesn't seem to work or, more likely, I'm not implementing them the right way. In short, this is what I want to happen: An user opens the application on...

session,curl,dart
My server behaves differently when I do a login request with CURL and from the browser. When doing the following curl request: curl -i -X POST 'http://localhost:8080/login' -d 'username=fred&password=blah' -H 'content-type: application/x-www-form-urlencoded' I get the expected result in form of: However when doing the same (or so I think) request...

dart,capitalize
I am trying to create a method in dart but have run into a wall. I was looking at how .toUpperCase(); and .toLowerCase(); were done. The method that I am trying to create is .capitalize(); I would like to call this method like this String hello = "WORLD".capitalize(); //World Here...

dart,switch-statement,polymer
Is there something in Polymer to do a switch statement in markup? I have this component I want to build, and it could have a ton of "IFs" to simply display some code. I was wondering if Polymer has something like Angular's ng-switch? Example: <div ng-switch="selection"> <div ng-switch-when="settings">Settings Div</div> <div...

parsing,date,datetime,dart
The format of "new DateTime.now()" will print following output: 2015-05-20 07:34:43.018 By having only the time as a String in the correct format ("07:34:43.018"), how do I parse the time to a DateTime object? The usage of the intl package does not support the mentioned format AFAIK....

syntax,dart,syntax-error,questionmark
I'm new to Dart and just learning the basics. The Dart-Homepage shows following: It turns out that Dart does indeed have a way to ask if an optional parameter was provided when the method was called. Just use the question mark parameter syntax. Here is an example: void alignDingleArm(num axis,...

dart
I am porting old vm unittest files using the new test package. Some relies on input files in sub directories of my test folder. Before I was using Platform.script to find the location of such files. This works fine when using $ dart test/my_test.dart However using $ pub run test...

dart
I have this map: var temp= { 'A' : 3, 'B' : 1, 'C' : 2 }; How to sort the values of the map (descending). I know, I can use temp.values.toList()..sort(). But I want to sort in context of the keys like this: var temp= { 'B' : 1,...

dart,warnings
What can I do to prevent the compiler from throwing the following warning Missing concrete implementation of setter 'MyClass.field' and getter 'MyClass.field' on the following code? import 'package:mock/mock.dart'; class MyClass { String field; } @proxy class MockMyClass extends Mock implements MyClass{} ...

dart,dart-async
In the documentation for StreamController.broadcast(): The controller distributes any events to all currently subscribed listeners at the time when [add], [addError] or [close] is called. It is not allowed to call add, addError, or close before a previous call has returned I understand the need for this limitation (at least,...

dart,google-chrome-app,content-security-policy
I have this problem in dart Refused to load the image 'https://**.png' because it violates the following Content Security Policy directive: "img-src 'self' data: chrome-extension-resource:". when try to set src in image element ImageButtonInputElement button = new ImageButtonInputElement(); button.className="button_element"; button.src=el["imageUrl"]; //like "https://**.png" whit this manifest.json "content_security_policy":"img-src https://server.example.org" Someone would know...

dart,markdown,publish
Having an issue with the display of "<" and ">" using markdown's back-tick code syntax in Dart pub? Not sure how to achieve: Future<bool>. If I write that as I have done here, it comes out as: Future&lt;bool&gt;, as found here: https://pub.dartlang.org/packages/functional_behaviour_tree Have also noticed that where packages were fine...

javascript,dart,operator-overloading,operators,overloading
Very happy to see Dart support operator overloading (very cool :) ), but I am curious as to how this implementation translates to Javascript before I dive into developing something around this? Know this isn't something Javascript supports natively so wondered if there would be any complications around conversion to...

webview,dialog,dart,google-chrome-app
I use this code to intercept a dialog from a webview but I can not see the content or interact with it: Element webview= querySelector("#webview"); Map<String,String> map=new Map(); map["src"]=urlWebView+user; webview.attributes.addAll(map); querySelector("#webview_cont").style.visibility="visible"; window.addEventListener("dialog",(Event e){ //Use window or webview returns the same result e.preventDefault(); ... //What should I do here ?? }...

dart,dart-polymer,dart-pub,dart2js
Аfter compiling Dart code (which use Dart Polymer) to JS. I get the following error: Uncaught Exception: The "smoke" library has not been configured. Make sure you import and configure one of the implementations (package:smoke/mirrors.dart or package:smoke/static.dart). Sometimes the message was: No elements registered in a while, but still waiting...

asynchronous,stream,dart,stdout
I am starting a process in Dart that attaches its stdout stream to stdout so that the results can be printed to the terminal like so: Process.start(executable, ['list','of','args']).then((proc) { stdout.addStream(proc.stdout); stderr.addStream(proc.stderr); return proc.exitCode; }); However, once this completes I would like to start a new process and begin this again...

json,symfony2,dart,fosrestbundle
I have a little dilema. I have a backend/Frontend Application that comunicates with a JSON based REST Api. The backend is written in PHP(Symfony/jmsserializer) and the Frontend in Dart The communication between these two has a little Problem. For most List Data the backend responds with a JSON like [{"id":1,...},{"id:2,....}]...

dart,dart-polymer
I'm trying to migrate from Bootstrap to Polymer/Paper and I've got a lot of situations where I have to enable/disable buttons that were previously accessed as ButtonElements and then .disabled=true/false. So for example I've got a paper button I'm trying to access and enable/disable via querySelector as such: PaperButton nextWeekButton...