cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

1617
Views
1
Helpful
18
Replies
e.gailiss
Enthusiast

Custom "math" CVP CallStudio element.

I'm trying to create custom element for CallStudio. Something along the lines of built-in math element. It has to have some parameters and a button to open simple editor where I can enter multiple lines of text.

Dealing with parameters is easy, but I couldn't find any examples how to do this "button to open additional editor window". Can anyone point me to any samples?

Thank you!

Ervins

18 REPLIES 18
vinodkewate
Beginner

If you are trying to pass Text as parameter to your Custom Configurable element, you could declare the field as TextField under setting configuration,

settingArray[n] = new Setting("TextEditor", "Enter Text Content",

                          "This setting is for large text content",

                          false,  // It is not required

                          true,   // It appears only once

                          true,   // It allows substitution

                          Setting.TEXTFIELD);

Vinod,

Thank you for your suggestion.

At the moment I went with this suggestion. All is looking more or less fine but I have hit another problem - substitutions.

Textfield editor has substitutions enabled regardless if they are disabled for this parameter when Setting is created.

I couldn't find any way how to prevent substitution analysis happening on text field and data format I'm using involves {}.

I could replace curly brackets with some pattern and then replace them back in element logic itself, but then it looks like the way Hemal suggested - I have to create my own editor to modify textfield before saving..

Ervins

hemal.mehta
Contributor

I assume you are looking for an editor similar to expression in Math element. Check for Math related classes in elements.jar. For example on CVP 8.5, it will be under:

C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.elements.core_8.5.1

You can look at the code for the same.

Hemal

Hemal,

Thank you for suggestion.

In folder you mention contains only class files - pre-compiled java bytecode. Are those the files you were thinking about?

Ervins

Yes, you can decompile them.

Regards,

Hemal

Hemal,

I decompiled class files - they use the same approach as Vinod suggested.

The problem with that is I need to disable substitution process in order to use curly brackets in text itself. Any ideas?

Thank you!

Ervins

Are you saying that you do not need the substitution functionality where the system will interpret what is there in the { } ? Could you give more details on what you are trying to accomplish ?

The real question is whether the updateApp.bat will allow you to use { }

for something other than specifying studio variable names! My guess is

that it won't.

You can disable substitution when you define the setting for the TextField.

Just set the 2nd boolean to false.

Setting constructor:

string real-name, string display-name, string description, boolean is

setting required?, boolean is substitution allowed?, boolean is the

setting single?, typeOfSetting