EmEditor (text editor) Forum Index
   EmEditor Core Bug Reports
     Macro clipboardData.clearData error in v9.01
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
mldisibio
Posted on: 10/16/2009 8:32 am
Just popping in
Joined: 10/9/2009
From:
Posts: 6
Macro clipboardData.clearData error in v9.01
I have a macro which calls
"clipboardData.clearData("Text");
and which was working fine up to v9.01

I now get an "Unspecified Error" popup pointing to that line in the macro.
If I comment out the line, the Macro works as expected.

I also tried:
clipboardData.clearData("text")
clipboardData.clearData();
clipboardData.clearData("Text",0);
all of which throw the exception.
mldisibio
Posted on: 10/16/2009 8:49 am
Just popping in
Joined: 10/9/2009
From:
Posts: 6
Re: Macro clipboardData.clearData error in v9.01
Okay, one more test occurred to me after I posted.

The line "clipboardData.clearData()" fails if there is nothing in the clipboard.
Since I have been using this macro for months, I am not sure if this is a new behavior or simply a very coincidental situation I never encountered before, but I would very likely have run the macro with an empty clipboard, at least once.

I added this code, and now the line does not fail:
var cpd = clipboardData.getData("Text");
if(cpd.length > 0)
clipboardData.clearData();

I created a one line macro that simply clears the clipboard of any data in order to verify the conditions.

In other words, if I highlight some text and perform a "copy", then there is data in the clipboard and the macro works without the check clause.
However, if I clear the data once, and then call the macros without checking, the line fails.

This may be the correct behaviour, but as I said, seems odd that the exception was never raised before v9.01.
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文