[Magritte] exercices

Hilaire Fernandes hilaire at ext.cri74.org
Sun Jun 11 20:16:18 UTC 2006



Lukas Renggli a écrit :
>> I found the solution might be:
>>
>> MAPersonModel>>description
>>         ^super description copy;
>>                 add: CustomDescription ;
>>                 yourself
>>
>> But it appears to lock the image, when updating from the web browser
>>
>> Then if I execute a few 'MAPersonModel new description', I got a growing
>>    description (insepcting 'MAPersonModel description'), which may
>> explain the locked image. However I don't understand what make the
>> description growing.
> 
> 
> I can't investigate your problem in my own image right now, but I
> think you should use #addAll: instead of #add:. Just from looking at
> your code I don't exactly understand what causes the described
> problem, very likely this is a bug in Magritte.


Not sure if it can help, but I have this MAPersonManager>>report method
where the description message is sent:

report
   report ifNil: [
	report := MAReport
	   rows: self persons
           description: (MAPersonModel description select: [:each |
		#(#firstName #lastName #title #birthday) includes: each accessor
selector]).
	report addColumn: (MACommandColumn new
		addCommand: [:aPerson | self call: ((MAPersonEditor withPerson:
aPerson) component readonly: true)] text: 'vue';
		addCommand: [:aPerson | self call: (MAPersonEditor withPerson:
aPerson) component] text: 'editer';
		addCommand: [:aPerson | MAPersonManager persons remove: aPerson] text:
'supprimer').
	report rowFilter: [:model | model description anySatisfy: 	
		[:aDescription|
			(aDescription toString: (model readUsing: aDescription)) matches:
self filter]]].
   ^report
	


> 
> Cheers,
> Lukas
> 



More information about the Squeak-dev mailing list