|
<< Click to Display Table of Contents >> Navigation: Telegram > 2019 > 07 > 01 > Telegram_2019-07-01T13 |
2019-07-01T13:06:31
if you are using the normal add script methods it should work fine. Im sure in our demos there is an example of this.
2019-07-01T13:07:31
type: link http://docs.atozed.com/docs.dll/development/Working%20with%20JavaScript.html
2019-07-01T13:07:52
right
2019-07-01T13:07:58
problem is ...
2019-07-01T13:08:34
if I try to add a onKeyDown script event, and there is a scriptevent of this name already set
2019-07-01T13:08:50
it will be -1 unless you have added an event there previously.
2019-07-01T13:08:53
the exsiting script is not added
2019-07-01T13:08:57
sorry
2019-07-01T13:09:16
the old script is not replaced by the new one
2019-07-01T13:09:28
so, in order to it work propperly
2019-07-01T13:09:34
i need to delete the existing one
2019-07-01T13:09:38
but
2019-07-01T13:09:40
yes, as I told you, you cant simply change them at run time.... the browser doesnt just unload JS easily.
2019-07-01T13:10:07
and Id have to look, but I think IW removes the entry once it sends it to the browser
2019-07-01T13:10:08
but i´m not changing it at runtime
2019-07-01T13:10:53
let me give you an example
2019-07-01T13:11:07
i have a property called AllowNegative
2019-07-01T13:11:14
in DESIGNTIME
2019-07-01T13:11:23
if I change the value of that property
2019-07-01T13:11:38
i need to load a new script event to the onKeyDown script event
2019-07-01T13:11:43
at design time
2019-07-01T13:11:53
but
2019-07-01T13:12:03
but in order for me to do this
2019-07-01T13:12:24
i need to remove the script that is already there
2019-07-01T13:12:34
again
2019-07-01T13:12:37
in design time
2019-07-01T13:12:41
the problem is
2019-07-01T13:12:58
when I try to get the index of the onKeyDown event
2019-07-01T13:13:01
I get -1
2019-07-01T13:13:18
I can see the script on the dfm file
2019-07-01T13:13:27
but i keep getting -1
2019-07-01T13:13:37
I would suggest you debug your code at design time. The forum message doesnt contain complete details and its likely the non posted code isn't working as you expect.
2019-07-01T13:14:07
i have debuuged the design time code using vcl showmessage
2019-07-01T13:14:08
also you dont say which version exactly, make sure you are on the latest free update.
2019-07-01T13:14:54
dont use showmessage, actually debug it. Start a second instance of Delphi from Delphi and load your package. You can set breakpoints, trace, watches etc.
2019-07-01T13:14:55
I´ll try to provide more details to the form message
2019-07-01T13:15:11
but i´tll be nice if Alexandre could give me a hand
2019-07-01T13:15:20
As I understand hes is brazilian also
2019-07-01T13:15:37
thanx for now chad