You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copied from Pharo issue tracker 13246
If one writes a method with at least one parameter and a <path ...> in a class
subclassed from WARestfulHandler he gets an "MessageNotUnderstood
RBArgumentNode>>key" error.
I think this comes from GRPharoPlatform>>argumentNamesOf:
argumentNamesOf: aCompiledMethod
^ aCompiledMethod methodNode arguments collect: [ :each | each key ]
whereas this should (maybe!?)
^ aCompiledMethod methodNode arguments collect: [ :each | each token value ]
Steps to reproduce:
// ===
a) Use a fresh image (pharo-30846.image)
b)
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main';
package: 'ConfigurationOfSeaside3';
load.
((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load.
c)
Gofer new
squeaksource: 'Seaside31Addons';
package: 'Seaside-REST-Core';
package: 'Seaside-Pharo-REST-Core';
package: 'Seaside-Tests-REST-Core';
load.
d) FileIn
'From Pharo3.0 of 18 March 2013 [Latest update: #30846] on 5 May 2014 at
7:56:58.462612 pm'!
WARestfulHandler subclass: #Pharo3FogbuzReport
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'GHP-Pharo'!
!Pharo3FogbuzReport commentStamp: '<historical>' prior: 0!
!
!Pharo3FogbuzReport methodsFor: 'as yet unclassified' stamp: 'GeroldPummer
5/5/2014 19:50'!
getMessageJson: aParameter
<get>
<path: '/bug/{aParameter}'>
self halt.
^'OK'! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
Pharo3FogbuzReport class
instanceVariableNames: ''!
!Pharo3FogbuzReport class commentStamp: '<historical>' prior: 0!
!
!Pharo3FogbuzReport class methodsFor: 'as yet unclassified' stamp:
'GeroldPummer 5/5/2014 19:49'!
initialize
WAAdmin register: self at: 'bugreport'! !
Pharo3FogbuzReport initialize!
// ===
e) do
ZnZincServerAdaptor startOn: 8086.
f) do
Pharo3FogbuzReport initialize.
g)
point your web-browser to http://localhost:8086/bugreport/bug/somevalue
h)
The smalltalk debugger should come up with the parameter aParameter and the
value 'somevalue' but gives a message not understood error.
"Funny" thing on this is, I changed my argumentNamesOf: Method to the new one,
and wrote this report. Then I changed the method back to the old method and now
I get an error "WAArgumentNotFoundError: argument "aParameter" was not found in
an OrderedCollection(RBArgumentNode(aParameter))". I then reproduced all with a
fresh image.
Assigned to Everyone by Gerold Pummer 5/5/2014 8:22 PM
Edited by Marcus Denker 7/16/2014 (Today) 1:20 PM Edit
The method #argumentNamesOf: should be rewritten to use
#argumentNames
Can you move this issue to the issue tracker of Seaside?
Edited by Marcus Denker 7/16/2014 (Today) 1:21 PM Edit
argumentNamesOf: aCompiledMethod
^ aCompiledMethod argumentNames
isn't it nice to have a good API on CompiledMethod instead of writing a layer
on top?
Resolved (Invalid) and assigned to Gerold Pummer by Marcus Denker 7/16/2014
(Today) 1:24 PM
Status changed from 'Work Needed' to 'Resolved (Invalid)'.
Milestone changed from 'Later' to 'Pharo4.0: 31/03/2015'.
Closed by Marcus Denker 7/16/2014 (Today) 1:26 PM Edit
I close it here as there is no action possible for Pharo. It needs to be fixed
in Grease.
Edited by Stephan Eggermont 7/16/2014 (Today) 2:24 PM Edit
Some remarks:
- The Seaside31Addons are now on smalltalkhub in Seaside/Seaside31
- It is an extension method in *seaside-pharo-rest-core
- Fix needs a change in ConfigurationOfSeaside
Original issue reported on code.google.com by step...@stack.nl on 16 Jul 2014 at 12:36
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
step...@stack.nl
on 16 Jul 2014 at 12:36The text was updated successfully, but these errors were encountered: