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 » Application crush
Application crush [message #20805] Thu, 09 April 2009 07:08 Go to next message
Infausto is currently offline  Infausto
Messages: 28
Registered: June 2008
Promising Member
I have this little code:

File: Crush.lay


File: Crush.h

#ifndef _Crush_Crush_h
#define _Crush_Crush_h

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

#define LAYOUTFILE <Crush/Crush.lay>
#include <CtrlCore/lay.h>


class Crush : public WithCrushLayout<TopWindow>
{
public:
	typedef Crush CLASSNAME;

	Crush();

private:
	void CrushThis();
};

#endif




File: main.cpp


#include "Crush.h"

Crush::Crush()
{
	arcCrush.AddColumn(t_("Artista"));
	arcCrush.AddColumn(t_("Disco"));
	arcCrush.SetSortColumn(0);
	
	arcCrush.Set(0, 0, "Morbid Angel");
	arcCrush.Set(0, 1, "Domination");
	arcCrush.Set(1, 0, "Cradle of Filth");
	arcCrush.Set(1, 1, "The Principle of Evil Made Flesh");

	btnCrush <<= THISBACK(CrushThis);
	
	Zoomable().Sizeable();
	CtrlLayout(*this, "Crush Example");
}

void Crush::CrushThis()
{
	arcCrush.DoColumnSort();
}

GUI_APP_MAIN
{
	Crush().Run();
}



When i hit the "Crush!!" button then... guess what... the app is crush and close without any error message.

Why occurs this??

I use the 1051 nightly build of upp, mingw-tdm (with gcc 4.3.3) and official release of mingw (with gcc 3.x) on Windows Xp 32 bits service pack 3.

Project files are uploaded.

cheers!!
  • Attachment: Crush.zip
    (Size: 1.09KB, Downloaded 258 times)
Re: Application crush [message #20858 is a reply to message #20805] Tue, 14 April 2009 20:16 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
It is because these columns are not defined as sorting.

The thing is that this mode is intended for situation when you want to sort the list by clicking to column header.

If you just need to sort, use Sort Smile

Anyway, I have also added a fix that will provide fix your example (sending to svn now).

Mirek
Previous Topic: Howto create control-collection -control? [SOLVED -good example]
Next Topic: MultiLanguage on Werner Wenzel's Standard Application UPT?
Goto Forum:
  


Current Time: Thu Mar 28 22:56:27 CET 2024

Total time taken to generate the page: 0.01581 seconds