我收到以下错误:
Stack Trace: #0 NoSuchMethodErrorImplementation._throwNew (dart:core-patch:641:3)
#1 init_autogenerated (http://127.0.0.1:3030/C:/dev/CalendarDatePicker/CalendarDatePicker/web/out/CalendarDatePicker.dart:43:26)
#2 main (http://127.0.0.1:3030/C:/dev/CalendarDatePicker/CalendarDatePicker/web/out/CalendarDatePicker.html_bootstrap.dart:7:30)
这是我的视图代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CalendarDatePicker</title>
<link rel="stylesheet" href="CalendarDatePicker.css">
</head>
<body>
<element name="calendar" constructor="Calendar" extends="div">
<template>
<table>
<tr>
<th>Sun</th>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thu</th>
<th>Fri</th>
<th>Sat</th>
</tr>
</table>
</template>
</element>
<div is="calendar"></div>
<script type="application/dart" src="CalendarDatePicker.dart"></script>
<script type="text/javascript" src="https://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js"></script>
</body>
</html>
这是我的主要脚本:
import 'dart:html';
import 'dart:core';
import 'package:web_ui/web_ui.dart';
void main() {
}
class Calendar extends WebComponent
{
}
此行的自动生成代码失败:
new Calendar.forElement(__e0)
..created_autogenerated() //Exception: No such method: 'Calendar.forElement'
..created()
..composeChildren();