Text is not selectable
You can not mark text in a shoes application, e.g. when holding the mouse button you can not mark and copy it. This is behavior as in Shoes3 but back then lots of people (including myself) complained about it.
So if we can figure out a way to make text markable (is that a word?) even if it's just optionally I would be very happy.
I marked this as a bug, as I consider the shoes3 behavior a bug =)
edit: Apparently it is called selecting text thanks @fism88 !
Do you mean selecting text when you say marking?
In fact I do. :-D Thanks!
when holding the mouse button you can not mark and copy it
You can do that with Shoes 3. So, I think this is not a bug, just not implemented yet in Shoes 4. Try out the following snippet.
Shoes.app height: 200 do
msg = para 'Shooooose ' * 50
click do |b, x, y|
@s = msg.marker = msg.hit(x, y)
end
release do |b, x, y|
@e = msg.cursor = msg.hit(x, y)
self.clipboard = msg.text[@s, @e-@s]
end
end
In Shoes, you have to control text-cursor by yourself. TextBlock#cursor, TextBlock#hit and TextBlock#marker are helper methods to do that. Not mentioned in the manual, though...
Oh ok I didn't know that, it was a complaint we got a lot that you could not copy and paste text from the console.
However wouldn't it be good to have something more automatic? I mean for instance on the web you can just copy and paste any text - couldn't shouldn't it be the same in shoes so that it just works without extra code to make it possible?
I think that this might be more trouble than it's worth, to try and implement. Also, I'm not sure that I like that we will be moving so much from what people expect. Imho this is really just a quirk in old-shoes (I just minted that term) and not really a feature.
Can't the people that need this just use an edit_line?
@ashbb I had no idea about #hit #cursor and #marker :)
@davorb it would be great if we could copy from the error console. In Shoes 3, you can't, and it's always surprising to users: "My app had an error, but I can't copy and paste it. Should I type it in?"
Also for the hacketyhack editor having selectable text is nice but maybe that is an edit line. But yeah as @wasnotrice mentioned the console is the most important one.
@wasnotrice @PragTob I agree that we pretty much need to have the console text be selectable. But it's super easy (at least with swt) to make an edit_line look like normal text, and do that for us.