mgo
OS/400 Edition
Volume 2, Number 78 -- October 11, 2002

Client Access Hotspots


Hey, Ted:

I want to display a calendar if a user clicks on a date on the first line of a display. The date field is a ten-character output field in mm/dd/yyyy format.


If I click on the year or a forward slash (/), the program works correctly. However, if I double-click on the month or date portion, the program goes crazy. Double-clicking on a date of 03, for example, shuts down the program. Double-clicking on a month of 10 locks the keyboard.

Any ideas you have that will help solve my problem will be greatly appreciated.

-- Bill


I have to thank Holley Davis of www.ProgrammerInaBox.com for teaching me this one.

Here's your problem: You have enabled hotspots in Client Access. A hotspot is an area on the display where you can click the left mouse button to carry out some action, such as simulating the press of a command key. In your case, double-clicking on the 03 in the date activates the 03 indicator, which you are using to shut down the program. Double-clicking on the 10 locks the keyboard, because you did not enable indicator 10 in your display file.

How to disable hotspots depends on your version of Client Access (CA). On some versions of CA, the Hotspots option is under the Assist menu. Other versions require you to pull down the Edit menu and select Preferences. Once you have opened the Hotspots Setup window, de-select the nn option in the Point-and-Select Hotspots frame.

For the benefit of anyone who wants to better understand this feature, I am including Bill's DDS and a short RPG program to drive it. I suggest you compile this program with the Create Bound RPG Program (CRTBNDRPG) command, specifying DBGVIEW(*LIST). Then run this program under debug to see how clicking on a hotspot can affect a program.

-- Ted

 * display file cisne01d
 *
 * CRTDSPF FILE(xxx/CISNE01D) +
 *    SRCFILE(xxx/QDDSSRC) +
 *    SRCMBR(CISNE01D)
 *
A                                      DSPSIZ(24 80 *DS3)         
A                                      MSGLOC(23)                 
A                                      PRINT                      
A          R SCREEN01                                             
A                                      CA03(03 'EXIT')            
A                                      CF04(04 'PROMPT')          
A                                      CA06(06 'UPD PF')          
A                                      MOUBTN(*ULD ENTER)         
A                                      RTNCSRLOC(&ORF### &CSRFLD) 
A            ORF###        10A  H                                 
A            CSRFLD        10A  H                                 
A            ROW            3S 0H                                 
A            COL            3S 0H                                 
A                                  1 22' R E Q U E S T    -       
A                                       C A N C E L '             
A                                      COLOR(BLU)                 
A                                  1  3'DATE:'   
A            WSDATE        10A  O  1 10COLOR(BLU)
 * Program cisne01r
 *
 * CRTBNDRPG PGM(xxx/CISNE01R) +
 *    SRCFILE(xxx/SRC) +
 *    SRCMBR(CISNE01R) +
 *    DBGVIEW(*LIST)
 *
Fcisne01d  cf   e             workstn               
C                   eval      wsdate = '10/03/2002' 
C                   dou       *in03                 
C                   exfmt     screen01              
C                   enddo                           
C                   eval      *inlr = *on           

Sponsored By
inFORM DECISIONS

ELIMINATE THE COSTS OF PRE-PRINTED FORMS, LABOR AND POSTAGE WITH
inFORM Decisions iDocs™ 'Suite'

iSeries based e-Forms, e-Checks, e-Mail, e-FAX, and Document Retrieval from the Web are available as individual modules or as a complete e-Document processing 'Suite'.

Click to Download the Complete Suite or Individual Modules today
www.inFORMDecisions.com
or call (800) 858-5544


THIS ISSUE
SPONSORED BY:

ASC
inFORM Decisions


BACK ISSUES

TABLE OF CONTENTS

Odds and Ends

Client Access Hotspots

Reader Feedback and Insights: Dynamic Result Field in Query/400


Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris

Managing Editor
Mari Barrett

Publisher and
Advertising Director

Jenny Thomas

Advertising Sales Representative
Kim Reed

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com



Last Updated: 10/11/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.