alrighty if your name is nxiii you have probably figured out that I'm making a mod. I am not some reject thats just stealing other peoples blocks and throwing it together. I have actually been researching squeak and smalltalk for maybe 2 weeks now looking at how it works and making small blocks here and there. as nxiii said on my last forum post
nXIII wrote:
Blocks like 'doUntil' are called special-form blocks -- they have custom (or special) evaluation procedures. These are actually defined in ScratchProcess, not ScriptableScratchMorph
a Cblock is a special-form block and they have special evaluation procedures. I was wondering if anyone might know how you make such special procedures so that one could make a working Cblock. thanks for all your help.
Last edited by poppyseeds (2010-05-07 19:34:53)
Offline
Okay, blockSpec time:
#('string w/ args (if any, not including c)' c someSelectorNoArgs)
the selector has no arguments, something like 'doUntil' or 'doReturn'. The c is for "c-block".
Next, go to ScratchProcess's private-special forms and add your method selector there.
I will give you a more detailed help on the method if you tell me what your block is; it's really very case-specific.
Offline
ok so you want me to go to block specs in scriptablescratchmorph and put in a block string. my block string would be ('if %b then do until %b' #c #ifUntil) ok then I * my method to the scratch process's my this you mean I goto instalize in scratch process's and type in my block command which is ifUntil? my Cblocks that I'm really playing to make are mostly combination of other Cblocks
Offline
poppyseeds wrote:
ok so you want me to go to block specs in scriptablescratchmorph and put in a block string. my block string would be ('if %b then do until %b' #c #ifUntil) ok then I * my method to the scratch process's my this you mean I goto instalize in scratch process's and type in my block command which is ifUntil? my Cblocks that I'm really playing to make are mostly combination of other Cblocks
My advice: don't bother wasting your time making a new (very space-consuming) c-block that can easily be accomplished with a few other blocks. Make new c blocks for things that are COMPLETELY new and MUST contain code, such as Panther's
[ do with camera open]
||
[_____________________]
block.
Last edited by nXIII (2010-05-07 20:39:46)
Offline
I have specific reasons for what I'm doing. unlinke panther Nyx isn't so much a beefed up scratch its more of a specialized thing. so if you wouldn't mind could you just help me
Offline
also what your implying is that I should take blocks from panther, which I would rather avoid the only thing I've used so far that I think id from panther is some mesh stuff but we have been coding most of it out selves.
Offline
poppyseeds wrote:
also what your implying is that I should take blocks from panther, which I would rather avoid the only thing I've used so far that I think id from panther is some mesh stuff but we have been coding most of it out selves.
not really, that's not what I'm implying....
poppyseeds wrote:
I have specific reasons for what I'm doing. unlinke panther Nyx isn't so much a beefed up scratch its more of a specialized thing. so if you wouldn't mind could you just help me
![]()
Um.. what reasons?
Offline
mostly gaming I'd rather have easier simplified blocks to get things done alot of blocks I'm taking out to make room for operators control and sensing blocks im adding.
Offline