array mystery
Peter M. Brigham, MD
pmbrig at gmail.com
Thu May 10 09:27:47 EDT 2012
Well, I've given up for the moment. Weeding out null characters made no difference, and arrayEncoding/decoding made no difference, and putting the text string into a field and getting the text of the field made no difference, so it wasn't the cross-platform line delimiter issue, as I had thought. I still don't know what the problem is. The debugger shows the correct array contents, but getting the array content from a script returns empty. I'm going to use a different page-scraping approach entirely when I can stand to go back to it -- that will be a bigger job.
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
On May 9, 2012, at 5:53 PM, Peter Haworth wrote:
> 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
>>
> _______________________________________________
> 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