Reorganize the order of my own blocks

Hello everybody, and happy new year !

I wonder wheather there is a way to reorganize the order of my own blocks ?
( all the blocks which are under Make a block)
Without deleting them and creating the blocks again one by one in the wanted order...

No, sorry. I guess you could edit the xml file, if it's important enough to you. But be sure to keep a copy of the project as it was before you started editing!

Oh, I see. Is there a description of the xml files projects somewhere ? Because I just had a look on mine and it looks very long... moreover the custom-blocks are everywhere...

Do you know a good xml editor on mac ?

I'm a windows users so don't know of a mac editor
But when you find one, you'll want to expand how it looks otherwise its MUCH harder to edit.

But you need to make sure that when you compress it back again - that Snap! is happy with the file

So, for first use - play around with a copy of your project until your happy that you can edit and re-save without it going wrong

This caught me out in early days with my windows editor :frowning:

No, I just use emacs. Maybe xcode has one?

I've found a good one on mac QXmlEdit.

Like I say - make sure Snap! is happy with the file when you save - I just tried another windows xml editor one out and Snap! wouldn't reload the file even though I made no changes at all!

I've put together a hacked addition to the right-click menu (using a previous @dardoro project) that seems to able to move custom blocks to the top of the list

I've no idea if it's safe to use on a complex real project so use at own risk

image

https://snap.berkeley.edu/snap/snap.html#present:Username=cymplecy&ProjectName=CustomCommandMenu.moveToTop
[edit2 - now works with command, reporter and predicate custom blocks]

I've already tested QXmlEdit, modifying an xml Snap*!* project and importing it again into Snap!. It works.

Anyway, thank you for the move block to top.

Nice!

What I really want is a way to weave custom blocks in with the primitives. So, for example, the Colors and Crayons library could put its SET PEN [menu] TO __ block up where the primitive one is, and hide the primitive one. :~)

I'll get on it :slight_smile:

I noticed that the library creates a lot of variables, which makes the part of the screen with the variables very crowded.

Would it be possible to somehow hide only the variables that are created by libraries.

We're working on designing a system for that. Soon, I hope.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.