[Pharo-project] Issue 3685 in pharo: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array
Status: New Owner: ---- New issue 3685 by ya...@rogers.com: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array http://code.google.com/p/pharo/issues/detail?id=3685 Pharo core version: Pharo1.2rc2 Latest update: #12324 In Pharo1.1 the instance variables could be passed as an array. See attached testcase, or, for example: SomeClass createUserSubclass: 'SomeSubclass' instVarNames: #(id varOne varTwo) categoryName: 'Test'. The code change here, looks to be the cause: ClassBuilder>>name: className inEnvironment: env subclassOf: newSuper type: type instanceVariableNames: instVarString classVariableNames: classVarString poolDictionaries: poolString category: category unsafe: unsafe < instVars := instVarString subStrings: ' '. < classVars := (classVarString subStrings: ' ') collect: [ :x | x asSymbol ]. "Validate the proposed name" --
instVars := Scanner new scanFieldNames: instVarString. classVars := (Scanner new scanFieldNames: classVarString) collect: [ :x | x asSymbol ]. "Validate the proposed name"
This issue came up in some code that was originally derived from some GemStone code. Maybe it was never intended that instVarNames could be passed in as an array. I've changed my code to pass an instVarString, but I thought I'd mention the changed behaviour here. Attachments: ClassBuilderFormatTests-testSubclassWithInstanceVariablesArray.st 565 bytes
Comment #1 on issue 3685 by stephane...@gmail.com: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array http://code.google.com/p/pharo/issues/detail?id=3685 Normally we should not pass array to class creation.
Updates: Status: Fixed Comment #2 on issue 3685 by stephane...@gmail.com: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array http://code.google.com/p/pharo/issues/detail?id=3685 (No comment was entered for this change.)
Updates: Labels: Milestone-1.3 Comment #3 on issue 3685 by marianopeck: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array http://code.google.com/p/pharo/issues/detail?id=3685 (No comment was entered for this change.)
Updates: Status: FixProposed Comment #4 on issue 3685 by marcus.d...@gmail.com: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array http://code.google.com/p/pharo/issues/detail?id=3685 (No comment was entered for this change.)
Updates: Status: WontFix Comment #5 on issue 3685 by marcus.d...@gmail.com: #createUserSubclass:instVarNames:categoryName: no longer accepts an inst var array http://code.google.com/p/pharo/issues/detail?id=3685 Object subclass: self baseClassName instanceVariableNames: #(var var2) classVariableNames: '' poolDictionaries: '' category: 'Kernel-Tests-ClassBuilder'. instanceVariableNames: #(var var2) is not supported. It's a string... (yes, ugly) We will change that when we move to Slots.
participants (1)
-
pharo@googlecode.com