[Vm-dev] latest vmmaker wont run with pharo 1.1.1 (dev)

Levente Uzonyi leves at elte.hu
Sat Nov 6 18:33:37 UTC 2010


On Sat, 6 Nov 2010, Esteban Lorenzano wrote:

>
> Hi,
> I'm trying to generate a vm... loading ConfigurationOfVMMaker version 1.4, 
> then updating WMMaker package to latest version (200), but the generator, it 
> is sending a DNU:
>
> while calling:
>
> 'From Pharo-1.1.1-- of 12 September 2010 [Latest update: #11414] on 6 
> November 2010 at 3:00:14 pm'!
>
> !String methodsFor: '*VMMaker-Translation to C' stamp: 'dtl 10/25/2009 
> 14:31'!
> replaceLastOccurrence: oldSubstring with: newSubstring 	"Answer a copy with 
> the last occurrence of oldSubstring replaced by newSubstring."
>
> 	" 'int i' replaceLastOccurrence: 'i' with: 'i2' "
> 	" 'void *v' replaceLastOccurrence: 'v' with: 'v2' "
> 	" 'int intxintxintx' replaceLastOccurrence: 'i' with: 'I2' "
> 	" 'int intxintxintx' replaceLastOccurrence: 'FOO' with: 'BAR' "
> 	" 'int intxintxintx' replaceLastOccurrence: '' with: 'BAZ' "
>
> 	^ self class streamContents: [:ws | | pos rs | 			rs := 
> ReadStream on: self.
> 			pos := self findLastOccuranceOfString: oldSubstring 
> startingAt: 1.
> 			pos > 0 ifTrue: [ws nextPutAll: (rs next: pos - 1); 
> nextPutAll: newSubstring.
> 						rs next: oldSubstring size].
> 			ws nextPutAll: rs upToEnd]! !
>
>
> the DNU is with:
> 	findLastOccuranceOfString: oldSubstring startingAt: 1

It's a typo that should be fixed in VMMaker. The correct method name is 
findLastOccurr_e_nceOfString:startingAt: without the underscores.


Levente

>
> Cheers,
> Esteban
>
>
>


More information about the Vm-dev mailing list