Luis
New Member
Posts: 7
|
Post by Luis on Feb 21, 2009 18:47:26 GMT -5
Hello, While developing code with LBWS, every time I save my work, a new "Untitled.bak" editor window appears. After saving 3 or 4 times I have so many editor windows that it becomes very confusing and frustrating. 1) I would like to disable the *.bak option. Is this possible? I look around in the different menu option but could no find it. 2) Is it possible to stop creating "Untitled.bak windows every time I save my work?. It is always the same file with the same name and in the same folder
I will appreciate some guidance on this issue. Thanks Luis.
|
|
|
Post by Alyce Watson on Feb 22, 2009 7:10:32 GMT -5
Hello, While developing code with LBWS, every time I save my work, a new "Untitled.bak" editor window appears. After saving 3 or 4 times I have so many editor windows that it becomes very confusing and frustrating. 1) I would like to disable the *.bak option. Is this possible? I look around in the different menu option but could no find it. 2) Is it possible to stop creating "Untitled.bak windows every time I save my work?. It is always the same file with the same name and in the same folder I will appreciate some guidance on this issue. Thanks Luis. I cannot recreate this problem by saving a file. I suspect that you are seeing the actual Liberty BASIC editor, loaded with "untitled.bak". LBWorkshop saves a file to disk to RUN or DEBUG a program. It then invokes Liberty BASIC to RUN or DEBUG that file. If you share your code, perhaps I can find out what is happening. Can you please post a small piece of code that recreates the problem?
|
|
Luis
New Member
Posts: 7
|
Post by Luis on Feb 22, 2009 19:44:01 GMT -5
Alyce, Thanks for your reply. The code is very simple. I am learning and experimenting. Nothing fancy yet...maybe soon.
I honestly think that the problem is not in the code; the problem might be that I do not know how to use LBW well.
The code is below. The main problem arises every time I run the GUI during design time, testing a new button or how it looks like, etc., it creates a new Untitled.bak file.
When I am finally done editing the GUI I like and want to save est modifications in the GUI. I hope you can grasp what the issue is; what am I doing wrong?
I think there is the right procedure to do what I want; creating the GUI, running it, editing, running it, editing, etc. etc. without generating all these *.bak files but I do not know how to do it. Can you help me with that?
Additionally, can you elaborate on when I should use only the "Compile GUI code" or "Compile to BAS code with outline". What is the difference??
Your input will be appreciated. Luis
'***HERE IS THE CODE**** '** Created by Liberty BASIC Workshop - 2/22/2009 6:26:32 PM '** Lessons Learned - Main Window
[InitColors] 'Please use default colors when possible. 'ForegroundColor$ = "Black" 'BackgroundColor$ = "Buttonface"
True = 1 : False = 0
[WindowSetup] NOMAINWIN WindowWidth = 629 : WindowHeight = 438 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetup] Menu #main, "&File" , "E&xit", [quit] statictext #main.statictext1, "Add a New Report", 65, 45, 180, 25 statictext #main.statictext2, "Edit Report", 65, 85, 135, 16 statictext #main.statictext3, "Search Reports", 65, 130, 160, 16 stylebits #main.button1, _BS_MULTILINE, 0, 0, 0 button #main.button1, "New", button1Click, UL, 255, 40, 80, 30 stylebits #main.button2, _BS_MULTILINE, 0, 0, 0 button #main.button2, "Edit", button2Click, UL, 255, 80, 80, 30 stylebits #main.button3, _BS_MULTILINE, 0, 0, 0 button #main.button3, "Search", button3Click, UL, 255, 120, 80, 30 stylebits #main.button4, _BS_MULTILINE, 0, 0, 0 button #main.button4, "Help", button4Click, UL, 515, 340, 90, 30 groupbox #main.group1, "", 10, 5, 425, 180
Open "Reports - Main Window" for Window as #main #main "trapclose [quit]" #main "font ms_sans_serif 10"
[loop] Wait
[quit] close #main : END
|
|
|
Post by Alyce Watson on Feb 23, 2009 6:56:24 GMT -5
Sorry, Luis, but if you want to test the GUI by running it, the BAK files must be written to disk.
As I said in an earlier reply, LBW "runs" and "debugs" programs by writing a file to disk, then calling Liberty BASIC to run or debug the file. The file must be written to disk. LBW doesn't run it. Liberty BASIC runs it.
When you compile the code for a GUI, all of the controls statements are included, as well as the statement to open the window. If you choose to compile with an outline, the branch label handlers are added to the code for you, also.
|
|
Luis
New Member
Posts: 7
|
Post by Luis on Feb 23, 2009 20:15:45 GMT -5
Alyce, Thanks for the explanation. I understand now what the issue is about. This will allow me to understand better how to process the GUI. Sincerely, Luis.
|
|