array mystery

Peter Haworth pete at lcsql.com
Wed May 9 17:53:04 EDT 2012


Hi Peter,
I know this is a bit late but I just remembered there's a pretty cool
screen scraping plugin for Firefox called Outwit Hub.  I've used it a few
times and it's worked very nicely.  Probably too late for you now since
you've written LC handlers to do it.

Pete
lcSQL Software <http://www.lcsql.com>



On Thu, May 3, 2012 at 10:47 AM, Peter M. Brigham, MD <pmbrig at gmail.com>wrote:

> I have a customprop, CYPdata, that is an array, each element of which is
> an array itself. I am scraping the data to build CYPdata from an HTML page
> on the web, and filling it via script by parsing the HTML. There is an odd
> bug that I'm trying to get to the bottom of, and something strange is
> happening when I do the following in a test button:
>
> on mouseUp
>   put the CYPdata of this stack into CYParray
>   put CYParray["fluvoxamine"] into aFLV
>   put CYParray["doxepin"] into aDOX
>   put aFLV is an array into testFLV
>   put aDOX is an array into testDOX
>   breakpoint
> end mouseUp
>
> In the debugger variable pane at the breakpoint, expanding the array
> CYParray shows the keys, which are a whole list of drugs (as it should be),
> and each key/drug is indeed indicated as containing an array (with the
> little gray expansion triangle at the left). If I examine
> CYParray["fluvoxamine"] by clicking the expansion triangle, it shows the
> elements of that array, as expected. Same for CYParray["doxepin"]. The
> correct data is there in both cases. However, the aDOX variable does not
> display as an array (no expansion triangle) and testDOX = false, whereas
> aFLV is indeed an array, as displayed in the debugger and confirmed by
> testFLV = true.
>
> What could be going on here? As it happens, the "doxepin" case is handled
> differently from the "fluvoxamine" case when I parse the HTML in loading
> the array, since they appear in slightly different contexts, so that must
> be the source of the difference, but how can the debugger show the
> "doxepin" array keys properly but somehow CYParray["doxepin"] not an array?
> Any ideas?
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list