Cannot assign to non-existent property "tools"

Bug #1576463 reported by XiaoGuo, Liu
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Fix Released
High
Cris Dywan

Bug Description

On the page: https://developer.ubuntu.com/api/apps/qml/sdk-15.04.5/Ubuntu.Components.ToolbarButton/, in the code snippet:

import QtQuick 2.4
import Ubuntu.Components 1.3
MainView {
    width: units.gu(50)
    height: units.gu(80)
    Action {
        id: action1
        text: "action 1"
        iconName: "compose"
        onTriggered: print("one!")
    }
    Page {
        title: "test page"
        Label {
            anchors.centerIn: parent
            text: "Hello, world"
        }
        tools: ToolbarItems {
            // reference to an action:
            ToolbarButton {
                action: action1
            }
            // define the action:
            ToolbarButton {
                action: Action {
                    text: "Second action"
                    iconName: "add"
                    onTriggered: print("two!")
                }
                // override the text of the action:
                text: "action 2"
            }
            // no associated action:
            ToolbarButton {
                iconName: "cancel"
                text: "button"
                onTriggered: print("three!")
            }
        }
    }
}

when running, it complains Cannot assign to non-existent property "tools"

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
Revision history for this message
Cris Dywan (kalikiana) wrote :

The Page component in Ubuntu.Components 1.3 has no "tools" property anymore.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :

Then it is a bug against the documentation of the API. We need to correct the example code on the page. It is confusing to the developers.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Invalid → New
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Christian Dywan (kalikiana)
status: New → Confirmed
importance: Undecided → High
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
milestone: none → 12
status: New → Fix Committed
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 1.3.1984+16.10.20160527.2

---------------
ubuntu-ui-toolkit (1.3.1984+16.10.20160527.2) yakkety; urgency=medium

  [ Christian Dywan ]
  * Slimmer frame for TextFields: 0.5dp. Fixes LP: #1578190.

  [ Albert Astals Cid ]
  * Add override
    The override specifier (since C++11) specifies that a virtual function
    overrides another virtual function. In a member function declaration or
    definition, override ensures that the function is virtual and is overriding
    a virtual function from the base class.

  [ Tim Peeters ]
  * Fix reference error in PullToRefreshStyle. Fixes LP: #1582843
  * Mark Tab, Tabs, TabBar, PageHeadConfiguration, PageHeadSections,
    PageHeadState, ToolbarButton, ToolbarItems as deprecated in the
    documentation. Fixes LP: #1566735, LP: #1566741.

  [ CI Train Bot ]
  * Resync trunk.

 -- Zoltan Balogh <email address hidden> Fri, 27 May 2016 07:08:44 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.