Furniture

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Furniture

Post by richmond62 » Sun Jul 15, 2018 12:54 pm

working screenRect does NOT detect screen furniture adequately.

This is a pox because one can have no idea what sort of
screen furniture an end user has cluttering up the screen.

I wonder if one can "hand-roll" a routine to detect screen furniture?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Furniture

Post by Klaus » Sun Jul 15, 2018 1:26 pm

What does "furniture" mean in this context?
Files and folders on the desktop?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Furniture

Post by richmond62 » Sun Jul 15, 2018 2:47 pm

Adding the working adjective to either form returns the virtual co-ordinates of each screen's working-area. The working-area of a screen is defined to be the area not covered by OS furniture (such as the task bar on Windows, and the Dock and Menubar on Mac OS X).
Straight from the horse's mouth.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Furniture

Post by Klaus » Sun Jul 15, 2018 2:57 pm

Aha, thank you, I had no idea.
Works here on my Mac, but I do not have anything else but the macOS "Dock" cluttering up my screen 8)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Furniture

Post by jacque » Sun Jul 15, 2018 4:29 pm

What OS, and what isn't detected exactly?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Furniture

Post by bogs » Sun Jul 15, 2018 7:11 pm

I think what your missing is the "effective" word, as in effective working screenRect.

One paragraph lower than your quote it says
Adding the effective adjective to either form returns the area of the screen the application has to itself.
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Furniture

Post by richmond62 » Sun Jul 15, 2018 8:39 pm

Is that a fact?
-
sr.png
-
Either the documentation is "insufficient" or I'm being a bit goofy; or both. :D

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Furniture

Post by richmond62 » Sun Jul 15, 2018 8:48 pm

Works here on my Mac
Not round this neck of the woods.

The distance between my Mac Menu bar and my Dock is 959 pixels, but
effective screenRect gives me 1003

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Furniture

Post by jacque » Sun Jul 15, 2018 8:50 pm

Bogs means this:

Code: Select all

put the effective working screenrect...
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Furniture

Post by bogs » Sun Jul 15, 2018 9:18 pm

Erm, yes, quite that Jacque :D

In fact, I used that very code when creating the visual layout for this dialog, then scaled everything so that the pictures would show fairly correctly (the application size would look like that on screen for the size given).
Selection_007.png
Liverper-Card - Create or Open Stack_008.png
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Furniture

Post by richmond62 » Sun Jul 15, 2018 11:24 pm

No joy over here on a Mac:
-
srect.png
srect.png (20.93 KiB) Viewed 5677 times
-
rect all exam.livecode.zip
Here's the stack.
(1.15 KiB) Downloaded 119 times
-

Code: Select all

on mouseUp
   put "screenRect" && the screenRect into line 1 of fld "scl"
   put "working SR" && the working screenRect into line 2 of fld "scl"
   put "effective working SR" && the effective working screenRect into line 3 of fld "scl"
end mouseUp

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Furniture

Post by FourthWorld » Sun Jul 15, 2018 11:27 pm

richmond62 wrote:
Sun Jul 15, 2018 11:24 pm
No joy over here on a Mac:
-
srect.png
-
rect all exam.livecode.zip
-

Code: Select all

on mouseUp
   put "screenRect" && the screenRect into line 1 of fld "scl"
   put "working SR" && the working screenRect into line 2 of fld "scl"
   put "effective working SR" && the effective working screenRect into line 3 of fld "scl"
end mouseUp
What's missing?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Furniture

Post by bogs » Mon Jul 16, 2018 3:51 am

I don't think anythings 'missing' per se, I think he is saying that the working screenRect and effective working screenRect are reporting the same dimensions.
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Furniture

Post by FourthWorld » Mon Jul 16, 2018 8:29 am

bogs wrote:
Mon Jul 16, 2018 3:51 am
I don't think anythings 'missing' per se, I think he is saying that the working screenRect and effective working screenRect are reporting the same dimensions.
Unless you're using multiple monitors that should be what we expect, no?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9387
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Furniture

Post by richmond62 » Mon Jul 16, 2018 10:01 am

The fact is that I can get no variant of screenRect to either:

1. Take the Dock on my Macintosh into account.

2. Take XFCE panels on various Linux distros using XFCE.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”