Simplicty and flexibility!


New Functionality - DE8 Console, functions: ConsoleCopy(), ConsoleShow() (Ver. 8.0.0.1323)

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

New Functionality - DE8 Console, functions: ConsoleCopy(), ConsoleShow() (Ver. 8.0.0.1323)

Download Sample


It is no secret that the ability to generate simple output, export, text, screen printing has been strongly missed in DFW since its conception. In 8 this has already been strongly remedied but now we take it one step further. 

All of our DFD users miss the simple text output so we implement DE8 Console, where you can output text to a Console Window from anywhere in your app. The console Window is unique pr. application, but you can access it from anywhere in your app like a big visible global variable...

Initially the Console is Hidden, but you can show and hide it with ConsoleShow(). ConsoleShow(1) will show it, and consoleShow(0) will hide it.

To make the experience "genuine" the default console window (for now) is proper black with white default DOS font ;-)

However you can configure the window and save the look in the file menu.

So far we have only implemented the Console, and one function to put content in it: ConsoleCopy()

This function will copy any text string (up to 255 characters) onto the console.

We will also implement MemoConsoleCopy() which will copy the content of an entire Memo onto the Console and of course a function to save and print the Console - ConsolePrintToFile().

To Print you simply copy the content of Console to the Printer Share name.

We have included a little sample to show how you can use it, but this is obviously not what it will be used for.

The console window will be useful to output debug information when you develop as well as being used for screen printing and messages to the users.

You can also use it as a scrap board for exports or other text file uses.

We are also creating a support function called FixedWith() which will return a string that has a fixed length (space padded) for columnar output.

FixedWidth("My Text", 40,Position) where position is left (default), Right or Center.

ConsoleCopy (and MemoConsoleCopy) have switches to make it easier to output formatted text.

0=Append, 1=Overwrite, 2=Clear/Delete Console 3=Insert at beginning 4=Append with CR before and 5=Insert with CR after.

A typical scenario for building a report would be (ExecDQL)

Define temp "retval" text.
For MyCustomers;
retval := MemoConsoleCopy(MyHeading,1) .
retval := ConsoleCopy(FixedWith(CustomerNr,15,0),4) .-- first column listed with CR before and fixed with 15 left.
retval := ConsoleCopy(FixedWith(CustomerName,40,0),0). -- second column appended on same line with CR before and fixed with 40 left.
retval := ConsoleCopy(FixedWith(CustomerAddress,40,0),0). -- third column appended on same line with CR before and fixed with 40 left.
end
retval := MemoConsoleCopy(MyFooter,4) . -- Footer appended with CR before.




Written by DataEase 05/07/13 at 11:49:53 Dataease [{8}]FIVE
DG3_BlogList