ByteString value in 6.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ByteString value in 6.3

Nicholas Moore
WebElement >> existScriptForEvent: anEventString
    | eventPattern |
    eventPattern := '*aidaEvent(''', anEventString, '*'.
    self attributes isNil ifTrue: [^false].
    self attributes do: [:attribute |
        attribute value class = OrderedCollection
            ifFalse: [(eventPattern match: attribute value) ifTrue: [^true]]
            ifTrue: [(attribute value contains: [:attr | eventPattern match: attr]) ifTrue: [^true] ] ].
    ^false


This fails if an attribute is a ByteString with DNU 'value'.

Is there likely to be a problem with adding a 'value' method to String which returns '^self' ? It works so far.

FYI ... I have loaded the latest Swazoo and Aida 6.3 and everything seems to work as expected.

Regards

Nicholas


--

Nicholas Moore


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: ByteString value in 6.3

Nicholas Moore
On closer examination it looks as if the test:

attribute value class = OrderedCollection

should be:

attribute class = OrderedCollection

and also:

ifTrue: [(attribute contains: [:attr | eventPattern match: attr]) ifTrue: [^true] ] ].

Is that the correct meaning?

Nicholas


might work better if it is the attribute class which is

On 26/08/11 13:22, Nicholas Moore wrote:
WebElement >> existScriptForEvent: anEventString
    | eventPattern |
    eventPattern := '*aidaEvent(''', anEventString, '*'.
    self attributes isNil ifTrue: [^false].
    self attributes do: [:attribute |
        attribute value class = OrderedCollection
            ifFalse: [(eventPattern match: attribute value) ifTrue: [^true]]
            ifTrue: [(attribute value contains: [:attr | eventPattern match: attr]) ifTrue: [^true] ] ].
    ^false


This fails if an attribute is a ByteString with DNU 'value'.

Is there likely to be a problem with adding a 'value' method to String which returns '^self' ? It works so far.

FYI ... I have loaded the latest Swazoo and Aida 6.3 and everything seems to work as expected.

Regards

Nicholas


--

Nicholas Moore

_______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida

--

Nicholas Moore


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida