xChoice() function works with FWH 1906?
Wiht FWH 15.07 works fine.
Note: aPrompts is an array like { "Hola", "que tal" }
- Code: Select all Expand view
- /* *********************************************************************************** */
FUNCTION XChoice( aPrompts, cTitle )
/*by nageswaragunupudi » Mon Aug 19, 2013 8:30 pm
You may try using this function in the place of AChoice
*/
local nSelect := 0
DEFAULT cTitle := "Select"
XBROWSER aPrompts TITLE cTitle SELECT ( nSelect := oBrw:nArrayAt ) ;
SETUP ( oBrw:lHeader := .f., oBrw:lRecordSelector := .f., oBrw:lHScroll := .f., ;
oBrw:oWnd:bInit := { |oDlg| oDlg:aControls[ 1 ]:Hide(), ; // Anar al primer registre.
oDlg:aControls[ 2 ]:Hide(), ; // Anar un regitstre enrera
oDlg:aControls[ 3 ]:Hide(), ; // Anar un registre endavant
oDlg:aControls[ 4 ]:Hide(), ; // Anar al darrer registre
oDlg:aControls[ 5 ]:Hide(), ; // Afegir un registre
oDlg:aControls[ 6 ]:Hide(), ; // Modificar un registre
oDlg:aControls[ 7 ]:Hide(), ; // Eliminar un registre
oDlg:aControls[ 8 ]:Hide(), ; // Imprimir
oDlg:aControls[ 9 ]:Hide()} ) // Exportar a XLS
Return nSelect
/* *********************************************************************************** */
Error occurred at: 16-08-2019, 17:11:16
Error description: Error BASE/1132 Error de rango: acceso al array
Args:
[ 1] = A { ... } length: 2
[ 2] = N 3
Stack Calls
===========
Called from: => (b)EVAL( 1378 )
Called from: .\source\function\XBROWSER.PRG => FITSIZES( 301 )
Called from: .\source\function\XBROWSER.PRG => (b)XBROWSE( 250 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 864 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1120 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 278 )
Called from: c:\desarrol\treball\Ampa1906\prg\Lib00.PRG => XCHOICE( 1378 )