[Xerte] Noob question
Dave Burnett
d_b_burnett at hotmail.com
Fri Jan 30 13:41:04 GMT 2009
Unless the text file contained "undefined", can't I just use that?
;-)
Subject: RE: [Xerte] Noob question
Date: Fri, 30 Jan 2009 13:31:03 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
The event does fire, even if the file failed to load, yes. If it
helps I can put a value in the fileData property to indicate there was an error
if you like.
J
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Friday, January 30, 2009 1:29 PM
To: Xerte list
Subject: RE: [Xerte] Noob question
Julian,
am I correct in seeing onReadFile fire even if the URL is incorrect?
e.g. if "undefined" is returned, as far as the event is concerned,
the function has completed.
Subject:
RE: [Xerte] Noob question
Date: Fri, 30 Jan 2009 09:03:02 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
I just updated it and fixed a different
bug with loadVars anyway, so you might as well have it:
Usage
iconID.readFile(url);
Parameters
url. The url of the file to read.
Description
Reads in an external file. Fires
the 'onReadFile' event when complete, and sets iconID.fileData with the
contents of the file.
Returns
Nothing.
From:
xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Thursday, January 29, 2009 10:12 PM
To: Xerte list
Subject: RE: [Xerte] Noob question
Thanks
Julian.
I was mushing around the 2.1 help files and was sure I could get it to work in
a round-about way.
Let me mull around a bit before I ask for a re-compile.
I'll save that for the real nasty stuff.
:-)
Dave
Subject:
RE: [Xerte] Noob question
Date: Thu, 29 Jan 2009 21:44:19 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
CC: Julian.Tenney at nottingham.ac.uk
there is an onData event I can
trap for you on loadVars. You can point to a url, I can get an icon to load it
via loadVars, intercept the onData event, and pass it back to your code in an
event handler iconID.onData. I can set iconIdD.rawData or similar and then
when you handle iconID.onData you can have a text icon {iconID.rawData}.
The onData event fires before onLoad, and
lets you access the raw text in the file you loaded. Same with the XML class. Basically
it's readExtFile(). I'm not sure if there is support for it right now in Xerte,
but it is five minutes to add it.
Remember the supported HTML is a bit limited,
thanks to the Flash player. Stylesheets might be useful.
From:
xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Thu 29/01/2009 21:35
To: Xerte list
Subject: RE: [Xerte] Noob question
Yes.
Subject:
RE: [Xerte] Noob question
Date: Thu, 29 Jan 2009 21:26:56 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
what do you want to do with them?
Load them and display them?
From:
xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Thu 29/01/2009 19:39
To: Xerte list
Subject: RE: [Xerte] Noob question
Thanks
Julian.
I just stumbled across it by accidentally adding a URL param in the source.
So what's the accepted method for handling external text files in .htm format?
Now you see why I got curious.
AW had hidden unsupported methods, right? ;-)
Dave
Subject:
RE: [Xerte] Noob question
Date: Thu, 29 Jan 2009 19:17:57 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
It isn't.
BUT
Under the hood, Xerte uses the same class to
display graphic icons and text icons, so the <DIS> nodes can have url
properties, but they refer to the URL for an image for the graphic icon. There's
some code that goes
if (node.attributes.type=='graphic'){
//add a graphic icon to the stage
} else if (node.attributes.type == 'text'){
///add a text icon
}
If I were to rebuild it, there would be two
classes. In fact there'd probbly be three, with one seperate one for swfs.
From:
xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Thu 29/01/2009 17:02
To: Xerte list
Subject: [Xerte] Noob question
What's
the URL parameter in the Text icon used for?
Windows Live™ Hotmail®…more than just
e-mail. See
how it works.
Windows Live™ Hotmail®:…more than just
e-mail. Check
it out.
Windows Live™: E-mail. Chat. Share. Get
more ways to connect. Check
it out.
Windows Live™ Hotmail®…more than just
e-mail. See
how it works.
Windows Live™: E-mail. Chat. Share. Get
more ways to connect. Check it out.
_________________________________________________________________
Windows Live™ Hotmail®:…more than just e-mail.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090130/e5e5e5ba/attachment.html
More information about the Xerte
mailing list