Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

wysiwyg?

<< < (2/4) > >>

thomas:

--- Quote from: DJMaze on March 17, 2006, 06:29:38 pm ---The issue here is, after you wrote the code and modify it but think "hmm i need another widget on the form" you're screwed since you call "File" -> "write code" again and all your changes are lost, unless you run a merger app or something.
--- End quote ---
But... you don't modify that code. You never do.
If you need to add custom code to those widgets, you do that from inside the RAD (and save it with the RAD project). Then you can always add or remove widgets or do whatever, and use "write code" as often as you like. wxSmith even does all the nasty event stuff for you.

The rest of your app is widely independent of all of that, anyway (or should be).

Maybe I really don't understand the problem, but I think that it does just what you want :lol:

DJMaze:

--- Quote from: thomas on March 17, 2006, 06:36:48 pm ---If you need to add custom code to those widgets, you do that from inside the RAD (and save it with the RAD project).
--- End quote ---

That's my whole point: don't save it with the RAD, but save it in .cxx file.

If you have never used a Borland IDE i will wrap up some screenshots to show what i mean

takeshimiya:

--- Quote from: DJMaze on March 17, 2006, 09:33:11 pm ---
--- Quote from: thomas on March 17, 2006, 06:36:48 pm ---If you need to add custom code to those widgets, you do that from inside the RAD (and save it with the RAD project).
--- End quote ---

That's my whole point: don't save it with the RAD, but save it in .cxx file.

--- End quote ---
If I understand what you mean, it would be the same as "saving .cbp projects embedded in .cxx" (!).
Some sort of project management is always necessary.

Another thing: wxSmith generates the code and the widgets in the .cxx files, so I really don't understand what you're saying. Or, you never used it?

Anyways using XRC files instead of widgets embedded in the .cxx source is always preferred whenever available.


--- Quote from: DJMaze on March 17, 2006, 09:33:11 pm ---If you have never used a Borland IDE i will wrap up some screenshots to show what i mean

--- End quote ---
Yes, please do, because I really don't get what you're trying to explain. :P

mandrav:

--- Quote from: DJMaze on March 17, 2006, 09:33:11 pm ---
--- Quote from: thomas on March 17, 2006, 06:36:48 pm ---If you need to add custom code to those widgets, you do that from inside the RAD (and save it with the RAD project).
--- End quote ---

That's my whole point: don't save it with the RAD, but save it in .cxx file.

If you have never used a Borland IDE i will wrap up some screenshots to show what i mean

--- End quote ---

Are you sure you know how to use wxSmith?
Read this please...

byo:
DJMaze, maybe I'll jsut clarify how wxSmith does work and what I've wanted to do from the very beginning.

wxSmith is a RAD tool what means it can write lot of annoying code for You. It generates it on-the-fly, each change inside editor affects some .cpp / .h files. But it does not create the file from scratch (it does it just at the beginning, only once to create some skeleton).
When You look into source code generated with wxSmith There are some parts which are recreated and some which are left untouched. That was the goal - You can freely add Your own members to classes, change names, add Your own event handlers etc. And as long as You put it outside regenerated parts You won't loose it.
And how does wxSmith know what parts of source code it should recreate ?
Blocks of recreated code are marked with special comments. Each block MUST start with //(* and end with //*).
wxSmith does use comments for marking parts of code which need to be recreated. Other tools use some simillar techniques (latest visual studio use #pragma for that, Borland uses AFAIK published class section).
It could be also done with parsing class and analyzing it's content but it's really hard to do - If You don't believe just read some articles on C++ parsing.

When You use wxSmith You can work on both RAD designer and source code. As long as You don't remove nor change wxSmith-generated code it's safe to do.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version