From patrice.truongvannga at gmail.com Fri Nov 7 17:13:40 2008 From: patrice.truongvannga at gmail.com (patrice truong van nga) Date: Sat, 8 Nov 2008 02:13:40 +0100 Subject: [Jslib] inMemRDF Message-ID: <8adee0f90811071713s47d789e2lb298e2b878c860d7@mail.gmail.com> Hi all I am new in jslib i am stuck I apologize to ask such a question I try to use th inMemRDF var gRDF = null; var rdfFileURL = "chrome://project/content/local.rdf"; fileUtils = new FileUtils( ); path = fileUtils.chrome_to_path(rdfFileURL); if(navigator.platform == "Win32") { alert(path); path = path.replace(/\//g,"\\"); // Only needed on Windows, until JSLib is fixed } gRDF = new RDFFile(path,null,"http://www.project.org/fs-rdf#",null); var gRDF = initRDF(); var node = searchNode(getTreeCellId(treename),gRDF); var root = "urn:fs:root"; var MRDF = new inMemRDF(root, "http://www.project.org/fs-rdf#"); it throw an exception component return failure code 0x80004005(NS_ERROR_FAILURE) [nsIRDFContainer.Init] what's wrong thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From pete at mozdevgroup.com Fri Nov 7 17:41:59 2008 From: pete at mozdevgroup.com (Pete Collins) Date: Fri, 07 Nov 2008 18:41:59 -0700 Subject: [Jslib] inMemRDF In-Reply-To: <8adee0f90811071713s47d789e2lb298e2b878c860d7@mail.gmail.com> References: <8adee0f90811071713s47d789e2lb298e2b878c860d7@mail.gmail.com> Message-ID: <4914EE67.20603@mozdevgroup.com> I would recommend staying away from RDF if possible. This lib is quite old now and hasn't been maintained. If you really need it fixed, please post a bug and I'll try to look at it. Thanks --pete patrice truong van nga wrote: > Hi all I am new in jslib > i am stuck I apologize to ask such a question > > I try to use th inMemRDF > > var gRDF = null; > var rdfFileURL = "chrome://project/content/local.rdf"; > fileUtils = new FileUtils( ); > path = fileUtils.chrome_to_path(rdfFileURL); > if(navigator.platform == "Win32") { > alert(path); > path = path.replace(/\//g,"\\"); > // Only needed on Windows, until JSLib is fixed > } > gRDF = new RDFFile(path,null,"http://www.project.org/fs-rdf#",null); > var gRDF = initRDF(); > var node = searchNode(getTreeCellId(treename),gRDF); > var root = "urn:fs:root"; > var MRDF = new inMemRDF(root, "http://www.project.org/fs-rdf#"); > > > it throw an exception component return failure code > 0x80004005(NS_ERROR_FAILURE) [nsIRDFContainer.Init] > > what's wrong thanks in advance > ------------------------------------------------------------------------ > > _______________________________________________ > Jslib mailing list > Jslib at mozdev.org > https://www.mozdev.org/mailman/listinfo/jslib > -- Pete Collins - Founder, Mozdev Group Inc. www.mozdevgroup.com Mozilla Software Development Solutions tel: 1-719-302-5811 fax: 1-719-302-5813 From patrice.truongvannga at gmail.com Sat Nov 8 03:30:45 2008 From: patrice.truongvannga at gmail.com (patrice truong van nga) Date: Sat, 8 Nov 2008 12:30:45 +0100 Subject: [Jslib] inMemRDF In-Reply-To: <4914EE67.20603@mozdevgroup.com> References: <8adee0f90811071713s47d789e2lb298e2b878c860d7@mail.gmail.com> <4914EE67.20603@mozdevgroup.com> Message-ID: <8adee0f90811080330k7aaaa0afuadb3f356a454dfa7@mail.gmail.com> Thanks fro your honesty Do I need to call directly Mozilla interface or can I use another javascript lib? 2008/11/8 Pete Collins > I would recommend staying away from RDF if possible. > > This lib is quite old now and hasn't been maintained. > > If you really need it fixed, please post a bug and I'll try to look at it. > > Thanks > > --pete > > > patrice truong van nga wrote: > >> Hi all I am new in jslib >> i am stuck I apologize to ask such a question >> >> I try to use th inMemRDF >> >> var gRDF = null; >> var rdfFileURL = "chrome://project/content/local.rdf"; >> fileUtils = new FileUtils( ); >> path = fileUtils.chrome_to_path(rdfFileURL); >> if(navigator.platform == "Win32") { >> alert(path); >> path = path.replace(/\//g,"\\"); >> // Only needed on Windows, until JSLib is fixed >> } >> gRDF = new RDFFile(path,null,"http://www.project.org/fs-rdf#",null); >> var gRDF = initRDF(); >> var node = searchNode(getTreeCellId(treename),gRDF); >> var root = "urn:fs:root"; >> var MRDF = new inMemRDF(root, "http://www.project.org/fs-rdf#"); >> >> >> it throw an exception component return failure code >> 0x80004005(NS_ERROR_FAILURE) [nsIRDFContainer.Init] >> >> what's wrong thanks in advance >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Jslib mailing list >> Jslib at mozdev.org >> https://www.mozdev.org/mailman/listinfo/jslib >> >> > > -- > Pete Collins - Founder, Mozdev Group Inc. > www.mozdevgroup.com > Mozilla Software Development Solutions > tel: 1-719-302-5811 > fax: 1-719-302-5813 > > _______________________________________________ > Jslib mailing list > Jslib at mozdev.org > https://www.mozdev.org/mailman/listinfo/jslib > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pete at mozdevgroup.com Sat Nov 8 08:22:09 2008 From: pete at mozdevgroup.com (Pete Collins) Date: Sat, 08 Nov 2008 09:22:09 -0700 Subject: [Jslib] inMemRDF In-Reply-To: <8adee0f90811080330k7aaaa0afuadb3f356a454dfa7@mail.gmail.com> References: <8adee0f90811071713s47d789e2lb298e2b878c860d7@mail.gmail.com> <4914EE67.20603@mozdevgroup.com> <8adee0f90811080330k7aaaa0afuadb3f356a454dfa7@mail.gmail.com> Message-ID: <4915BCB1.9060207@mozdevgroup.com> patrice truong van nga wrote: > Thanks fro your honesty > Do I need to call directly Mozilla interface or > can I use another javascript lib? > The jsLib RDF library wraps the mozilla RDF stuff. I think some interfaces might have changed and that's why jsLib is not working properly for you. You can search around the mozilla codebase to see if there is js code rdf consumers that do what you are looking to do. Or if you feel inspired you can fix the jsLib RDF code. :-) --pete -- Pete Collins - Founder, Mozdev Group Inc. www.mozdevgroup.com Mozilla Software Development Solutions tel: 1-719-302-5811 fax: 1-719-302-5813