Component Model in QxTransformer 0.4 alpha

4 views
Skip to first unread message

wHGdaYakHWkmBwu

unread,
Mar 1, 2010, 7:07:14 PM3/1/10
to QxTransformer
Hi. I had been trying to transform a simple component, but it fails.
Here's the code:

<?xml version="1.0" encoding="utf-8"?>
<qx:application
xmlns:qx="http://www.qxtransformer.org/qooxdoo"
xmlns:qxt="http://www.qxtransformer.org/extension"
xmlns:mfa="myfirstapplication.*"
className="myfirstapplication.Application">

<mfa:myFirstWidget />

</qx:application>

<?xml version="1.0" encoding="utf-8"?>
<qxt:component
xmlns:qx="http://www.qxtransformer.org/qooxdoo"
xmlns:qxt="http://www.qxtransformer.org/extension"
className="myfirstapplication.MyFirstWidget"
tagName="myFirstWidget">

<qx:button label="First Label" icon="helloworld/test.png"
qxt:left="100" qxt:top="300">
</qx:button>

</qxt:component>

Output:

[INFO] - Processing file /home/myuser/qooxdoo/myFirstApplication/
source/xml/myfirstapplication/MyFirstWidget.xml
[ERROR] - settings.getConfigByTagName:355 - Unable to get configuraton
for tag qxt:component. Please check dialect configuration files and
make sure that there is a mapping for such tag there.
Traceback (most recent call last):
File "../qxtransformer-0.4a/bin/qxtransformer.py", line 237, in
<module>
main()
File "../qxtransformer-0.4a/bin/qxtransformer.py", line 184, in main
__processDir__(dirPath,options)
File "../qxtransformer-0.4a/bin/qxtransformer.py", line 95, in
__processDir__
result = p.transform(path)
File "/home/myuser/qooxdoo/qxtransformer-0.4a/pylib/qxt/transformer/
processor.py", line 59, in transform
return self.renderTag(context.ElementContext(self.__root__, None,
None));
File "/home/myuser/qooxdoo/qxtransformer-0.4a/pylib/qxt/transformer/
processor.py", line 75, in renderTag
data = self.__createTmplDataStruct__(econtext);
File "/home/myuser/qooxdoo/qxtransformer-0.4a/pylib/qxt/transformer/
processor.py", line 133, in __createTmplDataStruct__
data[self.THIS_DATA_KEY_NAME] =
self.__elementDataLookup__.getDataForElement(econtext.getTag())
File "/home/myuser/qooxdoo/qxtransformer-0.4a/pylib/qxt/transformer/
processor.py", line 282, in getDataForElement
data = self.__fillDataForElement__(element)
File "/home/myuser/qooxdoo/qxtransformer-0.4a/pylib/qxt/transformer/
processor.py", line 304, in __fillDataForElement__
attrFromConfig =
self.__tagsConfig__.getPropByNameForTag(tagName,self.DATA_KEY_NAME
+"."+self.ATTR_KEY_NAME)
File "/home/myuser/qooxdoo/qxtransformer-0.4a/pylib/qxt/settings/
settings.py", line 363, in getPropByNameForTag
prop = self.getConfigByTagName(tagName)
File "/home/myuser/qooxdoo/qxtransformer-0.4a/pylib/qxt/settings/
settings.py", line 356, in getConfigByTagName
raise KeyError(e)
KeyError: KeyError('qxt:component',)
Shell command returned error code: 1

QooXDoo SDK = 1.0.1
QxTransformer = 0.4a

What am I doing wrong?

Siarhei Barysiuk

unread,
Mar 2, 2010, 3:49:23 AM3/2/10
to qxtran...@googlegroups.com
Hi,

Components are not available in 0.4a, please use trunk instead. It's
more stable and has more features.

You can check out if from qooxdoo-contrib repository as

svn co https://qooxdoo-contrib.svn.sourceforge.net/svnroot/qooxdoo-contrib/trunk/qooxdoo-contrib/QxTransformer/trunk/

Let me know if you have any questions.

Cheers,
Serge

> --
> You received this message because you are subscribed to the Google
> Groups "QxTransformer" group.
> To post to this group, send email to qxtran...@googlegroups.com.
> To unsubscribe from this group, send email to qxtransforme...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/qxtransformer?hl=en
> .
>

Christian Boulanger

unread,
Mar 2, 2010, 5:39:03 AM3/2/10
to qxtran...@googlegroups.com
Even easier than using SVN is to download QxT as a contribution:


Best,
Christian

2010/3/2 Siarhei Barysiuk <s.bar...@gmail.com>

Siarhei Barysiuk

unread,
Mar 2, 2010, 5:41:53 AM3/2/10
to qxtran...@googlegroups.com
Christian, great! Completely forgot that it's possible with qooxdoo-contribs! The way better.

Siarhei

wHGdaYakHWkmBwu

unread,
Mar 2, 2010, 7:18:01 PM3/2/10
to QxTransformer
I noticed that now qxml-files must be in "class" folder, rather than
"xml". Is this forever? I want stability.

I also tried to use the contributions, but if I understand correctly,
when I transfer the project from one computer to another, I have to
constantly delete and add a few lines in config.json (in sections
"include" and "export").

wHGdaYakHWkmBwu

unread,
Mar 2, 2010, 7:53:41 PM3/2/10
to QxTransformer
The same example on the new version leads to a confusing error.

[INFO] - Processing file /home/myuser/qooxdoo/
myFirstComponentApplication/source/class/myfirstapplication/
Application.xml


Traceback (most recent call last):

File "../qxt/tool/bin/qxtransformer.py", line 250, in <module>
main()
File "../qxt/tool/bin/qxtransformer.py", line 197, in main
__processDir__(dirPath,options)
File "../qxt/tool/bin/qxtransformer.py", line 99, in __processDir__
result = p.transform(path)
File "/home/myuser/qooxdoo/qxt/tool/pylib/qxt/transformer/
processor.py", line 67, in transform
self.__componentLookup__.lookup(nsmap)
File "/home/myuser/qooxdoo/qxt/tool/pylib/qxt/transformer/
component.py", line 52, in lookup
tagConfig.extendWithComponents(configs)
File "/home/myuser/qooxdoo/qxt/tool/pylib/qxt/settings/settings.py",
line 393, in extendWithComponents
newTagConf.get(self.EXTENDS,[]).insert(0, normalizedTagName)
AttributeError: 'NoneType' object has no attribute 'get'


Shell command returned error code: 1

On Mar 2, 11:49 am, Siarhei Barysiuk <s.barys...@gmail.com> wrote:
> Hi,
>
> Components are not available in 0.4a, please use trunk instead. It's  
> more stable and has more features.
>
> You can check out if from qooxdoo-contrib repository as
>

> svn cohttps://qooxdoo-contrib.svn.sourceforge.net/svnroot/qooxdoo-contrib/t...

Christian Boulanger

unread,
Mar 5, 2010, 6:35:47 AM3/5/10
to qxtran...@googlegroups.com
Hi,

as far as the folder is concerned, In the current trunk (but I also thought it was since 0.4a), we do no longer use the "xml" folder. All the xml files reside in the same folder as the class file that is generated from them

Siarhei has to look into the python question -  can you post the xml that is concerned?

Thanks,
Christian 

2010/3/3 wHGdaYakHWkmBwu <feg...@gmail.com>

wHGdaYakHWkmBwu

unread,
Mar 6, 2010, 2:32:47 PM3/6/10
to QxTransformer
Hi, thanks for the answer.
Appropriate xml is written at the top of my first post.
Otherwise, the sequence of my actions was something like this:
1. use create-application.py,
2. correct config.json,
3. remove Application.js,
4. create Application.xml and MyFirstWidget.xml instead.

Incidentally, is it important that I'm using Python 2.6.4 instead of
Python 3?

On Mar 5, 2:35 pm, Christian Boulanger <c.boulan...@qxtransformer.org>
wrote:

> > qxtransforme...@googlegroups.com<qxtransformer%2Bunsu...@googlegroups.com>


> > > > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/qxtransformer?hl=en
> > > > .
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "QxTransformer" group.
> > To post to this group, send email to qxtran...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > qxtransforme...@googlegroups.com<qxtransformer%2Bunsu...@googlegroups.com>

Siarhei Barysiuk

unread,
Mar 12, 2010, 6:00:10 AM3/12/10
to qxtran...@googlegroups.com
Hi,

I've just tested your example with

1) qooxdoo 0.8.2
2) qxt trunk version

It works fine. You can find my project attached to compare it with
yours. Please let me know if you have further questions regarding this
problem. Also more information you can find in our wiki: http://sites.google.com/a/qxtransformer.org/qxtransformer/Documentation/component-model

test-qxt-component.zip
Reply all
Reply to author
Forward
0 new messages