Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 17 APR 1998 09:05:53AM Oystein Reigem wrote:

If a SP or handler knows the name of a window bound to a table - how can it find the name of the control(s) containing the key?

I thought there was a property, but I cannot find it. Must I really loop CTRLMAP and pick out all control names with PART not null?

- Oystein -


At 17 APR 1998 09:43AM Don Bakke wrote:

Oystein,

Aaron wrote a "Save As" routine for SENL v9n1. In it there is a fairly quick way to retrieve the key controls for a window:

$insert oiwin_comm_init

*Determine the key controls

keyCount=count(keyMap@, @FM) + (keyMap@  NULL$)

keyControls=NULL$



for keyNbr=1 to keyCount

keyControls := keyMap@:@RM

next keyNbr



keyControls-1,1=NULL$

dbakke@srpcs.com

SRP Computer Solutions


At 17 APR 1998 09:57AM Tracy Graves wrote:

Well, PART is supposed to return null if the key is not multi-part, as well as if it's not a key field.

As far as I know, you would have to loop through CTRLMAP and then look for the COLUMN (property) that you are looking for.

Tracy


At 17 APR 1998 11:31AM Oystein Reigem wrote:

Don,

Great! Thanks! So it was keymap@ I was thinking of.

- Oystein -


At 20 APR 1998 03:22AM Oystein Reigem wrote:

Don,

Wait a minute! With KeyMap@ you can determine the key controls of the current window. I need to know the key controls of a different open window.

- Oystein -


At 20 APR 1998 04:21AM Andrew P McAuley wrote:

same applies - just set WinId to the other window.

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 20 APR 1998 06:18AM Oystein Reigem wrote:

Andrew,

same applies - just set WinId to the other window.

What do you mean? Doesn't always KeyMap@ contain the values (the names of the key control(s)) for the current window? What is it that I can set so that it changes to showing values for a different window?

Well, when I posted I didn't expect any response for a few hours, and suddenly feeling (more) restless (than usual) I decided to solve the problem myself. I thought it must be possible to get the information from the window's SYSREPOSWINEXES row, and it wasn't as difficult as I thought. I studied OIWIN_EQUATES and a couple of SYSREPOSWINEXES rows and did the following:

$insert OIWIN_EQUATES

WinName=…

open "SYSREPOSWINEXES" to TableVar else … end

read Row from TableVar, WinName else … end

JoinMap=Field( Row, @RM, 2 )

KeyMap=Field( JoinMap, @VM, JMAP_KEY_CONTROLS$ )

NoOfKeys=count( KeyMap, @SVM ) + (KeyMap "")

KeyCtrlNames="

for K=1 to NoOfKeys

KMapCtrl=Field( KeyMap, @SVM, K )

KeyCtrlNames=Field( KMapCtrl, @TM, KMAP_CONTROL$ )

next K

It seems to work. So if this is smart enough I'm satisfied.

- Oystein -


At 20 APR 1998 06:27AM Andrew P McAuley wrote:

Your solution will work

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 20 APR 1998 06:45AM Oystein Reigem wrote:

Andrew,

Thanks!

I must say it's great when you get replies instantaneously and don't have to wait until the people in the States (and Oz/NZ) get up. I guess the time difference sometimes is a problem for you at Sprezz UK too. What about we too changing the axis of the globe to go from let's say Novaja Zemlja to Hawaii so we got more on the same longitude as the US people? (Sorry about you down under. We could have done it differently but I thought of it first.)

- Oystein -


At 20 APR 1998 07:07AM Cameron Revelation wrote:

Oystein,

What do you mean? Doesn't always KeyMap@ contain the values (the names of the key control(s)) for the current window? What is it that I can set so that it changes to showing values for a different window?

I suggest you look in detail over Don's original response to you. In particular, I suggest you look at:

$insert oiwin_comm_init

Hint: There is no such thing called KeyMap@ without the above line of code.

Cameron Purdy

info@revelation.com


At 20 APR 1998 08:24AM Oystein Reigem wrote:

Cameron,

Thanks!

I did make a note of this last summer (from a posting of yours) but I had forgotten all about it now.

- Oystein -

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/36d0c1ba5e888ea6852565e90047f334.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1