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 04 JUN 2000 11:38:12PM Ray Chan wrote:

Just curious, but is there an easy way to get the name of the control that holds the Key or ID value for a record? I see that there is an "ID" event, but that returns the value of the key. I want the name of the control.

Thanks,

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 05 JUN 2000 01:07AM Don Bakke wrote:

Ray,

Here is a routine we wrote in SYSPROG to be universally. Use in good health:

<code>

Compile function Get_Key_Controls(Window)

************************************************************************************************
*
* Name       :  Get_Key_Controls
*
* Description:  Returns a list of key controls for the window
*
* Notes      :	
*
* Parameters
*   Window 		in  -- The window needing the FOCUS change
*	KeyList	   out  -- @FM delimited list of key controls sorted in PART order
*
* History (Date, Initials, Notes)
*   09/11/99  dmb   Original programmer
*
************************************************************************************************

$insert APP_INSERTS

Declare subroutine V119

* Get list of all controls
CtrlList=Get_Property(Window, "CTRLMAP")
Convert @FM to @RM in CtrlList
* Get field positions of all controls
PosList=Get_Property(CtrlList, Str("POS":@RM, Count(CtrlList, @RM)):"POS")
* Build list of keys
KeyList="
Loop
	Locate "0" in PosList using @RM Setting Pos else Pos=0
While Pos
	KeyList := Field(CtrlList, @RM, Pos):@RM
	PosList=Field(PosList, @RM, Pos+1, 999)
	CtrlList=Field(CtrlList, @RM, Pos+1, 999)
Repeat
KeyList-1, 1="
NumKeyCtrls=Count(KeyList, @RM) + (KeyList NE "")
If NumKeyCtrls GT 1 then
	Props=Str("PART":@RM, NumKeyCtrls-1):"PART"
	Parts=Get_Property(KeyList, Props)
	Convert @RM to @FM in KeyList
	Convert @RM to @FM in Parts
	Work="
	For Loop=1 to NumKeyCtrls
		Work := Parts:@FM:KeyList:@RM
	Next Loop
	V119("S", "", "A", "R", Work, "")
	For Loop=1 to NumKeyCtrls
		KeyList=Field(Work, @RM, Loop)
	Next Loop
end

Return KeyList

</code>

dbakke@srpcs.com

SRP Computer Solutions


At 05 JUN 2000 01:10AM Richard Hunt wrote:

One easy example is in the HELP chapter 4 (properties). Under the "POS", there just happens to be an example of what you are looking to do. Check it out and see if that is what you want.


At 05 JUN 2000 01:24AM rayc@symmetryinfo.com wrote:

The Don,

Thanks so much for the snippet of your code. I shall use it to preserve my good health .

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 05 JUN 2000 01:26AM rayc@symmetryinfo.com wrote:

Richard,

Appreciate the reference. I'm learning something new everyday .

Thanks,

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 05 JUN 2000 03:44AM Oystein Reigem wrote:

Ray,

Are you sure it wasn't a slip of the pen and what Don really meant was that he wrote it in good faith? :-)

- Oystein -


At 05 JUN 2000 02:15PM rayc@symmetryinfo.com wrote:

Oystein,

Are you sure it wasn't a slip of the pen and what Don really meant was that he wrote it in good faith?

At this point in my life, my understanding of faith is slight. It is hope that I have more contact with as in "god I hope I can get this conversion done..

But with the help of you guys, I do have faith…I guess,;-)

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 05 JUN 2000 05:59PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

Or just look at the KeyMap@ labelled common window variable (see SENL passim).

The Sprezzatura Group

World Leaders in all things RevSoft


At 05 JUN 2000 09:09PM rayc@symmetryinfo.com wrote:

Mr. SprezzGroup,

Thanks for the info on KeyMap@. Went to your website. Using the search engine, I found reference to KeyMap@ in V1-I9 of your publication. Very cool, easy, fast, and useful. I am posting a snippet of the code for others to see. Using KeyMap@ is very nice.

— Sprezz sample code on using Keymap –

(* make sure you define winId before $insert oiwin_comm_init) winId=ctrlEntId1,'.' $insert oiwin_comm_init *Determine the key controls keyCount=count( keyMap@, @FM) + ( keyMap@ NULL$) keyControls=NULL$


Thanks again. Hey when are we going to see another Revmedia!?!

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 05 JUN 2000 09:58PM Don Bakke wrote:

Ray,

Note that with OIWIN_COMM_INIT you still have to parse out the actual control name from the array. Also, the second part of our code sorts the controls by key part.

We used to use OIWIN_COMM_INIT a lot (thanks to Sprezz's pioneering) but we preferred to include the insert in our generic application wide insert statement. We soon discovered that if you have one insert embedded in another you soon lose the ability to debug your code line by line accurately.

dbakke@srpcs.com

SRP Computer Solutions


At 06 JUN 2000 12:54AM rayc@symmetryinfo.com wrote:

"The Don"

Note that with OIWIN_COMM_INIT you still have to parse out the actual control name from the array.

Yes, I see that it returns a three part vm delimited variable. I see that is the ControlName; is the class type. What is ? Just curious.

We used to use OIWIN_COMM_INIT a lot (thanks to Sprezz's pioneering) but we preferred to include the insert in our generic application wide insert statement. We soon discovered that if you have one insert embedded in another you soon lose the ability to debug your code line by line accurately.

Valid point (not that I have to worry about debugging.). However, for me and other, it's good to know other alternatives as in KeyMap@. It's like a magic pill. I can see that if you had a multipart key that the code you provide will pick that up. Again, just curious, do you know if KeyMap@ will properly pickup the controls related to multipart key and would they be delimited with @FM?

Cheerio and thanks a bunch.

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info


At 06 JUN 2000 11:00AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

We've been a little too busy on internal projects to do an SENL for a while. All we seem to be doing is MAJOR web projects at the moment. We've got some pretty cool technologies - especially for AREV users. So all of the other projects (32 bit file open dialogs, Win200 style revParamerizer, next SENL etc etc etc) have all gone on a back burner. Add in training our new recruits (PERL expertise is great but RBasic is a tad more useful at present) and introducing new management processes and time is a little short.

This also explains the lack of postings here - we only have time to monitor the main forum now and even then we only post infrequently. Sorry .

The Sprezzatura Group

World Leaders in all things RevSoft


At 06 JUN 2000 11:37AM rayc@symmetryinfo.com wrote:

Mr. Sprezz,

This also explains the lack of postings here - we only have time to monitor the main forum now and even then we only post infrequently. Sorry .

Well, you got to do what you got to do! Glad to hear you got some neat AREV projects going on, but sorry to see that you're too busy to do a REVMedia soon. As I am now reading them now , sorry, I find them to be filled with useful tips and hints on using OI. (I would advise any new OI developers get your hands on them. They are Great!) And yea, we have notice and missed your presence on this forum.

No need to apologize. Heck RTI doesn't. Wasn't there a movie where they said "love means you don't have to say sorry."

Well, keep up the good work and thanks for all your help.

Tally ho, and onward with OI,

rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"

Symmetry Info

Ray Chan ~ Symmetry Info

View this thread on the forum...

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