The meaning behind window_spec

12 views
Skip to first unread message

Nicholas G Lawrence

unread,
May 6, 2021, 9:58:34 PM5/6/21
to mapi...@googlegroups.com

Hello all,

 

I am writing a mapbasic script to interrogate a workspace file.

I wanted to check if an assumption I am making is correct.

For the WindowInfo() function, window_spec is a number that specifies which window I want to query

Window_spec can be a positive integer value (1,2,…n) where n is the number of open document windows returned by NumWindows()

 

My assumption is; that when a workspace is opened, that the window_spec of each open document window is determined by the order that the windows are created in the Workspace file.

That is the workspace file contains the commands;

Map From

Browse

Layout

and as each command is executed in order each window is assigned the corresponding window_spec

Of course, my starting point is no open tables and no open document windows when I open the workspace

Is my assumption correct?

 

Nick Lawrence
Senior Spatial Science Officer | Geospatial Technologies
Engineering & Technology | Transport and Main Roads

 

Floor 19 | 313 Adelaide Street | Brisbane City Qld 4000
GPO Box 1412 | Brisbane City Qld 4001
P: (07) 30667977
E: nicholas....@tmr.qld.gov.au
W:
www.tmr.qld.gov.au

 

***********************************************************************
WARNING: This email (including any attachments) may contain legally
privileged, confidential or private information and may be protected by
copyright. You may only use it if you are the person(s) it was
intended to be sent to and if you use it in an authorised way. No one
is allowed to use, review, alter, transmit, disclose, distribute, print
or copy this email without appropriate authority.

If this email was not intended for you and was sent to you by mistake,
please telephone or email me immediately, destroy any hardcopies of
this email and delete it and any copies of it from your computer
system. Any right which the sender may have under copyright law, and
any legal privilege and confidentiality attached to this email is not
waived or destroyed by that mistake.

It is your responsibility to ensure that this email does not contain
and is not affected by computer viruses, defects or interference by
third parties or replication problems (including incompatibility with
your computer system).

Opinions contained in this email do not necessarily reflect the
opinions of the Department of Transport and Main Roads,
or endorsed organisations utilising the same infrastructure.
***********************************************************************

Peter Horsbøll Møller

unread,
May 7, 2021, 1:23:42 AM5/7/21
to mapi...@googlegroups.com

Your assumption seem correct, Nick.

 

Think of it as an array of windows where you can access the specific window using it’s index.

Also keep in mind that the numbers may shift if you close a window “in the middle”.

 

Personally, I have always used WindowID() to get from an index to the actual WindowID

But that’s just as much because I never realized you could use the index directly in the WindowInfo() function

Until now 😊

 

Peter Horsbøll Møller

www.precisely.com

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

From: 'Nicholas G Lawrence' via MapInfo-L <mapi...@googlegroups.com>
Sent: 7. maj 2021 03:58
To: mapi...@googlegroups.com
Subject: [MI-L] The meaning behind window_spec

 

This message originated Externally. Use proper judgement and caution with attachments, links, or responses.

 

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/MEYP282MB154303FE0E223E94028564DBD3579%40MEYP282MB1543.AUSP282.PROD.OUTLOOK.COM.

Reply all
Reply to author
Forward
0 new messages