the users name was not entered for this quote so we will just put: wrote:
('%b=%b' #b #a:equalsb:)
Code:
a:t1 equalsb:t2
t1 = t2 ifTrue [^true].
^false.What it does:
Reports wether or not the two booleans are equal.
@Sparks This block is the same as the original
[blocks] <( <=> )> [/blocks]
block. Remember you can insert booleans into text inserts, so the original is the same only allows you to use text and/or booleans. It is taking up space on Scratch.mit.edu and it isn't free to have a webpage they have to pay $.
<( <mouse down?> <=> <loud?> )> [/blocks]
sparks wrote:
SaveTheSpaces!DueToCarelessOveruseageOfSpaces,
TheyHaveBecomeAnEndangeredSpecies!StandUpForWhatIsRight!
Last edited by Pecola1 (2011-01-07 19:49:37)
Offline
I tried my code and it didn't work!
Offline
floppy_gunk wrote:
I've got several BYOB blocks...
Wow, Panther is a great tool for automating stuff (like typing out the images and links) that would normally take an hour!
Nice! That's about how much I added when I first saw this thread.
Offline
Pecola1 wrote:
the users name was not entered for this quote so we will just put: wrote:
('%b=%b' #b #a:equalsb:)
Code:
a:t1 equalsb:t2
t1 = t2 ifTrue [^true].
^false.What it does:
Reports wether or not the two booleans are equal.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png@Sparks This block is the same as the original
[blocks] <( <=> )> [/blocks]
block. Remember you can insert booleans into text inserts, so the original is the same only allows you to use text and/or booleans. It is taking up space on Scratch.mit.edu and it isn't free to have a webpage they have to pay $.
<( <mouse down?> <=> <loud?> )> [/blocks]sparks wrote:
SaveTheSpaces!DueToCarelessOveruseageOfSpaces,
TheyHaveBecomeAnEndangeredSpecies!StandUpForWhatIsRight!
Ok, I get it.
jk, I understand. On that note, why are the <[]>[]> blocks string inputs?
Offline
Pecola1 wrote:
MathWizz wrote:
Pecola1 wrote:
The hashes are like broadcast almost; it means that the computer will look for a code named whatever is after the #.
The [ and ] are (I am not really sure) Like for conditions such as ifTrue: [^ true].
(I thought you were an expert?)No, #selector is a selector. It is almost identical to a string.
I know but it also SELECTS different codes like broadcasting. That is how it is used in block specs.
So it's like this:
docodingof: t1 #t1
should do the coding of the inout (i.e. 'forward: 10' will make it go forward 10 steps)?
Offline
sparks wrote:
yeah, you can still post it, I'll just add a note to say, warning, takes some time to execute.
Doesn't take time, freezes Scratch for upto 2 seconds!
Offline
comp500 wrote:
sparks wrote:
Yes, sorry comp, they're already in the library but thanks all the same for your contribution
The second one isn't in panther or scratch, just byob.
ADD IT!
Offline
SSBBMIsSavingSpacesToo!Yay!Hey...MeToo!
Offline
Hardmath123 wrote:
Pecola1 wrote:
MathWizz wrote:
No, #selector is a selector. It is almost identical to a string.
I know but it also SELECTS different codes like broadcasting. That is how it is used in block specs.
So it's like this:
Code:
docodingof: t1 #t1should do the coding of the inout (i.e. 'forward: 10' will make it go forward 10 steps)?
Yes, notice how whoever put on the press green flag used:
pressGreenFlag #pressGreenFlagButton
But it didn't work, why? Because it was not in the same class as pressGreenFlagButton. I am not sure exactly how or why but this is what I am pretty sure is true.
BTW great block!
Just found out:
the
docodingof: t1 #t1
block will not work because it has to be:
docodingof: t1 ^#t1
but that wont work because the # before t1 makes t1 not the insert, it tries to do t1 instead, even when you make it a reporter it will report t1. I couldn't find a way to fix it .
Last edited by Pecola1 (2011-01-08 13:05:32)
Offline
ProgrammingFreak wrote:
I tried my code and it didn't work!
Offline
ProgrammingFreak wrote:
I tried my code and it didn't work!
What code?
Last edited by Pecola1 (2011-01-08 13:06:57)
Offline
Blockspec:
('alert %s' #- #alert:)
code:
alert: t1
t1<-DialogBoxMorph new title: '?' inform: t1.
Offline
Hi guys, my life in unpredictable and slightly manic at the moment due to exams, essays and university applications. I'm not going to sit down and update for a bit, but please feel free to continue sharing! Thanks for understanding
Offline
ProgrammingFreak wrote:
Blockspec:
('alert %s' #- #alert:)
code:
alert: t1
t1<-DialogBoxMorph new title: '?' inform: t1.
The reason why is because you cannot change an insert in the code, you will need to make a new variable like this:
alert: t1 | t2 | t2 _ DialogBoxMorph new title: '?' inform: t1 ^ t2
Note it still wont work.
Last edited by Pecola1 (2011-01-08 14:42:33)
Offline
Pecola1 wrote:
ProgrammingFreak wrote:
Blockspec:
('alert %s' #- #alert:)
code:
alert: t1
t1<-DialogBoxMorph new title: '?' inform: t1.The reason why is because you cannot change an insert in the code, you will need to make a new variable like this:
Code:
alert: t1 | t2 | t2 _ DialogBoxMorph new title: '?' inform: t1 ^ t2Note it still wont work.
if we fix it do you want it in RKT?
Offline
Pecola1 wrote:
ProgrammingFreak wrote:
Blockspec:
('alert %s' #- #alert:)
code:
alert: t1
t1<-DialogBoxMorph new title: '?' inform: t1.The reason why is because you cannot change an insert in the code, you will need to make a new variable like this:
Code:
alert: t1 | t2 | t2 _ DialogBoxMorph new title: '?' inform: t1 ^ t2Note it still wont work.
it works!
alert: t1 DialogBoxMorph inform: t1 title: '?'
it has to have the inform before the title, and there is no reason for a second variable.
Last edited by scimonster (2011-01-08 15:08:33)
Offline
scimonster wrote:
Pecola1 wrote:
ProgrammingFreak wrote:
Blockspec:
('alert %s' #- #alert:)
code:
alert: t1
t1<-DialogBoxMorph new title: '?' inform: t1.The reason why is because you cannot change an insert in the code, you will need to make a new variable like this:
Code:
alert: t1 | t2 | t2 _ DialogBoxMorph new title: '?' inform: t1 ^ t2Note it still wont work.
it works!
Code:
alert: t1 DialogBoxMorph inform: t1 title: '?'it has to have the inform before the title, and there is no reason for a second variable.
yay! like?
Offline
ProgrammingFreak wrote:
Pecola1 wrote:
ProgrammingFreak wrote:
Blockspec:
('alert %s' #- #alert:)
code:
alert: t1
t1<-DialogBoxMorph new title: '?' inform: t1.The reason why is because you cannot change an insert in the code, you will need to make a new variable like this:
Code:
alert: t1 | t2 | t2 _ DialogBoxMorph new title: '?' inform: t1 ^ t2Note it still wont work.
if we fix it do you want it in RKT?
Nah... we can use the open dialogue titled ( ) with text ()
Offline
New block
Spec
('Play default system beep' #- #beepDefault)
Method
beepDeafault
self beep
Offline
MathWizz wrote:
Pecola1 wrote:
New block
Spec
('Play default system beep' #- #beepDefault)
Method
beepDeafault
self beepJust use:
('beep' #- #beep)
No, then they don't know what it does, i think It should be
('sound the default system beep' #- #beepDefault)
Offline
Hardmath123 wrote:
Pecola1 wrote:
the users name was not entered for this quote so we will just put: wrote:
('%b=%b' #b #a:equalsb:)
Code:
What it does:
Reports wether or not the two booleans are equal.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png@Sparks This block is the same as the original
[blocks] <( <=> )> [/blocks]
block. Remember you can insert booleans into text inserts, so the original is the same only allows you to use text and/or booleans. It is taking up space on Scratch.mit.edu and it isn't free to have a webpage they have to pay $.
<( <mouse down?> <=> <loud?> )> [/blocks]sparks wrote:
SaveTheSpaces!DueToCarelessOveruseageOfSpaces,
TheyHaveBecomeAnEndangeredSpecies!StandUpForWhatIsRight!Ok, I get it.
jk, I understand. On that note, why are the <[]>[]> blocks string inputs?
What note?
Offline
Pecola1 wrote:
MathWizz wrote:
Pecola1 wrote:
New block
Spec
('Play default system beep' #- #beepDefault)
Method
beepDeafault
self beepJust use:
('beep' #- #beep)No, then they don't know what it does, i think It should be
('sound the default system beep' #- #beepDefault)
No, the point is, you don't need to make a new method for a method that's already there.
('sound the default system beep' #- #beep) works fine.
Offline
Pecola1 wrote:
Hardmath123 wrote:
Pecola1 wrote:
@Sparks This block is the same as the original
[blocks] <( <=> )> [/blocks]
block. Remember you can insert booleans into text inserts, so the original is the same only allows you to use text and/or booleans. It is taking up space on Scratch.mit.edu and it isn't free to have a webpage they have to pay $.
<( <mouse down?> <=> <loud?> )> [/blocks]Ok, I get it.
jk, I understand. On that note, why are the <[]>[]> blocks string inputs?What note?
While we're on the topic of the >=< booleans, why are they string inserts?
Let me have a guess...
Scratch 1.4 is the first version to actually have good string technology. In 1.3.1 and lower, variables couldn't be strings , strings couldn't be compared, there were no ask or answer blocks, and there were none of the string control blocks (join [][], letter () of [], length of []). There were four places for strings:
[blocks]<say[ Hello ]for( 2 )secs><say[ Hello <think[ Hmm... ]for( 2 )secs><think[ Hmm... [/blocks]
So now numbers, strings, reporters, and booleans can be compared.
Anything is a string.
Last edited by scimonster (2011-01-09 04:06:29)
Offline