edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] Dynamic Menus
Date: Thu, 13 Mar 2014 10:43:45 -0400	[thread overview]
Message-ID: <20140213104345.eklhad@comcast.net> (raw)

Yes, they work now!
It's not intrusive; if they give you any trouble at all then just
comment out the call to rebuildSelectors() in html.cpp.

Bring up jsrt, select a state,
and You get two different sets of colors to choose from below,
depending on whether the state is A through M or N through Z.
This is how a lot of real world sites work.

Fun? Sure it was fun, always fun to program new and interesting features.

Expedient? Without doubt. I'm Trying to support more websites.

Forward looking? Well maybe. Just a little.
My tags continue to be the representation of the page, js independent,
and then the render selector function is part of a post scan,
to see which js objects have changed,
and map those changes back to the html tags, and report same to user.
Maybe it's a prototype for where we want to go.

Oh by the way, scanning the tree of js objects with a 100% js function,
and doc writing the output in some ascii string,
and converting that back into tags,
that nifty idea is dead on arrival.
Writing a prototype is a great way to see what works and what doesn't.
It doesn't work because I don't have a good way to embed pointers to the
js objects in the ascii output stream.
Oh maybe a way %p but not a good way,
and I need each html tag to point (t->jv) to its corresponding js object.
And there are other ways that it doesn't work so well, as Adam has noted.

My first post-scan function isn't really too bad.
It plods along, but none of the code is hard to follow.
See rebuildSelector and rebuildSelectors in jsloc.cpp.
If you have a moment, look at these and we can think about how
it might scale up to a more general post-scan of any changes on the page.
Also the newSelect() function in jsrt.
Meantime it's a little code that helps a lot.
It's kind of cool to pick the state and have new colors appear
in the submenu below.

One more observation, with jspool = 2, smallest it can be, I ran into a site
wherein things stopped working properly,
but they worked fine with a larger jsppool.
So I think sometimes we run into memory errors that aren't reported to us,
and so we don't shut down js as we should.
Adam mentioned this in a recursive situation.
So sm js continues to hold mysteries.

Karl Dahlke

             reply	other threads:[~2014-03-13 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 14:43 Karl Dahlke [this message]
2014-03-13 16:49 ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140213104345.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).