Guest User

Untitled

a guest
Oct 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. "Unfortunately, Pharo is too smart, and signals an error :)"
  2. maxInstVars := 254. "I guess 8 bits are dedicated in the bytecodes to the offset"
  3. instVarNames := String streamContents: [ :s | (1 to: maxInstVars + 1)
  4. do: [ :e | | validVarName |
  5. validVarName := e asWords select: [ :c | c isLetter ].
  6. s nextPutAll: validVarName ]
  7. separatedBy: [ s nextPut: Character space ] ].
  8. Object subclass: #MyClass
  9. instanceVariableNames: instVarNames
  10. classVariableNames: ''
  11. poolDictionaries: ''
  12. category: 'MyCategory'
Add Comment
Please, Sign In to add comment