[Pharo-project] Refactor class > Accessors not working for instvars with leading numeric
renggli at gmail.com
Fri Jan 6 10:55:09 EST 2012
The Smalltalk syntax does not allow leading numbers in variable or
selectors. Prefix it with an underscore.
It is strange that you could add an instance-variable with that name
in the first place.
On 6 January 2012 16:34, Ben Coman <btc at openinworld.com> wrote:
> For the following accepted class definition (so presumably leading zero is a
> valid instance variable name),
> from the menu selecting "Refactor class > Accessors"
> fails with "Error: End of statement list encountered
> EpcimIdentifiedObject subclass: #EpcimBaseVoltage
> instanceVariableNames: '0nVoltageLevel'
> classVariableNames: ''
> poolDictionaries: ''
> category: 'IEC61970-Core'
> If I take away the leading zero on the instance variable it works okay. I
> can get by with it not working but wondered whether I log a bug report or am
> I doing something wrong? I do want to keep the leading zero because I am
> using it to mark the multiplicity of associations (eg see
> BaseVoltage/Voltage down the bottom of ).
More information about the Pharo-dev