From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta04.westchester.pa.mail.comcast.net (qmta04.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:40]) by hurricane.the-brannons.com (Postfix) with ESMTP id 183B078697 for ; Thu, 13 Mar 2014 07:45:07 -0700 (PDT) Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73]) by qmta04.westchester.pa.mail.comcast.net with comcast id d1k61n0021ap0As542jk6Z; Thu, 13 Mar 2014 14:43:44 +0000 Received: from eklhad ([107.5.36.150]) by omta22.westchester.pa.mail.comcast.net with comcast id d2jk1n00e3EMmQj3i2jkh5; Thu, 13 Mar 2014 14:43:44 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.5.1 Date: Thu, 13 Mar 2014 10:43:45 -0400 Message-ID: <20140213104345.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1394721824; bh=T8HAa2iZW735p6iqjYG6shp2MqyarGGFPjTLNvl4Bh8=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=YNPt7Ox7kIwTo+aSuiznUao1FCo0NueaBJyA2pXhN1igZXN0jDn8XefYHkeS/so6E fveioGUVsecewTLFOeTy14JWKJamjaIxYx3I1dhTusFvojHfGxeCeIN4M7yYUhdlrA wuVxo/X7P2oIxNG1GqPrSQN/0Xni6uQ3Myx+RxawqiatZ0oTTL3SScn11wzhp3Wn/x V5qGLYa7sJvIY1MEvjh8z84iLMtBXDVt/OlVc/fRfiEMcOX4pzckIIa9UjSVJ0sOb1 cDv9TRPGhL+X9ixbq6Zm4SBtCE3rXo/TmQNA+3KfXnJbzk38mU8n/XBgaKyW/gm7Gz 6lBlzS+UQuRzA== Subject: [Edbrowse-dev] Dynamic Menus X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Karl Dahlke List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2014 14:45:08 -0000 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