PixIOC

8 views
Skip to first unread message

Thomas Pujolle

unread,
May 4, 2011, 6:23:34 AM5/4/11
to pixlib
Hello there!

Just wanted to know when PixIOC will be released.

Is it possible to get an overview of what an xml config could look
like, working in this IOC context?

I might have to use this quite soon to describe a whole video player
using an XML file.

Thank you!

Romain Ecarnot

unread,
May 8, 2011, 12:33:29 PM5/8/11
to pixlib
Hi Thomas,

There is no date yet for the public release of this extension, but
it's on the roas ;).
Still tsome esting phases and documentation.

For XML contexts, I try to prepare you some examples (simple and
complex) quickly.

All the best,
R.

Romain Ecarnot

unread,
May 8, 2011, 12:55:28 PM5/8/11
to pixlib
Hi Thomas... here is a quick example of what is possible with the IoC
context :
(just for features demo)

-----------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<beans>

<var id="local" type="String" value="fr" />
<var id="productionPath" type="String" value="../prod/" />

<lib url="sandbox://pixlib.swf" />

<rsc id="infoText"
url="sandbox://info.txt"
type="text"/>

<rsc id="background"
url="sandbox://${local}/background.png"
type="binary"
deserializer-class="net.pixlib.encoding.PXDisplayDeserializer"
locator="bitmap"/>

<rsc id="style"
url="productionPath://styles.css"
type="text"
deserializer-class="net.pixlib.encoding.PXCSSDeserializer"/>

<bean id="store" type="Object">
<property name="resource" ref="ResourceLocator(bitmap,background)" /
>
</bean>

<dll url="sandbox://pluginA.swf" />

<bean id="PluginA" type="com.test.PluginA" />

<bean id="ConfigData" type="com.test.ConfigData">
<argument type="String" value="Default configuration" />
</bean>

<bean id="IHManager" type="com.test.manager.IHManager">
<method-call name="client.connect">
<argument type="String" value="ConfigData.getProxy()" />
</method-call>

<method-call name="setOption">
<argument ref="ConfigData.getConfig('default',
ConfigData.getOption(IHManager.client.getRoles('admin')))" />
</method-call>
<bean>

<root id="root">
<bean id="BView" url="sandbox://button.swf">
<property name="x" value="5" />
<property name="y" value="50" />
</bean>

<bean id="CView" type="flash.display.Sprite">
<property name="x" value="60" />
<property name="y" value="50" />

<method-call name="graphics.beginFill">
<argument type="uint" value="0xFF0000" />
<argument type="Number" value="1" />
</method-call>
<method-call name="graphics.drawRect">
<argument type="Number" value="0" />
<argument type="Number" value="0" />
<argument type="Number" value="50" />
<argument type="Number" value="25" />
</method-call>
<method-call name="graphics.endFill" />

<property name="buttonMode" type="Boolean" value="true" />

<method-call name="addEventListener">
<argument value="click" />
<argument ref="IHManager.onClick" />
</method-call>

</bean>
</root>
</beans>
-----------------------------------------------


Cheers,
R.
Reply all
Reply to author
Forward
0 new messages