librelist archives

« back to archive

why doesn't _why's "Nobody knows..." code work?

why doesn't _why's "Nobody knows..." code work?

From:
Shon Feder
Date:
2012-03-30 @ 14:07
Dear Shoesers (is there a better collective noun?),

Synopsis:
  My Shoes      :   0.r1739 (i.e, Shoes 3)
  My Computer   :   MacBook Pro
  My OS         :   OS X 10.6.8
  Problems:
      - Shoes won't display attributes from my objects.
      - Shoes won't respond to _why's "Nobody Know's..." codes.

Technically Irrelevant Preliminary:
  I've been deeply impressed by the nature and timbre of this community.  I
love the ideas and the sentiments circulating here. This sort of open,
collaborative endeavor seems like an instantiation of way we'll need if
we're ever to become better humans. So thank you all very much for that.

I've been lurking a bit (and poking and prodding when I should be working
on my thesis) but I am basically a completely uninformed *un*initiate.
 Please bear this in mind.

Still, I was working on the beginnings of an app for mapping the
interrelations of places in a literary work, but I kept running into blank
windows or missing `para "words"` imperatives (this occurred when I tried
to call an attribute ala `object.attribute`, and persisted whether I used
`attr_accessor` or explicitly defined the attribute as a method: `def
method; @variable; end`). I ran the same code through the shell and could
access the attributes fine, but Shoes wouldn't put 'em up.

I sought a new approach and thought I might have found it in nesting my
nascent program within a "views" structure, but everything I tried was in
vain.

Finally, I just copied and pasted _why's code from "Nobody Knows...", and
still ended up with a blank window.

Most recently, I tried the following:

class Dictionary < Shoes
>   url '/',      :index
>   url '/(\w+)', :word
>   def index
>     stack do
>       title "Enter a Word"
>       @word = edit_line
>       button "OK" do
>         visit "/#{@word.text}"
>       end
>     end
>   end
>   def word(string)
>     stack do
>       para "No definition found for #{string}. ",
>         "Sorry this doesn’t actually work."
>     end
>   end
> end
> Shoes.app do; end


I've also tried the code right before this in "Nobody Knows...", and the
result is the same.

Moreover, as you may notice, I added 'do; end' to the code.  This is
because, despite the issue being closed on github, Shoes was still
returning a "Undefined ... blah blah" in the consul lest I addd the final
bit.  (I can go thru my history to fill this in, if no one recalls the
issue easily.)

I know that shoes is on the verge of a metamorphoses, so these issues may
be next to moot (or already all the way in moot), but, incase, they matter,
they've now been mentioned.

Much thanks and admirations for all that y'all do,
shon

Re: [shoes] why doesn't _why's "Nobody knows..." code work?

From:
ashbb
Date:
2012-03-30 @ 15:30
Hi Shon,

> Finally, I just copied and pasted _why's code from "Nobody
> Knows...", and still ended up with a blank window.
Ah, I think you've copied from the pdf file.
So, the following line include a multibyte apostrophe char.

  "Sorry this doesn’t actually work."

Try out this one: http://pastie.org/3698483
I've just replaced a apostrophe from multibyte char to ascii.
No need to add 'do; end'. ;-)

ashbb

Re: [shoes] why doesn't _why's "Nobody knows..." code work?

From:
Shon Feder
Date:
2012-03-31 @ 16:45
Thanks for the help, ashbb.

I tried the code from pastie, but with the same results.  I'm afraid it
must be my use of the official release rather than HEAD ('the Head?
), as Steve suggested.  Moreover, I spent most of yesterday trying to build
the beta release, but rake and my messy system don't seem to get along.
 I'm taking this as sign that my computer skills aren't quite up to the
task of meddling with such things and have resolved to keep studying the
fundamentals until I don't get hung up on such basic stuff (while
struggling with bundler, I managed to dump my home directory with an errant
`~` and had to restore my system. It fixed the bundler problem, but alos
alerted me to my incompetence).  I figure, if I can't work out this kind of
thing, I probably don't need to be building a gui. ;)  I have tones to
learn about ruby basics.

Thanks again for your help!

Best wishes,
shon


On Fri, Mar 30, 2012 at 9:30 AM, ashbb <ashbbb@gmail.com> wrote:

> Hi Shon,
>
>
> > Finally, I just copied and pasted _why's code from "Nobody
>
> Knows...", and still ended up with a blank window.
> Ah, I think you've copied from the pdf file.
> So, the following line include a multibyte apostrophe char.
>
>
>   "Sorry this doesn’t actually work."
>
> Try out this one: http://pastie.org/3698483
> I've just replaced a apostrophe from multibyte char to ascii.
> No need to add 'do; end'. ;-)
>
> ashbb
>

Re: [shoes] why doesn't _why's "Nobody knows..." code work?

From:
Steve Klabnik
Date:
2012-03-30 @ 14:29
Hey shon!

>   I've been deeply impressed by the nature and timbre of this community.  I
> love the ideas and the sentiments circulating here. This sort of open,
> collaborative endeavor seems like an instantiation of way we'll need if
> we're ever to become better humans. So thank you all very much for that.

This is one of the nicest things anyone has ever said about something
I'm involved in. Thanks so much.


> Still, I was working on the beginnings of an app for mapping the
> interrelations of places in a literary work,

Oh yeah? Interesting. I got accepted to do a masters in English composition...

> Moreover, as you may notice, I added 'do; end' to the code.  This is
> because, despite the issue being closed on github, Shoes was still returning
> a "Undefined ... blah blah" in the consul lest I addd the final bit.  (I can
> go thru my history to fill this in, if no one recalls the issue easily.)

I _think_ that this is because you're using the latest release, rather
than HEAD. We've been doing _lots_ of work over the past year, and so
there's lots of stuff that's not public yet. We're trying to get a
release out the door, as you've seen, so hopefully that will help?

Re: [shoes] why doesn't _why's "Nobody knows..." code work?

From:
Shon Feder
Date:
2012-03-31 @ 16:37
Thank you, Steve!

I'd figured it was something so simple.  Sorry to wrap such a simple problem

in so many pretentious words.

Congratulations on the masters program!  I'd be nosy about the specifics,

but this doesn't seem like the appropriate forum...

I'll muster my patience and look forward to the release.


Best wishes and many thanks,
shon


On Fri, Mar 30, 2012 at 8:29 AM, Steve Klabnik <steve@steveklabnik.com>wrote:

> Hey shon!
>
> >   I've been deeply impressed by the nature and timbre of this community.
>  I
> > love the ideas and the sentiments circulating here. This sort of open,
> > collaborative endeavor seems like an instantiation of way we'll need if
> > we're ever to become better humans. So thank you all very much for that.
>
> This is one of the nicest things anyone has ever said about something
> I'm involved in. Thanks so much.
>
>
> > Still, I was working on the beginnings of an app for mapping the
> > interrelations of places in a literary work,
>
> Oh yeah? Interesting. I got accepted to do a masters in English
> composition...
>
> > Moreover, as you may notice, I added 'do; end' to the code.  This is
> > because, despite the issue being closed on github, Shoes was still
> returning
> > a "Undefined ... blah blah" in the consul lest I addd the final bit.  (I
> can
> > go thru my history to fill this in, if no one recalls the issue easily.)
>
> I _think_ that this is because you're using the latest release, rather
> than HEAD. We've been doing _lots_ of work over the past year, and so
> there's lots of stuff that's not public yet. We're trying to get a
> release out the door, as you've seen, so hopefully that will help?
>