This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-08-12 06:43:56

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

findTokens: error

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)


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2010-08-12 06:46:37

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: findTokens: error

depends. use the debugger

Offline

 

#3 2010-08-12 06:47:41

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

how?


You can now reach me on Twitter @johnnydean1_

Offline

 

#4 2010-08-12 06:49:11

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

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


You can now reach me on Twitter @johnnydean1_

Offline

 

#5 2010-08-12 06:57:54

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

Oh and for some reason I get it with every image I put in the folder!


You can now reach me on Twitter @johnnydean1_

Offline

 

#6 2010-08-12 07:04:04

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: findTokens: error

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

 

#7 2010-08-12 07:21:36

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

Its the file I think, it doesnt work with any mod in that file?


You can now reach me on Twitter @johnnydean1_

Offline

 

#8 2010-08-12 09:09:07

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

http://a.imageshack.us/img814/9899/errorv.jpg


You can now reach me on Twitter @johnnydean1_

Offline

 

#9 2010-08-12 09:20:03

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: findTokens: error

oh it's the label! i get it now. send me the code in addShortcutButtons and labelForHomeFolder.

Offline

 

#10 2010-08-12 09:20:45

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: findTokens: error

There may be a problem with your ScratchSkin. What were you doing before the error?

Offline

 

#11 2010-08-12 09:26:46

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

Nothing Ill reload a normal skin


You can now reach me on Twitter @johnnydean1_

Offline

 

#12 2010-08-12 09:28:13

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

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)]


You can now reach me on Twitter @johnnydean1_

Offline

 

#13 2010-08-12 09:32:07

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: findTokens: error

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

 

#14 2010-08-12 09:34:57

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

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)


You can now reach me on Twitter @johnnydean1_

Offline

 

#15 2010-08-12 09:38:05

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: findTokens: error

then i can't help you. sorry.

Offline

 

#16 2010-08-12 09:40:17

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

Hang on get this.

I redownloaded the source
Put my Scratch.exe in the folder after extracting
Then run it
Same error!


You can now reach me on Twitter @johnnydean1_

Offline

 

#17 2010-08-12 09:44:25

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

bump


You can now reach me on Twitter @johnnydean1_

Offline

 

#18 2010-08-12 09:53:58

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: findTokens: error

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

 

#19 2010-08-12 09:55:53

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

OK, Im running a virus scan if that makes any diffrence


You can now reach me on Twitter @johnnydean1_

Offline

 

#20 2010-08-12 09:56:53

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

Ok Ive swapped it with the Panther Lion And Bingo .exe and still I get the error!


You can now reach me on Twitter @johnnydean1_

Offline

 

#21 2010-08-12 15:53:53

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: findTokens: error

I think it's because you don't have the Scratch plugin DLLs. Put them in the folder and see if that helps.


nXIII

Offline

 

#22 2010-08-12 16:02:30

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: findTokens: error

ok it works. I had the .dlls in the folder but replaced them and its fine


You can now reach me on Twitter @johnnydean1_

Offline

 

#23 2010-08-12 16:06:08

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: findTokens: error

Cool! I wish you luck in your mod  smile
60 seconds
That's how long it took me to close all those tags!


nXIII

Offline

 

Board footer