[Seaside] WAModelProxy bug in VW Port?

Josh Braun josh_braun at mac.com
Sun Mar 28 06:16:39 CEST 2004


Hello,

I ran into what I think is a bug in the port of Seaside to VisualWorks. 
  It seems that the WAModelProxy in VisualWorks doesn't actually read 
values from its cache when a #performRead: is invoked upon it.  Here's 
my sample code:

tmp := WAStoreItem new.
tmp description: 'My store item';
	price: '5';
	subtitle: 'The coolest thing ever!';
	title: 'Giant Toy Robot'.

proxy := WAModelProxy on: tmp.

proxy price: '56'.
proxy price (just 'do it' to this line and you should see '5').

The above code works fine in Squeak, but not VW.  From what I can tell, 
it depends on how Symbol functions differently in the two apps.  When 
the cache looks up a value using the selector from the message passed 
to #doesNotUnderstand:, #performRead: uses the selector as a pure 
symbol (e.g., #price) at which point it doesn't match the key in the 
cache for 'price', which is a string.  Since it is absent, it goes on 
to get the value from the wrapped model (i.e., from the WAStoreItem in 
the above example).

For now, I've adjusted my own local version.  But I thought I ought to 
let the list know about this, if it really is a bug.  If this isn't a 
bug, would someone point out the proper usage of WAModelProxy?

Thanks,

Josh



More information about the Seaside mailing list