Simplicty and flexibility!


DataEase 8.2 - Movement Project initiated, Height and Width added (Ver. 8.2.0.1619)

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

DataEase 8.2 - Movement Project initiated, Height and Width added (Ver. 8.2.0.1619)

Download MoveObject Sample

You can say that DataEase 8 is the 1968 or "flower power " version of DataEase.

For so many years, DataEase for Windows has been confined within its own space and conformity. The established "truths " had become the only truth. 

DataEase is moving forward all across the line now, and part of it is to deal with these established truths.

So far we have given "power to the people" by showing how you can use Design Time features in Runtime (SetFunctions, ExecDQL etc. etc).

So what about position? Does objects need to reside in the same position for the rest of their life?

NO!

To be honest, you can already move them about in OML so this feature has been there for a good 10 years but has anyone ever used it? If you have please comment on this blog.

You need to dig deep down into the OML documentation (which like most DFW documetnation is extreemly poor...) to even find an example.

Here is another:

define "telle" number .

define "fwidth" number .

define "fheight" number .

define "retval" text .

define "vVersion" text .

vVersion := if (GetCurrent("Version")=blank,"No Version Number FOUND!",GetCurrent("Version")) .

if lastc(GetCurrent("Version"),4)+0 <1619 then

retval := SetStyle("Message","Message") .

Retval := SetLabelText("Message",concat("Sorry! You are outversioned! /CRYou need to run 8.2.0.1619 or higher, you are running:",vVersion)) .

else

fwidth := GetCurrent("Width") -(Ball.Rect.right - Ball.Rect.left) .

fheight := GetCurrent("Height")- (Ball.Rect.bottom - Ball.Rect.top) .

Ball.Rect.right :=Ball.Rect.right - Ball.Rect.left .

Ball.Rect.left := 0 .

Ball.Rect.bottom :=Ball.Rect.bottom - Ball.Rect.top .

Ball.Rect.top :=0 .

ball.hide() .

ball.show() .

ball.draw() .

while telle < fwidth do

Ball.Rect.right :=Ball.Rect.right +1 .

Ball.Rect.left :=Ball.Rect.left + 1 .

ball.show() .

ball.draw() .

telle := telle + 1 .

end .

telle := 0 .

while telle < fheight do

Ball.Rect.top :=Ball.Rect.top +1 .

Ball.Rect.bottom :=Ball.Rect.bottom + 1 .

ball.show() .

ball.draw() .

telle := telle + 1 .

end .

telle := 0 .

while telle < fwidth do

Ball.Rect.right :=Ball.Rect.right -1 .

Ball.Rect.left :=Ball.Rect.left - 1 .

ball.show() .

ball.draw() .

telle := telle + 1 .

end .

telle := 0 .

while telle < fheight do

Ball.Rect.top :=Ball.Rect.top -1 .

Ball.Rect.bottom :=Ball.Rect.bottom - 1 .

ball.show() .

ball.draw() .

telle := telle + 1 .

end .

telle := 0 .

Retval := SetLabelText("Message",StringEscape("Now Resize Window (FORM) and click on ball again, then resize again etc.../CRThis script use GetCurrent(/'Height/') and GetCurrent(/'Width/') to find the borders...")) .

end

We just included this script to illustrate. To do this stuff with existing functions is quite .... complex....

In this script we have used our latest additions, so see if you can find them.

This is just the meagre beginnings of the exciting new part of DE8.

Watch this space.


Written by DataEase 28/08/14 at 07:56:28 Dataease [{8}]FIVE
DG3_BlogList