VBScript works, equivalent JScript doesn't - what am I missing?

Thursday, June 9, 2005 by whiterabbit007 | Discussion: DesktopX

This script is for DesktopX Edit object, basically it's suppose to respond to pressing Enter.
For some reason when I run this VB script, it works
Sub Control_OnKeyPress(Key)
' if enter key is pressed
If Key = 13 Then
Control.Text = "1234"
End If
End Sub


However, when I try to do the same thing with JScript, there's no response
function Control_OnKeyPress(Key)
{
if( Key == 13 )
{
Control.Text = "1234";
}
}


What am I doing wrong? Is the name of the function different for JScript?
thomassen
Reply #1 Thursday, June 9, 2005 1:43 PM
hm... odd. I tried the code you had there and I get the same results. I also tried a pushbutton control and same thing happends there. The OnClick even triggers in VB but not JS. I think this might be a bug in the DX script implementation. I think you should report this to the developer.
whiterabbit007
Reply #2 Thursday, June 9, 2005 3:55 PM
Hmmm, I posted this on DesktopX->Development->Bug Reports (or something like that) forums, is there any other way to report bugs or is that it?
thomassen
Reply #3 Thursday, June 9, 2005 7:22 PM
Only official channel is [email protected]
CerebroJD
Reply #4 Thursday, June 9, 2005 8:38 PM
The newsgroups might work too.
thomassen
Reply #5 Friday, June 10, 2005 5:41 AM
The newsgroups might work too.

True, but the keyword is "might". This bug is a showstopper one and it's probably best to be sure.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01