Home » Community » Newbie corner » Message from the system.
Re: Message from the system. [message #27125 is a reply to message #27121] |
Sun, 27 June 2010 07:39   |
|
281264 wrote on Sun, 27 June 2010 00:07 | Hi,
I am attaching the files of the application in question (please remember that the purpose is to get familiar with U++). The application is very simple: open a dialog by clicking the button in the TopWindow; then type two (double) values in the Edit Fields; then press OK button , close dialog and then compute the multiplication and then show the outcome in the EditField in the TopWindow.
|
I'll try to help.
It is important that the chosen path (sequence of actions to create the program) is important!
Quote: |
The idea is to practice with dialogs: how to create them, how to transfer values to the TopWindow, etc.
You will see that I still have no idea about how to position the widgets in the dialog, therefore the layout in the dialog is rubbish.
|
You must use the Layout Designer better.
Quote: |
Taking advantage of your help, please allow me to ask some questions:
1.- How to pass the values from the EditFields in the dialog to the TopWindow; so far I have declared public the variables in the dialog so they can be accessed;
|
-To pass from program variable to dialog variable use this construction:
dialog_var <<= program_var;
-To get from dialog variable to program variable use this:
program_var = ~dialog_var;
Quote: |
2.- How a string captured by a EditField can be converted to a numerical value (let us say double) and vice versa;
|
You must use Convert classes as ConvInt or simple use EditInt (what is the same).
Quote: |
3.- How a dialog can be “closed” without having problems with the memoey? For example how is guaranteed that the dialog is deleted.
|
dialog is stack variable, because it's deleted automatically
Quote: |
4.- In the manual I have seen expressions of this kind:
virtual Value Scan(const Value& text) const
|
Here, I just can not say. I do not use it.
Quote: |
4.1.- What is the role of the “virtual” qualifier? I have seen that virtual functions are specially made for been overridden.
|
Yes, overriden member is variant to action with Ctrl.
Quote: |
4.2.- Why the argument is a &?
|
It's easy. Passing parameters not by value, but on reference. This technique simply allows the function to direct modify the value of the parameter variable.
Quote: |
4.3.- Any other suggestion related with "good" practices when programming.
|
practice for this task (My experiment with ScreenCasting):
http://ultimatepp.svsoft.ru/for-javier.html
PS
Sorry for my English
SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
|
|
|
 |
|
Message from the system.
By: 281264 on Fri, 25 June 2010 16:56
|
 |
|
Re: Message from the system.
By: koldo on Sat, 26 June 2010 18:07
|
 |
|
Re: Message from the system.
By: 281264 on Sat, 26 June 2010 22:07
|
 |
|
Re: Message from the system.
|
 |
|
Re: Message from the system.
By: 281264 on Sun, 27 June 2010 14:04
|
 |
|
Re: Message from the system.
|
 |
|
Re: Message from the system.
By: koldo on Sun, 27 June 2010 01:34
|
 |
|
Re: Message from the system.
|
 |
|
Re: Message from the system.
By: koldo on Sun, 27 June 2010 12:25
|
 |
|
Re: Message from the system.
|
 |
|
Re: Message from the system.
By: koldo on Mon, 28 June 2010 12:51
|
 |
|
Re: Message from the system.
|
 |
|
Re: Message from the system.
By: koldo on Mon, 28 June 2010 22:13
|
 |
|
Re: Message from the system.
By: koldo on Tue, 29 June 2010 08:07
|
 |
|
Re: Message from the system.
|
 |
|
Re: Message from the system.
By: koldo on Tue, 29 June 2010 10:44
|
 |
|
Re: Message from the system.
|
Goto Forum:
Current Time: Mon Apr 28 12:27:30 CEST 2025
Total time taken to generate the page: 0.00651 seconds
|