October 06, 2022, 11:34:41 AM


IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!

3. Getting Started

Started by LarryMc, October 13, 2014, 10:30:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


If we were creating a Single File application the first thing we would do would be to create a source file and then click the Make Executable button on the IDE's Main Toolbar in order to enter the necessary information to create an *.opts file.

After a fashion we reverse that order when creating a Project application.

First, we select File/New/Project from the IWBasic IDE Main Menu.  This will open a New Project  dialog.  Make the following entries:
- Project Name   -'myApp'
- Project Path   - A path of your choosing.
- Project Type   - 'Windows Executable'
- Output File   - 'myApp.exe'

and then click OK.  This creates a Project Options file named 'myApp.iwp'. Leave the project open. The Project Name will appear in he IDE's Caption Bar like this:
QuoteIWBasic (myApp) -

Now we are ready to create some empty source code files to support our Project.

Select File/New/IWBasic Source File  from the IWBasic IDE Main Menu. This will open an empty IWBasic source file with an automatically generated name of IWBASICx where x is a sequential number.

Select File/SaveAs  from the IWBasic IDE Main Menu.   This will open a Save As dialog.  Navigate to the folder specified in the Project Path entry above. You may name this file anything you wish but since this file is going to where I program will start execution I suggest you enter 'main.iwb' for the file name and click Save. Right click on the just renamed file and select Insert File Into Project.  The popup menu will disappear and the file name will appear in the IDE's File View  panel in the lower right corner of the IDE (or under the Files Tab in the Project List window in IWBasic2.5 beta).

Repeat the same process and add a file named 'mainsetup.iwb'
Repeat the same process and add a file named 'dialog_1.iwb'
Repeat the same process and add a file named 'util_1.iwb'
Repeat the same process and add a file named 'globals.iwb'
Repeat the same process and add a file named '_todo.iwb'

Be sure to do a Save Project at this time.  This will update the project options file(*iwp) with the names that are part of the project.

So, our project now contains 6 source files
Referring back to our scope
1. A WINDOWS based application containing some edit controls and buttons.
  a) the window setup in a subroutine in its own file
  b) the window message handler is in the main window
2. A DIALOG which is opened via a button on the main window.
  a)the dialog is configured in a subroutine
  b) the handler for the dialog
  c) both 2a and 2b are together in their own file
  d)the dialog processes information passed to it via a global value
  e)after processing the resulting data is displayed in the main window
3. Some utility subroutines in a separate file that are called by both the main window and the dialog.
the files and what they will contain are

  • main.iwb -- 1b

  • mainsetup.iwb --1a

  • dialog_1.iwb -- 2a, 2b

  • util_1.iwb -- 3

  • globals.iwb -- used to establish Project global variables

  • _todo.iwb -- handy place to put todo items for the project and keep track of changes in each release.
    Note: the leading underscore makes the file always appear at the top of the files list(easy to find)

This completes 3. Getting Started
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library