There is a substitution step, but you'll need to do something like
"#{SETNAME.join(',')}, ... " to get correct behavior.
However, this doesn't seem like a great way to write these tags; it
seems like there's going to end up being a zillion attributes possibly
on each tag. Wouldn't it be easier to do at least some of them as
parameters rather than attributes?
Then there's the issue of lowerCamelCase vs dashed names...
--Matt Jones
On Sep 10, 2009, at 1:39 PM, kevinpfromnm wrote:
>
> In the interim, you could lump the common sets into constants and
> include them with a "#{SETNAME},..." in your attribute list. I
> haven't tried this but I do believe in the dryml compile there's an
> initial string substitution step. I haven't dug into the code though,
> that's just what I've picked up from looking at it externally.
>
> On Sep 10, 7:00 am, Kristian <[email protected]> wrote:
>> I am making nice progress defining a DRYML taglib for ExtJS,
>> however I
>> noticed some things I think could be improved in the DRYML language:
>>
>> In my case I end up with tags like the following:
>>
>> <def tag="ext-hiddenfield" attrs="var, allowDomMove, anchor, applyTo,
>> autoCreate, autoEl, cls, ctCls, disabled, id, inputType,
>> invalidClass , invalidText, itemCls, itemId, name, overCls, pageX,
>> pageY, preventMark, ptype, readOnly, ref, renderTo, stateEvents,
>> stateId, stateful, style, tabIndex, value, vtype, vtypeText, width,
>> x,
>> xtype, y">
>>
>> ...
>> </def>
>>
>> <def tag="ext-textfield" attrs="var, allowBlank, allowDomMove,
>> anchor,
>> applyTo, autoCreate, autoEl, autoHeight, autoShow, autoWidth,
>> blankText, clearCls, cls, ctCls, disableKeyFilter, disabled,
>> disabledClass, emptyClass, emptyText, enableKeyEvents, fieldClass,
>> fieldLabel, focusClass, grow, growMax, growMin, height, hidden,
>> hideLabel, hideMode, hideParent, id, inputType, invalidClass ,
>> invalidText, itemCls, itemId, labelSeparator, labelStyle, maskRe,
>> maxLength, maxLengthText, minLength, minLengthText, msgFx, msgTarget,
>> name, overCls, pageX, pageY, preventMark, ptype, readOnly, ref,
>> regex,
>> regexText, renderTo, selectOnFocus, stateEvents, stateId, stateful,
>> stripCharsRe, style, tabIndex, validateOnBlur, validationDelay,
>> validationEvent, value, vtype, vtypeText, width, x, xtype, y">
>> ...
>> </def>
>>
>> ----
>>
>> It should be obvious, that these tags each share common features/
>> configuration, and so it would be nice to allow for attribute sets or
>> inheritance when defining tags.
>> This allows for much more DRY tag definitions and allows for better
>> reuse..
>>
>> <def tag="ext-textfield" attrs="var, maskRe, value" attr-sets="form-
>> component, min-max, grow, regex, text, validate"/>
>> <def tag="ext-hiddenfield" attrs="var, value" attr-sets="form-
>> component"/>
>>
>> <attr-set name="min-max" attrs="maxLength, maxLengthText, minLength,
>> minLengthText"/>
>> <attr-set name="grow" attrs="grow, growMax, growMin"/>
>> <attr-set name="regex" attrs="regex, regexText"/>
>> <attr-set name="text" attrs="emptyText, blankText"/>
>> <attr-set name="validate" attrs="validateOnBlur, validationDelay,
>> validationEvent"/>
>>
>> <attr-set name="form-component" attrs="allowDomMove, anchor, applyTo,
>> autoCreate, autoEl, autoHeight, autoShow, autoWidth, clearCls, cls,
>> ctCls, disableKeyFilter, disabled, disabledClass, emptyClass,
>> enableKeyEvents, fieldClass, fieldLabel, focusClass, height, hidden,
>> hideLabel, hideMode, hideParent, id, inputType, invalidClass ,
>> invalidText, itemCls, itemId, labelSeparator, labelStyle, msgFx,
>> msgTarget, name, overCls, pageX, pageY, preventMark, ptype, readOnly,
>> ref, renderTo, selectOnFocus, stateEvents, stateId, stateful,
>> stripCharsRe, style, tabIndexvalue, vtype, vtypeText, width, x,
>> xtype,
>> y"/>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---