Visual Designer -> Editor

Just starting out? Need help? Post your questions and find answers here.
rturnham
New User
New User
Posts: 1
Joined: Mon Jul 21, 2003 6:37 pm
Location: Charlotte NC USA
Contact:

Visual Designer -> Editor

Post by rturnham »

I must be missing something really simple here...

Downloaded PB to try it out ... seriously interested. Examples ran just fine.

Started my own project. Used Visual Designer first to design the window, and saved it as a .pbv type. Returned to Editor; nothing was imported from the VD. Went back to VD and selected Project>Generate source. It would NOT save source as a .pb type; it created the file, but put nothing in it. It will save the source only if I take the default name of "Common.pb". I did that, then cut text from that file and pasted into my source.

What am I missing? There's GOT to be a better way for the visual designer and editor to talk to each other, but I *did* RTFM, and could not find it there, nor in the forum.

My apologies for such a NEWBIE question, but thanks for your patience and coaching!
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Re: Visual Designer -> Editor

Post by TerryHough »

rturnham wrote:I must be missing something really simple here...

What am I missing? There's GOT to be a better way for the visual designer and editor to talk to each other, but I *did* RTFM, and could not find it there, nor in the forum.
I suspect Berikco will weigh in with some advice if he is available today. He wrote the VD.

I don't uise it much so my advice is limited. But I suspect you need to complete the filenames in the Project Options section. As I recall, I failed to do this my first time through also.

Personally, I tend to do this all manually and spend way too much time doing it. Just my way of doing things... the hard way. Probably because that is the way I got started learning to use PB.

BTW, good to see someone from NC interested in PureBasic. I am over in Greensboro myself.

Terry
Gantry
User
User
Posts: 20
Joined: Tue Jun 03, 2003 6:24 am
Location: Sweden

Post by Gantry »

Hi!

The way I use the visual designer is this:
1) I start the visual designer.
2) I design a nice GUI
3) I put file names in the project options. I call the main file main.pb and the include file common.pb
4) I don't care much for the event loop since the visual designer will overwrite it every time I export.
5) I select 'Generate Source' from project options.

The visual designer now gives me the file main.pb (I never use that one) and the file common.pb - this is the interesting one.

6) I now start my real main file let's call it 'mainprogram.pb' and first in that file I put the line:
IncludeFile "Common.pb"

The file common.pb will be inserted to your main program. You can write your event loop (VD will never overwrite it) and all other fancy stuff.

If you feel like changing the gui, just start up the visual designer, make your changes and generate source. No need to cut and paste or even load the file common.pb unless you forget and want to check some ID.

Maybe this is not the best way, but it works for me. Prior to this I actually tried to use the main file generated, but I couldn't stand the cut&paste and watching lines of code being destroyed all the time. In this way I only have to make changes to my own main file to reflect any ID changes or new gadgets added to common.pb by the visual designer.

I get much more work done now. Does it make sense?

Regards,

Gantry
*** In the end we will remember not the words of our enemies, but the silence of our friends. (Martin Luther King Jr.) ***
Post Reply