I am making a mod in Scratch and when I save I get a
message not understood findTokens:
where is it?
Last edited by johnnydean1 (2010-08-12 06:45:55)
Offline
depends. use the debugger
Offline
Dont worry heres the error How to fix
labelForHomeFolder
| t1 t2 |
UserHomeFolder notNil ifTrue: [^ 'Home' localized].
t1 _ ScratchPlugin primGetFolderPathOrNil: 1.
t2 _ FileDirectory pathNameDelimiter asString.
^ UTF8 withAll: (t1 findTokens: t2) last
Offline
Oh and for some reason I get it with every image I put in the folder!
Offline
that code seems completely legit to me. if you didn't edit it try tracking back your changes to see what's related to it
Offline
Its the file I think, it doesnt work with any mod in that file?
Offline
oh it's the label! i get it now. send me the code in addShortcutButtons and labelForHomeFolder.
Offline
There may be a problem with your ScratchSkin. What were you doing before the error?
Offline
Nothing Ill reload a normal skin
Offline
labelForHomeFolder
| t1 t2 |
UserHomeFolder notNil ifTrue: [^ 'Home' localized].
t1 _ ScratchPlugin primGetFolderPathOrNil: 1.
t2 _ FileDirectory pathNameDelimiter asString.
^ UTF8 withAll: (t1 findTokens: t2) last
------------------------------------------------------
addShortcutButtons
| t1 |
t1 _ Morph new extent: 5 @ 5;
color: Color transparent.
shortcutColumn removeAllMorphs.
shortcutColumn addMorphBack: (self
shortcutButtonLabel: 'Computer'
action: #myComp
icon: #folderDiscsIcon).
shortcutColumn addMorphBack: t1 fullCopy.
shortcutColumn addMorphBack: (self
shortcutButtonLabel: self labelForHomeFolder
action: #myHome
icon: #folderHouseIcon).
shortcutColumn addMorphBack: t1 fullCopy.
shortcutColumn addMorphBack: (self
shortcutButtonLabel: 'Desktop'
action: #myDesktop
icon: #folderIcon).
shortcutColumn addMorphBack: t1 fullCopy.
#background = self type ifTrue: [shortcutColumn addMorphBack: (self
shortcutButtonLabel: 'Backgrounds'
action: #scratchBackgrounds
icon: #folderCatIcon)].
#costume = self type ifTrue: [shortcutColumn addMorphBack: (self
shortcutButtonLabel: 'Costumes'
action: #scratchCostumes
icon: #folderCatIcon)].
#project = self type
ifTrue:
[shortcutColumn addMorphBack: (self
shortcutButtonLabel: 'Examples'
action: #sampleProjects
icon: #folderCatIcon).
shortcutColumn addMorphBack: t1 fullCopy.
shortcutColumn addMorphBack: (self
shortcutButtonLabel: 'My Projects'
action: #userProjects
icon: #folderIcon)].
#sound = self type ifTrue: [shortcutColumn addMorphBack: (self
shortcutButtonLabel: 'Sounds'
action: #scratchSounds
icon: #folderCatIcon)]
Offline
it's probably a skin error then. don't reload a normal skin entirely because the two added categories will have the error again. try adding/replacing just the icons called folderXIcon (X stands for home cat etc)
Offline
I redownloaded the skin copied my 2 new catagorys reloaded the skin and nothing. I still get the error!
Last edited by johnnydean1 (2010-08-12 09:35:13)
Offline
then i can't help you. sorry.
Offline
Hang on get this.
I redownloaded the source
Put my Scratch.exe in the folder after extracting
Then run it
Same error!
Offline
johnnydean1 wrote:
Hang on get this.
I redownloaded the source
Put my Scratch.exe in the folder after extracting
Then run it
Same error!
The problem is with your Squeak VM (Scratch.exe)
Get a different Scratch.exe and that should help.
Offline
OK, Im running a virus scan if that makes any diffrence
Offline
Ok Ive swapped it with the Panther Lion And Bingo .exe and still I get the error!
Offline
ok it works. I had the .dlls in the folder but replaced them and its fine
Offline