I've been puzzling over the tabIndex config for ExtJS's Ext.form.field.Base (generic field, in other words). I didn't find much information in the documentation (but then maybe I looked in the wrong place), so I went with trial and error and here's how I understand it now.
Fields where tabIndex is set explicitly with an integer value strictly greater than 0 are ordered by ascending tabIndex. If several fields have been set with the same tabIndex value, they are sub-ordered by creation: the first field created goes first and so on.
Fields where tabIndex is set explicitly with 0, or where tabIndex is not set explicitly, go next, with the same sub-order by creation.
Fields where tabIndex is set exlicitly with an integer value strictly lesser than 0 are out of the order: you cannot reach them with Tab.
(I'll admit that I didn't try to set tabIndex with non-integer values.)
Can someone confirm that this is the way it works, or better yet, point out mistakes or omissions in the above, please ?
The nice folks at sencha have confirmed it : http://www.sencha.com/forum/showthread.php?250586-Can-someone-please-confirm-tabIndex-behavior-with-Ext.form.field.Base&p=918558#post918558
They also pointed out that it was the same in HTML, which is quite right but I had had no inkling of it. Silly me. Well, I hope someone else will find this useful.
Related
I am trying to make a comparison between two different dates in the GDS and present that information in a scorecard.
I have done this in the past with no problem, but this time I want to do an absolute comparison. Although I checked the box to make it an absolute comparison, the information appears with a % sign after it. I would like to see a "p.p." after it or nothing at all.
How can I achieve this result?
You can find below an image of what is happening.
Thanks in advance!
UPDATE:
I solved the issue by aligning all the elements of that scorecard to the right and adding a text box in front of the % sign. It is not perfect, but it works.
Not the answer you're looking for, but I don't think this is currently possible. I had to add a disclaimer below the scorecards to indicate the comparison values are absolute (despite the percentages). Not ideal, but at least it shows the info
Using CakePHP 3.7.
I have added, at the bottom of config/bootstrap.php:
Inflector::rules('irregular', ['thesis' => 'theses']);
and actually, I've tried
Inflector::rules('irregular', ['theses' => 'thesis']);
just in case I had it backwards.
And in a cell I am trying to use:
use Cake\Utility\Inflector;
$singular_and_plural = [Inflector::singularize($base_name), $base_name];
The result for singularizing the word "thesis" is "thesiss".
Can anyone point out what's wrong, here?
The first form is the correct one, the key is the singular value, and the value the plural value.
That being said, what you're showing here is incorrect/problematic usage of Inflector::singularize(), as you're passing a value to it that already is singular, doing that often gives you unexpected/wrong results. You could open an issue ticket in such cases, sometimes this can be fixed in the core, but often times it's simply not possible as it would conflict with existing, required rules.
It should also be noted that CakePHP can handle thesis/theses out of the box already, it has singular/plural rules that match that. Make sure that you are passing in the expected values, and that you don't have additional custom rules that may interfer with what you're trying to inflect.
Sometimes you need to ng-if or ng-show an item in html based on some choices made earlier. One of these for me is "Additional Item". You can enter one set of information, and also if you want, an additional set. This creates an array of 2 similar objects. With this setup, you can only have 1 or 2 objects in this array. (important, since the scope of this question needs to be limited this way)
I want to ng-show an html directive based on "myItemsArray.length > 1". Since the array can (read should) only be 1 or 2 in length (not 0), this should work. However, it does not, because AngularJS seems to be adding an item "proto" to the array which adds to the count. See the image.
The problem is, proto makes the array length equal 2. I am not going to just look for length > 2 because i really don't know if i can count on proto always being there, and i just think thats bad practice anyway.
Also, i know there are MANY other ways of doing this (setting a boolean, or using another var to indicate etc, but i really just want to work with count of items in the array because "business logic"..
EDIT:
After doing a little debugging, i'm seeing that i have an array of "Object, undefined". How is this even possible :)
Some search lead me to this. Why are some values in my array undefined
EDIT:
Seems that using a delete may cause this problem
I've been battling this issue for a while now and seem not to be able to come up with a concrete workaround - I have a TextBox which is bound to a decimal, and the binding has UpdateSourceTrigger set to PropertyChanged and is so by necessity (LostFocus won't work well in this case). The default behavior while I'm sure is somehow explainable, is not acceptable for my purposes, so I've tried the following StringFormat, which I had thought remedied the issue, but only partially and am now looking for something more concrete. My originaly fix was to add a string format to the binding...in my case it was
StringFormat={0:#.#####}
so when typing something like .12345 or 1.5 the solution works great, however if I type .01234, as soon as I hit the zero key, it removes the decimal I had just typed...which for obvious reasons would be disasterous in terms of data entry. I'm hoping that my familiarity with string formatting is just lacking. Wost case scenario I'll have my exposed property be a string and the setter and getter just convert to decimal, but that seems like a hacky solution.
Thanks!
Aj
I came across this because Im seeing the same issue with a .Net 4.6.2 build. I needed to enter an exchange rate, e.g. 1.15 and found it was ending up as 115 with the decimal removed. My workaround was to bind to a string property that maintained it's own string value while input e.g. 1, 1., 1.1, 1.15. But with each input attempted to update the underlying numeric property inside a Try Catch. It's far from elegant, but works for my needs.
You have two simple choices to achieve what you want:
Try typing a '0' first... you can enter '0.01234' without issue.
Use StringFormat={}{0:0.00000} instead... then you can enter '.01234' without issue.
is it possible to read the value of an IdentityTag if you place it on the TagVisualizer, without having initalized it before?
I would like to use the tags for registering a new object on the Surface but having all the "free" IdentityTags in a Collection for initalizing them all... There must be a better way to do in I think.
But the TagVisualizer doesn't seem to do anything when you put a tag on it that it doesn't know.
If I understand correctly, you'll need to start by setting up your TagVisualizer with a TagVisualizationDefinition with a Matches method that always returns true.