Bob Morris wrote:
> On one, but not another, of two Windows XP machines the problem below
> about argument types arises. I am so new to Simile that I don't even
> know how to move the successful case to the other machine to get some
> clues about what might be different in the two environments, nor could
> I think of any (but unsuccessful, naive ) archive search strings to
> find any other occurrences. The problem:
> 
> With Solvent, I make a small piece of javascript (below) and try to
> run it with the Solvent code window Run button. Something---I suppose
> it must be PiggyBank---raises an alert whose text is:
>     Error: There is no method
> edu.mit.simile.piggyBank.WorkingModel.addStatement that matches
> JavaScript argument types (undefined, undefined, undefined,
> undefined). Candidate methods with the same name are: void
> addStatement(java.lang.String,java.lang.String,java.lang.String,boolean)
> 
> It's perfectly clear to me what this message means. It's opaque what I
> should do to look for a cause. Both Firefox installations are current,
> both systems have JRE1.5

It *feels* like the java and javascript subsystems of piggy bank are
misaligned in version.

Have you tried uninstalling and re-installing the misbehaving piggy
bank? (don't worry, your data won't be removed).

> Thanks for any guidance.
> Bob Morris
> ==========
> generated code:
> 
> 
> var rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
> var dc = 'http://purl.org/dc/elements/1.1/';
> 
> var namespace = document.documentElement.namespaceURI;
> var nsResolver = namespace ? function(prefix) {
>   return (prefix == 'x') ? namespace : null;
> } : null;
> 
> var getNode = function(document, contextNode, xpath, nsResolver) {
>   return document.evaluate(xpath, contextNode, nsResolver,
> XPathResult.ANY_TYPE,null).iterateNext();
> }
> 
> var cleanString = function(s) {
>   return utilities.trimString(s);
> }
> 
> var xpath = '//[EMAIL PROTECTED]"rmp_table"]/tbody/tr';
> var elements = utilities.gatherElementsOnXPath(document, document,
> xpath, nsResolver);
> for each (var element in elements) {
>   // element.style.backgroundColor = 'red';
> 
>   var uri = 'http://simile.mit.edu/ns#Item'; // generate the item's URI here
> 
>   data.addStatement(uri, rdf + 'type',
> 'http://simile.mit.edu/ns#Unknown', false); // Use your own type here
>   // log('Scraping URI ' + uri);
> 
>   try {
>     data.addStatement(uri, 'http://Course',
> cleanString(getNode(document, element, './TD[2]/text()[1]',
> nsResolver).nodeValue), true);
>   } catch (e) { log(e); }
> 
> }
> 
> 
> 


-- 
Stefano.

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to