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++ Widgets - General questions or Mixed problems » public Ctrl in my class - param in constructor problem
Re: public Ctrl in my class - param in constructor problem [message #30295 is a reply to message #29948] Wed, 22 December 2010 12:39 Go to previous messageGo to previous message
arkady_c is currently offline  arkady_c
Messages: 14
Registered: December 2010
Location: Polska
Promising Member
Howk ALL!
I was not,I absorb Scatter Very Happy
I added a few lines and it is OK(Format time HH:MM:SS // MM:SS)
and void FitToData(bool Y = false,bool X = true); Very Happy

index.php?t=getfile&id=2999&private=0

I have another problem with the index in the constructor.
It compiles but will not fire.

class OptionOB : public Option
{
private:
	zmienna * zm;
	
public:
	virtual void  PerformAction();
	//OptionOB& 
	void SetAddr(zmienna * azm);
	OptionOB& Set(int b);

	OptionOB();
	virtual ~OptionOB();
};
//-----------------
class OptionFDay : public CtrlFrame
{
private:
	zmienna * zm;
	
public:
	virtual void FrameLayout(Rect& r);
	virtual void FrameAddSize(Size& sz);
	virtual void FrameAdd(Ctrl& parent);
//	void SetSetZ(); 
	OptionOB ob[24];
	
	OptionFDay(zmienna& azm)
	{
		zm = &azm;
		for(int i=0;i<24;i++){
		ob[i].SetAddr(zm);
		//ob[i].SetData(*zm->vari);//this is problem?
		}
	}
};
//------------
class FrameOb : public ParentCtrl
{
public:
	OptionFDay ni,po;
typedef FrameOb CLASSNAME;
	FrameOb(zmienna& ani, zmienna& apo) : ni(ani), po(apo)
	{
		AddFrame(ni);	AddFrame(po);	
	}
};

I tried to load the class OptionFDay (Option:: Set (Option:: setDate)) parameter ratio, also tried in the body OptionOB: Set

I suspect not initialized pointer? (did not have time for unknown reasons to me)
ob: Set (1) - Works

void OptionOB::SetAddr(zmienna * azm)
{
	zm = azm;
	option = *zm->vari;//
	//Set(zm->vi);
}


class zmienna{
private:
	int adres;
	int vi;
			
public:	
	void	init_i(int aadres, int avar);
int	*	vari;
zmienna();
~zmienna(){;} 
};
zmienna::zmienna(){
	adres = 0;
	vi = 0;
	vari = &vi;
}
//-------------------------------
void zmienna::init_i(int aadres, int avar){
	adres = aadres;
	vi = avar;
}


Best regards,
Arkady
  • Attachment: wykres1.jpg
    (Size: 67.20KB, Downloaded 484 times)


2a7aff6be3f76940495be32258777636

[Updated on: Thu, 23 December 2010 14:28]

Report message to a moderator

 
Read Message icon10.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GetDefaultPrinter Call does not compile
Next Topic: Label box has no disabled look
Goto Forum:
  


Current Time: Thu May 23 13:43:52 CEST 2024

Total time taken to generate the page: 0.01522 seconds