I’m developing a application in Lazarus, that need to check if there is a new version of a XML file on every Form_Create.
How can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have used the synapse library in the past to do this kind of processing. Basically include
httpsendin your uses clause, and then callhttpgetbinary(url,xmlstream)to retrieve a stream containing the resource. I wouldn’t do this in the OnCreate though, since it can take some time to pull the resource. Your better served by placing this in another thread that can make a synchronize call back to the form to enable updates, or set an application flag. This is similar to how the Chrome browser displays updates on the about page, a thread is launched when the form is displayed to check to see if there are updates, and when the thread completes it updates the GUI…this allows other tasks to occur (such as a small animation, or the ability for the user to close the dialog).Synapse is not a visual component library, it is a library of blocking functions that wrap around most of the common internet protocols.