Re: When luxor will be fully tag-extensible ?

sgfdgf ryejt <[email protected]> Tue, 25 May 2004 02:06:01 +0200 (CEST)
Newsgroups gmane.comp.java.luxor-xul.devel
Message-ID <[email protected]>
--0-1782299121-1085443561=:91827
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi Gerald,
 
"We" are working in a research organization. The project is not open source, but might be subject of a research publication later on.
 
I am currently investigating alternatives to use a high level language to specify GUI. So far XUL and Luxor library suit my needs, and I am happy with that, except the fact that I can't create container tags. Maybe I am not using properly the library, so I'll try to describe concretely my problem:
 
I want to create a container tag, which should be considered as an internal frame (JInternalFrame in Java).
 
Here is a XUL sample:
<mycontainertag ...>
  <label .../>
  <mysimpletag/>
</mycontainertag>

Thanks to the petra tutorial (http://petra.sourceforge.net/tutorial.html) I can easily create tags like "mysimpletag".
I downloaded another tutorial (http://luxor-contrib.sourceforge.net/index.php?alias=jbeantable) and tried to do the same to make container tags but it doesn't work...
 
In the config/moretags.xul file I got:
<config>
  <tagdef name="mysimpletag" class="MySimpleTagDef"/>
  <tagdef name="mycontainertag" class="MyContainerTagDef" processbody="true"/>
</config>
 
The class is:
 
public class MyContainerTagDef extends XulContainer {
  public final static XulTagFactory FACTORY =
      new XulTagFactory() {
    public XulTag createXulTag(Element element) {
      return new MyContainerTagDef(element);
    }
  };
  static Logger T = Logger.getLogger( MyContainerTagDef.class );

  private ArrayList _componentDef = new ArrayList();
  public MyContainerTagDef(Element element){
    super( element );
  }
  public void add(XulTag tag) {
    if(tag instanceof NComponent)
      _componentDef.add(tag);
    else
      Xul.SyntaxError.UNSUPPORTED_TAG_INSIDE( tag.getElementName(), "mycontainertag" );
  }
  public MyFrame createFrame() {
    // parsing the def...
  }
}

"MyFrame" extends JInternalFrame.

By the way, what is this for:
  public final static XulTagFactory FACTORY =
      new XulTagFactory() {
    public XulTag createXulTag(Element element) {
      return new MyContainerTagDef(element);
    }
  };
  static Logger T = Logger.getLogger( MyContainerTagDef.class );
 
I use it just to do as in the library classes....

The problem is that the "add" method is never called. I tried to debug the library, and I can notice that in XulLoader.createElements and XulDef.add methods,  the custom tags are not managed... am I right ?
 
So, could you either give me clues or code snippets to help me fixing that ?
 
Then, I am surprised this forum is not very active, I mean there are not a lot of people using it. Is there another forum ?
 
Thanks a lot Gerald ! You're doing a great job.
 
Julien

Gerald Bauer <[email protected]> wrote:
Hello Julien,

> But impossible to make it work with container.

How do you come to this conclusion?

> We would use Luxor for our applications development,
> but we need to make sure that extending the tags
> will be possible, before we go further.

Can you tell us more about your project. Is it open
source? Who's we? What kind of extension tags do you
have in mind? Do you plan to share them?

Loooking foward to your answers.

- Gerald


		
---------------------------------
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
--0-1782299121-1085443561=:91827
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>Hi Gerald,</DIV>
<DIV>&nbsp;</DIV>
<DIV>"We" are working in a research organization. The project is not open source, but might be subject of a research publication later on.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am currently investigating alternatives to use a high level language to specify GUI. So far XUL and Luxor library suit my needs, and I am happy with that, except the fact that I can't create container tags. Maybe I am not using properly the library, so I'll try to describe concretely my problem:</DIV>
<DIV>&nbsp;</DIV>
<DIV>I want to create a container tag, which should be considered as an internal frame (JInternalFrame in Java).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is a XUL sample:<BR>&lt;mycontainertag ...&gt;<BR>&nbsp; &lt;label .../&gt;<BR>&nbsp; &lt;mysimpletag/&gt;<BR>&lt;/mycontainertag&gt;</DIV>
<DIV><BR>Thanks to the petra tutorial (<A href="http://petra.sourceforge.net/tutorial.html">http://petra.sourceforge.net/tutorial.html</A>) I can easily create tags like "mysimpletag".</DIV>
<DIV>I downloaded another tutorial (<A href="http://luxor-contrib.sourceforge.net/index.php?alias=jbeantable">http://luxor-contrib.sourceforge.net/index.php?alias=jbeantable</A>) and tried to do the same to make container tags but it doesn't work...</DIV>
<DIV>&nbsp;</DIV>
<DIV>In the config/moretags.xul file I got:</DIV>
<DIV>&lt;config&gt;<BR>&nbsp; &lt;tagdef name="mysimpletag" class="MySimpleTagDef"/&gt;<BR>&nbsp; &lt;tagdef name="mycontainertag" class="MyContainerTagDef" processbody="true"/&gt;<BR>&lt;/config&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>The class is:</DIV>
<DIV>&nbsp;</DIV>
<DIV>public class MyContainerTagDef extends XulContainer {<BR>&nbsp; public final static XulTagFactory FACTORY =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new XulTagFactory() {<BR>&nbsp;&nbsp;&nbsp; public XulTag createXulTag(Element element) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new MyContainerTagDef(element);<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; };<BR>&nbsp; static Logger T = Logger.getLogger( MyContainerTagDef.class );</DIV>
<DIV><BR>&nbsp; private ArrayList _componentDef = new ArrayList();</DIV>
<DIV>&nbsp; public MyContainerTagDef(Element element){<BR>&nbsp;&nbsp;&nbsp; super( element );<BR>&nbsp; }</DIV>
<DIV>&nbsp; public void add(XulTag tag) {<BR>&nbsp;&nbsp;&nbsp; if(tag instanceof NComponent)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _componentDef.add(tag);<BR>&nbsp;&nbsp;&nbsp; else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Xul.SyntaxError.UNSUPPORTED_TAG_INSIDE( tag.getElementName(), "mycontainertag" );<BR>&nbsp; }</DIV>
<DIV>&nbsp; public MyFrame createFrame() {<BR>&nbsp;&nbsp;&nbsp; // parsing the def...<BR>&nbsp; }<BR>}</DIV>
<DIV><BR>"MyFrame" extends JInternalFrame.</DIV>
<DIV><BR>By the way, what is this for:<BR>&nbsp; public final static XulTagFactory FACTORY =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new XulTagFactory() {<BR>&nbsp;&nbsp;&nbsp; public XulTag createXulTag(Element element) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new MyContainerTagDef(element);<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; };<BR>&nbsp; static Logger T = Logger.getLogger( MyContainerTagDef.class );</DIV>
<DIV>&nbsp;</DIV>
<DIV>I use it just to do as in the library classes....</DIV>
<DIV><BR>The problem is that the "add" method is never called. I tried to debug the library, and I can notice that in XulLoader.createElements and XulDef.add methods,&nbsp; the custom tags are not managed... am I right ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>So, could you either give me clues or code snippets to help me fixing that ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then, I am surprised this forum is not very active, I mean there are not a lot of people using it. Is there another forum ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks a lot Gerald ! You're doing a great job.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Julien<BR><BR><B><I>Gerald Bauer &lt;[email protected]&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hello Julien,<BR><BR>&gt; But impossible to make it work with container.<BR><BR>How do you come to this conclusion?<BR><BR>&gt; We would use Luxor for our applications development,<BR>&gt; but we need to make sure that extending the tags<BR>&gt; will be possible, before we go further.<BR><BR>Can you tell us more about your project. Is it open<BR>source? Who's we? What kind of extension tags do you<BR>have in mind? Do you plan to share them?<BR><BR>Loooking foward to your answers.<BR><BR>- Gerald<BR><BR></BLOCKQUOTE><p>
		<hr size=1>
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/mail/mail_taglines/default/*http://fr.benefits.yahoo.com/">Créez votre Yahoo! Mail</a>
<br><br>
Dialoguez en direct avec vos amis grâce à <a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com/">Yahoo! Messenger !</a>
--0-1782299121-1085443561=:91827--


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click