Hi I am new to XPCOM/XUL, I am having problems using XPCOM components from javascript. The function which as me stumped is 'nsIRDFNode nsIRDFDataSource.GetTarget()' . Say I have asserted an arc into a data source, that has a literal as its target, and the following code gets that target
t=ds.GetTarget(person,foaf_title,true); When run in xpcshell this does exactly what I want, t is an object which raps nsISuports, nsIRDFNode, and nsIRDFLiteral, and print(t.Value); shows the data I want. When the code is in an XUL program, things don't always work the way I want them to, the object returned is usually just an nsIRDFNode, and I cant use the Value attribute, it does show up in venkman, but as a undefined. I can get this to work in some places just by using the var keyword? It seems to me that XPConnect does different things depending on the situation. If someone can explain this to me I will bee very happy. Thanks in advance Joe
