Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Don't retrieve !D.Y_VSIZE too quickly
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
alx  
View profile  
 More options Nov 4 2012, 3:38 am
Newsgroups: comp.lang.idl-pvwave
From: alx <lecacheux.al...@wanadoo.fr>
Date: Sun, 4 Nov 2012 01:38:54 -0700 (PDT)
Local: Sun, Nov 4 2012 3:38 am
Subject: Re: Don't retrieve !D.Y_VSIZE too quickly
Le dimanche 4 novembre 2012 02:59:03 UTC+1, wlandsman a écrit :

> For the second time this week, I found a need to repeat an IDL command for it to take full effect.    Below is the sample program on my Mac

> pro testwin

> print,getprimaryscreensize()

> window,xsize=870,ysize=870,retain=2

> print,!D.y_size,!D.y_vsize

> print,!D.y_size,!D.y_vsize

> return

> end

> The output is

> IDL> testwin    

>         1440         878

>          870         870

>          856         856

> So when I first ask to print !D.y_vsize it returns 870, but when I immediately ask again it returns 856.

> This problem is avoided if I put any sort of wait statement after opening the window.    It appears to take a finite time, after I ask IDL to open a window with a Ysize of 870 pixels, to realize that the toolbar is using up 22 pixels and adjust !Y.V_SIZE accordingly.

> This delay is what may have caused the difficulty in getting the Mac useful screen size

> ( http://www.idlcoyote.com/code_tips/goldilocks.html ).    My solution for getting the useful Mac screen size would now be the following:

> function getmacsize

> xy = get_screen_size()

> window,xsize=xy[0],ysize=xy[1],/free

> wait,0.01

> out = [!D.x_vsize,!D.Y_vsize]

> wdelete,!D.window

> return,out

> end

> Of course, this will give flashing but at least it will give the right answer.

> Cheers, -Wayne

This cannot be repeated in my configuration:
{ x86 Win32 Windows Microsoft Windows 8.2.1 Aug 20 2012      32      64}
IDL> testwin
        1600         900
         870         870
         870         870

More likely a MacOS problem than an IDL one.
By the way, what "getprimaryscreensize()" function is exactly doing (that is not a standard IDL function)?

Cheers,
alain.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.