[Jslib] Re: working with rdf.js
Martin T. Kutschker
Martin.T.Kutschker@blackbox.net
Tue, 29 May 2001 20:24:00 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C0E87D.4BA16BC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Eric Plaster <plaster@urbanrage.com> schrieb in im Newsbeitrag: =
public.mozdev.jslib/3B13C4C8.BC571CA1@urbanrage.com...
=20
I appologize for not getting back to you sooner (been out of town).=20
I think the problem is an rdf issue, not a rdf.js issue. I ran into =
this a while back and had a fight with some NS people until they finally =
explained it to me. The problem is you create the RDFFile class (which =
calles RDF.Init()) and then imediatly use the class (doing an rdf =
assert) before the rdf is loaded. To solve the problem, I moved the =
creation of the object in the "onload" handler and put the rest of my =
code in some button handler. If that is not an option use a =
"setTimeout" to call another function after a second or two. I believe =
martin is working on a way to check whether it has been loaded or not, =
so we can do something like:=20
doit() {
if(RDF.loaded) {
domystuff();=20
remove set timeout...=20
}=20
setInterval("doit();", 1);=20
}=20
You may actually do this already.
Masi
------=_NextPart_000_0009_01C0E87D.4BA16BC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>Eric Plaster <<A=20
href=3D"mailto:plaster@urbanrage.com">plaster@urbanrage.com</A>> =
schrieb in=20
im Newsbeitrag: <A=20
=
href=3D"mailto:public.mozdev.jslib/3B13C4C8.BC571CA1@urbanrage.com">publi=
c.mozdev.jslib/3B13C4C8.BC571CA1@urbanrage.com</A>...</DIV> =20
<BR>I appologize for not getting back to you sooner (been out of =
town).=20
<P>I think the problem is an rdf issue, not a rdf.js issue. I =
ran into=20
this a while back and had a fight with some NS people until they =
finally=20
explained it to me. The problem is you create the RDFFile class =
(which=20
calles RDF.Init()) and then imediatly use the class (doing an rdf =
assert)=20
before the rdf is loaded. To solve the problem, I moved the =
creation of=20
the object in the "onload" handler and put the rest of my code in some =
button=20
handler. If that is not an option use a "setTimeout" to call =
another=20
function after a second or two. I believe martin is working on a =
way to=20
check whether it has been loaded or not, so we can do something like:=20
<P><TT>doit() {<BR> if(RDF.loaded)=20
{<BR> domystuff();</TT>=20
<BR><TT> remove set=20
timeout...</TT> <BR><TT> }</TT> =
<BR><TT> =20
setInterval("doit();", 1);</TT> <BR><TT>}</TT> </P></BLOCKQUOTE>
<DIV><FONT face=3D"Andale Mono" size=3D2>You may actually do this=20
already.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Andale Mono" size=3D2>Masi</FONT></DIV></BODY></HTML>
------=_NextPart_000_0009_01C0E87D.4BA16BC0--