Re: [Selenium-devel] more explicit construction of registries for pattern-matchers, locators, option-specifiers, etc

2005-07-03 Thread David Kemp
Mike Williams <[EMAIL PROTECTED]>  wrote on 01/07/2005 10:54:59 PM: > > How about something like: > >     Selenium.commands.myCommand = ... >     Selenium.asserts.myCondition = ... >     Selenium.elementLocators.myCriteria = ... >     Selenium.patternMatchers.myPatternType = ... >     Selenium.

Re: [Selenium-devel] Cleaning up the Selenium JavaScript

2005-07-03 Thread David Kemp
Mike Williams <[EMAIL PROTECTED]>  wrote on 01/07/2005 09:03:49 PM: > I have little idea of what best practice is in the _javascript_ world, but > I wonder if we could clean up the core _javascript_ code a little, perhaps > even introduce some coding standards, etc. > > I've been perusing "Pro

Re: [Selenium-devel] more explicit construction of registries for pattern-matchers, locators, option-specifiers, etc

2005-07-03 Thread Darrell DeBoer
On 7/1/05, Mike Williams <[EMAIL PROTECTED]> wrote: > When I introduced the PatternMatcher stuff recently, I used the same > kind of "reflection" trick we use for locators, commands, etc; > PatternMatcher tried to map a prefix like "regexp" to a function-name > like "RegexpMatchStrategy". > > I re

Re: [Selenium-devel] more explicit construction of registries for pattern-matchers, locators, option-specifiers, etc

2005-07-03 Thread Mike Williams
Darrell DeBoer wrote: How about something like: Selenium.commands.myCommand = ... ... etc ... I think you're right - this mechanism is a bit clearer for cases where we don't need subclasses to override behaviour. I'm not so sure how we'd do it for locators where we have different implem

Re: [Selenium-devel] Cleaning up the Selenium JavaScript

2005-07-03 Thread Mike Williams
David Kemp wrote: Are you also suggesting that we copy their code for Class.create() and Object.extend() ? Class.create(), anyway. And I like the more structured class-definition style, e.g. MyClass.prototype = { method1: function(arg1, arg2) { ... }, method2: function() { ... } }