returnObject 不返回任何内容
我正在使用最新的 SDK 4.5.0.20967。我之前曾使用过 SDK Hero。 一切工作正常,但我的返回对象有问题。这是唯一不起作用的事情。
所以我有一个页面,我在其中创建 returnObject:
override public function createReturnObject():Object
{
return m_parameters;
}
当我调试时,我看到我的 navigator.poppedViewReturnedObject = null。
var poppedViewReturnedObject:ViewReturnObject = navigator.poppedViewReturnedObject;
有人知道我做错了什么或有解决方案吗?
亲切的问候,
蒂博·海伦
I'm working with the latest SDK 4.5.0.20967. I worked before with the SDK Hero.
Everything is working fine but I have a problem with my returndObject. That's the only thing that isn't working.
So I have a page where I make my returnObject:
override public function createReturnObject():Object
{
return m_parameters;
}
When I debug I see that my navigator.poppedViewReturnedObject = null.
var poppedViewReturnedObject:ViewReturnObject = navigator.poppedViewReturnedObject;
Does anybody knows what I'm doing wrong or has a solution?
Kind regards,
Thibault Heylen
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
poppedViewReturnedObject 仅在最初推送包含覆盖的 createReturnObject 方法的新视图的视图的 addHandler 中可用。
poppedViewReturnedObject 什么时候可用,即不为 null?当然,当调用 popview() 时。
如果您尝试在其他情况下访问 poppedViewReturnedObject,例如在 viewActivated 处理程序中,它将为 null。
代码示例:
poppedViewReturnedObject is available only in the addHandler of the view which originally pushed your new view containing the overriden createReturnObject method.
When will poppedViewReturnedObject be available, i.e., not null? When popview() is invoked of course.
If you try to access poppedViewReturnedObject in other circumstances, for instance in a viewActivated handler, it will be null.
Code sample:
您必须在添加初始值设定项中初始化 ViewReturnObject。然后就可以了
You have to initialize your ViewReturnObject in the add initializer. Then it works