0

zscript deferred="true"

asked 2010-02-06 11:20:09 +0800

balamurugan32000 gravatar image balamurugan32000
111 2

The below code does not work, and if i remove deferred="true', then it works. Any thing wrong in my code.

<window title="My First Window" border="normal" width="200px">
<zscript deferred="true">
void add(){
alert("Hi");
}
</zscript>
<button onClick="add()" />
</window>

Note: I tested in 3.5.1 and zk 5

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2010-02-07 19:36:11 +0800

iantsai gravatar image iantsai
2755 1

I think this is a bug.

I have the same result if I test it in zkdemo, and I already post it in SF.net: zscript deferred attribute was broken


But it seems it works fine if you use it inside a normal zul file, can you test your case in your project for me?

link publish delete flag offensive edit

answered 2010-02-08 01:33:17 +0800

iantsai gravatar image iantsai
2755 1

It seems the bug was fixed, please wait for freshly update.

link publish delete flag offensive edit

answered 2010-02-08 08:02:09 +0800

balamurugan32000 gravatar image balamurugan32000
111 2

But it seems it works fine if you use it inside a normal zul file, can you test your case in your project for me?

Not sure, when you say normal zul file? I have the above sample code in test.zul file and the zscript method is embedded inside the zul page.

link publish delete flag offensive edit

answered 2010-02-08 09:36:44 +0800

iantsai gravatar image iantsai
2755 1

yeah, that's what I mean normal zul file, anyway, the bug has been fixed.

link publish delete flag offensive edit

answered 2010-02-10 02:24:03 +0800

balamurugan32000 gravatar image balamurugan32000
111 2

ok. Now I know what the issue is. The fix need some fine tuning.
baiscally, I have more than once zscript in my file. thats why id did not work after the fix. i.e.,

<window title="My First Window" border="normal" width="200px">
<zscript >
void addALert(){
alert("Hi Alert");
}
</zscript>

<zscript deferred="true">
void add(){
alert("Hi");
}
</zscript>
<button onClick="add();addALert()" />
</window>

The below code does not work after the fix. Please verify it.

link publish delete flag offensive edit

answered 2010-02-12 11:36:59 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

@balamurugan32000,

It is better re-open the bug and put your comment directly on ZK Bug or it is easily lost tracking. ( I have done that for you).

link publish delete flag offensive edit

answered 2010-02-12 11:52:16 +0800

balamurugan32000 gravatar image balamurugan32000
111 2

Thanks. I tried to re-open it. But don't know how to do it.

link publish delete flag offensive edit

answered 2010-02-15 08:47:52 +0800

tomyeh gravatar image tomyeh
610 1 3
http://blog.zkoss.org ZK Team

I saw Henri re-opened it. We will follow it.

FTI: to re-open, just change the status to Open.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-02-06 11:20:09 +0800

Seen: 628 times

Last updated: Feb 15 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More