Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » XMLNode error
XMLNode error [message #16867] Thu, 17 July 2008 23:36 Go to next message
TeCNoYoTTa is currently offline  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

Re: XMLNode error [message #16869 is a reply to message #16867] Fri, 18 July 2008 09:56 Go to previous messageGo to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

why cant i see my topic in the forum ??? is this a bug in the forum ??

[Updated on: Fri, 18 July 2008 10:06]

Report message to a moderator

Re: XMLNode error [message #16871 is a reply to message #16869] Fri, 18 July 2008 12:04 Go to previous message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

thanks ....... i fixed it ..... just use () instead of [] or put const in the constructor arguments
Previous Topic: XML parsing error
Next Topic: BiArray::AddTail/AddHead pick problems
Goto Forum:
  


Current Time: Sat Apr 27 14:52:56 CEST 2024

Total time taken to generate the page: 0.02953 seconds