Day 018 - IDE puzzles, customizations, and window importing

Although I'm following the tutorial, this is also a diary of the issues I encounter as I use WinDev. 

And today I had a puzzler.

I had WinDev running overnight, which may or may not be relevant, and this morning I created a class. I did so because I wanted to know if WinDev stored classes as text files or as binary files. The answer is binary, disappoints me for a couple of reasons. One is that it means I can never use anything other than the WinDev editor to edit my classes. The other is I can't readily use any other source code repository other than SCM. Forget about sharing code with other devs via GitHub - it's SCM or nothing. 

But that's not problem the main problem I had this morning. I noticed that my errors window was overlapping the class source editor, when both should have been in their own panes. So I double-clicked on the caption of the errors window which made it go full size. The panel with the project explorer and other stuff like code bricks was on the left, with the errors window on the right. 

WinDev looked like this:

When I tried to go to the dashboard nothing changed.

I restarted WinDev. No change. I closed the project and opened another one. No change.

Finally I grabbed the caption of the errors window and dragged it around. And that revealed the desktop! So I dragged the errors window and docked it at the bottom of the IDE, and the explorer window to the right of the IDE. And I had my layout back. 

Lesson 2.10 (page 140) is a Q&A section, covering topics including how to:

  • add a menu
  • open a window or run a report via a menu (you write a line of code)
  • add the ? menu
  • create a popup menu
  • automatically close an idle menu (one line of code)
  • get command line parameters
  • uninstall an application
  • create a CD installer
  • create and install programs
  • set the application icon
  • set the splash screen
  • display the application icon in the task bar
  • create an application shortcut
  • share the WinDev framework between applications
  • find unused code and resources

Nothing too dramatic there. 

Lesson 3.1 (page 147) explores the various WinDev editors.There's some helpful info here on how to drag and dock the various windows, although if you've used any of a number of modern IDEs all of that will already be familiar to you. 

You can also save up to four different IDE configurations. Or you should be able to. Selecting a different configuration doesn't work for me; the buttons are grayed out. 

Similarly, pressing Ctrl+(1-4) does nothing either.

The keycode to go to wide mode (Ctrl-W) does work, and that's handy for temporarily hiding docked windows. 

The custom menu

You can add your own programs to the custom menu. Here I've clicked on Add an option:

The ability to add folders is a nice touch.

Customized wizards

If you're getting a little tired of pouty red lips, you can customize the wizard background image; just right-click on the image and pick something from the list (or choose the random or custom image option). 

More on windows

Lesson 3.2 (page 142) is all about windows, of which there are several kinds:

  • RAD windows, which are generated from data files in the analysis and include code for standard functionality. They are ready to use. 
  • RID (Rapid Interface Definition) windows, also generated from data files in the analysis, but which require the developer to write the code before they can become functional
  • blank windows with no associated analysis
  • internal windows - not discussed in this part of the tutorial, but from other reading I've done I gather they are kind of like a custom control. You can use an internal window as part of another window, and to the user it all looks like one window. 
  • imported windows - WinDev will screen scrape a window from any running app

I found this last option so intriguing that I decided to try it right away. I ran the Windows Calculator app:

Then I created a new window and clicked on the Import tab:

I selected the Calculator app and clicked on the check mark. WinDev grabbed the screen and presented me with a list of controls so I could override any of the default choices. 

Clicking on an entry in the list highlighted that control in the window; I could also change the control type or mark it as not imported. 

Here's the original next to the imported window:

 

I'd still have to write all of the code to perform the calculator functions, but that is a pretty slick import process. 

Window properties

I won't go over all of the window properties as described in the tutorial, but here are a few items that stood out for me. 

Ctrl-E brings up a fast selection for windows,  reports, tests and possibly other elements. There's a preview (not very large) and you can search for any text in the name of the element.

There are options to:

  • let users move windows by dragging anywhere on the window background.
  • automatically resize a window to encompass its controls
  • animate windows
  • automatically close or validate windows after a timeout period
  • use an image to define the shape of a window
  • use an image for the sizing handle

Lesson 3.3 looks like a longish session on controls, so I'll stop for today.