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++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » U++ needs wizards
Re: U++ needs wizards [message #37281 is a reply to message #36690] Fri, 14 September 2012 10:31 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Wizard not needed. We have classes.
For example.
I use my own class for some dictionaries with CRUD and RepGen calls and some other futures.
I write to describe one of dictionaries very small code like this:

//==dict_little_dicts.h=================================================================//
class DictTypeOfCar : public DictStd {
public:
	typedef DictTypeOfCar CLASSNAME;
	
	DictTypeOfCar();
};
//==dict_little_dicts.cpp===============================================================//
DictTypeOfCar::DictTypeOfCar(){
	window_title = "Car type";
	ReportClass("Print car type");
	ReportListClass("Print list of car type");
	sqltable = TYPEOFCAR;
	sqlid = TOC_ID; sqlname = TOC_NAME;
	colname_id = "Id"; colname_name = "Type Name";
	HelpTopic("Dictionaries#TypeOfCar");

	DictStdSetup();
}
//==========================================================================================//


Or, if I need some additional functionality:

//==dict_little_dicts.h=================================================================//
class DictStatus : public DictStd {
public:
	typedef DictStatus CLASSNAME;
	ColorCtrl STA_Color;
	DictStatus();
	void virtual AddingColumns();
	void virtual LoadOneRecord();
};
//==dict_little_dicts.cpp===============================================================//
DictStatus::DictStatus(){
	window_title = "Statuses";
	ReportClass("Print status");
	ReportListClass("Print status list");
	sqltable = STATUS;
	sqlid = STA_ID; sqlname = STA_NAME;
	colname_id = "Id"; colname_name = "Status";
	HelpTopic("Dictionaries#Status");
	DictStdSetup();
}

void DictStatus::AddingColumns() {
	list.AddIndex(STA_ID);
	list.AddColumn(STA_NAME,"Status name",100).Edit(DctName);
	list.AddColumn(STA_COLOR,"Color",50).SetDisplay(Single<DisplayColorRect>()).Edit(STA_Color);
	STA_Color.SetConvert(Single<ConvertColor>());
	stdctrls 
		(sqlname,DctName)
		(STA_COLOR,STA_Color)
	;
	STA_Color.SetConvert(Single<ConvertColor>());
}

void DictStatus::LoadOneRecord(){
	list(STA_ID) = Dict::sqld[STA_ID];
	list(STA_NAME) = Dict::sqld[STA_NAME];
	list(STA_COLOR) = Dict::sqld[STA_COLOR];
}

//==========================================================================================//


You can see, with wizard you spent more more time.
Classes help write ONE feature with ONE code string.

Usually in application 10-30 dictionaries and 3-10 main data tables.

Make classes for this 2 things and other will be very quckly.

When I start write next application I just copy DictStd call and
little rewrite main table CRUD classes. And application is ready.


The result is two beautiful DictWindow:
index.php?t=getfile&id=3873&private=0


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}

[Updated on: Fri, 14 September 2012 13:19]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bug: Scroll icons in home folder
Next Topic: Cannot close the last tab
Goto Forum:
  


Current Time: Thu Aug 21 09:15:51 CEST 2025

Total time taken to generate the page: 0.05008 seconds