Re: New win32lib and XML

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "Tommy Carlier" <tommy.carlier at pandora.be>
To: "Euphoria Mailing List" <EUforum at topica.com>
Subject: RE: New win32lib and XML


> 
> 
> Derek Parnell wrote:
> > I already have. I was discussing SMEL with Tommy before he released it. 
> > In
> > the end, although he did adopt a couple of my suggestions, I decided not 
> > to
> > go with it because it was still too verbose, and didn't support nested
> > attributes. SMEL is a good alternative to XML but it is overkill for my
> > needs. I want to make Win32lib EASIER to use, not harder.
> 
> Still too verbose? Might be true indeed, but you can create a lot of 
> powerful constructions, and you don't have to write the name of every 
> element/attribute: standard, frequently used names can be omitted. Every 
> control has an ID, so the ID-attribute is standard, so you can omit it.
> Instead of:
> form(id=!Form1 size=[300,200])
> {
> button(id=!Button1 size=[50%,20px] location=[10,10] 
> OnClick=!Button1_Click);
> label(id=!Label1 size=[200,20] location=[10,40]){ "This is a label with a 
> variable ", var(id=!Label1Var);, " in it." }
> }
> You can say:
> form(!Form1 size=[300,200])
> {
> button(!Button1 size=[50%,20px] location=[10,10] OnClick=!Button1_Click);
> label(!Label1 size=[200,20] location=[10,40]){ "This is a label with a 
> variable ", var(!Label1Var);, " in it."}
> }

And here it is in my syntax...

 window, Form1, size={300,200}
 button, Button1,size={50%,20},at={10,10}
 label, Label1,  size={200,},at={,40}
   caption={This is a label with a variable ${Label1Var} in it.}

 
> Doesn't support nested attributes? True, but attributes are supposed to be 
> simple properties and not children. And if you want to have an attribute 
> that contains more than 1 value, you can use a sequence-value (which can 
> be nested): look at the example above: size and location are attributes 
> with sequence-values.

Like 'font' right and size, etc...?

  label, caption="Label", 
         font={name={Courier},size={10},style={Bold}},
         size={width=200,length-200},
         at={left=10,top=100} 

-- 
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu