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

#1 2011-08-16 14:06:43

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Making Variables in Squeak.

I know how to declare a variable in a method in squeak, but how do I make one that I can use in a different method, like the loginName and projectName variable?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#2 2011-08-16 14:11:14

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

Re: Making Variables in Squeak.

Declare them in the class. Just click on the class (for example ScratchSpriteMorph) and in the bottom pane you'll find class and instance variables. Add it to the instance for something each instance has, or to class for something that will occur only once (such as a database of strings or pictures, like the ScratchSkin or fonts).

You can only access instance variables from the class. To access class variables, however, you can use <className> <variableName>.

To make it simpler if you know other languages, instance vars are normal ones in an object, and class vars are shared/global variables.

Offline

 

#3 2011-08-16 14:14:00

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Making Variables in Squeak.

So how do I make it so people can login with an account online, and then login to gopher with the account? Bye the way, how did u remove the created by weebly footer. Can you give me the inscructions?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#4 2011-08-16 15:10:11

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

Re: Making Variables in Squeak.

WindowsExplorer wrote:

So how do I make it so people can login with an account online, and then login to gopher with the account? Bye the way, how did u remove the created by weebly footer. Can you give me the inscructions?

I don't understand, sorry. We're talking about Squeak here right?
And I told you, I was "experimenting" with CSS's 'visibility' tag.

Offline

 

#5 2011-08-16 15:15:18

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Making Variables in Squeak.

how did you do that though?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#6 2011-08-16 15:20:45

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

Re: Making Variables in Squeak.

WindowsExplorer wrote:

how did you do that though?

did it not occur to you that it might be 'visibility: none' ?  roll   tongue

or was it hidden... meh.

Last edited by LS97 (2011-08-16 15:21:04)

Offline

 

#7 2011-08-16 15:22:43

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Making Variables in Squeak.

No, its that I don't know where to find it?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#8 2011-08-16 15:30:06

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

Re: Making Variables in Squeak.

WindowsExplorer wrote:

No, its that I don't know where to find it?

Oh, right! Just go to edit HTML/CSS of page. In design tab.

Last edited by LS97 (2011-08-16 15:30:17)

Offline

 

#9 2011-08-16 15:34:38

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Making Variables in Squeak.

done taht, but which line is it on?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#10 2011-08-16 15:41:49

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

Re: Making Variables in Squeak.

WindowsExplorer wrote:

done taht, but which line is it on?

The line that contains weeblyfooter  roll

Offline

 

#11 2011-08-16 16:04:46

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Making Variables in Squeak.

All I can see is:
http://www.jotform.com/uploads/penguin11318/11443620116/179334260931071008/gp3.jpg


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#12 2011-08-16 16:11:47

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

Re: Making Variables in Squeak.

WindowsExplorer wrote:

All I can see is:
http://www.jotform.com/uploads/penguin1 … 08/gp3.jpg

Anywhere! Just after the margin tag will be fine. Add a line return, and add
visibility: hidden;
to the code before the bracket.

Offline

 

#13 2011-08-16 16:17:48

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Making Variables in Squeak.

Thank you! Now my website looks professional!


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

Board footer