This is a migrated thread and some comments may be shown as answers.

[Solved] Sys.ArgumentTypeException

3 Answers 195 Views
Editor
This is a migrated thread and some comments may be shown as answers.
ChrisS
Top achievements
Rank 1
ChrisS asked on 22 Apr 2008, 11:20 AM
I am getting the following error:

A Runtime Error has occurred.
Do you wish to Debug?

Line: 7352
Error: Sys.ArgumentTypeException: Object of type 'String' cannot be converted to type 'Boolean'.
Parameter name: value

The error occurs when I use the visible property within the toolsfile.xml eg

<tool name="XhtmlValidator" visible="false" />

Have I done something wrong or is this a problem with the RAD Editor?

Many thanks

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Apr 2008, 03:30 PM
Hi Chris Studman,

In order to accommodate a number of scenarios which allow the editor's tools to be easily extended and customized on the client side in the current update the toolsfile reader was changed to read all attributes that are set in the ToolsFile.xml and not just name, shortcut and text. All attributes are send to the client and the MS Ajax framework attempts to initialize each tool by calling a corresponding client-side javascript property.

In this particular case there is no title, dockable and visible attributes anymore to the tool object, because the localization is performed using resource files. So in this case, what needs to be done is remove all title, dockable and visible attributes from the ToolsFile.xml. You can also review the following help article:
Using the ToolsFile.xml.

Please, try this suggestion and let me know if you still experience the problem.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ChrisS
Top achievements
Rank 1
answered on 22 Apr 2008, 03:55 PM
Dear Rumen,

I don't understand why you can do this:

<telerik:EditorTool Name="XhtmlValidator" Visible="false" Enabled="false" /> 

but:

<tool name="XhtmlValidator" enabled="false" visible="false" /> 

is no longer available.  Surely the same functionality should be available regardless of which method you choose?

My scenario is as follows:

With the old rad editor I set visible="false" for some of the tools within the toolsfile.  If the user had permission the button was made visible via the code behind.  How can I replicate this functionality?

Many thanks
0
Rumen
Telerik team
answered on 24 Apr 2008, 06:00 AM
Hello Chris Studman,

The problem appears when you set the visible attribute in the ToolsFile.xml file only when the debug compilation attribute is set to true in the web.config, e.g.

<compilation debug="true">
      <assemblies>
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </assemblies>
    </compilation>

If you want to keep the visible attribute set in the ToolsFile.xml just set the debug attribute to false and the editor will be displayed without the MS AJAX error.

<compilation debug="false">

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
ChrisS
Top achievements
Rank 1
Answers by
Rumen
Telerik team
ChrisS
Top achievements
Rank 1
Share this question
or