Multiple initializers for property 'dataProvider'. (note: 'dataProvider' is the

错误:Multiple initializers for property 'dataProvider'. (note: 'dataProvider' is the default property of 'mx.controls.LinkBar)

 

 

在很多情况下,编译器都会出现这种提示,如:<mx:ToggleButtonBar>,<mx:LinkBar>,<mx:LineChart>

 

例:

   

<mx:LinkBar x="10" y="140" dataProvider="{vs}">
	<mx:ViewStack id="vs" x="10" y="165">
		<mx:Panel label="查看所有用户" title="查看所有用户" width="200" height="100"></mx:Panel>
		<mx:Panel label="添加用户" title="添加用户" width="200" height="100"></mx:Panel>
	</mx:ViewStack>
</mx:LinkBar>

 

 这种正常的写法,就会出现上述这种错误提示,

 

解决方法:

 

 把上面代码改成:

   

<mx:ViewStack id="vs" x="10" y="165">
	<mx:Panel label="查看所有用户" title="查看所有用户" width="200" height="100"></mx:Panel>
	<mx:Panel label="添加用户" title="添加用户" width="200" height="100"></mx:Panel>
</mx:ViewStack>
<mx:LinkBar x="10" y="140" dataProvider="{vs}"></mx:LinkBar>

 

    即把<mx:ViewStack>放在<mx:LinkBar>后面即可

  

 

ubuntu16.04ros编译时报错home/bobac3/ros_workspace/src/multipoint_navigation/src/multipoint_nav.cpp:20:17: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 int cycle = 1; //巡航次数 ^ /home/bobac3/ros_workspace/src/multipoint_navigation/src/multipoint_nav.cpp: In member function ‘void Multipoint_Nav::move()’: /home/bobac3/ros_workspace/src/multipoint_navigation/src/multipoint_nav.cpp:90:26: error: ‘goal’ does not name a type for(auto goal:pose) //遍历导航点列表 ^ In file included from /opt/ros/kinetic/include/ros/ros.h:40:0, from /opt/ros/kinetic/include/actionlib/client/simple_action_client.h:45, from /home/bobac3/ros_workspace/src/multipoint_navigation/src/multipoint_nav.cpp:1: /opt/ros/kinetic/include/ros/console.h:373:3: error: expected ‘;’ before ‘do’ do \ ^ /opt/ros/kinetic/include/ros/console.h:561:35: note: in expansion of macro ‘ROS_LOG_COND’ #define ROS_LOG(level, name, ...) ROS_LOG_COND(true, level, name, __VA_ARGS__) ^ /opt/ros/kinetic/include/rosconsole/macros_generated.h:110:23: note: in expansion of macro ‘ROS_LOG’ #define ROS_INFO(...) ROS_LOG(::ros::console::levels::Info, ROSCONSOLE_DEFAULT_ ^ /home/bobac3/ros_workspace/src/multipoint_navigation/src/multipoint_nav.cpp:152:17: note: in expansion of macro ‘ROS_INFO’ ROS_INFO("------------------loop ( %d ) termination!----------- ^ /opt/ros/kinetic/include/ros/console.h:373:3: error: expected primary-expression before ‘do’ do \ ^ /opt/ros/kinetic/include/ros/console.h:561:35: note: in expansion of macro ‘ROS_LOG_COND’ #define ROS_LOG(level, name, ...) ROS_LOG_COND(true, level, name, __VA_ARGS__) ^ /opt/ros/kinetic/include/rosconsole/macros_generated.h:110:23: note: in expansion of macro ‘ROS_LOG’ #define ROS_INFO(...) ROS_LOG(::ros::console::levels::Info, ROSCONSOLE_DEFAULT_
06-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值