Lots of times I'd like to remove a block from the middle of a script but not actually delete it
I'm thinking that a simple "cut" right-click menu item could copy the block to the clipboard - allowing us to paste it somewhere else
A more advanced idea would be to have a "remove" menu item that simply popped the block out to the right of the script to save paste operation
[editing]Add cut/remove as well as duplicate
Moderator: MSandro
Re: [editing]Add cut/remove as well as duplicate
I LOVE GP :)
It seems to be very simple to implement :)
In Blocks.gp I just copied and modfied grabDuplicate and added item to the context menu
and
It seems to be very simple to implement :)
In Blocks.gp I just copied and modfied grabDuplicate and added item to the context menu
Code: Select all
addItem menu 'duplicate' 'grabDuplicate' 'just this one block'
if (and ('reporter' != type) (notNil (next this))) {
addItem menu '...all' 'grabDuplicateAll' 'duplicate including all attached blocks'
}
// add in remove block option
addItem menu 'remove' 'grabRemove' 'remove block from script without deleting it'
addItem menu 'copy to clipboard' 'copyToClipboard'
Code: Select all
method grabRemove Block {
dup = (duplicate this)
if (notNil (next dup)) {setNext dup nil}
grabCentered morph dup
delete this
}
Re: [editing]Add cut/remove as well as duplicate
I'm not sure about "remove" as users might think that it will act as a delete block action
I'm thinking "extract" could be better syntax
I'm thinking "extract" could be better syntax
Re: [editing]Add cut/remove as well as duplicate
Wow, I'm impressed that you figured out how to do!
I agree, I think "extract" or "extract block" would probably communicate the idea more clearly than "remove".
Would you mind if I incorporated this command into GP?
I agree, I think "extract" or "extract block" would probably communicate the idea more clearly than "remove".
Would you mind if I incorporated this command into GP?
Re: [editing]Add cut/remove as well as duplicate
Mind?
Mind??
I'd be very pleased to have it incorporated :)
Mind??
I'd be very pleased to have it incorporated :)