Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Interface to A J Martin's ML dialect

From: tim:johnsons-web at: 28-Aug-2003 7:47

* A J Martin <[AJMartin--orcon--net--nz]> [030827 22:33]:
> Hi, Tim. > > Tim wrote: > > I would welcome comments and criticisms. This is just a small starting > point. > > Can you expand more on the end goal, please? I don't know where the starting > point at is going to lead to. > Thanks!
Hi Andrew: I'm up to my neck in work today, so I'm going to 'dump' a simple example of a python dictionary that I use for one form, (the login form, not the 100-field survey). Here's the python structure: login_dict = [ # not a true dictionary, but does become one in the process 'email', { 'type':'text', 'attrs':{'llabel': 'Email Address', 'lj': 0, 'size': 30,'req':1,},}, 'password', {'type':'text', 'attrs':{'llabel': 'Password', 'lj': 0, 'size': 30,'req':1,},}, ] # true and tested data structure ; lj = left justified, llabel = label to left, rj, rlabel ->right etc ; other pseudo-attributes would be 'link (relational tables in database) ; now here is the proposed rebol structure of the same functionality ; UNTESTED! login-dict: [ email [ ; name, may have to be a string type "text" txt[llabel "Email Address" lj 0 req 1] ; text attributes att[size 30 maxlength 40] ; 'htm attributes ] password [ type "password" txt[llabel "Email Address" req 1 lj 2] att[size 20 maxlength 30] ] ] ; in the case of a set of radio buttons, the 'txt/'att structures ; would be nested in an outer block ; And further 'up the line' either of these data structures might ; be generated (at least in one pass) by parsing a static web form ; or even from a database. I hope this makes it a little clearer. BTW: the python dictionary (of the {key: 'value'} structure is a implementation of a binary tree in the "C" source, and is very fast at runtime. Does rebol have anything comparable ("under the hood")? tim
> Andrew J Martin > ICQ: 26227169 > > > > -><- > > -- > To unsubscribe from this list, just send an email to > [rebol-request--rebol--com] with unsubscribe as the subject.
-- Tim Johnson <[tim--johnsons-web--com]>