Groups
Groups
Sign in
Groups
Groups
Wind.js User Groups
Conversations
About
Send feedback
Help
发现一个windjs的语法限制
23 views
Skip to first unread message
hopesfish
unread,
Sep 11, 2012, 9:26:59 AM
9/11/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to win...@googlegroups.com
发现一个语法的限制:
出错的写法:
if ($await(Book.get(1000))) {
}
会报引用错误
正确的写法
var book = $await(Book.get(1000));
if (book) {
}
这算是语法限制么?还是算一个issue?
Jeffrey Zhao
unread,
Sep 13, 2012, 3:58:57 AM
9/13/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to win...@googlegroups.com
这是语法限制,可能文档上没有说清。
目前$await需要出现在一条独立的语句中:
var a = $await(...);
a = $await(...);
$await(...);
return $await(...);
至于原因,就是……编译器容易写,且某些参考标准就是这么来的……
下一步会改进这种情况。
老赵 | Jeffrey Zhao
Blog:
http://blog.zhaojie.me/
GitHub:
http://github.com/JeffreyZhao/
--
Reply all
Reply to author
Forward
0 new messages