[albatross-users] Re: css

Dave Cole djc at object-craft.com.au
Sun Mar 17 10:48:54 EST 2002


>>>>> "Lewis" == Lewis Bergman <lbergman at abi.tconline.net> writes:

Lewis> Yes, a couple of hours after I wrote that I thought I probably
Lewis> should have just tried it. =)

Always the way.

>> This does not directly solve your problem of needing to alter the
>> value of the class attribute, but you can always use
>> <al-if><al-else></al-if> to select between normal and error
>> variants of the tag.

Lewis> Exactly how I was thinking of doing it anyway. Although, maybe
Lewis> by the 2.0 version there will be some elegent, yea even "magic"
Lewis> way of doing this.

I thought of a way to do this sort of thing a while ago.  I am not
sure that it is a good idea though.  It could lead to all sorts of
confusion - I should give it a try at some point.

Lewis> Maybe I will get to know albatross well enough one day to allow
Lewis> me to write some class extending the exectution framework that
Lewis> would do some validation and then pass back to the model the
Lewis> fact that something didn't jive.

There are hooks which could almost be used for that sort of thing.  If
you note in the Application.run() method there is a call to
validate_request().  In the Application class the method always
succeeds.  If you make your own application class you could supply a
method which does some form of validation and returns FALSE on
failure.  That will prevent the page_process() page module function
being executed.

Lewis> Maybe some presets even. Maybe alpha only, digits. only, hex,
Lewis> only, alphanumeric, us phone, international phone, email(that's
Lewis> controversial) . Ahhhh.... the regex's are endless. And of
Lewis> course, good docs to tell how to (whats the term?) overload?,
Lewis> supercede?.

Overload (extend current function) or override (replace current
function).

Lewis> Thanks again for all the hard work. It is quite evident that
Lewis> untold number of hours went into this.

Lots and lots of work.  Still more to come though.

Lewis> I will say one thing about the docs though. They would be well
Lewis> served by a PHP'ish style of giving the simple syntax of at
Lewis> least the tags so someone might lookup what arguement's or
Lewis> whatever a tag has. You know, how the first line of the docs
Lewis> says: trimr(string[string], char[int], pos[int]) I made that
Lewis> up. But a quick reference to the args, any type they might
Lewis> expected to be and so on. But, I must admit, the flexability of
Lewis> most of the tags would probably make that difficult.

That is a good idea.  Some sort of quick reference sheet which gave
the call signature for each method of each class.

The trouble we have is that we are too close to the code to think of
things like that.  Input from people just getting started is extremely
valuable.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list