I think you can only put other Text Elements (text stuff) in paras; look at
the weird stuff that happens here when you try to give a TextBlock to a
TextBlock:
Shoes.app do
para "123", para("456")
end
I bet Hackety Hack just uses flows with a set width; here's my attempt at
recreating a button (the events seem a little slower tho):
Shoes.app do
background "#E9EFE0"
@button = flow :width => 50, :top => 10, :left => 10 do
background '#DDD', :curve => 5, :height => 28
@save = para "Save", :stroke => '#767676'
hover { @save.size = 14; @save.weight = 'semibold'; @button.width = 55 }
leave { @save.size = 13; @save.weight = 'normal'; @button.width = 50 }
end
end
-tieg
On Sat, Mar 21, 2009 at 5:24 AM, Jenna Fox <[email protected]>wrote:
> I haven't tried this, but can't you put arbitrary stuff in to a para? Or do
> para's only accept strings and special styled text objects? It must be
> possible, as the Hackety Hack beta runs atop shoes, and it's code editor
> sometimes displays clickable button icons inline with the code.
>
> On 18/03/2009, at 2:50 AM, Tieg Zaharia wrote:
>
> +1 for a nativish inline slot (if possible)
>
> -tieg
>
> On Tue, Mar 17, 2009 at 11:28 AM, Seth Thomas Rasmussen <
> [email protected]> wrote:
>
>> On Tue, Mar 17, 2009 at 11:24 AM, Satoshi Asakawa <[email protected]>
>> wrote:
>> > If you add no styles, the width will be 100%.
>> > 100% means the object fills its parent slot.
>>
>> Aha, hmm. Not sure I dig that behavior. It makes inline styles like
>> the ones this thread spawned very tedious.
>>
>> Although, if backgrounds and other styles that slots enjoy were
>> allowed for text elements like em() and the like, that would be a nice
>> solution for this problem.
>>
>> --
>> Seth Thomas Rasmussen
>> http://greatseth.com
>>
>
>
>