Animation Error: _animation_update_transforms: Failed setting key - animation

I'm getting an error as such:
E 0:00:00.744 _animation_update_transforms: Failed setting key at
time 0 in Animation 'Running' at Node '/path/to/AnimationPlayer',
Track 'path/to/custom node:rotation_degrees'.
Check if property exists or the type of key is right for the property
<C++ Source> scene/animation/animation_player.cpp:871 #
_animation_update_transforms()
I'm trying to rotate a custom node (made by extending position2D) in animation but for some reason this error shows up.
According to the error:
Check if property exists
since I've extended position2D the rotation property exists
and the other part:
type of key is right for the property
I believe the values for the key are accurate, as when I hover over the keys
all the values seem to be accurate:
How do I fix this error?
or anyway to further isolate the error to pinpoint exactly where it's occurring within my custom node script?

if you are editing animation with godot script. You should update points that are set by auto.
Try something like this:
$AnimationPlayer.get_animation("rotate").value_track_set_update_mode(0, Animation.UPDATE_CAPTURE)

Try to uncheck "Reset on Save" option on the AnimationPlayer Node and delete "RESET" animation.

Related

Xcode UITest sometimes does not find property of XCUIElement

In my UI tests, the frame property of some XCUIElement are found, but not of others.
The accessibility identifiers used below are set in storyboard, and app is initialised in setUp() as XCUIApplication().
Here is the storyboard layout:
The two UI elements used in the test are Text Field and Add Button.
Here is the relevant code:
func test() {
// given
let mainViewNavigationBar = app.navigationBars[„NavBar“]
let navBarHeight = mainViewNavigationBar.frame.size.height
print("navBarHeight: \(navBarHeight)") // is printed out correctly
let addShoppingItemTextField = app.textFields["TextField"]
let textFieldHeight = addShoppingItemTextField.frame.size.height // error breakpoint here
print("textFieldHeight: \(textFieldHeight)")
}
The test stops at an error breakpoint at the second last line with the following message:
No matches found for Find: Descendants matching type TextField from input {(
Application, 0x60000019f070, pid: 13114, label: ‚xxx‘
)}
I do not understand why the frame property, which should be defined for all XCUIElement, is found in the first case, but not in the second.
EDIT
Oletha pointed out below, that my constant addShoppingItemTextField is an XCUIElementQuery that should be resolved when I try to read the frame property of the textField.
Indeed, when the program stops at the test error breakpoint and I print its description, I get
Printing description of addShoppingItemTextField:
Query chain:
→Find: Target Application 0x6080000a6ea0
↪︎Find: Descendants matching type TextField
↪︎Find: Elements matching predicate '"TextField" IN identifiers'
But the find fails, although Accessibility is enabled, and the Accessibility Identifier is set to TextField:
I also inserted in the app
print(textField.accessibilityIdentifier!)
in viewDidLoad(), and it printed out TextField correctly.
As a workaround, I set the test to recording, and tapped the textField. This created code for the access to the textField. I then replaced let addShoppingItemTextField = app.textFields["TextField"] by (the right side was generated by the recording):
let addShoppingItemTextField = app.otherElements.containing(.navigationBar, identifier:"WatchNotOK")
.children(matching: .other).element.children(matching: .other).element
.children(matching: .other).element
And now the code works without errors.
So it seems to me that the query for the accessibility identifier of a textField does not work correctly.
EDIT 2
I give up: Without changing anything in the storyboard, the test now stops with the same test error (No matches found for Find: Elements matching predicate '"WatchNotOK" IN identifiers‘) at the line let navBarHeight = mainViewNavigationBar.frame.size.height. This did work all the time.
This indicates to me that Xcode UI tests are broken.
I contacted Apple, and they found my bug:
The view of my main view controller had its accessibility property set to true. This was wrong; it must be set to false:
The explanation is found in the docs to isAccessibilityElement:
The default value for this property is false unless the receiver is a standard UIKit control, in which case the value is true.
Assistive applications can get information only about objects that are represented by accessibility elements. Therefore, if you implement a custom control or view that should be accessible to users with disabilities, set this property to true. The only exception to this practice is a view that merely serves as a container for other items that should be accessible. Such a view should implement the UIAccessibilityContainer protocol and set this property to false.
As soon as I set accessibility of the main view to false, the UI test succeeded.
In addition with above answers... I would like to add one point
This may happen because the XCUIElement you are accessing is not available on screen.
Suppose you are executing test case for login screen and simulator is launching with dashboard not with login screen. This happen with my case. I tried to logout and then execute test case. Error disappears
The problem is not that the frame property is not found on the element, it's that the element itself could not be found.
Every XCUIElement is derived from an XCUIElementQuery. The first attempt to resolve the query is not, as you might expect, when you assign the value of addShoppingItemTextField, but the first time you access a property (other than exists) on addShoppingItemTextField.
Therefore, when you try to access the frame property on the XCUIElement object, the query for finding that element is resolved, but the element is not found - so you get the error saying 'No matches found...' on the line where you access frame. This can be a bit misleading, but the problem you're encountering is that the element could not be found. Try adjusting your query.

What does the error 'Unsupported Configuration' mean?

When I go to the screen that is causing this error, their is a white screen. It should have a website on it. Ive read the error but I don't know how to fix it. Any help? The Picture shows what it says.
Update: The warnings have went away but I still get a white screen.
Look underneath the error and read what it says:
Constraint referencing items turned off in current configuration. Turn
off this constraint in the current configuration.
It seems as though you had some items in your storyboarrd window that had some constraints set on them, and then those items were deleted. The constraints seem to still be set.
If you remove those constraints, this error should disappear.
If you cannot find those constraints, refer to this question's answer:
Xcode Storyboard warning: Constraint referencing items turned off in current configuration. Turn off this constraint in the current configuration

Bundle by Name Output Cluster Error

Im just getting into using LabView and I ran into an error I can't seem to get rid of while working on a small sample exercise with the Bundle by Name Function.
Under here you can find my front panel, block diagram & error message displayed.
The output cluster is all indicators and all the items in the Enums have the same values, I don't know what I am doing wrong here. Can anyone help out?..
Thanks in advance!
Just delete your output cluster, than right click on bundle function and create indicator.
The problem is your output cluster order is other than cluster constant order.
Please read about type definitions and consider using them to avoid problems like this in the future.
Double check that your indicator and the cluster constant are actually the same type. A short cut would be to delete the existing control and just creat a new on by right clicking on the terminal of the unbundle by name and selecting create>>indicator.
Given the error message, I would say that it's because of the difference in elements order, between the constant you're giving to the Bundle, and the indicator wired to the output.
You can make sure of order consistency by right-clicking on the border of the cluster constant, and select AutoSizing -> Arrange vertically. This will order the elements, and to fix it you re-order by selecting Reorder controls in cluster in the same menu. Of course, you can also fix the ordering of the indicator.

NSStepper ignores current NSTextField value

I have the same initial problem as described in Integrate NSStepper with NSTextField:
I need to have a NSTextField working with a NSStepper as being one control so that I can edit an integer value either by changing it directly on the text field or using the stepper up/down arrows.
Using bindings as commented on by carlosb results in a usable UI. However, in the initial question carlosb describes the following:
Problem is that if I edit the text field then click the stepper again it will forget about the value I manually edited and use the stepper's internal value.
This is why I am posting a variation on this question again. carlosb's use of bindings doesn't solve this problem. This happens in both the current project I am working on and a test project I have created. The test project can be found at GitHub. You can download it there (even without git) via the "Download Source" button in the top right.
Is there a clean way to solve this issue?
Text fields and sliders are both in the view layer of the MVC pattern. You'll have much better results by binding both of those views to a property of your controller.
Your problem is that that the editing isn't ended until you press return or the field loses focus (so the number is never actually changed). If you press return or leave the field after editing, you'll see it works as expected.
One solution is to check the "Continuously Updates Value" option in the text field's value binding and check the "Continuous" option in the text field's attributes.
This will make sure the value is being updated as it's typed, so an immediate click on the stepper will reflect these changes.

Setting CTreeCtrl item's checkbox to partial state

First I add TVS_EX_PARTIALCHECKBOXES to the CTreeCtrl's extended styles:
TreeView_SetExtendedStyle(tree->GetSafeHwnd(), TVS_EX_PARTIALCHECKBOXES, TVS_EX_PARTIALCHECKBOXES);
Now how do I actually set any item to this state? There doesn't appear to be any documentation about that. I guessed that since checking and unchecking works by changing the item's state image to 1 or 2, I can try my luck with 3:
tree->SetItemState(tree->GetFirstVisibleItem(), INDEXTOSTATEIMAGEMASK(3), TVIS_STATEIMAGEMASK);
Of course that would have been too easy, it just made the image disappear.
Maybe you need to use tree->SetCheck() instead of tree->SetItemState(), Try setting check state to 2.

Resources