Quick question about how objects work.  I'm using a global XML parser
object to go through data and call handlers
where appropriate.  These handlers then access the global object.

However, issues arise in the fact that I am constantly receiving this
xml data.  If I am not done in handlerX with xmlDataY when a new
document comes in, the data in the object will be overwritten in the
middle of my interaction with it.  

To solve this, I thought maybe I could do something like the following,
eliminating the global xml object.  Basically, I want to know if this
code is legal, as I seem to be getting some random errors.

on XMLrecieve

        myXMLdata = new(xtra "xmlparser")

        --do xml parsing and examination
        if (myXMLdata.child[1].name = "foobar") then
                --pass the object as a param here
                foobarxmlhandler(myXMLdata)
        end if

end XMLreceive  


on foobarxmlhandler(foobarXMLdata)

        myXMLdata = new(xtra "xmlparser")
        myXMLdata = foobarXMLdata

        do stuff

end foobarxmlhandler
        
        

~matt desimone
[EMAIL PROTECTED]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to