如何在as3中使用parsley框架注入字典?
在我的欧芹容器中,我正在实例化一个包含字典 (flash.utils.Dictionary) 的对象“A”。
我想使用欧芹创建这个字典并将其注入“A”。 该字典对结构为:key=对象 'B' 的 id,value='B' 其中对象“B”也是使用欧芹定义和创建的对象 (所以基本上对结构是对象 id 作为键,对象本身作为值)。
现在,我可以毫无问题地创建“A”和“B”,但似乎无法找到使用欧芹创建此字典的正确方法,也无法将其注入“A”。
非常感谢任何帮助!
提前致谢, 约格夫
In my parsley container, I'm instantiating an object 'A' that contains a Dictionary (flash.utils.Dictionary).
I would like to create this Dictionary using parsley and inject it to 'A'.
This dictionary pairs structure is: key=id of object 'B', value='B'
where object 'B' is also an object which is defined and created using parsley
(so basically the pairs structure is and object id as a key and the object itself as the value).
Now, I have no problem creating 'A' and 'B', but can't seem to find the right way to create this dictionary using parsley, nor injecting it to 'A'.
Any help is highly appreciated!
Thanks in advance,
Yogev
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 context.mxml 中执行此操作:
然后只需在要注入的类中执行以下操作:
You can do this in the context.mxml:
Then simply in the class you want to inject to do the following: