I have pretty much run out of %* options for creating block arguments (e.g. ('do %s')).
Is there a way I can change the format to allow for more? Any help would be appreciated.
Offline
Use upper and lower case?
Offline
bobbybee wrote:
Use upper and lower case?
I'm starting to run out in that respect too. Does anyone know the code that Panther used to make the args work differently?
Last edited by jvvg (2012-02-29 19:50:13)
Offline
Seriously though, why do you need so many arg options
Offline
bobbybee wrote:
Seriously though, why do you need so many arg options
![]()
I have a lot of blocks that use menus. I also have copied a few other types of arg types.
Offline
I would not suggest doing what I did in Panther; it leads to overly verbose block specs. However, you can slightly modify the spec-parsing code to consume multiple letters after each % sign, so for example.
CommandBlockMorph parseCommandSpec: 'set %si to %inp' -> ('set' '%si' 'to' '%inp')
with just a little tweaking of CommandBlockMorph class >> parseCommandSpec:
(k+1 <= len) and: [(spec at: k+1) isDigit | (spec at: k+1) isLetter]
Then just compare against specString rather than code at the top of CommandBlockMorph >> uncoloredArgMorphFor:, e.g.
| code |
specString = '%inp' ifTrue: ["..."].
code := specString at: 2.
"..."
Offline
Thank you, I will try that next time I get the chance and let you know how it works.
So far, it is giving me a "Message not understood: isSeperator" when I try to edit UncoloredArgMorphFor
Last edited by jvvg (2012-02-29 22:01:42)
Offline
[offtopic]@nXIII Can I please have a copy of the Panther skin? Please Please Pleaaaaaaasssssssseee?
[/offtopic]
Last edited by nathanprocks (2012-03-01 00:17:23)
Offline
nXIII wrote:
jvvg wrote:
So far, it is giving me a "Message not understood: isSeperator" when I try to edit UncoloredArgMorphFor
Are you modding another mod?
No, I'm just modding the Scratch Source Code.
Offline
nathanprocks wrote:
[offtopic]@nXIII Can I please have a copy of the Panther skin? Please Please Pleaaaaaaasssssssseee?[/offtopic]
How'd you get the [offtopic] images?
Offline
Hardmath123 wrote:
nathanprocks wrote:
[offtopic]@nXIII Can I please have a copy of the Panther skin? Please Please Pleaaaaaaasssssssseee?[/offtopic]How'd you get the [offtopic] images?
put off topic inside a scratch blocks tag
Offline
muppetds wrote:
Hardmath123 wrote:
nathanprocks wrote:
[offtopic]@nXIII Can I please have a copy of the Panther skin? Please Please Pleaaaaaaasssssssseee?[/offtopic]How'd you get the [offtopic] images?
put off topic inside a scratch blocks tag
[offtopic] [otherText]Cool!
[/offtopic]
Last edited by Hardmath123 (2012-03-01 12:14:18)
Offline