FAQ Database Discussion Community


dart wait for inner Future

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 data binding from a parent custom element to attributes of a child custom element

dart,dart-polymer
Here is a problem that cropped up today when I updated to the latest Dart libs. The child custom element is a combo box. The parent custom element fills it with a varying list of strings. // child HTML <polymer-element name="bx-icombo" attributes="aLabel aList aSelected"> <template> <div class='outr' flex layout horizontal...

Choosing between package:html, dart:html, dart:io (class HttpClient) and package:http APIs to fetch HTTP resources

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...

How to access detail from core-signal event in polymer.dart?

dart,dart-polymer
I am working on a web app in polymer.dart. When I use core-signal, I am unable to access the detail. Here's some of the code that I'm using... main_app.dart class MainApp extends PolymerElement { onClick(Event event, var detail, Node sender) { print('button clicked'); fire("core-signal", detail:{'name':'button-click', 'data':0}); } ready() { super.ready();...

Dart Polymer: Removing element from List

data-binding,dart,polymer,dart-polymer
I have a custom element with some models. Here is the code for custom element. message-element.html <polymer-element name="message-element" attributes="message"> <template> <table class="table"> <tr template repeat="{{attrib in attribs}}"> <td><paper-input name="message-attrib-name" label="New Attribute" value="{{attrib.name}}"></paper-input></td> <td> <paper-input name="message-attrib-value" label="" value="{{attrib.value}}"></paper-input> <core-icon-button...

Refuse to load JS in Dart

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'...

Block until field is initalized

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...

How does Dart's operator overloading translate to javascript?

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...

Add delete item button - ToDo App - Dart

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....

Stuck with initialize package (Dart)

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 pub get generates link to packages in each folder and subfolders

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...

Dart Polymer: Creating PaperDialog with CoreAnimatedPages displayed incorrectly in Firefox

firefox,dart,polymer
I use Dart Polymer PaperDialogs containing CoreAnimatedPages. The idea is to have popups in which you can click through multiple option views. Example repository available at: https://bitbucket.org/neogucky/polymer-dialog-problem/ DialogView: view.html <link rel="import" href="packages/polymer/polymer.html"> <link rel="import" href="packages/paper_elements/paper_button.html"> <link rel="import" href="packages/paper_elements/paper_dialog.html"> <link rel="import"...

inserting value of map to string

dart
I took a look at the postgresql driver dokumentation. I found the following code there. conn.query('select color from crayons where id = @id', {'id': 5}) .toList() .then((result) { print(result); }); conn.execute('insert into crayons values (@id, @color)', {'id': 1, 'color': 'pink'}) .then((_) { print('done.'); }); I wanted to test the inserting...

How to test Dart Polymer elements using the new Test library?

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>...

How convert Dart to JS?

javascript,dart
The dart app run fine in Dartium, but I would like to convert it to JS. C:\dart-sdk\bin\dart2js --out=test.js main.dart generates JS from: import 'dart:html'; void main() { querySelector('#myid').text = 'Wake up, sleepy head!'; } Then I add it to the : <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript" src="test.js"></script> </head>...

Dart Language: Authentication and session control (shelf_auth)

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...

Can I force unoptimal logical condition checking?

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 - Polymer Unit Testing. Not able to reference dom elements after click event

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...

Is it possible to change the default build directory in Dart?

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....

Type Error when using JwtSessionHandler - dart

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, how to bind to programmatically generated elements, textarea, select, optgroup

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>,...

Resize when selecting inside the dialog

dart,polymer,paper-elements
resizeable_dialog.html <link rel="import" href="../../packages/polymer/polymer.html"> <link rel="import" href="../../packages/paper_elements/paper_dialog.html"> <link rel="import" href="../../packages/paper_elements/paper_button.html"> <link rel="import" href="../../packages/paper_elements/paper_tabs.html"> <link rel="import" href="../../packages/paper_elements/paper_tab.html"> <link rel="import" href="../../packages/paper_elements/paper_icon_button.html"> <link rel="import"...

Dart: pub build minified dart.js missing

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...

Using dart discoveryapis_generator on webapp?

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:...

Dart Mirrors in JS: type '_ListConstructorSentinel' is not a subtype of type 'int'

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(""),...

Listening for event in Dart via JQuery “on” with dart:js

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...

Dart: Create method from string

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...

Set custom header in Dart's HttpRequest

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...

On which version is based Polymer Dart?

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...

Questions about using Futures and Completers

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...

Sum of integer values of a Future

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,...

How to migrate to Polymer and PaperElements 1.0 using pubspec.yaml

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'...

Serving content dynamically using the directory parameter for GET requests - shelf package dart

get,dart,dart-shelf
The code snippets below come from a server serving a get request Server snippets 1) io.serve(handler, InternetAddress.LOOPBACK_IP_V4, 8080).then((server) { print('Listening on port 8080'); }).catchError((error) => print(error)); 2) Router routes = new Router() ..get('/newest', handler.handleNewest) ..get('/anonymous', handler.handleAnonymousGetRequest) ..post('/anonymous', handler.handleAnonymousPostRequest); 3) shelf.Response handleNewest(shelf.Request request){ print('got request for newest'); return new shelf.Response.ok('sample content...

convert HttpHeader to Map

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...

How to add data to a synchronous broadcast StreamController from inside an event listener to that controller's Stream?

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 Pub greater than and less then mardown issue

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...

Weird DartEditor behavior / bug?

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...

JsFunction.apply doesn't work while JsObject.callMethod does work (dart)

javascript,dart,dart-js-interop
I have this often, that JsFunction.apply doesn't work like I would expect. Consider this example: import "dart:js"; import "dart:html"; void main() { var div = querySelector('div'); var span = new SpanElement()..text = "hello world"; var js = new JsObject.fromBrowserObject(div); js["appendChild"].apply([span]); // this one does work: // js.callMethod("appendChild", [span]); } I...

How to parse a String of “hh:mm:ss.SSS” into a DateTime

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....

Error after compiling Polymer Dart to JS. (The “smoke” library has not been configured)

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...

Checking, if optional parameter is provided in Dart

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,...

does exist a Dart plugin for Netbeans?

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?...

Does Polymer Dart have something similar to Angular's ng-switch?

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...

Dart import package:polymer/polymer.dart error

dart,dart-polymer,dart-pub
I'm trying to create my own element with Polymer, but i can't import polymer package. Why it throws error: "Target of URI doesn't exist"? In Tools Output window I found 404 error. And my pubspec.yaml: name: polymer1 description: A sample web application dependencies: browser: any polymer: ">=0.15.1 < 0.17.0" ...

What is the proper way to remove a stream from stdout so that another stream may be added?

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...

Add extra headers to websocket connection from browser in Dart

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...

What is the best way to set the default instance for a final private field with optional parameter?

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:...

Order by query using dart and postresql

postgresql,dart
When running this query using dart and the postresql driver getPost(int limit, int offset, String order_by){ connect(uri).then((conn){ conn.query('''select * from posts order by @order_by limit @limit offset @offset''', {'limit': limit, 'offset': offset, 'order_by': order_by}) .toList() .then((rows){ print(rows); }) .whenComplete(() => conn.close()); }) .catchError((err) => print('Error in getPost: $err')); } I...

Generate static accessors by name

dart
Suppose i had this class: abstract class DynamicallyAccessible{ operator [](String key){ throw 'DynamicallyAcessible [] operator is not implemented'; } operator []=(String key,Object value){ throw 'DynamicallyAcessible []= operator is not implemented'; } call(String methodName,List<Object> params){ throw 'DynamicallyAcessible call method is not implemented'; } } and this class which extends the above:...

compiled dart code not running in IE 10 and IE 11

dart,internet-explorer-10,internet-explorer-11,dart2js
I am having trouble with a small dart app which runs perfectly fine in Chrome and Firefox and... guess what.... not in IE 10 and 11 (Project Spartan in Win10 Preview works!). It is a simple UI controll logic like so: ... //init elements SelectElement studyList = querySelector('#studies'); SelectElement roleList...

Creating a capitalize Method in Dart

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 Pirate Tutorial Doesn't Download JSON after build (step 7)

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...

How to create json encodable classes in dart

json,dart,to-json
This question is related to this post. I tried the following code: import 'dart:convert'; /*server side Post class */ class Post { int post_id; String title; String description; DateTime posted_at; DateTime last_edited; String user; String editor; int up_votes; int down_votes; int total_votes; String links_to; List<String> tags = new List(); Post.fromSQL(List...

How to run a Dart Console Application?

dart
I just follow https://www.dartlang.org/docs/dart-up-and-running/ch01.html to run a Dart console application,but the result is ‘HTML file could not be found’.

Cross-Domain issue in Chrome possibly b/c of strange Dart HttpRequest behavior

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...

Alert dialog from was blocked

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...

Different server behavior from CURL and browser

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...

Using bootstrap navbar in bootjack

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...

How to sort map value?

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,...

Determine browser's default text highlight color using JavaScript or Dart

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?...

How can a “missing concrete implementation” warning be suppressed?

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{} ...

Parallel.run syntax

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...

How to receive data from an Iframe in Dart?

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....

Error 42703 when connecting to postgresql database with dart

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...

“Refused to load the image” in a Chrome App

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...

Failed to load dartium when running test

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 ...

How do I programatically select and disable a PaperButton?

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...

Callback in Dart when the page is fully loaded

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...

Incompatibility between the Dart shelf and rpc packages? ('access-control-request-method' header)

dart,dart-shelf
There seems to be an incompatibility between the shelf and rpc packages. In rpc [0.4.1] config/api.dart: The handleHttpOptionsRequest expects the 'access-control-request-method' header to be a List: Future<HttpApiResponse> handleHttpOptionsRequest( ParsedHttpApiRequest request) async { var requestedHttpMethods = request.headers['access-control-request-method']; List<String> allowed = []; assert('OPTIONS'.allMatches(request.methodKey).length == 1); if (requestedHttpMethods != null) { requestedHttpMethods.forEach((httpMethod) {...

Abstract methods in Dart

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...

How to debug a Dart client Side application using IntelliJ Idea Community Edition?

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....

Error 42601 using postgresql and 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...

using dart route package url got error 404

routes,dart
Here's my main.dart: import 'dart:html'; import 'package:route/client.dart'; import 'urls.dart'; void main() { var router = new Router() ..addHandler(homeUrl, showHome) ..addHandler(galleryurl, showGallery) ..listen(); HttpRequest.getString("home.html").then((html){ querySelector("#container").innerHtml = html; }); } void showHome(String path){ HttpRequest.getString("home.html").then((html){ querySelector("#container").innerHtml = html; }); } void showGallery(String path){ HttpRequest.getString("gallery.html").then((html){...

Can I have two apps in one webpage in Dart + polymer?

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...

Using resumable.js from Dart

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...

Does the dart VM impose restrictions on the stack memory size of a native extension?

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];...

Retrieving the selected item in a paper-element dropdown

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}}'>...

Google Cloud Messaging in dart

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...

How to set callback when