Kanzi 3.9.2 migration guide

Use this migration guide to update Kanzi applications from Kanzi 3.9.1 to Kanzi 3.9.2.

Java 8

Kanzi Android framework (droidfw) and Kanzi Java API now require Java 8 (1.8) or higher.

In the Gradle files of your application ensure that the Java language version is set to a compatible version. For example, in app/build.gradle set:

android {
    ...

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Changes in Kanzi Java API

  • Removed the Metaclass constructor overload that required you to pass the associated class as an argument. Kanzi automatically infers the class based on the location of the initialization of the Metaclass instance.

    Change your Metaclass initializations from

    class MyClassName
    {
       public static final Metaclass metaclass =
          new Metaclass("Example.MyClassName", MyClassName.class);
    

    to

    class MyClassName
    {
       public static final Metaclass metaclass =
          new Metaclass("Example.MyClassName");
    
  • The Optional* family of classes are no longer used and have been removed.

    • Matrix4x4.getRotationAngle() now returns a nullable Vector3 instead of an OptionalVector3.

    • Matrix4x4.createLookAtMatrix() now returns a nullable Matrix4x4 instead of an OptionalMatrix4x4.

Changes in focus handling

Kanzi 3.9.2 introduces these changes in the focus handling API:

Kanzi 3.9.1

Kanzi 3.9.2

Node::ContainsFocusProperty

Node::FocusStateProperty

ModalScope implements modal scopes and is inherited by PopupScope

OverlayScope implements the base of overlay-type focus scopes and is inherited by:

  • AutoClosingModalScope (replaces PopupScope)

  • AutoClosingModelessScope

  • ModalScope

  • ModelessScope

FocusManager::FocusScopeType enumerator with these values:

  • NoScope

  • Group

  • Fence

  • Modal

  • Popup

FocusScopeType enumerator with these values:

  • NoScope

  • Group

  • Fence

  • Modal

  • AutoClosingModal

  • Modeless

  • AutoClosingModeless

FocusScope::getModalScope()

FocusScope::getOverlayScope()

getPopupTypeScopeForNode()

findOverlayScopeForNode()

isPopupTypeScope()

isOverlayScope()

FocusManager::createFocusScopeInfo()

FocusScope::create() with variants that take as arguments either Node or FocusScopeType and Node.

void Node::updateFocusScopeInfo()

virtual void Node::updateFocusScopeInfo(FocusScopePtr& nodeScopeInfo)

FocusManager::getPrecedingScope(), returns ModalScope

FocusManager::getOverlayBelow(), returns OverlayScope

FocusManager::getForemostScope(), returns ModalScope

FocusManager::getForemostOverlay(), returns OverlayScope

FocusManager::getForemostScopeNode()

FocusManager::getForemostOverlayNode()

FocusManager::ScopeBroughtToFrontMessage

FocusManager::OverlayBroughtToFrontMessage

FocusManager::
ScopeBroughtToFrontMessageArguments
FocusManager::
OverlayBroughtToFrontMessageArguments

FocusManager::ScopeSentToBackMessage

FocusManager::OverlaySentToBackMessage

FocusManager::ScopeSentToBackMessageArguments

FocusManager::OverlaySentToBackMessageArguments

FocusManager::bringScopeToFront()

removed

FocusManager::BringScopeToFrontMessage

removed

FocusManager::BringScopeToFrontMessageArguments

removed

FocusManager::sendScopeToBack()

removed

FocusManager::SendScopeToBackMessage

removed

FocusManager::SendScopeToBackMessageArguments

removed

FocusManager::ScopeStack::bringToFront()

removed

FocusManager::ScopeStack::sendToBack()

removed

FocusManager::trySetFocus(ModalScope& popupScope, NodeSharedPtr newFocusNode)

removed

FocusManager::FocusChainDirection enumerator with these values:

  • PreviousFocusable

  • NextFocusable

FocusChainDirection enumerator with these values:

  • Previous

  • Next

FocusManager::FocusReason enumerator with these values:

  • ForceFocusReason

  • FocusChainNavigationReason

  • HiddenFocusReason

  • UnhiddenFocusReason

  • OtherScopeInFront

  • ScopeDetached

  • ScopeNextInStack

  • OtherFocusReason

FocusReason enumerator with these values:

  • Force

  • FocusChainNavigation

  • Hidden

FocusManager::ScopeStack

detail::OverlayStack

To migrate to Kanzi 3.9.2 a Kanzi Studio project that you created with an earlier version of Kanzi and that contains popup-type focus scopes:

  • The Bring Scope To Front and Send Scope To Back actions no longer exist. Replace the invalid actions with Set Property actions that set the visibility of the focus scope.

  • To close an overlay with touch output outside that overlay, use the Input Outside Overlay trigger with a Set Property action that hides the overlay.

See Creating an overlay.

To migrate to Kanzi 3.9.2 a Kanzi Studio project that you created with Kanzi 3.9.1 and that uses the Contains Focus property, use the Focus State property instead. See Showing when a user interface element has focus.

Changes in class metadata

  • Renamed these properties in class InputManipulator::InputMessageArguments:

    Kanzi 3.9.1

    Kanzi 3.9.2

    InputMessageArguments.Manipulator.Point

    InputManipulator.InputMessageArguments.ManipulatorPoint

    InputMessageArguments.Manipulator.RayOrigin

    InputManipulator.InputMessageArguments.ManipulatorRayOrigin

    InputMessageArguments.Manipulator.RayDirection

    InputManipulator.InputMessageArguments.ManipulatorRayDirection

    InputMessageArguments.HitTest.Point

    InputManipulator.InputMessageArguments.HitTestPoint

    InputMessageArguments.HitTest.RayOrigin

    InputManipulator.InputMessageArguments.HitTestRayOrigin

    InputMessageArguments.HitTest.RayDirection

    InputManipulator.InputMessageArguments.HitTestRayDirection

    InputMessageArguments.HitTest.Object

    InputManipulator.InputMessageArguments.HitTestObject

  • Renamed these MessageArgument metaclasses in StateManager:

    Kanzi 3.9.1

    Kanzi 3.9.2

    Message.StateManager.MessageArguments

    Message.StateManagerMessageArguments

    Message.StateManagerStateChange.MessageArguments

    Message.StateManagerStateChangeMessageArguments

    Message.StateManagerGoToState.MessageArguments

    Message.StateManagerGoToStateMessageArguments

    Message.StateManagerGoToDefinedState.MessageArguments

    Message.StateManagerGoToDefinedStateMessageArguments

    Message.StateManagerGoToNextDefinedState.MessageArguments

    Message.StateManagerGoToNextDefinedStateMessageArguments

    Message.StateManagerGoToPreviousDefinedState.MessageArguments

    Message.StateManagerGoToPreviousDefinedStateMessageArguments

    Message.StateManagerEnteredState.MessageArguments

    Message.StateManagerEnteredStateMessageArguments

    Message.StateManagerLeftState.MessageArguments

    Message.StateManagerLeftStateMessageArguments

    Message.StateManagerTransition.MessageArguments

    Message.StateManagerTransitionMessageArguments

    Message.StateManagerTransitionStarted.MessageArguments

    Message.StateManagerTransitionStartedMessageArguments

    Message.StateManagerTransitionFinished.MessageArguments

    Message.StateManagerTransitionFinishedMessageArguments