Ok...I can reproduce it. The difference between Pharo 3.0 and 2.0 is likely that in 3.0 we have the new Opal compiler. If I debug your problem, it seems Opal is not able to even parse the method. It fails with a SyntaxErrorNotification. Example:
Variable or expression expected -> renderContentOn: html self wasShown ifTrue: [ ^ self ]. self messageString ifNotNil: [ self messageType = 'error' ifTrue: [ html tbsAlert beDanger; with: [ html text: self messageString ] ]. self messageType = 'info' ifTrue: [ html tbsAlert beInfo; with: [ html text: self messageString ] ]. self messageType = 'success' ifTrue: [ html tbsAlert beSuccess; with: [ html text: self messageString ] ]. ]. self wasShown: true On Thu, Dec 11, 2014 at 9:52 AM, Sanjay-M <[hidden email]> wrote: I do not get an error in the Seaside one-click experience 3.1 from seaside.st |
Hi Mariano, I would suspect Opal parsing this as not a method, but as an expression.2014-12-11 14:11 GMT+01:00 Mariano Martinez Peck <[hidden email]>:
|
On Thu, Dec 11, 2014 at 10:49 AM, Thierry Goubier <[hidden email]> wrote:
nautilus selectedClass subclassDefinerClass evaluate: input notifying: aController logged: true ] This is called from the method #contents: input notifying: aController of WANautilusBrowser.
|
This is the code: contents: input notifying: aController ^ nautilus showComment ifTrue: [ nautilus selectedClass organization comment: input. true ] ifFalse: [ selectedMessageCategory isNil ifTrue: [ "compile a class" nautilus selectedClass subclassDefinerClass evaluate: input notifying: aController logged: true ] ifFalse: [ "compile a method" (self selectedClass compile: input classified: selectedMessageCategory notifying: aController) isSymbol ] ] selectedMessageCategory is nil.....that's why it goes to the "class" side of the IF... mmmm On Thu, Dec 11, 2014 at 10:55 AM, Mariano Martinez Peck <[hidden email]> wrote:
|
In reply to this post by Mariano Martinez Peck
2014-12-11 14:55 GMT+01:00 Mariano Martinez Peck <[hidden email]>:
Isn't that a method used to evaluate the myClass subclass: #mySubclass ... code? In that case, this is an expression and it can't be used to compile a method. It should be something like: nautilus selectedClass compile: input classified: something notifying: aController. Thierry
|
In reply to this post by Mariano Martinez Peck
2014-12-11 14:56 GMT+01:00 Mariano Martinez Peck <[hidden email]>:
Ok. selectedMessageCategory as nil should make the method 'as yet unclassified' instead of trying to compile a class... GUI logic seems wrong there. Do you have the logic which says whether the core text for the pane is a class definition or a method definition? i.e. the one which says: messageSelectorAndArgumentNames "comment stating purpose of message" | temporary variable names | statements When you are about to write a method? Thierry
|
Free forum by Nabble | Edit this page |