[Pharo-users] Magritte+Seaside 3.4.4+Pharo issues

2021-02-09 Thread Sanjay Minni
Hi I am posting these here (rather in desperation) as I seem to be stuck very
erratically in Magritte.

Magritte appeared to me the next best thing after sliced bread but somehow i
just cant get it to toast.

trying the simplest of the example - exercise 1 - from the booklet "Meta
Data at work with Magritte" - item 4.3 - which is a form rendering CMPerson
from the code example library Magritte-ContactManager - i now get errors /
walkbacks in the Classes. Yet it seemed working earlier. (PS I have only
loaded Pharo 8)

- MAInternalEditorComponent
- MAFileModelHandler

MessageNotUnderstood__receiver_of__requiresMultipartForm__is_nil.pdf

  

MessageNotUnderstood__MAFileModelHandler___#key_.pdf

  

I see it being used in desktop and probably in web (seaside) as well but
somehow I am drawing a blank

So can someone pls just help me and put any fixes as required (I will do a
sprint over 2 weeks to get an app up) - - its a make or break for me



-
cheers, 
Sanjay
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html


[Pharo-users] Re: RB - New introduced refactorings

2021-02-09 Thread Stéphane Ducasse
Thanks evelyn for the announce. 
I will use it for the blog :)



> On 8 Feb 2021, at 09:40, Evelyn Cusi Lopez  wrote:
> 
> Hello all,
> 
> These weeks I added new refactorings, following I will give some examples of 
> them.
> 
> 1. Create accessors with lazy initialization
> 
> This refactoring create accessors for variables with lazy initialization, for 
> example:
> - we have a class
> 
> Object subclass: #SomeClass
> instanceVariableNames: 'stringVar'
> classVariableNames: ''
> package: 'Example'
> 
> - we can create accessors with lazy initialization executing this script:
> 
> (RBCreateAccessorsWithLazyInitializationForVariableRefactoring 
> variable: #stringVar
> class: SomeClass 
> classVariable: false 
> defaultValue: '''example''') execute
> 
> the result of this refactoring is:
> 
> SomeClass >> stringVar
> ^ stringVar ifNil: [ stringVar := '' ]
> 
> SomeClass >> stringVar: anObject
> stringVar := anObject
> 
> 2. Extract setUp refactoring (is the first version by the moment, it need to 
> be improved)
> 
> This refactoring create a setUp method from a code fragment.
> You can select an interval of some code in a test method and call this 
> refactoring to create a setUp method implementing that code and replace the 
> code by nothing. The selected class need to be a subclass of TestCase.
> 
> For example:
> 
> - given  a class
> 
> TestCase subclass: #SomeTest
> instanceVariableNames: ''
> classVariableNames: ''
> package: 'Example'
> 
> SomeTest >>testFoo
>  self x.
>  self assert: true
> 
> SomeTest >>  self x
> self doSomething
> 
> - To extract setUp method you can execute this script:
> 
> (RBExtractSetUpMethodRefactoring extract: (10 to: 16)
> from: #testFoo
> in: SomeTest) execute
> 
> the result of this refactoring is:
> 
> SomeTest >> setUp
> super setUp.
> self x.
> 
> SomeTest >> testFoo
> self assert: true
> 
> 3. Move method to class side refactoring (This refactoring is still awaiting 
> review)
> 
> This refactoring move a method to class side.
> For example:
> - given a method 
> 
> ClassX >> annotatedBlockMarkup
>^ '@@'
> 
> - we can execute the refactoring with this script:
> 
> (RBMoveMethodToClassSideRefactoring 
> method: (ClassX >> #annotatedBlockMarkup) 
> class: ClassX) execute.
> 
> the result of this refactoring is:
> 
> ClassX >> annotatedBlockMarkup
>   ^ self class annotatedBlockMarkup
> 
> ClassX class >> annotatedBlockMarkup
>   ^ '@@'
> 
> Any suggestions or comment of these refactorings are welcome. I hope these 
> new refactorings are useful to you .
> 
> Regards,
> Evelyn C.


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France