Date: Mon, 9 Dec 2002 16:49:09 GMT
Reply-To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Organization: EarthLink Inc. -- http://www.EarthLink.net
Subject: Re: Moving object in a AF application
Content-Type: text/plain;
"Armin Bauerbach" <armin_bauerbach@dadebehring.com> wrote in message
news:91dc8df3.0212090735.34b61130@posting.google.com...
> Hi,
> I would like to dress up my AF application by displaying a moving
> container box containing important information about the application
> when starting up the application.
> To move objects in a frame you can use the _moveRegion method. The
> only problem I have is, that this doesn't work while processing the
> INIT-section. The object is only displayed twice, the start position
> and the end position (no movement). A call from any other section e.g.
> MAIN works fine. Does anyone know how to force the frame to refresh
> the display at every iteration.
>
> Here is my source code:
> init:
> regionList=makelist();
> container._getRegion(RegionList,'pixels');
> sulx=getnitemn(RegionList,'ulx');
> suly=getnitemn(RegionList,'uly');
> do i=1 to 200 by 1;
> container._moveRegion(sulx+i,suly);
> container._needRefresh();
> _frame_._refresh();
> call wait(0.005);
> end;
> rc=dellist(regionList);
> return;
>
> Any help would be appreciated
> Armin
I think you have found a 'defect' in either the containerbox object or
expectations of the container box.
In a test I did, I placed a textlabel inside a containerbox (which by
default shows a border) and ran your code in the INIT.
The textlabel did appear to move, the container did not. At the end of INIT
the container box boundary was redrawn correctly.
There is a certain amount of implicit rerendering of the container box, but
not as much as one might want (try changing the container's background to
different colors within the loop)
You can make the border appear to move by double refreshing the frame
within the loop
do i=1 to 200 by 1;
Containerbox1._moveRegion(sulx+i,suly);
Containerbox1.borderColor = 'Black';
_frame_._refresh();
call wait(0.005);
Containerbox1.borderColor = 'White';
_frame_._refresh();
end;
Containerbox1.borderColor = 'Black';
Containerbox1._hide('All');
--
Richard A. DeVenezia
http://www.devenezia.com/downloads/sas/af