edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] rerender
@ 2015-09-14 21:17 Karl Dahlke
  2015-09-15 23:21 ` Adam Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Dahlke @ 2015-09-14 21:17 UTC (permalink / raw)
  To: Edbrowse-dev

So many things are changing, I mean it's a complete redesign,
and I'm trying to keep the ship sailing in the meantime.
If I step back and think about it globally my head spins,
so I keep head down, stay focused, and make one incremental change at a time.

As we move forward, more things don't work in the old system,
and I can't maintain it forever.
With the latest push, edbrowse runs on the new system by default.
If you really need javascript, and I have badly broken it,
export oldsystem=1
to bring back the old system; but I can't guarantee how long
it will keep working.

The new system has a new 2 letter command, rr, for rerender.
It's a little bit meaningless now, but will make sense when
(someday) we have asynchronous javascript running.
Perhaps stock prices on the page have changed, which a sighted person
would just look at the screen and see the change; we would type rr for rerender.
When you do this now it just says "no change".
This has no meaning in the old system, or when not in browse mode,
or when js is inactive.

The point here is that rerender is called internally
after each javascript action.
Perhaps you clicked on a button, or changed a field
that has onchange code associated with it, or whatever.
The objects change, the screen is rerendered, and compared
against the old.
Like if you change the state in jsrt to Utah, which changes the color menu.

This is really really preliminary.
The comparison is done by strcmp.
If the screen is unchanged, and it almost always is,
that's the high runner case, I don't do anything and don't print anything.
Just move on.
If a single byte of the screen changes, I delete the old contents,
put in the new, and tell you that something has changed.
That's it, for now.
You get to figure out what has changed.
Of course I'll put in some more smarts over the next few days,
some kind of diff algorithm to tell you
"line 12 has been updated", and perhaps just changing that line
so I can retain your dot location and any labels you might have set.
That's coming but for now it's clunky,
just to prove the concept.
Yes, we can rerender the tree of nodes again and again,
and reflect any changes that have been made through javascript.

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-16  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-14 21:17 [Edbrowse-dev] rerender Karl Dahlke
2015-09-15 23:21 ` Adam Thompson
2015-09-16  1:55   ` Karl Dahlke

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).