|
|
Home » U++ Library support » U++ Core » XMLNode error
XMLNode error [message #16867] |
Thu, 17 July 2008 23:36 |
TeCNoYoTTa
Messages: 138 Registered: July 2008 Location: Egypt
|
Experienced Member |
|
|
hi all
this is the .h file
#ifndef _CISNotifier_CISNotifier_h
#define _CISNotifier_CISNotifier_h
#include <CtrlLib/CtrlLib.h>
#include <Web/Web.h>
using namespace Upp;
#define LAYOUTFILE <CISNotifier/CISNotifier.lay>
#include <CtrlCore/lay.h>
struct message
{
String title;
String body;
String popup;
String link;
String attachment;
};
class news
{
public:
Time Message_Time;
message Current_Message;
String sender;
news(XmlNode data)
{
Message_Time.day = StrInt(data["timing"]["date"]["day"][0].GetText());
Message_Time.month = StrInt(data["timing"]["date"]["month"][0].GetText());
Message_Time.year = StrInt(data["timing"]["date"]["year"][0].GetText());
Message_Time.hour = StrInt(data["timing"]["time"]["hour"][0].GetText());
Message_Time.minute = StrInt(data["timing"]["time"]["minute"][0].GetText());
Current_Message.title = data["message"]["title"][0].GetText();
Current_Message.body = data["message"]["body"][0].GetText();
Current_Message.popup = data["message"]["popup"][0].GetText();
Current_Message.link = data["message"]["link"][0].GetText();
Current_Message.attachment = data["message"]["attachment"][0].GetText();
sender = data["sender"][0].GetText();
}
message GetMessage()
{
return Current_Message;
}
String GetSender()
{
return sender;
}
};
class CISNotifier : public WithCISNotifierLayout<TopWindow> {
public:
typedef CISNotifier CLASSNAME;
CISNotifier();
void get();
};
#endif
and this is the .cpp file
#include "CISNotifier.h"
CISNotifier::CISNotifier() //project constructer
{
CtrlLayout(*this, "Window title");
HttpClient client;
client.URL("http://cisclub.com/tecno/bta3/XML.xml");
String content;
content = client.ExecuteRedirect();
XmlNode z = ParseXML(content);
news newz(z["root"]["new"]);
static_text.SetText(news.sender);
}
GUI_APP_MAIN
{
CISNotifier().Run();
}
i dont know why this error comes
C:\MyApps\CISNotifier\main.cpp(16) : error C2664: 'news::news(Upp::XmlNode)' : cannot convert parameter 1 from 'const Upp::XmlNode' to 'Upp::XmlNode'
[Updated on: Fri, 18 July 2008 10:05] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 28 14:11:33 CEST 2024
Total time taken to generate the page: 0.04004 seconds
|
|
|