|
Process source code at every window within project |
Started by J. Flietstra, Feb., 16 2004 10:57 PM - 11 replies |
| |
| | | |
|
| |
Posted on February, 16 2004 - 10:57 PM |
Hello, We would like to define source, which will be processed in the initialisation embed-point of every window within the project. This prevents from entering the same source at every new window. In Clarion we used to do this by customizing the templates and put our source line in the embed-point 'after opening window'. The only thing we had to do after this line, was re-generating the project. Any ideas? Regards, J.Flietstra |
| |
| |
| | | |
|
| | |
| |
Posted on February, 17 2004 - 4:41 AM |
Hello, We would like to define source, which will be processed in the initialisation embed-point of every window within the project. This prevents from entering the same source at every new window. In Clarion we used to do this by customizing the templates and put our source line in the embed-point 'after opening window'. The only thing we had to do after this line, was re-generating the project. Any ideas? Regards, J.Flietstra There is probably a more OOPish way of doing it that one of our Peter's will point out (ever notice how many WD guru's are named Peter?), but first thought would be to edit the WD equivalent of a Clarion template, the .MDL files. Art |
| |
| |
| | | |
|
| | |
| |
Posted on February, 17 2004 - 5:06 AM |
Art is right. On line help index Rad > customizing models follow the links to other model options. Bert
Hello, We would like to define source, which will be processed in the initialisation embed-point of every window within the project. This prevents from entering the same source at every new window. In Clarion we used to do this by customizing the templates and put our source line in the embed-point 'after opening window'. The only thing we had to do after this line, was re-generating the project. Any ideas? Regards, J.Flietstra |
| |
| |
| | | |
|
| | |
| |
Posted on February, 17 2004 - 9:31 AM |
>There is probably a more OOPish way of doing it that one of our Peter's will point out (ever notice how many WD guru's are named Peter?), but first thought would be to edit the WD equivalent of a Clarion template, the .MDL files. Sure? The Clarion template chain is the foundation of code generation. In other words when i (as developer) make a change to a template (for example the windows.tpw) and i rgenerate my project, my code is automaticly generated (it can be generated conditional) Is this possible with the model files from Windev, or are the model files of Windev only new windows/reports etc. Kind regards Jonathan Flietstra |
| |
| |
| | | |
|
| | |
| |
Posted on February, 17 2004 - 10:10 AM |
J. Flietstra said:
There is probably a more OOPish way of doing it that one of our Peter's will point out (ever notice how many WD guru's are named Peter?), but first thought would be to edit the WD equivalent of a Clarion template, the .MDL files. Sure? The Clarion template chain is the foundation of code generation. In other words when i (as developer) make a change to a template (for example the windows.tpw) and i rgenerate my project, my code is automaticly generated (it can be generated conditional) Is this possible with the model files from Windev, or are the model files of Windev only new windows/reports etc.
To proceed as you want, the best way is to have a global procedure that you call at the opening point of the model window.
The call to the global procedure is always present in the new windows ( from the global model) and, when a change is done in the global procedure, it is effective as soon as you the global procedure is recompiled.
HTH -- Michel Herrscher Consultant Président de WinDAsso - Association des Développeurs WINDEV(c) http://www.windasso.org Tel=+33 450 870912 Fax=+33 450 871741 GSM=+33 609044711 |
| |
| |
| | | |
|
| | |
| |
Posted on February, 17 2004 - 10:36 PM |
Hi Jonathan Flietstra,
We would like to define source, which will be processed in the initialisation embed-point of every window within the project. This prevents from entering the same source at every new window. Don't exagerate. In Windev you can use global procedures/functions. Just put "MyGlobalProc()" in your wanted 'embed-point' and ready. (project of 100 windows? 1x Ctrl/C, 100x Ctrl/V (2-3 minutes i guess). After you just change your Proc() and hop, change of code for all your windows. If you want to go further, (code depending on whatever), have a look at dynamic compilation.
Regards, Peter |
| |
| |
| | | |
|
| | |
| |
Posted on February, 18 2004 - 9:54 AM |
Hello Jonthan, there are serverla ways to go for you. I prefer this one: Write the code in a class and define it as a callback procedure. In your project code do an Event(":YourMethod", "*.", WM_CREATE) Raimund
Hello, We would like to define source, which will be processed in the initialisation embed-point of every window within the project. This prevents from entering the same source at every new window. In Clarion we used to do this by customizing the templates and put our source line in the embed-point 'after opening window'. The only thing we had to do after this line, was re-generating the project. Any ideas? Regards, J.Flietstra
http://www.invitec.com |
| |
| |
| | | |
|
| | |
| |
Posted on February, 23 2004 - 11:23 PM |
Raimund, Can you be more specific on your answer you wrote below? We don't understand what the line event.....WM_Create does. Regards, J.Flietstra
Hello Jonthan, there are serverla ways to go for you. I prefer this one: Write the code in a class and define it as a callback procedure. In your project code do an Event(":YourMethod", "*.", WM_CREATE) Raimund Hello, We would like to define source, which will be processed in the initialisation embed-point of every window within the project. This prevents from entering the same source at every new window. In Clarion we used to do this by customizing the templates and put our source line in the embed-point 'after opening window'. The only thing we had to do after this line, was re-generating the project. Any ideas? Regards, J.Flietstra |
| |
| |
| | | |
|
| | |
| |
Posted on February, 24 2004 - 12:11 PM |
Hi Jonathan, >Raimund, No Raimund but Peter
Can you be more specific on your answer you wrote below? We don't understand what the line event.....WM_Create does. WM_CREATE (value 1 / 0x0001) is the Windows event fired when a window is created ('on screen') Peter
http://www.xs4all.nl/~petervu |
| |
| |
| | | |
|
| | |
| |
Posted on February, 24 2004 - 12:19 PM |
Hi,
Can you be more specific on your answer you wrote below? We don't understand what the line event.....WM_Create does. WM_CREATE (value 1 / 0x0001) is the Windows event fired when a window is created ('on screen') Sorry, maybe not good reading so not the answer you needed. Line : 'Event(":YourMethod", "*.", WM_CREATE)' means that the procedure ':YourMethod()' is started everytime the WM_CREATE event message is send by Windows. Peter |
| |
| |
| | | |
|
| | |
| |
Posted on February, 24 2004 - 12:33 PM |
Hi Jonathan, Raimund, No Raimund but Peter Can you be more specific on your answer you wrote below? We don't understand what the line event.....WM_Create does. WM_CREATE (value 1 / 0x0001) is the Windows event fired when a window is created ('on screen') Peter Where is WM_Create defined? When i use this i got a error (not declared as EXTERN) |
| |
| |
| | | |
|
| | |
| |
Posted on February, 24 2004 - 3:01 PM |
Hi,
Where is WM_Create defined? When i use this i got a error (not declared as EXTERN) It is not declared automaticly. You can do it yourself : --- Constant WM_CREATE=1 //0x0001 end --- Or use the delivered WINCONST.WL (text) file (or make your own constant file) and load the constants with the 'Extern "winconst.wl"' command. Peter |
| |
| |
| | | |
|
| | | | |
| | |
|