TuragaTreeko wrote:
any chance any one could help me with the other question i posted? the one with the [blocks]<when I receive[ <when I receive[ [/blocks]? thanx.
I don't understand it.
Offline
let me clarify. i know what to put in instance ops, just not what to put in blockspecs.
Offline
To make a hat block?
Offline
LS97 wrote:
The link block
Ok, finally some time to add the greatest block of all. the block links the user to a webpage, program or file as long as the path or URL is given. add in the blockspecs in the control section some kind of block code (choose whatever you want, you know how to do it). and add in the corresponding instance ops:Code:
Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]So little code for such a great block... and remember to click accept!
this one. what is the "some kind of block code"?
Offline
TuragaTreeko wrote:
LS97 wrote:
The link block
Ok, finally some time to add the greatest block of all. the block links the user to a webpage, program or file as long as the path or URL is given. add in the blockspecs in the control section some kind of block code (choose whatever you want, you know how to do it). and add in the corresponding instance ops:Code:
Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]So little code for such a great block... and remember to click accept!
this one. what is the "some kind of block code"?
I think he means the blockspec
Last edited by danwoodski (2011-06-06 16:10:03)
Offline
yeah... but what do i put in the blockspec? ...do i sound like a moron?
Offline
TuragaTreeko wrote:
yeah... but what do i put in the blockspec? ...do i sound like a moron?
Oh, I would do:
('open %s' #- #open: 'http://scratch.mit.edu')
open: t1 Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]
This makes the default value the Scratch homepage. If you insert a filepath in it, it will open the file!
Offline
wait do you replace t1 with the url? :? <- this is my own emoticon. i just made it up, right here, right now.
Offline
No. T1 is the insert; it gets defined when the block is run.
Offline
okay, got the block, but it says Message not understood:open. help? but, I actually have a block that says "open (space for URL)", which is like the biggest breakthrough in the world. ... but also
Offline
TuragaTreeko wrote:
yeah... but what do i put in the blockspec? ...do i sound like a moron?
sorry...didn't see that he mentioned it was a blockspec
Offline
it's okay. my problem now is that it doesn't understand the command open. any ideas? please? you're all very awesome for helping me. just like this guy ->
Offline
ScratchSpriteMorph(Object)>>error:
[] in PasteUpMorph>>runStepMethods
[] in BlockContext>>ifError:
ScratchSpriteMorph(Object)>>error:
ScratchSpriteMorph(Object)>>doesNotUnderstand:
CommandBlockMorph>>evaluateWithArgs:
ScratchProcess>>applyPrimitive
ScratchProcess>>evaluateCommandFor:
ScratchProcess>>evaluateFor:
ScratchProcess>>runStepFor:
this is what it spits out when I try to use the URL block.
my script is
[block]<when[ ]clicked>[/block]
open http://www.scratch.mit.edu/
also, i think I replaced the [block]<broadcast[/block] with my open URL block. could that be the problem?
Offline
okay, my problem was that my instance ops didn't get saved. any idea how to add a block to the "other ops" list? but i replaced the broadcast block and completely screwed uo scratch so i had to reinstall. but i found my problem, so it's all good.
Offline
I need to clarify. because I CREATED a new block instead of replacing an old one, I don't know what the "corresponding instance ops" is. when I replaced the broadcast block, there was a broadcast ops for me to edit. but I made a new block, so no ops for me to define the command "open" in. (my problem last time was that I forgot to save my instance ops, and also replacing the broadcast really messed up scratch)
Offline
I may be wearing out my welcome with my endless string of posts that goes on and on and is really annoying, but you can all hear that this is my last one and that I got my block to work. Thank you for tolerating me while I was here, and just, overall, .
Offline
TuragaTreeko wrote:
okay, got the block, but it says Message not understood:open. help? but, I actually have a block that says "open (space for URL)", which is like the biggest breakthrough in the world. ... but also
Make sure there's a colon at the end...
TuragaTreeko wrote:
okay, my problem was that my instance ops didn't get saved. any idea how to add a block to the "other ops" list? but i replaced the broadcast block and completely screwed uo scratch so i had to reinstall. but i found my problem, so it's all good.
It's supposed to add the new method.
Offline
its okay everyone, I have built several new blocks in two days since figuring this out. please see my project "experimental blocks -- DO NOT TOUCH!" (i haven't figured out how to link a project)
Offline
whizzer wrote:
Have we forgotten how to use the quote tag?
, even though IMO that was quite rude.
Offline
LS97 wrote:
whizzer wrote:
Have we forgotten how to use the quote tag?
, even though IMO that was quite rude.
Offline