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

#1 2010-09-16 14:11:23

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

Using a variable in #( #hi)

So I have some code:
list _ ScratchFilePicker new extensions: #(#scratch #ext ).

heres the catch, ext is a global variable but when run through that code it gets turned into

#scratch #ext

and not
#scratch #(ext's value)

Help!


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2010-09-16 14:16:06

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

Re: Using a variable in #( #hi)

Where it needs changeing at:
UI-Dialogs-FileChooser-all-createScratch
UI-Panes-FrameMorph-all-importScratch Project


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2010-09-16 14:59:16

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

Re: Using a variable in #( #hi)

Just use an actual array declaration:

{#scratch. ext}


nXIII

Offline

 

#4 2010-09-18 15:27:30

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

Re: Using a variable in #( #hi)

Thank you!


You can now reach me on Twitter @johnnydean1_

Offline

 

#5 2010-09-18 15:41:31

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

Re: Using a variable in #( #hi)

Hmm nXIII its still not working. the ext is set to 'cw'. When i run it it still wont get cw files?


You can now reach me on Twitter @johnnydean1_

Offline

 

#6 2010-09-19 12:32:48

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

Re: Using a variable in #( #hi)

johnnydean1 wrote:

Hmm nXIII its still not working. the ext is set to 'cw'. When i run it it still wont get cw files?

set it to #cw instead of 'cw'. Might work, I'm not sure though.


nXIII

Offline

 

#7 2010-09-19 12:33:13

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

Re: Using a variable in #( #hi)

Ok


You can now reach me on Twitter @johnnydean1_

Offline

 

Board footer