>******************************************************************** >* Description.......: InvokeMainGlobalEditor >* Calling Samples...: >* Parameter List....: >* Created by........: Nadya Nosonovsky 08/16/2002 01:44:24 PM >* Modified by.......: Nadya Nosonovsky 09/06/2002 01:33:55 PM >******************************************************************** >*=messagebox('Global Editor') && For testing >*-------------------------------------------------------------------------- >* -- updated:rmm:09/25/01 >* -- Get the global edit field list form the gefldlist table from Alan - >* -- per edittype >*-------------------------------------------------------------------------- >local lcShow, lnFieldCount, lnCount, lcSetRelation >if not used('GeFldList') and not OpenTble('GeFldList','GeFldList','shared noupdate') > return .f. && we can not open GeFldList table >endif > >if seek(upper(padr(thisform.name,25)+ ; > padr(thisform.EditType,10)),'GeFldList','FormMode') ; > and GeFldList.EnableGE >&& Could be, that the mode is not found > lcShow = GeFldList.GeFldList > local array laShow[1] > lnFieldCount = aparser(@laShow, m.lcShow, ", ") >*!* select &lcShow. from BldMstr where .f. into cursor curTemp >*!* select curTemp >*!* lnFieldCount = afields(laGe) >*!* use in curTemp >*!* dimension laShow(m.lnFieldCount,1) >*!* for lnCount = 1 to m.lnFieldCount >*!* laShow(1,m.lnCount) = laGe(m.lnCount,1) >*!* endfor > =asort(laShow) && Sort alphabetically > > local loGlobalEditor, lnSecurity, lcClassLib > lnSecurity = 5 > >&& This command button is hidden, so let's everybody to invoke it by secret Alt+G key >*!* if vartype(oJC)='O' >*!* lnSecurity = oJC.Sec_Grp >*!* endif > >* tcTableAlias - alias to process (BldMstr in most cases, ltResolve in Validate case) >* tlDisDelGrpOpt - if true, Delete Group is disabled >* tlDisLinkOpt - if true, Link button is invisible >* tcForOpt - For Condition >* taTargFields - array of fields, which could be changed >* tcEType - form's EditType >* tlConvNull - if true, Clear Field converts to NULL >* tnSecurityLevel - Security Group (if less than 4 Global Editor is not accessible) >* tcAddlReplace - Additional Replace command >*!* select BldMstr >*!* lcSetRelation = set('relation') >*!* set relation to && close the relations > lcClassLib = 'GlobalEditor.vcx' > loGlobalEditor = newobject('GlobalEditor',m.lcClassLib,"", ; > "BldMstr",.f.,,,@laShow, ; > thisform.EditType, thisform.ConvNull, m.lnSecurity, thisform.AdditionalReplace) > > if vartype(m.loGlobalEditor)='O' > loGlobalEditor.show(2) && Show non-modal > read events > endif >*!* select BldMstr >*!* if not empty(m.lcSetRelation) >*!* set relation to &lcSetRelation && Restore relations >*!* endif >else && Mode is not found - should never happen > =messagebox('Global editing is not allowed for this operation.',0,'Global Editor') >endif>
>thisform.RestoreNLocked() >if this.WindowType = 0 && Modeless, so read events was issued > clear events >endif>