What happen with function screenloc() and screenrect()?

Gilberto Cuba gilbert at isphlg.rimed.cu
Fri Mar 31 09:52:07 EST 2006


Jeanne DeVoto, thank you very much. 

You have a great idea, that maybe solve this problem for me. 
I think about this solution.

Best regards,

Gilberto Cuba

----- Original Message ----- 
From: "Jeanne A. E. DeVoto" <revolution at jaedworks.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Wednesday, March 29, 2006 11:13 PM
Subject: Re: What happen with function screenloc() and screenrect()?


> At 2:19 PM -0500 3/29/2006, Gilberto Cuba wrote:
>>I am found that functions screenloc() and screenrect() not work fine 
>>or I don't understanding the documentations.
>>Occur that I change the resolution when my application start and I 
>>tried to center the software with
>>
>>set the loc of this stack to screenloc()
>>
>>this not work fine. Why? I found that function screenloc() and 
>>screenrect() keep the values of the last resolution and not refresh 
>>with the new display resolution.
> 
> Yes, all of the screen functions behave like this (screenLoc, 
> screenRect, windowBoundingRect, colorMap, colorWorld, screenType). 
> They are set only when the application starts up, and they are not 
> updated if you change the settings. As it says in the docs for 
> screenRect: "The value returned by the screenRect function is updated 
> only when you start up the application. If you change the screen 
> settings after starting up the application, you must quit and restart 
> to update the screenRect."
> 
> The best way is probably to create your own function. If you are 
> setting the resolution, then you know what the new resolution is, and 
> you can place the new value in a global variable. Then use that 
> instead of the built-in screenLoc or screenRect.
> -- 
> jeanne a. e. devoto ~ revolution at jaedworks.com
> http://www.jaedworks.com





More information about the Use-livecode mailing list