dat.gui display simple text - text

Is it possible to display a simple text in dat.gui?
A text input field can be achieved, but I would like to use dat.gui to display comments, such as the application controls. Is that even possible?

Yes it is.
First you will have to determine the location of your particular text. It will be either in gui.__controllers or gui.__folders.__controllers.
For instance, I have a Folder called "Animation", and inside this folder I have a simple text display. But to get rid of input that is associated with the simple text display, you have to manipulate the domElement.
The command below,
gui.__folders["Animation"].__controllers[0].domElement.hidden = true;
will hide the 'input' and only display the 'application controls'.

Related

Browser Based Application on IE a spying issue on blue prism. Element gets off screen and bp can't highlight

I am using citrix vdi to read an element on webpage. It is able to highlight and read the value in open vdi but in close vdi layout of webpage messes up and element i need went out of bound/off screen from webpage. I have tried minimize and maximize before reading value but invain. I also tried html mode and AA still cannot read it. In html mode i kept only path attribute for element, value remains exactly same on close and open vdi. The only difference i have notice is width of div in which element resides. Div width changes in open 1921and close 1203 which i assume push element out of screen bounds. Any help will be appreciated.
When working with Blue Prism don’t rely on initial attribute set. You need to choose as few attributes as possible to uniquely identify element. You should always untick attributes that are empty or it’s value it’s “Self” (for example Element ID attribute tends to have such value which doesn’t mean anything). Generally, attributes connected with elements position on the screen or its size are not helpful, because it may be easily affected.
When working with HTML spy mode your elements don’t need to be visible on screen to interact with them (unless you are using surface automation techniques), HTML elements don’t have any Visible or Screen Visible attributes.
Try to use attributes like:
Tag Name
Class Name
ID
If Value has always particular text, use wildcard type of match: text
Path attribute is not always the best choice as it might change because web page is dynamic or application update mess up the layout. If you won’t be able to identify element any other way, make sure you use Path as Dynamic match type & store it as environmental variable, so it could be easily adjusted if needed.
If you have problems reading value using “Get Current Value”, try “Get HTML Attribute” in Read stage options & try “Value” or “Title” as an Input.

Test for overflow text in basiljs

I'm new to basiljs and am wondering if it is possible to test whether text is overflowing from a textbox. So I want to write the code to:
-create a text box,
-drop some text into it,
-tests if the text overflows
- if so, create another text box and link to the first.
- if not, finish.
Is there a way to carry out the test step?
Every textframe has a property overflows:
if (myTextFrame.overflows == true){
// link it
}

Dynamically add / remove editable area to custom control embedded in XPage

Okay... this is a little difficult to explain but I will try my best.
In Custom Control while adding properties in Property Definition we can set "Allow multiple instances" which allows us to add multiple instances of that property when the control is embedded in XPage.
Similarly, I need to know whether it is possible to add (and remove) Editable Areas in a custom control when it is embedded in XPage? What I plan is that I would have a repeat control inside my custom control and I would be able to put the contents in each editable area in every loop of that repeat.
Is this the right way to go about or am I looking at this problem incorrectly? Any solution not involving editable areas is also welcome :)
Update 4 Apr 2013:
A use case context I am looking for is a simple carousel where contents of each screen in carousel can have different contents. These contents would be put into each (dynamically added) editable area. The contents can be very different from each other with one screen containing only text, other only image and another both image and text.
Look at the table walker example in the 26 original exercises. It does mostly what you are looking for (conceptually). You won't need multiple editable areas. Whatever is inside the repeat gets repeated.
What you want to do is to give the control a custom property "boolean editMode" so you can render that one line to be edited - if that's the UI pattern you want to follow.
You also could consider a dojo table with Ajax which allows for a familiar spreadsheet UI

how to get rid of text selection in wxwidget combobox component?

In my program I want the user to be able to choose between some options so I was using wxChoice component. Unfortunately after user interaction (clicking a button) I have to show custom text (not from my predefined list). Everything works fine if I use wxCombobox control but the drawback of this approach is that each time user selects an element from a list, selected text is highlited. It is annoying. I want the component to be read-only like. How to achieve this ?
Some code to visualize my question:
wxComboBox* viewAngle = wxDynamicCast( owner->FindWindow
( ID_CHOICE_3D_VIEWANGLE ), wxComboBox );
viewAngle->SetSelection( wxNOT_FOUND );
viewAngle->SetValue(_("Custom View"));
EDIT:
This control is used to set camera view in 3D object viewer application. Possible options are like: top, left, right, etc. It is also possible that the user moves 3D object using mouse. In that case I want my combobox to display "custom view" string. However "custom view" should not be a part of combobox list because selecting this option does nothing.
wxWidgets default implementation alwasy marks selected text. Which might be misleading for the user because he might think that he is expected to input any text.
IMHO, the custom text should be added to the wxComboBox control, the program could just ignore it when user selects that option.
Also, the wxComboBox's wxCB_READONLY style could be used to avoid the highlighting thing.

cucumber testing for codemirror

I want to write cucumber test (bdd) for filling in codemirror with "abcd". But I cannot write
When I fill in "myFrame" with "abcd"
The codemirror hides the textarea and the text area is replaced by iframe. If there would have been text area, I would have simply written
When I fill in "myFrame" with "abcd"
But I don't know how to write test for filling in codemirror. May be I need to add custom step. If I could any how know to insert data into iframe, I think my problem would be solved. I am open to suggestions.
There exists a CodeMirror property on the wrapper DIV (which has class CodeMirror).
So you can execute the script :
$('.CodeMirror')[0].CodeMirror.setValue('Your value')

Resources