shoes4 icon indicating copy to clipboard operation
shoes4 copied to clipboard

clickable option and clickable blocks

Open KCErb opened this issue 11 years ago • 2 comments

This is a follow-up to #658

I have a question!

I've been digging into style the last few days and noticed that in some cases when we have an element take a click option, that element also takes a block and makes it clickable in the backend (oval, image, star, rect). But sometimes it doesn't (arc, line) and I'm not sure what's going on in shape (It seems to evaluate the block immediately, but none of the shapes are derived from it so it doesn't matter . . . ?).

My preference would be that anything that takes a click option should also make blocks given to it clickable, including text.

Shoes.app do
  para "This is clickable text." do
    alert "Good job!"
  end
end

KCErb avatar May 05 '14 13:05 KCErb

Hi @KCErb

The block in shape is used for something else, e.g. drawing the shape.

The blocks are a new addition made some time back by @ashbb - they do not work with shoes3. I like them though so this is merely a consistency thing that it isn't implemented everywhere properly. I believe we have a nice convenience method for that though... or maybe we should have :)

Cheers, Tobi

PragTob avatar May 05 '14 13:05 PragTob

OK, I'll make that more uniform (i.e. add clickable blk on the gui side of line and arc).

I know that text block has a lot going on, so I'm not sure how easy it will be to make text blocks take a block too . . . I'll look into it.

KCErb avatar May 05 '14 16:05 KCErb