Greg Hill
2008-09-22 18:43:08 UTC
I am using some code in a cc to allow users to pull up a popup menu in an
editor control to cut, copy, paste into and out of an editor control.
Occasionally the user gets an error message "Variable undefined Paste"
when they use the paste option. The code for this menu option in my cc is
this.MENU3 = new MENU(this)
with (this.MENU3)
onClick = {;form.activeControl.paste()}
text = "Paste"
shortCut = "Ctrl+V"
endwith
The odd thing about the error message is it references a line number from
the .cfm for the form.
function form_readModal
form.form_init() << line referenced in error msg
return (super::readmodal())
This error does not always happen, only sometimes, but it always
references the init function in the .cfm.
Anyone have an idea on what the error message is trying to tell me?
Any and all ideas appreciated,
I believe it is caused by the fact that some objects are not supported foreditor control to cut, copy, paste into and out of an editor control.
Occasionally the user gets an error message "Variable undefined Paste"
when they use the paste option. The code for this menu option in my cc is
this.MENU3 = new MENU(this)
with (this.MENU3)
onClick = {;form.activeControl.paste()}
text = "Paste"
shortCut = "Ctrl+V"
endwith
The odd thing about the error message is it references a line number from
the .cfm for the form.
function form_readModal
form.form_init() << line referenced in error msg
return (super::readmodal())
This error does not always happen, only sometimes, but it always
references the init function in the .cfm.
Anyone have an idea on what the error message is trying to tell me?
Any and all ideas appreciated,
copy paste, it returns something than a text string.
So, in the code you can use a try / catch to eliminate the error and even
better you can tell the end-user that nothing was copied, instruct the user
to highlight the text they want to copy first and the click copy.
Greg Hill