[Seaside] Strange error with WAHtmlAttributes>>writeKey:value:on:

Philippe Marschall philippe.marschall at gmail.com
Tue Apr 3 11:11:37 UTC 2007


2007/4/3, Hilaire Fernandes <hilaire2006 at laposte.net>:
> With the following code snippet:
>
>
> (html select)
>         list: entities;
>         selected: (entities ifNotEmpty: [selectedEditEntity := entities first]);
>         labels: [:entity | entity entityName];
>         callback: [:anEntity | selectedEditEntity := anEntity]
>
>
> When entity are IFIAdult object with the = and hash methods implemented
> I have the following error bellow.
>
>
> It looks like the following code in writeKey:value:on: is causing the error:
>
> writeKey: aKey value: aValue on: aStream
>         aValue = false ifFalse: [
> [...]

Does IFIPerson >> #= send #isKindOf:? If not add it.

Philippe.

> Indeed the debugger tells me aValue is an IFIAdult instance which does
> not expect to be compared to a boolean.
>
> Before I wrote the = method it was working fine.
>
> Hilaire
>
>
>
> MessageNotUnderstood: False>>entityName
>
>      * False(Object)>>doesNotUnderstand: #entityName
>
>            self false
>            temps
>            aMessage     entityName
>
>      * IFIAdult(IFIPerson)>>=
>
>            self an IFIAdult
>            temps
>            person       false
>            inst vars
>            lastName     'Fernandes'
>            firstName    'Hilaire'
>            picture      nil
>            email        nil
>            id   13864597
>            functions    an OrderedCollection(#teacher)
>
>      * WAHtmlAttributes>>writeKey:value:on:
>
>            self a WAHtmlAttributes
>            temps
>            aKey 'selected'
>            aValue       an IFIAdult
>            aStream      a RWBinaryOrTextStream '
>            inst vars
>            attributes   a Dictionary('selected'->an IFIAdult 'value'->'4' )
>
>      * [] in WAHtmlAttributes>>writeOn: {[:key :value | self writeKey:
> key asLowercase value: value on: aStream]}
>
>            self a WAHtmlAttributes
>            temps
>            aStream      a RWBinaryOrTextStream '
>            key  'selected'
>            value        an IFIAdult
>            inst vars
>            attributes   a Dictionary('selected'->an IFIAdult 'value'->'4' )
>
>      * [] in Dictionary>>keysAndValuesDo: {[:assoc | aBlock value: assoc
> key value: assoc value]}
>
>            self a Dictionary('selected'->an IFIAdult 'value'->'4' )
>            temps
>            aBlock       [] in WAHtmlAttributes>>writeOn: {[:key :value | self
> writeKey: key asLowercase value: value o...etc...
>            assoc        'selected'->an IFIAdult
>            inst vars
>            tally        2
>            array        #(nil nil 'selected'->an IFIAdult nil 'value'->'4' nil)
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the Seaside mailing list