1 / 21

SURVIVING WITHOUT SOURCE CODE

SURVIVING WITHOUT SOURCE CODE. Tim Ryan AES. Agenda. Introduction Terms Useful Tools Example In Use Summary Questions. TERMS HANDLE FRAME FIELD-GROUP WIDGET ATTRIBUTE SCREEN-VALUE GLOBAL-DRILL-HANDLE FOCUS:HANDLE ENTRY-POINT. TOOLS wivarinfo.p

jeneil
Télécharger la présentation

SURVIVING WITHOUT SOURCE CODE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SURVIVING WITHOUT SOURCE CODE Tim Ryan AES

  2. Agenda • Introduction • Terms • Useful Tools • Example In Use • Summary • Questions

  3. TERMS HANDLE FRAME FIELD-GROUP WIDGET ATTRIBUTE SCREEN-VALUE GLOBAL-DRILL-HANDLE FOCUS:HANDLE ENTRY-POINT

  4. TOOLS wivarinfo.p Displays the current values of all variables defined in mfdeclre.i widginfo.p Displays all the widgets and associated values in the current FRAME

  5. Var info. dtitle = ppptmt.p c+ 1.4.1 Item Master Maintenance 0 9/25/01 global_part = 01-101-730 global_site = global_loc = global_lot = global_sub_len = 2 gloabl_userid = tmryan pt_recno = 7713999 stline = F1=Go 2=Help 3=Ins 4=End 6=Menu 7=Recall 8=Clear 9=Prev 10=NextF1=Go 2= Help 3=Ins 4=End 5=Delete 6=Menu 7=Recall 8=ClearF1=Go 2=Help 3=Ins 4=End 6=Menu 7=Recall 8=Clear 11=PasteF1=Go 2=Help 4=End 7=PgUp 8=PgDn 9=LnUp 10=LnDnF1=Go 2 =Help 4=End 7=PgUp 8=PgDn 9=LnUp 10=LnDn Tab=PivotF1=Go 2=Help 4=End 7=PgUp 8=Pg Dn 9=LnUp 10=LnDn ENTER=SelectF1=Go 2=Help 4=End 7->10=Scroll ENTER=Select Tab=P ivotF1=Go 2=Help 4=End 6=All 7->10=Scroll ENTER=SelectF1=Go 2=Help 4=End 6=All 7 ->10=Scroll ENTER=Select Tab=PivotF1=Go 2=Help 3=Add 4=End 5=Delete 7=PgUp 8=PgD n 9=LnUp 10=LnDnF1=Go 2=Help 4=End 8=PgDn 9=LnUp 10=LnDn Tab=PivotF1=Go 2 =Help 3=Ins 4=End 5=Detach 6=Menu 7=Recall 8=ClearF1=Go 2=Help 3=Add 4=End 5=Del ete ststatus = F1=Go 2=Help 3=Ins 4=End 6=Menu 7=Recall 8=Clear 11=Paste hi_char = Var info. dtitle = ppptmt.p c+ 1.4.1 Item Master Maintenance 0 9/25/01 global_part = 01-101-730 global_site = global_loc = global_lot = global_sub_len = 2 gloabl_userid = tmryan pt_recno = 7713999 stline = F1=Go 2=Help 3=Ins 4=End 6=Menu 7=Recall 8=Clear 9=Prev 10=NextF1=Go 2= Help 3=Ins 4=End 5=Delete 6=Menu 7=Recall 8=ClearF1=Go 2=Help 3=Ins 4=End 6=Menu 7=Recall 8=Clear 11=PasteF1=Go 2=Help 4=End 7=PgUp 8=PgDn 9=LnUp 10=LnDnF1=Go 2 =Help 4=End 7=PgUp 8=PgDn 9=LnUp 10=LnDn Tab=PivotF1=Go 2=Help 4=End 7=PgUp 8=Pg Dn 9=LnUp 10=LnDn ENTER=SelectF1=Go 2=Help 4=End 7->10=Scroll ENTER=Select Tab=P ivotF1=Go 2=Help 4=End 6=All 7->10=Scroll ENTER=SelectF1=Go 2=Help 4=End 6=All 7 ->10=Scroll ENTER=Select Tab=PivotF1=Go 2=Help 3=Add 4=End 5=Delete 7=PgUp 8=PgD n 9=LnUp 10=LnDnF1=Go 2=Help 4=End 8=PgDn 9=LnUp 10=LnDn Tab=PivotF1=Go 2 =Help 3=Ins 4=End 5=Detach 6=Menu 7=Recall 8=ClearF1=Go 2=Help 3=Add 4=End 5=Del ete ststatus = F1=Go 2=Help 3=Ins 4=End 6=Menu 7=Recall 8=Clear 11=Paste hi_char =

  6. hi_date = 12/31/3999 low_date = 01/01/1900 recno = ? mrp_recno = ? global_user_lang = US gloabl_user_lang_nbr = 0 global_user_lang_dir = us/ global_ref = pt_promo global_type = global_lang = msg_temp = msg_tmp2 = msg_indx = 0 msg_var1 = msg_var2 = mfquotec = bcdparm = execname = ppptmt.p batchrun = no report_userid = tmryan null_char = base_curr = USD window_row = 7

  7. window_down = 6 glentity = 1000 global_addr = current_entity = 1000 global_db = trmsg = 0 curcst = 0 glxcst = 0 gllinenum = 0 acct_length = 0 tr_cr_acct = tr_cr_cc = tr_cr_proj = tr_dr_acct = tr_dr_cc = tr_dr_proj = tr_gl_ref = global_site = global_lngd_raw = no mfguser = TMP4577 maxpage = 0 printlength = 0 runok = no

  8. Field info for FRAME a LITERAL ? Order Number FILL-IN dss_nbr 05170094 LITERAL ? Ship-From FILL-IN dss_shipsite 23 LITERAL ? Ship-To FILL-IN dss_rec_site 24

  9. Field info for FRAME b LITERAL ? Date Created FILL-IN dss_created 07/03/96 LITERAL ? Remarks FILL-IN dss_rmks pups LITERAL ? Ship Date FILL-IN dss_shipdate 07/03/96 LITERAL ? Language FILL-IN dss_lang LITERAL ? Due Date FILL-IN dss_due_date 07/10/96 LITERAL ? Comments FILL-IN dsscmmts no LITERAL ? Purchase Order FILL-IN dss_po_nbr swb LITERAL ? Ship Via FILL-IN dss_shipvia LITERAL ? FOB Point FILL-IN dss_fob LITERAL ? BOL FILL-IN dss_bol

  10. EXAMPLE

  11. /* xxswcoa2.p - SCROLLING INQUIRY ON COMPANY ADDRS (ALL) */ /* This was written for the SHIP-FROM lookup in dsdomt.p */ DEF SHARED VAR global-drill-handle as HANDLE. DEFINE VAR nbrhandle AS WIDGET-HANDLE. DEFINE VAR holdship LIKE dss_shipsite NO-UNDO. DEF VAR isnew AS LOGICAL INIT YES NO-UNDO. DEF VAR dssrecid AS RECID NO-UNDO. DEF VAR sh AS HANDLE NO-UNDO. /* SESSION HANDLE */ DEF VAR cf As HANDLE NO-UNDO. /* CURRENT FRAME */ DEF VAR fg AS HANDLE NO-UNDO. /* FIELD GROUP */

  12. /* WALK THE DOM (so to speak) To GET THE dss_nbr */ ASSIGN sh = SESSION:HANDLE. ASSIGN cf = global-drill-handle:FRAME. ASSIGN fg = cf:FIRST-CHILD. nbrhandle = fg:FIRST-CHILD. /* Literal */ nbrhandle = nbrhandle:NEXT-SIBLING. /* dss_nbr */ /* Check to see if dss_mstr exists and */ /* Check dss__chr10 first to see if there is a value. */ /* If so - display it in the lookup. */ FIND FIRST dss_mstr NO-LOCK WHERE dss_mstr.dss_nbr = nbrhandle:SCREEN-VALUE NO-ERROR. IF AVAIL dss_mstr THEN DO: ASSIGN isnew = NO dssrecid = RECID(dss_mstr) holdship = dss__chr10. IF dss__chr10 NE "" THEN ASSIGN global-drill-handle:SCREEN-VALUE = dss__chr10. END. ELSE DO: ASSIGN isnew = YES. END.

  13. /* {1} = file name {2} = list of fields to display in frame. Must include indexed fields 1 and 2 {3} = indexed field #1 name {4} = indexed field #1 use-index e.g. "use-index pt_part" {5} = indexed field #2 name {6} = indexed field #2 use-index e.g. "use-index pt_desc" {7} = frame title {8} = "no-labels" (optional) {9} = additional search criteria or "yes" if no additional search criteria */ {window2c.i ad_mstr "ad_addr ad_sort" ad_addr "use-index ad_addr" ad_sort "use-index ad_sort" """COMPANY ADDRESS""" " " "ad_type = """company""" " } /* At this point you know the address selected. It may or ** may not be a valid site. For D/O - it has to be a site. ** If it is not a site then store it in so__chr10 and set ** the global-drill-handle:screen-value to the first two ** digits of the selection. */

  14. IF global-drill-handle:SCREEN-VALUE NE "" THEN DO: IF isnew THEN DO: /* dss_mstr DOESN'T EXIST */ ASSIGN global-drill-handle:SCREEN-VALUE = SUBSTRING(global-drill-handle:SCREEN-VALUE, 1, 2). END.

  15. ELSE DO: /* dss_mstr ALREADY EXISTS */ FIND FIRST si_mstr NO-LOCK WHERE si_site = global-drill-handle:SCREEN-VALUE NO-ERROR. IF NOT AVAIL si_mstr THEN DO: FIND FIRST dss_mstr WHERE RECID(dss_mstr) = dssrecid NO-ERROR. IF AVAIL dss_mstr THEN DO: ASSIGN dss__chr10 = global-drill-handle:SCREEN-VALUE global-drill-handle:SCREEN-VALUE = SUBSTRING(global-drill-handle:SCREEN-VALUE, 1, 2). END. END. END. END.

  16. FIRST-CHILD Returns the handle of the first widget created in the container widget or the current session. FRAME Specifies the handle of the frame that contains the widget. HANDLE Returns a handle to the widget. HIDDEN Controls the implicit display behavior of the widget. LAST-CHILD Returns the handle of the last widget created in the container widget or the current session. NAME An identifier for a widget. NEXT-SIBLING The next entry in the list of persistent procedure handles or widget handles, relative to a given handle. PARENT Specifies the handle for the parent widget of the widget. PREV-SIBLING The previous entry in the list of persistent procedure handles or widget handles, relative to a given handle. PRIVATE-DATA An arbitrary string associated with a widget or procedure. SELECTED Indicates whether the widget is selected (highlighted). SENSITIVE Controls the ability of the widget can receive input focus and events. TITLE Specifies the title string displayed for the widget. TYPE Returns the type of the widget or handle. VISIBLE Specifies whether a widget is currently visible on the display.

  17. SUMMARY All of this information can be downloaded at kevinslittlebrother.com Review the documentation on WIDGETS and HANDLES and ATTRIBUTES. Step your way through the children of a FRAME. Ask yourself – “What do I know and when do I know it”.

More Related