Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

There are other useful tidbits in this section such as creating a main menu, opening an HTML page and using the property syntax to change colors. Notably, WinDev, like Clarion, uses RGB color codes. Few other tools do. 

Passing parameters

In WinDev, when you create a window there's an implicit procedure that calls that window. If you want to pass parameters to the window you need to add a statement like the following to the window's global variables code section:

...

Note the syntax for Param3 - this is an optional parameter because it's assigned a default value.

Control groups

Controls can be grouped logically. Just select the controls and choose Control | Groups | Associate the selection. At that point you are supposed to be able to name the group and then change any common properties of the contained controls by changing the values on the group.

I had trouble getting this to work - I could create the group, but I'd done so and then clicked on some other control I couldn't find a way to get back to the group - clicking on the controls just selected them individually again. 

Databases and analyses

Lesson 4.1 covers the different ways of accessing databases. Available data access modes include:

...

OLE DB supports both the SQL* and the HRead* functions, as does ODBC via OLE DB. 

The data access function library

The HRead* functions are part of a larger library of around HyperFileSQL 200 functions. This has caused me a little confusion, because although the H at the start of each function name apparently stands for HyperfileSQL most of these functions can be used with databases other than WinDev's own SQL database. So maybe it's a case of the library originally being written only for HyperFileSQL and the repurposed for databases in general. 

...

But you're not actually restricted to record-oriented processing with the H* functions. If you use them on a query (or so I'm told) you're really only dealing with the fields returned by the query, so you can effectively mix and match set- and record-oriented operations. 

I asked a question about this in the WinDev Skype chat and Pete Halsted replied:

Dave for me if I am doing any kind of "where" clause then I do an HexecuteQuery with a SQL statement in it (datasource on the fly - what we always wanted in CW). If I have a Primary key and I am trying to grab the record I usually use an Hreadseekfirst, which does grab the entire record, but usually in those situations I am dealing with several fields (dispalying form, etc. Or I am using FileToScreen to populate a screen) If I was working on a distrubuted app that I knew was going to be communicating over a slow connection etc. I woul probably do everything with Hexecutesql. But in the eniroments that I design for, reading 1 complete record in isn't a big enough cost to justify creating sql statements and managing the moves to screen fields etc. Myself. And I figure Andy once notice a few HreadseekFirst statements bettered in nearly as much as he would Select * from,  even though they do the same thing at the end of the day