如何在单击时将边框应用到流程?
我有这个 Shoes 应用程序:
flow :top => 10, :left => 10 do
flow :width => 0.3 do
para @board.deck.card
click do
if @board.source_pile
@board.source_pile = nil
@deck_border.hide
else
@board.source_pile = @board.deck
@deck_border = border yellow, :strokewidth => 2
end
end
end
end
我想仅将边框应用于第二个流程,但由于某种原因边框出现在整个应用程序周围。 我缺少什么?
I've got this piece of Shoes app:
flow :top => 10, :left => 10 do
flow :width => 0.3 do
para @board.deck.card
click do
if @board.source_pile
@board.source_pile = nil
@deck_border.hide
else
@board.source_pile = @board.deck
@deck_border = border yellow, :strokewidth => 2
end
end
end
end
I would like to apply border only to the second flow, but for some reason the border appears around the whole application. What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
鞋子有棘手的块。 简而言之,在块中,
self
通常指的是应用程序。 为了解决这个问题,我们必须创建一个变量来保存我们想要边界的流:Shoes has tricky blocks. In a nutshell, in blocks,
self
typically refers to the application. To counter this, we'll have to create a variable to hold the flow we want to border: