System.IO.FileLoadException: Exception raised in RichEditBox document - exception

Hi, I have a user control that extends RichEditBox, we have a TextChanged Property, we bind a string variable to the Text Property, and the error shown in the image is generated within the TextChanged function, I am not sure why this error is being generated.. Any clue would be helpful.
For further information, Document.Selection is not null, Document.Selection.Text does show the last string bound to it, TASK_DONE_SYMBOL is not null either.
We have a page with a lot of items, each item has a RichEditBox, and when we update some of the items, sometimes, not always, does this issue come up.

Related

GAS error, listbox field displays "function addKeyPressHandler() {/* */}" instead of list

I just created this form and my first listbox works well, and notes box works well but second listbox is full of junk, non of which is found in the code?
starting with :
"function addKeyPressHandler() {/* */}"
then on to: mousedown, stylePrimary etc
any clue why?
var LOCATION = ['Select a Location','A Res','B Res','C Res','D Res','MNT','OSB','TWB','VP','VM','SITE DEV']
var ISSUETYPE = ['Select an ISSUE TYPE','Poor Workmanship','Lack of Training','Not Per Plans','Not Per Code','Not Per Spec','Plan Conflict']
Although it's hard to say exactly why without seeing more of your code, the "junk" you describe will show up when you are looping over and displaying properties of an object. You're seeing the functions attached to that object.
So check the code you are using to generate the select options on the problematic listbox, it's probably a typo, or perhaps you've inadvertently re-used a variable name and assigned an object too it, or maybe you have an un-quoted string that matches the name of some object.

MvxAutoCompleteTextView setting Text property to SelectedObject ToString()

I am using MvxAutoCompleteTextView (MVVM Cross's custom AutoCompleteTextView) and have the List appearing fine and the ItemTemplate displaying as expected.
When I click on one of the Items in the List the Text property gets set to the full name of the Type of object in the List. For example if the List contained objects of type MyObject in a namespace of MyCompany.MyDept the text property would be set to the string "MyCompany.MyDep.MyObject"
Anyone else ever seen this?
UPDATE
It looks like Android's AutoCompleteTextView prefers just a list of strings as the source of the list.
There is a method in the Android code called ConvertSelectionToStringFormatted but I cannot see how to provide an alternative to that
If you look at my UPDATE in the question you will see that the problem lay with ConvertSelectionToStringFormatted.
I could not see how to easily create a custom version of MvxAutoCompleteTextView with my own implemenation of ConvertSelectionToStringFormatted so I need a different approach.
Android's AutoCompleteTextView was obviously calling ToString on the selected object so I overrode ToString in my object to return a display name that was more useful than "MyCompany.MyDep.MyObject"
I thought I would also include my final axml for the control as that was pretty important
<MvxAutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
android:hint="Enter drug name..."
local:MvxItemTemplate="#layout/item_myObj"
local:MvxBind="ItemsSource Suggestions;
PartialText SearchTerm;
SelectedObject SelectedObj;" />
Setting completionThreshold was pretty important, when that was not set the control stopped working\searching once I had cleared the box. No matter what I typed after clearing the box (with backspace) it would not autocomplete anymore. Another odd issue when threshold was not set was that the PartialText was binding as an empty string once it went to 1 character! Yes 1 not 0.
Do not make the mistake of binding the Text property of the control. PartialText is the search term leave Text well alone. This caused me lots of odd issues.
Good luck

AS3 (ActionScript 3), Tabbing 3 Times before Switching Fields

It always comes as a surprise to me when I google a problem I am having and I am completely unable to find anything similar. In fact, the only 1 post that i found that describes the same problem can be found here: Tabbing between fields - where does the cursor disappear to?
That question got no responses unfortunately, and I am having the same exact issue.
The only major difference is, I'm using Classic Text instead of TLF Text.
My Form is setup on as3 w/ 2 input fields. the first has tabIndex set to 0, and the second has it set to 1. When i hit tab, the cursor vanishes. If i press it 2 more times, it finally shows up.
I placed the code below to observe what was happening:
var iox = function() {
trace(_root.stage.focus);
if (_root.stage.focus != null) {
trace(_root.stage.focus.parent.name)
}
setTimeout(iox, 400);
}
iox();
I expected to see maybe other fields file that might've been hidden getting the focus or some other object.. But turns out that the only 2 objects that get the focus are indeed my input boxes. After typing into 1 field, pressing tab only once switches the focus to the other field. However, the blinking cursor indicator, as well as the ability to type text into the field only shows up after the third time the button is pressed.
Any ideas?
After some more digging and some trial and error I've managed to fix the problem.
Basically all i had to do was import the FocusManager class and activate it. The triple tabbing button just vanished after that.
import fl.managers.FocusManager;
var fm = new FocusManager(myclip);
myclip.txt1.tabIndex = 0;
myclip.txt2.tabIndex = 1;
Check if any of your other items on display list have tabEnabled property set to true. TabEnabled property description MCs with buttonMode set to true have this enabled. Apparently there are two objects with this setting in the list when you check. So either perform a manual check, or do the complete displaylist walk querying at least class name and name property of any object that has tabEnabled as true.

How to copy Input Text Value into Dynamic Text that is in a MovieClip1 Inside a MovieClip2

Current my code is as such
setcustomlocation.addEventListener(MouseEvent.CLICK,customlocation2);
function customlocation2(e:MouseEvent):void
{
locationinput.text = FlashingWon.Won1.name.text;
}
I'm trying to make it such that it would copy the input text field values into a dynamic text. However, it throws up the error that
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at main/customlocation2()[main::frame1:9]
Which can I only assume that it is not able to communicate with the dynamic text field in the movieclip within another movieclip.
First, you can be 100% sure that it CAN communicate with the dynamic TextField in the MovieClip.
From you description I understand that you wish to copy from input into dynamic. But from your code I see that you take from the dynamic into the input, please check that out:
// This will copy in such a way: input <= wonText
locationinput.text = FlashingWon.Won1.name.text;
// This will copy from input
FlashingWon.Won1.name.text = locationinput.text;
Anyhow, the error that you get has nothing to do with this, it's rather like you already noticed, that one of your TextField is not 'found'. For this I recommend you a best practice: To create instances of the objects you want to use and populate them from the stage through the getChildByName method. This way you will promptly now (specially if you do this on construction or init) if you had any misspelling or miss structure on the childs you want to get.
like so:
var inputText: TextField;
var dynoText: TextField;
In your Constructor or else where at a soon level, give to your vars the proper value:
inputText = getChildByName('locationinput') as TextField;
dynoText = FlashingWon.Won1.getChildByName('name') as TextField;
This way you will soon enough know if one of this 2 textFields were not found under the object you give, and you have only one place to miss spell it. Also you will get code completion on your TextFields.
Finally the copy text part:
dynoText.text = inputText.text;
Hope it helps.
Alright, sorry for the delay, I was out on holidays.
I have opened your example and can see where the problems are:
1) You are trying to reach the FlashingWon when initiating the dynoText on the FIRST frame like so var dynoText = FlashingWon.Won1.getChildByName('name_txt'); BUT the FlashingWon element is ONLY available on the FIFTH frame. Meaning that you cannot refer to it quite yet, unless you add it on the first frame and make in invisible till the fifth frame. (You can make it visible in the goto1 function if you wish after the goToAndStop(5) line)
2) You called the TextField on the Won1 element 'name' which is a restricted sting in AS3, so change it to name_txt or label if you wish and it will work.
Let me know how it worked.

Class '<classname>' cannot be indexed because it has no default property

I created a custom code block for the first time in a report.
When the report is previewed this error is displayed:
Class '<classname>' cannot be indexed because it has no default property
I am trying to populate a report field with a value. Here is the code in the custom block:
Sub PopulateSubTotal
Fields!HeaderSubTotal.Value = Fields!TextboxSubTotal.Value
End Sub
Please tell me what I did wrong as this is my first attempt at using custom code blocks in a report.
If you get this error and the class name is ReportExprHostImpl.CustomCodeProxy, you may have written an expression with Code!MyFunction(...) instead of Code.MyFunction(...).
A solution was found.
I found out this can't be done in a custom code block so I used a variable instead.
Please reference this posting for the answer:
Displaying the value of a textbox in other parts of a report