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 » Community » Newbie corner » Add layout
Add layout [message #36909] Fri, 20 July 2012 05:58 Go to next message
varu is currently offline  varu
Messages: 21
Registered: March 2012
Location: Bangalore,India
Promising Member
hi
Is there any way by which i can add layout to already built core console app.?..

thank you


varun
Re: Add layout [message #36911 is a reply to message #36909] Fri, 20 July 2012 09:34 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3358
Registered: August 2008
Senior Veteran
Hello Varun

Do you mean that you have a console application and you would like to convert it to a GUI application with layouts?


Best regards
Iñaki
Re: Add layout [message #36912 is a reply to message #36911] Fri, 20 July 2012 11:47 Go to previous messageGo to next message
varu is currently offline  varu
Messages: 21
Registered: March 2012
Location: Bangalore,India
Promising Member
hello koldo,
yes...your right.i am having a core console app project to which i want add layouts.the data entered from the layout should be accessible in my core console app.

thank you

varun

Re: Add layout [message #36913 is a reply to message #36912] Fri, 20 July 2012 12:10 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3358
Registered: August 2008
Senior Veteran
Hello Varu

If I were you I would try the different samples there are available looking for features I like in my project. They are in Tutorial the most basic and in Examples and Reference the most advanced. I would choose the closest example to my main needs.

Then I would copy it and rename it (mainly folder and .upp file names that have to have the same name) to be the base skeleton of my new project.

After that I would copy to this new project my console application functions as class methods and I would call them from Button or menu options using things like:

myButton.WhenAction = THISBACK(MyGreatConsoleFunction)

And I would replace printf() or Cout() things with controls in the layout like EditString, EditDouble, ... to enter data and Label or also the later to output data. If you have data lists ArrayCtrl and GridCtrl are great. And if you have to plot data you can use ScatterCtrl.

I advice you to begin with the simplest feature of your console app., compile and run it successfully and after that go adding new features one by one. With this focus you will avoid problems and re-engineer your app. as the structure of a console app. is different that the one of a GUI app.


Best regards
Iñaki

[Updated on: Fri, 20 July 2012 12:12]

Report message to a moderator

Re: Add layout [message #36914 is a reply to message #36913] Fri, 20 July 2012 14:29 Go to previous messageGo to next message
varu is currently offline  varu
Messages: 21
Registered: March 2012
Location: Bangalore,India
Promising Member
Dear Koldo,

initially i started my app with sample layout application only which had some problem in some of my pointer declaration which i am uploading so i switched over to core console app where i was successful in doing the same.But now i reached to such a stage of my project which requires layout.so please let me knw if u can point out the mistake in my layout app some that i can switch back as u suggested earlier.

Thank you


Best regards
varun
Re: Add layout [message #36926 is a reply to message #36914] Sun, 22 July 2012 22:51 Go to previous message
koldo is currently offline  koldo
Messages: 3358
Registered: August 2008
Senior Veteran
Hello Varu

The concepts you use are rather advanced for me. However I can tell you that with this declaration:
class PLC_COMPILER : public WithPLC_COMPILERLayout<TopWindow>
{
	public:
		typedef PLC_COMPILER CLASSNAME;
...		
		void (*p[256] ) ();

This is not permitted:
p[0] = &Add();


However this is permitted:
p[0] = Add;


If Add() is declared static.

If you really needed a pointer to member function you can check that here ( http://www.codeguru.com/cpp/cpp/article.php/c17401/C-Tutoria l-PointertoMember-Function.htm).

U++ callbacks are rather nice and simple. You can see a small introduction here (http://www.ultimatepp.org/www$uppweb$overview$en-us.html)


Best regards
Iñaki
Previous Topic: TheIDE configuration Problems
Next Topic: running program at different speeds
Goto Forum:
  


Current Time: Fri May 03 15:00:15 CEST 2024

Total time taken to generate the page: 0.02337 seconds