View Full Version : Position Cursor in Menu Bar
01-01-1995, 02:00 AM
Hello, Is anybody know if that possible to control cursor position in Menu Bar? <pre> Example: Box1_________Box2_________Box3____________________ Menu Bar has 3 pulldown menus - Box1, Box2, Box3. User select number 2. After he finished with Box2 and returned to menu bar cursor highlighted a Box1. How to left the cursor on Box2? Thank you. Vadim </pre>
06-15-1999, 12:38 AM
Araya/David, This problem has cropped up a couple of times and I haven't seen a satisfactory resolution to it yet. First I'll re-phrase it so it's clear we're talking abouut the same thing. You want to take the address of a field, whose name is held in another character field. E.g. there is a 10-alpha field called AFldName and its current contents are 'X_CUST '. X_CUST happens to be the name of another field, and you want to take the address of X_CUST by operating on AFldName only. There have been a few times in the past where I thought this would be useful. One instance was where I used P-Fields rather than indicators to control 5250 fields, and all of these P-Fields had predictable names, namely the display field they controlled prefixed with a P. Because this P-Field name could be constructed, then I could do all my screen field control (high-light, reverse-image, colour set etc) via simple procedures that took field name as an argument. Something like SetDspFldAttr('X_CUST':BLU+UL). Just so long as I ensured there was a P-Field called PX_CUST coded in the DDS, then the procedure could dynamically take the address of PX_CUST and poke the right mix of bits into it. On Monday, June 14, 1999, 03:50 PM, David Morris wrote: On Monday, June 14, 1999, 12:14 AM, Araya Faisal wrote: Morris, What I'm tryin to solve is the replacement of the Fieldnames @FIELD through "The Addresse of Variable Field". I don't want to use that old way of replacement like, replace @FLD1 with FLD1 und replace @FLD2 with FLD2 etc. There shoulde be a way to do it better. like finding out the Adresse of the Field it self and do the replacement or whatever. Something like : EVAL Adresse = @ADDR(( %VAR(@FLD1) )) But there is not %VAR in ILRPG. OR???? araya Araya, I am not sure I follow this, but do you want to replace something at a variable offset/address? It sounds like you may want to look at using a based variable in your code. This allows you to change the location of a variable dynamically at run time. Are you familiar with the BASED() keyword and %ADDR() built-in function? David Morris
06-15-1999, 08:55 AM
I am interested in getting help with the TCP/IP Sockets Select() function. I need to send data to a server, then wait for a response. However the program was waiting forever. I am trying to timeout after xx seconds. I have the select working, however if the host receives the request then closes the connection, my program is not responding the way I expect it should. My select looks like this: eval rc = select(SdId + 1: p_sockset: read *NULL: write *NULL: exception p_waittime) wait time eval in_Write = FD_ISSET(SdId:sockset) It appears that rc is not zero and in_Write is set on. SDID = The socket descriptor I have open. I have only one descriptor open in this program. Where can I find more documentation on handling errors and using the select() function? Christopher K. Bipes Mailto:email@example.com CrossCheck, Inc.
06-16-1999, 05:38 AM
<font color=blue> On Tuesday, June 15, 1999, 08:26 AM, Vadim Rozen wrote: Hello, Is anybody know if that possible to control cursor position in Menu Bar? Example: Box1_________Box2_________Box3____________________ Menu Bar has 3 pulldown menus - Box1, Box2, Box3. User select number 2. After he finished with Box2 and returned to menu bar cursor highlighted a Box1. How to left the cursor on Box2? Thank you.</font><hr> When you read the menu bar, save the cursor position. On re-display, use CSRLOC in DDS, or X'13' | &ROW | &COL in DSM, to restore that same cursor position.
06-16-1999, 07:24 AM
Bruce, I'm not sure whether QUSLFLD can find all Programme variables . becouse i have a many Extren discreibed Data_Structurs if so it would be perfect. I would be very (:-) if you send me a sample programm for QUSRLFLD Thanks. firstname.lastname@example.org
06-18-1999, 07:16 AM
<font color=blue> On Friday, June 11, 1999, 02:25 AM, Araya Faisal wrote: I wrote an Editor where the users can edit document and place substitution strings. the substitution strings are my Fieldnames. I would like to write a dynamic procedure to replace all ("@" + Text_Field_name + "@" e.g @CUSTNO@ ) with Field_Value. e.g <pre> EVAL S_LOC = %Scan('@': DOC) DOW S_LOC > 0 EVAL LEN = %Scan('@': DOC : (S_LOC + 1)) - S_LOC EVAL REPLACEMENT = ????????????? EVAL DOC = %Replace( REPLACEMENT : DOC : S_LOC : LEN ) EVAL S_LOC = %Scan('@': DOC) ENDDO </pre> Let us say DOC = bla bla bla bla bla bla @CUSTN@ Ha Hi He Hh Ho @CUSTNAM@ etc. the probleme is to substite @CUSTN@ with the Real Table Field CustN dynamicaly some how like serial letters. I will really appreciate if someone can give me some advise. Thanks you in advance.</font><hr> So you want to allow delimited "field names" in a document, and then when you print a document, scan for and replace delimited "field names" with current values from fields in database files? You could create a service program with data item exports of all possible "field names" allowed in a document. When your print program scans for and locates a delimited "field name" in a document, pass that "field name" to the Get Export (QleGetExp) API to resolve a pointer to that field's storage location. (Also read the document's associated database record(s) to update exported field storage locations with current values.) Then replace the delimited "field name" in the document with a based-on value of the returned pointer. That way, you never have to hard-code all "field names" in your print program.
02-22-2000, 08:53 AM
"E.g. there is a 10-alpha field called AFldName and its current contents are 'X_CUST '. X_CUST happens to be the name of another field, and you want to take the address of X_CUST by operating on AFldName only. " Does anyone have any new light to shed on this post? I have the need to do exactly what this post is suggesting.............
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.