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++ Library : Other (not classified elsewhere) » friend window
friend window [message #17598] Thu, 21 August 2008 23:17 Go to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

hello all

class Download_Manager_Window : public WithDownloadManager<TopWindow>
{

	private:
		HttpClient client;
		bool Downloading;

	public:
		typedef Download_Manager_Window CLASSNAME;
		Download_Manager_Window();
		void Download_File();
		bool progress_indecator(int x, int all);
		
		friend class ItemNotes;

};

////////////////Item Notes///////////////////////
class ItemNotes : public WithItemNotes<TopWindow> {
	typedef ItemNotes CLASSNAME;

public:
	ItemNotes(int item_id,Download_Manager_Window &download_manager_window);
	void file_choosen();
	void btn_browser_click();
	void btn_download_click(Download_Manager_Window &download_manager_window);
	void btn_open_dir_click();
	void btn_open_file_click();
	void btn_save_notes_click(int item_id);
	
};


i made this two classes
but errors happen here

ItemNotes::ItemNotes(int item_id,Download_Manager_Window &download_manager_window) {
	CtrlLayout(*this, "Item");
	SQL*Select(ITEM_TITLE,SUBJECT_NAME,TYPE_NAME,ITEM_CONTENT,ITEM_USER_NOTES).From
	(CIS_SUBJECTS,SUBJECTS_TYPES,ITEMS).Where
	(ITEM_ID == item_id && SUBJECT_ID == ITEM_SUBJECT && TYPE_ID == ITEM_TYPE);
	if (SQL.Fetch()) {
		title.SetText(SQL[1].ToString()+"/"+SQL[2].ToString()+"/"+SQL[0].ToString());
		Text_Uploader_Notes.SetData(SQL[3]);
		Text_user_notes.SetData(SQL[4]);
	}
	SQL*Select(FILE_ID,FILE_NAME).From(FILES).Where(FILE_ITEM_ID == item_id);
	while (SQL.Fetch()) {
		droplist_files.Add(SQL[0],SQL[1]);
	}
	droplist_files.WhenPush = THISBACK(file_choosen);
	droplist_files.SetIndex(0);
	file_choosen();
	btn_browser <<= THISBACK(btn_browser_click);
	btn_download <<= THISBACK1(btn_download_click,download_manager_window);
	btn_open_dir <<= THISBACK(btn_open_dir_click);
	btn_open_file <<= THISBACK(btn_open_file_click);
	btn_save_notes <<= THISBACK1(btn_save_notes_click,item_id);
}


this error happens
D:\Program Files\MyApps\CISL\/CISL.h:401: note: synthesized method 'WithDownloadManager<Upp::TopWindow>::WithDownloadManager(WithDownloadM
	anager<Upp::TopWindow>&)' first required here 
D:\Program Files\MyApps\CISL\main.cpp: In constructor 'ItemNotes::ItemNotes(int, Download_Manager_Window&)':
D:\Program Files\MyApps\CISL\main.cpp:135: note: synthesized method 'Download_Manager_Window::Download_Manager_Window(Download_Manager_Win
	dow&)' first required here 


also before this errors these errors happen in the lay and U++ source files

D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::ProgressIndicator::ProgressIndicator(Upp::ProgressIndicator&)':
	
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/Progress.h:1: error: within this context
D:\Program Files\MyApps/CISL/CISL.lay: In copy constructor 'WithDownloadManager<Upp::TopWindow>::WithDownloadManager(WithDownloadManager<U
	pp::TopWindow>&)':
D:\Program Files\MyApps/CISL/CISL.lay:49: note: synthesized method 'Upp::ProgressIndicator::ProgressIndicator(Upp::ProgressIndicator&)' fi
	rst required here 
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::StaticText::StaticText(Upp::StaticText&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/StaticCtrl.h:1: error: within this context
D:\Program Files\upp\uppsrc/CtrlLib/StaticCtrl.h: In copy constructor 'Upp::Label::Label(Upp::Label&)':
D:\Program Files\upp\uppsrc/CtrlLib/StaticCtrl.h:19: note: synthesized method 'Upp::StaticText::StaticText(Upp::StaticText&)' first requir
	ed here 
D:\Program Files\MyApps/CISL/CISL.lay: In copy constructor 'WithDownloadManager<Upp::TopWindow>::WithDownloadManager(WithDownloadManager<U
	pp::TopWindow>&)':
D:\Program Files\MyApps/CISL/CISL.lay:49: note: synthesized method 'Upp::Label::Label(Upp::Label&)' first required here 
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::Pusher::Pusher(Upp::Pusher&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/PushCtrl.h:1: error: within this context
D:\Program Files\upp\uppsrc/CtrlLib/PushCtrl.h: In copy constructor 'Upp::Button::Button(Upp::Button&)':
D:\Program Files\upp\uppsrc/CtrlLib/PushCtrl.h:55: note: synthesized method 'Upp::Pusher::Pusher(Upp::Pusher&)' first required here 
D:\Program Files\MyApps/CISL/CISL.lay: In copy constructor 'WithDownloadManager<Upp::TopWindow>::WithDownloadManager(WithDownloadManager<U
	pp::TopWindow>&)':
D:\Program Files\MyApps/CISL/CISL.lay:49: note: synthesized method 'Upp::Button::Button(Upp::Button&)' first required here 
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::ArrayCtrl::ArrayCtrl(Upp::ArrayCtrl&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/ArrayCtrl.h:14: error: within this context
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::HeaderCtrl::HeaderCtrl(Upp::HeaderCtrl&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/HeaderCtrl.h:1: error: within this context
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:75: error: 'Upp::CtrlFrame::CtrlFrame(const Upp::CtrlFrame&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/HeaderCtrl.h:1: error: within this context
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::FrameCtrl<Upp::Ctrl>::FrameCtrl(Upp::FrameCtrl<Upp::Ctrl>&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:1406: error: within this context
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:75: error: 'Upp::CtrlFrame::CtrlFrame(const Upp::CtrlFrame&)' is private
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:1406: error: within this context
D:\Program Files\upp\uppsrc/CtrlLib/ScrollBar.h: In copy constructor 'Upp::ScrollBar::ScrollBar(Upp::ScrollBar&)':
D:\Program Files\upp\uppsrc/CtrlLib/ScrollBar.h:1: note: synthesized method 'Upp::FrameCtrl<Upp::Ctrl>::FrameCtrl(Upp::FrameCtrl<Upp::Ctrl
	>&)' first required here 
D:\Program Files\upp\uppsrc/CtrlLib/ScrollBar.h: In copy constructor 'Upp::HScrollBar::HScrollBar(Upp::HScrollBar&)':
D:\Program Files\upp\uppsrc/CtrlLib/ScrollBar.h:134: note: synthesized method 'Upp::ScrollBar::ScrollBar(Upp::ScrollBar&)' first required 
	here 
D:\Program Files\upp\uppsrc/CtrlLib/HeaderCtrl.h: In copy constructor 'Upp::HeaderCtrl::HeaderCtrl(Upp::HeaderCtrl&)':
D:\Program Files\upp\uppsrc/CtrlLib/HeaderCtrl.h:1: note: synthesized method 'Upp::HScrollBar::HScrollBar(Upp::HScrollBar&)' first require
	d here 
D:\Program Files\upp\uppsrc/CtrlLib/ArrayCtrl.h: In copy constructor 'Upp::ArrayCtrl::ArrayCtrl(Upp::ArrayCtrl&)':
D:\Program Files\upp\uppsrc/CtrlLib/ArrayCtrl.h:14: note: synthesized method 'Upp::HeaderCtrl::HeaderCtrl(Upp::HeaderCtrl&)' first require
	d here 
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::StaticRect::StaticRect(Upp::StaticRect&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/StaticCtrl.h:69: error: within this context
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::FrameCtrl<Upp::StaticRect>::FrameCtrl(Upp::FrameCtrl<Upp::Stati
	cRect>&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:1406: note: synthesized method 'Upp::StaticRect::StaticRect(Upp::StaticRect&)' first requi
	red here 
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:75: error: 'Upp::CtrlFrame::CtrlFrame(const Upp::CtrlFrame&)' is private
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:1406: error: within this context
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::FrameTB<Upp::StaticRect>::FrameTB(Upp::FrameTB<Upp::StaticRect>
	&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:1445: note: synthesized method 'Upp::FrameCtrl<Upp::StaticRect>::FrameCtrl(Upp::FrameCtrl<
	Upp::StaticRect>&)' first required here 
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::FrameBottom<Upp::StaticRect>::FrameBottom(Upp::FrameBottom<Upp:
	:StaticRect>&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:1467: note: synthesized method 'Upp::FrameTB<Upp::StaticRect>::FrameTB(Upp::FrameTB<Upp::S
	taticRect>&)' first required here 
D:\Program Files\upp\uppsrc/CtrlLib/ArrayCtrl.h: In copy constructor 'Upp::ArrayCtrl::ArrayCtrl(Upp::ArrayCtrl&)':
D:\Program Files\upp\uppsrc/CtrlLib/ArrayCtrl.h:14: note: synthesized method 'Upp::FrameBottom<Upp::StaticRect>::FrameBottom(Upp::FrameBot
	tom<Upp::StaticRect>&)' first required here 
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h: In copy constructor 'Upp::DisplayPopup::DisplayPopup(Upp::DisplayPopup&)':
D:\Program Files\upp\uppsrc/CtrlCore/CtrlCore.h:370: error: 'Upp::Ctrl::Ctrl(Upp::Ctrl&)' is private
D:\Program Files\upp\uppsrc/CtrlLib/LabelBase.h:102: error: within this context
D:\Program Files\upp\uppsrc/CtrlLib/ArrayCtrl.h: In copy constructor 'Upp::ArrayCtrl::ArrayCtrl(Upp::ArrayCtrl&)':
D:\Program Files\upp\uppsrc/CtrlLib/ArrayCtrl.h:14: note: synthesized method 'Upp::DisplayPopup::DisplayPopup(Upp::DisplayPopup&)' first r
	equired here 
D:\Program Files\MyApps/CISL/CISL.lay: In copy constructor 'WithDownloadManager<Upp::TopWindow>::WithDownloadManager(WithDownloadManager<U
	pp::TopWindow>&)':
D:\Program Files\MyApps/CISL/CISL.lay:49: note: synthesized method 'Upp::ArrayCtrl::ArrayCtrl(Upp::ArrayCtrl&)' first required here 
Re: friend window [message #17604 is a reply to message #17598] Fri, 22 August 2008 12:05 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
As far as I know, you can't use a reference to a non-moveable type as a parameter to a callback.

You could pass it as a pointer, but I would suggest adding a reference member to ItemNotes:
.h:
class ItemNotes : public WithItemNotes<TopWindow> {
	typedef ItemNotes CLASSNAME;

        Download_Manager_Window &download_manager_window;
...
};

.cpp:
	ItemNotes::ItemNotes(int item_id,Download_Manager_Window &_download_manager_window) : download_manager_window(_download_manager_window)
{
// Constructor
}
Re: friend window [message #17612 is a reply to message #17604] Fri, 22 August 2008 14:12 Go to previous message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

thanks alot
Previous Topic: opening other programs
Next Topic: program hangs [label]
Goto Forum:
  


Current Time: Fri Apr 19 21:12:02 CEST 2024

Total time taken to generate the page: 0.02043 seconds