1. New win32lib and XML

The new win32lib iirc is going to have some major changes to the way
controls can be specified (so I guess this is mainly aimed at Derek).
During my trawls on the web, one thing that seems increasingly to be a
jolly good idea is to store gui layouts in a separate file, and xml is
probably not the worst choice.

An example is:
<?xml version="1.0"?>
<dialog caption="Dialog Example" top="0" left="0"
                                 width="320" height="200"
        style="popup,clipsiblings,caption,sysmenu,modalframe,
               3dlook,setfont"
        fontname="Comic Sans MS" fontsize="10">
<control class="Static" top="29" left="32" width="70"
         height="11">Static Text Example</control>
<control class="Edit" top="76" left="32" width="78" height="14"
         style="not border" id="1000"></control>
<control class="Picture" top="96" left="32" width="32"
                         height="32" style="icon"
         resource-id="128"/>
<control class="Button" top="179" left="86" width="50"
                        height="14" id="1">&amp;OK</control>
<control class="Button" top="179" left="183" width="50"
                        height="14" id="2">&amp;Cancel</control>
<control class="ActiveX" top="26" left="130" width="128"
                         height="118"
         id="1009" clsid="{6262D3A0-531B-11CF-91F6-C2863C385E30}"/>
</dialog>

(from http://www.codeguru.com/advancedui/XMLGUI.html though I really
hate the idea of use "1", "2", "1000", and "1009" as control id's).

The major downside is that you can't link handlers directly to
controls. On the plus side, it divorces the gui alot more from the
application code, making it much easier to translate to another
language, remove (make invisible) a field not used by a particular
client, etc.

I haven't yet managed to find a common format for such a file (is
there one for wxWindows?) or a layout editor which stands out, maybe
Judith's IDE could be hacked?

Comments, anyone?

Pete

new topic     » topic index » view message » categorize

2. Re: New win32lib and XML

----- Original Message ----- 
From: "Pete Lomax" <petelomax at blueyonder.co.uk>
To: "EUforum" <EUforum at topica.com>
Subject: New win32lib and XML


> 
> 
> The new win32lib iirc is going to have some major changes to the way
> controls can be specified (so I guess this is mainly aimed at Derek).
> During my trawls on the web, one thing that seems increasingly to be a
> jolly good idea is to store gui layouts in a separate file, and xml is
> probably not the worst choice.
> 
> An example is:
> <?xml version="1.0"?>
> <dialog caption="Dialog Example" top="0" left="0"
>                                  width="320" height="200"
>         style="popup,clipsiblings,caption,sysmenu,modalframe,
>                3dlook,setfont"
>         fontname="Comic Sans MS" fontsize="10">
> <control class="Static" top="29" left="32" width="70"
>          height="11">Static Text Example</control>
> <control class="Edit" top="76" left="32" width="78" height="14"
>          style="not border" id="1000"></control>
> <control class="Picture" top="96" left="32" width="32"
>                          height="32" style="icon"
>          resource-id="128"/>
> <control class="Button" top="179" left="86" width="50"
>                         height="14" id="1">&amp;OK</control>
> <control class="Button" top="179" left="183" width="50"
>                         height="14" id="2">&amp;Cancel</control>
> <control class="ActiveX" top="26" left="130" width="128"
>                          height="118"
>          id="1009" clsid="{6262D3A0-531B-11CF-91F6-C2863C385E30}"/>
> </dialog>
> 
> (from http://www.codeguru.com/advancedui/XMLGUI.html though I really
> hate the idea of use "1", "2", "1000", and "1009" as control id's).
> 
> The major downside is that you can't link handlers directly to
> controls. On the plus side, it divorces the gui alot more from the
> application code, making it much easier to translate to another
> language, remove (make invisible) a field not used by a particular
> client, etc.
> 
> I haven't yet managed to find a common format for such a file (is
> there one for wxWindows?) or a layout editor which stands out, maybe
> Judith's IDE could be hacked?
> 
> Comments, anyone?
> 
I'm already ahead of you. In the next win32lib, it would be possible to define a
window and its controls in a text file. This can then be used at run time to
instantiate the actual Windows controls. Its syntax is a bit but more compact
than XML. Your example above would look something like ...

  window, caption={Dialog Example} at={0,0} size={320,200}
flags={new,ws_popup,ws_clipsiblings,ws_caption,ws_sysmenu,ws_ex_dlgmodalframe}
    font={Comic Sans MS,10}

  label,caption={Static Text Example}, at{32,29}, size={70,11}

  editbox, name=1000, at={32,76}, size={78,14}

  icon, at={32,96}, size={32,32}, picture=xyzzy.ico

  button, caption={&OK}, at={86,179}, size={50,14}

  button, caption={&Cancel}, at={183,179}, size={50,14}

(but doesn't support activex yet)

Let's say you create these lines in a file called 'MyDialog.form', then your app
would read ...

--------
  createForm( "file=MyDialog.form" )

global procedure Activate_Dialog_Example(integer self, integer event, sequence
  parms)
   . . . 
  end procedure

  global procedure Click_OK(integer self, integer event, sequence parms)
   . . . 
  end procedure

  global procedure Click_Cancel(integer self, integer event, sequence parms)
   . . . 
  end procedure

  global procedure Change_1000(integer self, integer event, sequence parms)
   . . . 
  end procedure
  
  . . .

  include w32start.ew
---------------

Am I getting close?
-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

3. Re: New win32lib and XML

Pete Lomax wrote:

>The new win32lib iirc is going to have some major changes to the way
>controls can be specified (so I guess this is mainly aimed at Derek).
>During my trawls on the web, one thing that seems increasingly to be a
>jolly good idea is to store gui layouts in a separate file, and xml is
>probably not the worst choice.
>  
>
I disagree. I have had too much exposure to XML to be able to consider 
it a serious method of storing data. I'm not kidding here, and yes I 
know I am going against the flow, however there are some serious issues 
with XML, at least two of which are:

1. It is far too verbose.  As illustrated in your example, XML requires 
a closing tag that repeats the name of the tag in order to be able to 
determine the hierarchy. I believe that the language LISP has a much 
better scheme (no pun intended)  when going about establishing the 
parent of an object.

2. There is not a clear reason to differentiate between attributes and 
child nodes, save for the fact that expressing every attribute as a 
child node would be to verbose. Attributes can easily be expressed in 
terms of child nodes, and indeed in many parsers are handled very 
similarly (There are often two collections for each node, one call 
attributes, the other children. The objects in both collections behave 
almost identically.).

These issues may seem to be irrelevant. However, I believe that they are 
important because a language that is too verbose is unpleasant to use 
(example, Cobol) and languages with inconstancies such as "Should this 
value be a string attribute or a #CDATA child?" are not well designed. 
That poor design seeps into any system developed with the language.

Forgive me, but I think this is a superior way of expressing the dialog 
example (approximately equivalent LISP code with some assumptions):

(dialog
    (caption "Dialog Example") (top 0) (left 0) (width 320) (height 200)
    (style 'popup 'clipsiblings 'caption 'sysmenu 'modalframe '3dlook 
'setfont)
    (control (class "Static") (top 29) (left 32) (width 70) (height 11) 
(text "Static Text Example"))
)

It could easily be expressed in terms of a Euphoria sequence as well:

sequence test_dialog
test_dialog = {"dialog"
                    {"caption" "Dialog Example"} {"top" 0} {"left" 0} 
{"width" 320} {"height" 200}
                    {"style" "popup" "clipsiblings" "caption" "sysmenu" 
"modalframe" "3dlook" "setfont"}
                    {"control" {"class" "Static"} {"top" 29} {"left" 32} 
{"width" 70} {"height" 11} {"text" "Static Text Example"}
}

The commands could easily also be stored as constants to make it a bit 
nicer looking:
test_dialog = {dialog
                    {caption "Dialog Example"} {top 0} {left 0} {width 
320} {height 200}
                    {style "popup" "clipsiblings" "caption" "sysmenu" 
"modalframe" "3dlook" "setfont"}
                    {control {class "Static"} {top 29} {left 32} {width 
70} {height 11} {text "Static Text Example"}
}

In fact...I'm quite sure I had a discussion (I believe in this list?) 
with a developer on the win32lib team that indicated something like this 
was to become the norm for window creation...perhaps I am mistaken.

At any rate, I believe it'd be much better to "keep it in the family" 
and express dialogs/windows/any object for use with win32lib as a 
Euphoria sequence. Euphoria already has a better data storage system 
than XML.


[snip]

>The major downside is that you can't link handlers directly to
>controls. 
>
How could we get around this? Use predefined handler names, like VB? 
(controlName_eventName is always the name of the event handler. Not good 
for more advanced event handling such as multiple controls attached to 
one function.)

>On the plus side, it divorces the gui alot more from the
>application code, making it much easier to translate to another
>language, remove (make invisible) a field not used by a particular
>client, etc.
>  
>
I agree with this. It's is generally better to not build GUIs within the 
actual code that manages them. It is a concept similar to that of 
template engines for web applications.

>I haven't yet managed to find a common format for such a file (is
>there one for wxWindows?) or a layout editor which stands out, maybe
>Judith's IDE could be hacked?
>  
>
I'd suggest writing a new form editor, even if Judith's IDE would be 
easy to convert (which I'm pretty sure it wouldn't be). It's better to 
have a fresh project that is designed from the ground up for a new 
format and makes no compromises.


Isaac

new topic     » goto parent     » topic index » view message » categorize

4. Re: New win32lib and XML

How would these changes affect programs written with older versions of
win32lib that have several hundred lines of 
contant control = create(....)?

Mike Sabal

>>> ddparnell at bigpond.com 01/05/2004 5:02:14 PM >>>
I'm already ahead of you. In the next win32lib, it would be possible to
define a window and its controls in a text file. This can then be used
at run time to instantiate the actual Windows controls. Its syntax is a
bit but more compact than XML. Your example above would look something
like ...

  window, caption={Dialog Example} at={0,0} size={320,200}
   
flags={new,ws_popup,ws_clipsiblings,ws_caption,ws_sysmenu,ws_ex_dlgmodalframe}
    font={Comic Sans MS,10}

Let's say you create these lines in a file called 'MyDialog.form', then
your app would read ...

--------
  createForm( "file=MyDialog.form" )

  global procedure Activate_Dialog_Example(integer self, integer event,
sequence parms)
   . . . 
  end procedure

  global procedure Click_OK(integer self, integer event, sequence
parms)
   . . . 
  end procedure

  global procedure Click_Cancel(integer self, integer event, sequence
parms)
   . . . 
  end procedure

  global procedure Change_1000(integer self, integer event, sequence
parms)
   . . . 
  end procedure
  
  . . .

  include w32start.ew
---------------

Am I getting close?
-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

5. Re: New win32lib and XML

Derek please have a look at SMEL....(written in euphoria)
http://users.pandora.be/tommycarlier/eu

RANT: I dont understand why no one (but me and a few) use .res files.
Parsing .res files 16 or 32bit is easy and allows you to use many
of the advanced IDE's out there...If an extension to .res file parsing
was made to allow for things like color, bitmaps, control size if certain
UI is used etc it would make more since to me.

Otherwise, SMEL should be the alternatative to using XML.

Euman

----- Original Message ----- 
From: "Derek Parnell" <ddparnell at bigpond.com>
To: <EUforum at topica.com>
Sent: Monday, January 05, 2004 5:02 PM
Subject: Re: New win32lib and XML


>
>
> ----- Original Message ----- 
> From: "Pete Lomax" <petelomax at blueyonder.co.uk>
> To: "EUforum" <EUforum at topica.com>
> Sent: Tuesday, January 06, 2004 8:19 AM
> Subject: New win32lib and XML
>
>
> > The new win32lib iirc is going to have some major changes to the way
> > controls can be specified (so I guess this is mainly aimed at Derek).
> > During my trawls on the web, one thing that seems increasingly to be a
> > jolly good idea is to store gui layouts in a separate file, and xml is
> > probably not the worst choice.
> >
> > An example is:
> > <?xml version="1.0"?>
> > <dialog caption="Dialog Example" top="0" left="0"
> >                                  width="320" height="200"
> >         style="popup,clipsiblings,caption,sysmenu,modalframe,
> >                3dlook,setfont"
> >         fontname="Comic Sans MS" fontsize="10">
> > <control class="Static" top="29" left="32" width="70"
> >          height="11">Static Text Example</control>
> > <control class="Edit" top="76" left="32" width="78" height="14"
> >          style="not border" id="1000"></control>
> > <control class="Picture" top="96" left="32" width="32"
> >                          height="32" style="icon"
> >          resource-id="128"/>
> > <control class="Button" top="179" left="86" width="50"
> >                         height="14" id="1">&amp;OK</control>
> > <control class="Button" top="179" left="183" width="50"
> >                         height="14" id="2">&amp;Cancel</control>
> > <control class="ActiveX" top="26" left="130" width="128"
> >                          height="118"
> >          id="1009" clsid="{6262D3A0-531B-11CF-91F6-C2863C385E30}"/>
> > </dialog>
> >
> > (from http://www.codeguru.com/advancedui/XMLGUI.html though I really
> > hate the idea of use "1", "2", "1000", and "1009" as control id's).
> >
> > The major downside is that you can't link handlers directly to
> > controls. On the plus side, it divorces the gui alot more from the
> > application code, making it much easier to translate to another
> > language, remove (make invisible) a field not used by a particular
> > client, etc.
> >
> > I haven't yet managed to find a common format for such a file (is
> > there one for wxWindows?) or a layout editor which stands out, maybe
> > Judith's IDE could be hacked?
> >
> > Comments, anyone?
> >
> I'm already ahead of you. In the next win32lib, it would be possible to define
> a window and its controls in a text file. This can
then be used at run time to instantiate the actual Windows controls. Its syntax
is a bit but more compact than XML. Your example
above would look something like ...
>
>   window, caption={Dialog Example} at={0,0} size={320,200}
>    
>     flags={new,ws_popup,ws_clipsiblings,ws_caption,ws_sysmenu,ws_ex_dlgmodalframe}
>     font={Comic Sans MS,10}
>
>   label,caption={Static Text Example}, at{32,29}, size={70,11}
>
>   editbox, name=1000, at={32,76}, size={78,14}
>
>   icon, at={32,96}, size={32,32}, picture=xyzzy.ico
>
>   button, caption={&OK}, at={86,179}, size={50,14}
>
>   button, caption={&Cancel}, at={183,179}, size={50,14}
>
> (but doesn't support activex yet)
>
> Let's say you create these lines in a file called 'MyDialog.form', then your
> app would read ...
>
> --------
>   createForm( "file=MyDialog.form" )
>
>   global procedure Activate_Dialog_Example(integer self, integer event,
>   sequence parms)
>    . . .
>   end procedure
>
>   global procedure Click_OK(integer self, integer event, sequence parms)
>    . . .
>   end procedure
>
>   global procedure Click_Cancel(integer self, integer event, sequence parms)
>    . . .
>   end procedure
>
>   global procedure Change_1000(integer self, integer event, sequence parms)
>    . . .
>   end procedure
>
>   . . .
>
>   include w32start.ew
> ---------------
>
> Am I getting close?
> -- 
> Derek
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: New win32lib and XML

Derek wrote:

<snip>

> I'm already ahead of you. In the next win32lib, it would be possible to
> define a window and its controls in a text file. This can then be used
> at run time to instantiate the actual Windows controls. Its syntax is a
> bit but more compact than XML. Your example above would look something
> like ...
>
>   window, caption={Dialog Example} at={0,0} size={320,200}
>    
>     flags={new,ws_popup,ws_clipsiblings,ws_caption,ws_sysmenu,ws_ex_dlgmodalframe}
>     font={Comic Sans MS,10}
>
>   label,caption={Static Text Example}, at{32,29}, size={70,11}
>
>   editbox, name=1000, at={32,76}, size={78,14}
>
>   icon, at={32,96}, size={32,32}, picture=xyzzy.ico
>
>   button, caption={&OK}, at={86,179}, size={50,14}
>
>   button, caption={&Cancel}, at={183,179}, size={50,14}
>
> (but doesn't support activex yet)


Looks very clean! This is much appreciated.

<snip>

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

7. Re: New win32lib and XML

On Mon, 05 Jan 2004 16:07:34 -0600, Isaac Raway
<isaac-topica at blueapples.org> wrote:

<snip>
>I disagree. /XML /serious method of storing data/verbose.
Yup. I said "not the worst" for pretty much the same reasons.

>2. There is not a clear reason to differentiate between attributes and 
>child nodes
I'm assuming you mean that:
	(label1=... (font=times)),
	(label2=... (font=times))
and
	(font=times (label1=...),
			   (label2=...))

should be treated identically.

<snip>
> language that is too verbose is unpleasant to use 
Agreed. Although it may occasionally be handy to edit the file
directly, a layout editor would obviously be much easier.

>In fact...I'm quite sure I had a discussion (I believe in this list?) 
>with a developer on the win32lib team that indicated something like this 
>was to become the norm for window creation...perhaps I am mistaken.
Yes, I'm pretty sure Derek said as much, my web crawlings triggered a
vague memory of his words. Just checking it could be a separate file.

>How could we get around this? Use predefined handler names, like VB? 
Let's just assume a sensible naming convention will get used, somehow.
If it needs to be overridden occasionally, then it can be. If your
editor needs a lookup, we'll make one. Details to follow blink

>I'd suggest writing a new form editor, even if Judith's IDE would be 
>easy to convert (which I'm pretty sure it wouldn't be). It's better to 
>have a fresh project that is designed from the ground up for a new 
>format and makes no compromises.

You're probably right. Count me in. I'll let you start. blink

Some like an all-in-one IDE style solution;  I prefer several small
distinct tools. Short term, I'll continue looking on the web.

I'm not the slightest bit worried about pre-processing xml/ lisp/
Eu-sequence style before throwing it at (eg) Derek's new win32lib. As
far as I'm concerned, XML is portable, unambiguous, easily parsed and
easily translated. So are lisp and Eu-sequence style. I'll defer my
final decision on which as long as possible, maybe even go with
supporting any of the above.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

8. Re: New win32lib and XML

On Tue, 6 Jan 2004 09:02:14 +1100, Derek Parnell
<ddparnell at bigpond.com> wrote:

>I'm already ahead of you. In the next win32lib, it would be possible to define
>a window and its controls in a text file. This can then be used at run time to
>instantiate the actual Windows controls. Its syntax is a bit but more compact
>than XML. Your example above would look something like ...
>
>  window, caption={Dialog Example} at={0,0} size={320,200}
>   
>    flags={new,ws_popup,ws_clipsiblings,ws_caption,ws_sysmenu,ws_ex_dlgmodalframe}
>    font={Comic Sans MS,10}
>
>  label,caption={Static Text Example}, at{32,29}, size={70,11}
>
>  editbox, name=1000, at={32,76}, size={78,14}
>
>  icon, at={32,96}, size={32,32}, picture=xyzzy.ico
>
>  button, caption={&OK}, at={86,179}, size={50,14}
>
>  button, caption={&Cancel}, at={183,179}, size={50,14}
>
Nice. How about applying a font or other attribute to more than one
control? Where's the design? blink
>
>Let's say you create these lines in a file called 'MyDialog.form', then your
>app would read ...
>
>--------
>  createForm( "file=MyDialog.form" )
>
>  global procedure Activate_Dialog_Example(integer self, integer event,
>  sequence parms)
>   . . . 
>  end procedure
>
>  global procedure Click_OK(integer self, integer event, sequence parms)
hmm.
What if I have several xxxDialog.form files, and several button,
caption={&OK} ...? Or do you mean that in the absence of a name
attribute, and/or provided the caption is unique, and/or Click_OK is
expected to use getParent or similar to figure stuff out?

>Am I getting close?
Very.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

9. Re: New win32lib and XML

----- 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 message » categorize

10. Re: New win32lib and XML

Pete Lomax wrote:

>
>
>On Mon, 05 Jan 2004 16:07:34 -0600, Isaac Raway
><isaac-topica at blueapples.org> wrote:
>
><snip>
>  
>
>>I disagree. /XML /serious method of storing data/verbose.
>>    
>>
>Yup. I said "not the worst" for pretty much the same reasons.
>
>  
Well, I think the duplication of each tag name is a pretty serious 
design flaw it's just sort of stupid...and with propor indentation 
(which code generators and programers should do anyway) it's just redundant.

>>2. There is not a clear reason to differentiate between attributes and 
>>child nodes
>>    
>>
>I'm assuming you mean that:
>	(label1=... (font=times)),
>	(label2=... (font=times))
>and
>	(font=times (label1=...),
>			   (label2=...))
>
>should be treated identically.
>
>  
Well, actually, I meant something like this. I'll use XML because that's 
the language where this isn't clear:

This...

<root>
    <object name="TestObject" />
</root>

Is conceptually identical to

<root>
    <object>
       <name>TestObject</name>
    </object>
</root>

The reason attributes are needed in XML is because to express an object 
purely in terms of elements is far too verbose and repetative. It is 
much more compact to use attributes, but the existence of both options 
makes the language impure.

I am really interested in purity in languages, so this won't necessarily 
bother other people. However, I believe this single fact is an 
impediment to a vision we where all given when XML was introduced: that 
anyone anywhere will be able to read data formatted as XML and do 
something useful with it. But that's not the case, in part because there 
are multiple ways to express the same conceptual data structure.

I'd prefer to express the sample object above as a LISP object because 
there is really only one way to do it (Once you decide on an over all 
structure that is. See below.):

(root
    (object
        (name "TestObject")
    )
)

Also, of course, expressible in terms of a Euphoria sequence.

Note that there has to be some agreed upon standard for how to express 
these things in as LISP lists or Eu sequences (which in reality are 
almost identical concepts). I don't think I'm actually getting the 
syntax right, but in Common LISP there is a consistent and standard way 
to express an object that has named slots. I'm sort of assuming that it 
is a list with the odd numbered items being the names of the even 
numbered object expressions, which may themselves be lists conforming to 
the same structure.

><snip>
>  
>
>>language that is too verbose is unpleasant to use 
>>    
>>
>Agreed. Although it may occasionally be handy to edit the file
>directly, a layout editor would obviously be much easier.
>  
>
Actually, with an (optional) flow based layout engine (sort of like 
Java, shudder) it may be even faster than a layout editor.

>>I'd suggest writing a new form editor, even if Judith's IDE would be 
>>easy to convert (which I'm pretty sure it wouldn't be). It's better to 
>>have a fresh project that is designed from the ground up for a new 
>>format and makes no compromises.
>>    
>>
>You're probably right. Count me in. I'll let you start. blink
>  
>
I'd love to, actually. The thing is, I'm not exactly an all star in 
Euphoria. I'd love to have a nice little tool like the old MS Dialog 
editors for pre-Word 97. A very simple tool, one window, lightweight. 
Want more than one form open for editing? Open more than one copy of the 
window. Entirely menu driven interface, no interfering toolbars or 
pallets. Right click, context menu (I think...) for each control, popup 
properties dialog.

>Some like an all-in-one IDE style solution;  I prefer several small
>distinct tools. Short term, I'll continue looking on the web.
>  
>
I tend to the multiple tools department when it comes to languages like 
Euphoria. I prefer an IDE for VC++ and VB because they are designed for 
IDEs.

>I'm not the slightest bit worried about pre-processing xml/ lisp/
>Eu-sequence style before throwing it at (eg) Derek's new win32lib. As
>far as I'm concerned, XML is portable, unambiguous, easily parsed and
>easily translated. So are lisp and Eu-sequence style. I'll defer my
>final decision on which as long as possible, maybe even go with
>supporting any of the above.
>  
>
Well, how about this. Create a middle layer with a data file spec that 
allows people to add support for whatever structured data format they 
like? Along with a tool to translate between the formats (as long as you 
have the data file for both the formats you want to move between), the 
better one would emerge as the leader. Well, at least the one people are 
most comfortable with, which may in fact not be the better one. Heh. 
LISP has always been better, but almost no one (including me, who thinks 
it's better) uses is very much. The world had a structured data language 
a very long time before XML came out. It's sad really...but oh well. 
Perhaps we can bring it back a little tiny bit?

>  
>

new topic     » goto parent     » topic index » view message » categorize

11. Re: New win32lib and XML

Isaac Raway wrote:
> I'd prefer to express the sample object above as a LISP object because 
> there is really only one way to do it (Once you decide on an over all 
> structure that is. See below.):

> (root
>    (object
>        (name "TestObject")
>    )
> )

> Also, of course, expressible in terms of a Euphoria sequence.

Then why not use SMEL: it has advanced features, but you don't have
to use all the features. The LISP-example above in SMEL:

root {
    object {
       name "TestObject";
    }
}

Remember: a SMEL-parser for Euphoria already exists, and can already
be used TODAY.

> Well, how about this. Create a middle layer with a data file spec that 
> allows people to add support for whatever structured data format they 
> like? Along with a tool to translate between the formats (as long as you 
> have the data file for both the formats you want to move between), the
I'm working on SMELT, a SMEL-application for transforming SMEL-documents
to other SMEL-documents, or to other text-based files. Can be compared
to XSLT (but will be easier to write).
> better one would emerge as the leader. Well, at least the one people are 
> most comfortable with, which may in fact not be the better one. Heh. 
> LISP has always been better, but almost no one (including me, who thinks 
> it's better) uses is very much. The world had a structured data language 
> a very long time before XML came out. It's sad really...but oh well. 
> Perhaps we can bring it back a little tiny bit?
When I was looking for a name for the format that is now called SMEL,
I posted a message to the XML-newsgroup and described what it would
look like. And in that newsgroup, LISP was also mentioned as a possible
structured data language.

I've created SMEL a few months ago, and I was wondering if somebody is
actually using it already.
Derek, you were right about the fact that attributes in SMEL don't
support nesting. But you don't have to use attributes if you don't
want to. See example above.
-- 

Tommy Carlier
tommy online: http://users.pandora.be/tommycarlier

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu