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

Hilaire Fernandes hilaire2006 at laposte.net
Tue Apr 3 10:40:46 UTC 2007


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: [
[...]

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)



More information about the Seaside mailing list