Hello Thierry When I run the application with the new version 2.26 I throw myself the following
AWAJAX.CRESULTADD - awajax.lSuccess(.f.): Error detected at code line #8,996 of method 'awajax.propssave' "Error while saving properties for the form 'login_administrador_scx': Method or procedure propssave_init_obj_init(): error #1734 ("Property WLJQUERYUIDIALOG is not found") at code line #9,500 (source code N/A)" Awapphost.formlaunch_() - Properties of form "login_administrador_scx" could not be saved: An instance of class 'awAJAX' should be in scope. awserver.fxp!Awajax.propssave() - Error while saving properties for the form 'login_administrador_scx': Method or procedure propssave_init_obj_init(): error #1734 ("Property WLJQUERYUIDIALOG is not found") at code line #9,500 (source code N/A) Awapphost.formlaunch() - Awapphost.formlaunch(tcForm: 'login_administrador_scx', tlSubForm: .F., m.tcSuffix: '') - Properties of form "login_administrador_scx" could not be saved: An instance of class 'awAJAX' should be in scope. awserver.fxp!Awajax.propssave() - Error while saving properties for the form 'login_administrador_scx': Method or procedure propssave_init_obj_init(): error #1734 ("Property WLJQUERYUIDIALOG is not found") at code line #9,500 (source code N/A) AWAJAX.CRESULTADD - awajax.lSuccess(.f.): Error detected at code line #8,996 of method 'awajax.propssave' "Error while saving properties for the form 'awsfrmmb': Method or procedure propssave_init_obj_init(): error #1734 ("Property WLJQUERYUIDIALOG is not found") at code line #9,500 (source code N/A)" Awapphost.formlaunch_() - Properties of form "awsfrmmb" could not be saved: An instance of class 'awAJAX' should be in scope. awserver.fxp!Awajax.propssave() - Error while saving properties for the form 'awsfrmmb': Method or procedure propssave_init_obj_init(): error #1734 ("Property WLJQUERYUIDIALOG is not found") at code line #9,500 (source code N/A) Awapphost.formlaunch() - Awapphost.formlaunch(tcForm: 'awsfrmmb', tlSubForm: .F., m.tcSuffix: '') - Properties of form "awsfrmmb" could not be saved: An instance of class 'awAJAX' should be in scope. awserver.fxp!Awajax.propssave() - Error while saving properties for the form 'awsfrmmb': Method or procedure propssave_init_obj_init(): error #1734 ("Property WLJQUERYUIDIALOG is not found") at code line #9,500 (source code N/A) Awapphost.init_app_forms() - No valid form found in 'login_administrador.scx,awsFrmMB' Awapphost.init() - Application could not start: "" THANK YOU
I you have something in C:\Users\<you>\AppData\Local\VirtualStore\<VFP9>\Tools\AB\
, delete it.
Hello Thierry, Regards
The errors indicated in the previous mail, no longer give, but still giving the problem
aw.vct!Login_Administrador_scx wformnoshow() - AJAX object should be in scope.
And I'm thinking about changing the type of menu. What seems strange to me is that it does not work
Gustavo,
Could you shoot and post a video showing exactly what you do? It'll be easier to understand…
Hello Thierry
This is the video address https://youtu.be/kdl95Ba7ll8.
If you need something more detailed please let me know.
I already told my brother about FOXINCLOUD and it seemed pretty good
He told me to take advantage of these rest days to investigate about it
In Panama there are opportunities to install applications under WEB
Gustavo,
As explained in an earlier post, you must interact with the form IN YOUR BROWSER, NOT WITH THE FORMS IN THE VFP IDE.
Here is a video showing how to do that on the 'TasTrade'
demo application: https://youtu.be/RQL5TaAiPv8
Hello Thierry
Reviewing the video I made some adjustments in my application and executed satisfactorily
Pressing the ACCEPT button gives me the following warnings:
Form login_administrador_scx : AWAJAX.CRESULTADD - awserver.fxp!Awajax.navigate() - URL "Menu_administrator.scx" is not supported
AWAJAX.CRESULTADD - awajax.lSuccess(.f.): Error detected at code line #69 of method 'login_administrador_scx.wformnoshow'
"Instantiating a form is not supported while this master form is (un)loaded or destroyed" "awsFrmMB"
I send you URL address of a video that prepares https://youtu.be/fve47UzTlE8
THANK YOU
Hello Thierry
Reviewing the video I made some adjustments in my application and executed satisfactorily
Pressing the ACCEPT button gives me the following warnings:
Form login_administrador_scx : AWAJAX.CRESULTADD - awserver.fxp!Awajax.navigate() - URL "Menu_administrator.scx" is not supported
AWAJAX.CRESULTADD - awajax.lSuccess(.f.): Error detected at code line #69 of method 'login_administrador_scx.wformnoshow'
"Instantiating a form is not supported while this master form is (un)loaded or destroyed" "awsFrmMB"
I send you URL address of a video that prepares https://youtu.be/fve47UzTlE8
THANK YOU
Gustavo,
Again, YOU MUST NOT INTERACT WITH THE FORM IN THE VFP IDE.
CLICK IN THE BROWSER ONLY.
Please make sure that menu_administrador.scx
is in set('path')
What code do you have in xxxSets.Init()
?
Thanks
Thierry
My sequence in the process of starting the application is
Login_Administrator => Menu_Administrator. Both are .scx.
One gives me the username and the password and the other shows me the menu
I sent you a video where you can see how the original version works. URL https://youtu.be/RzlodHkXsw8
I sent you the INIT() Procedure code from awsSets.prg?
Thanks
please post the code here using the code tool in the menu above.
Thierry what code are you referring to?
please post code from awsSets.init()
PROCEDURE Init
lparameters ; result; && @ result of application startup - appears in .../foxincloud-status.xxx, and in server log if !m.success , toAppHost as awAppHost of awAppHost.fxp && Application Host object (Web mode only)
toAppHost gives you access to:
-
- any PROTECTED property you've added to your server class - see class awsServer in awsServer.prg
-
- you application's configuration object in m.toAppHost.oConfigApp - see class awsAppConfig in awsServer.prg
-
- many other properties and methods that you can discover by setting a break point and typing 'm.toAppHost.' to trigger intellisense
HINT: In your code, you may take advantage of the following properties and methods: #if .F. && documentation this.wlWeb && application runs in Web mode this.wlLAN && (this.wlLAN = !this.wlWeb) application runs in LAN (desktop) mode this.lDevMode && application runs in the IDE this.lAutomation && App works in COM mode (this.wlWeb only) #endif
local success as Boolean
success = DoDefault(@m.result) && IMPORTANT! sets the above properties if !m.success return .f. endif
PLEASE NOTE
FoxInCloud Adaptation Assistant has recycled the following code from
'C:\Test\awSadin_Administrador\login_administrador.prg'.
This code has the main configuration features for your application.
You probably need to review it to operate correctly in Web mode,
especially regarding the PATHes and tests specific to LAN mode.
Note: the awPublic.prg!wlWeb() function indicates if application runs in Web mode.
If you perform a new installation after some manual modifications,
FoxInCloud Adaptation Assistant will detect it and propose to check
and/or save the file before eventually replace it
If anything serious happens during class initialization, set:
success = .F.
result = [the reason(s) why environment could not be set and/or application should not start]
in Web mode, this error will get written into the application log, and a mail sent to administrator.
in LAN mode, you could do something similar
Before this code executes, FoxInCloud Application Server has set CurDir() to
the application's main folder, where project resides
(C:\Test\awSadin_Administrador)
All the following pathes are relative to this folder …
SET PATH TO ".\BITMAPS;.\CLASES;.\DATOS;.\FORMAS;.\INFORMES;.\PICTURE;.\PROGRAMAS" ADDITIVE
IF !InList(_VFP.StartMode, 2, 3, 5) && In COM automation mode, Visual FoxPro implicitly performs a SET PROCEDURE and a SET CLASSLIB to the entire server by default when you instantiate an .exe or .dll COM server - if you reissue SET PROC or SET CLASSLIB repeatedly, COM object performance will drop sharply
SET PROCEDURE TO age,analizar_acceso,conexionservidor,desconexionservidor,desencriptar,encriptar,foxydb,foxydb_library2.5.prg,foxyrb_class,hwlib,login_administrador,main_administrador,validar_fecha_vencimiento ADDITIVE
ClassLibAdd("gcbase.vcx,gcctrl.vcx,aws.vcx") && modify command abDev EXTERNAL PROCEDURE ClassLibAdd
ENDIF
PUBLIC lcNombreEmpresa, lcDireccion, lcDepartamento, lcRif PUBLIC lcRutaSistema, lcRutaOrigen, lcRutaSistema PUBLIC lcPorcIva, lcFechaServicio, lcSimboloMoneda PUBLIC lcIp, lcUser, lcPassw, lcBd, lcPuerto PUBLIC oDb PUBLIC lcCodigoUsuario, lcNombreUsuario, lcClaveUsuario, ; lcGrupoUsuario, lcCodigoCentro, lcTipoUsuario, ; lcCodigoVendedor, lcNombreVendedor, lcPorcentajeDcto
&& Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:01 PM *-FIC- (see above) SET PATH TO (Home(1) + 'Tools' + 'AB') ADDITIVE *-FIC- (see above) AB() && loads FoxInCloud public modules located in the above folder, and shared on GitHub: https://github.com/FoxInCloud/FoxInCloud-AB.git *-FIC- (see above) SET CLASSLIB TO (Addbs(JustPath(Sys(16))) + 'CLASES\AWS.VCX') ADDITIVE && aws.vcx derives from aw.vcx && Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:01 PM
&& /!\ make sure all SET PATH/LIBRary/CLASslib/PROCedure && executed after this line have the ADDITIVE clause
:*************************************************************************** : Nombre Archivo : LOGIN_ADMINISTRADOR.PRG : Sistema : SISTEMA ADMINISTRATIVO INTEGRADO PARA NEGOCIOS ( SADIN ) : : Objetivo : Programa Que Pide Clave De Acceso : : Autor : Gustavo Colmenares : Copyright (c)2017, (G. Colmenares) : Ult. Modif. : 25-10-2017 :******************************************************************* IF WVISIBLE( "Command" ) HIDE WINDOW "Command" ENDIF
SET SYSMENU TO
DEACTIVATE WINDOW "Project Manager"
*-FIC- (see above) PUBLIC lcNombreEmpresa, lcDireccion, lcDepartamento, lcRif *-FIC- (see above) PUBLIC lcRutaSistema, lcRutaOrigen, lcRutaSistema *-FIC- (see above) PUBLIC lcPorcIva, lcFechaServicio, lcSimboloMoneda
IF !FILE( "\awSadin_Administrador\WinAcc.SIS" ) cMessageTitle = "ATENCION" cMessageText = "SADIN No Está Inicializado...." cDialogType = 0 + 48 *-FIC- Replaced by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:00 PM *-FIC- nAnswer = MESSAGEBOX(cMessageText, cDialogType, cMessageTitle)
*-FIC- (In web mode, no user can attend modal state at app startup, please condition with [if this.wlLAN]) nAnswer = wMessageBox(cMessageText, cDialogType, cMessageTitle)
QUIT ENDIF
USE WinAcc.SIS IN 0 SHARED SELECT WinAcc
lcNombreEmpresa = nomb_empr lcRutaOrigen = ALLTRIM( r_origen ) lcRutaDatos = ALLTRIM( r_datos ) lcRutaBitmaps = "\Bitmaps" lcRutaFormas = "\Formas" lcRutaClases = "\Clases" lcRutaInformes = "\Informes" lcRutaProgramas = "\Programas" lcRutaPicture = "\Picture"
lcRutaSistema = lcRutaOrigen + ";" +; lcRutaOrigen + lcRutaDatos + ";" +; lcRutaOrigen + lcRutaBitmaps + ";" +; lcRutaOrigen + lcRutaFormas + ";" +; lcRutaOrigen + lcRutaClases + ";" +; lcRutaOrigen + lcRutaInformes + ";" +; lcRutaOrigen + lcRutaProgramas + ";" +; lcRutaOrigen + lcRutaPicture + ";"
*-FIC- (see above) SET PATH TO ( lcRutaSistema ) ADDITIVE
- Llamar Forma Que Pide Clave De Acceso MODIFY WINDOW SCREEN ; TITLE "SISTEMA ADMINISTRATIVO INTEGRADO PARA NEGOCIOS ( SADIN )" ; FONT "MS Sans Serif",8 ; COLOR RGB(244,244,255,244,244,255) ; STYLE "B"
CLEAR
*-FIC- (see above) PUBLIC lcIp, lcUser, lcPassw, lcBd, lcPuerto *-FIC- (see above) PUBLIC oDb
- Leer parámetros de conexión con base de datos USE SysServidor IN 0 SHARED SELECT SysServidor
lcIp = ip_serv lcUser = user_serv lcPassw = passw_serv lcBd = db_serv lcPuerto = pto_serv
USE
DO FoxyPreviewer.app
oDb = NEWOBJECT("FoxyDb", "\awSadin\Programas\FoxyDb.prg")
*-FIC- (see above) PUBLIC lcCodigoUsuario, lcNombreUsuario, lcClaveUsuario, ; lcGrupoUsuario, lcCodigoCentro, lcTipoUsuario, ; lcCodigoVendedor, lcNombreVendedor, lcPorcentajeDcto
lcCodigoUsuario = SPACE( 12 ) lcNombreUsuario = SPACE( 40 ) lcClaveUsuario = SPACE( 8 ) lcGrupoUsuario = SPACE( 4 ) lcCodigoCentro = SPACE( 4 ) lcNombreCentro = SPACE( 30 ) lcCodigoVendedor = SPACE( 4 ) lcNombreVendedor = SPACE( 60 ) lcPorcentajeDcto = 0.00
return m.success && application won't start if .F. endproc
Please Gustavo use the code formatting feature …
PROCEDURE Init
lparameters ;
result; && @ result of application startup - appears in .../foxincloud-status.xxx, and in server log if !m.success
, toAppHost as awAppHost of awAppHost.fxp && Application Host object (Web mode only)
* toAppHost gives you access to:
* - any PROTECTED property you've added to your server class - see class awsServer in awsServer.prg
* - you application's configuration object in m.toAppHost.oConfigApp - see class awsAppConfig in awsServer.prg
* - many other properties and methods that you can discover by setting a break point and typing 'm.toAppHost.' to trigger intellisense
* HINT: In your code, you may take advantage of the following properties and methods:
#if .F. && documentation
this.wlWeb && application runs in Web mode
this.wlLAN && (this.wlLAN = !this.wlWeb) application runs in LAN (desktop) mode
this.lDevMode && application runs in the IDE
this.lAutomation && App works in COM mode (this.wlWeb only)
#endif
local success as Boolean
success = DoDefault(@m.result) && IMPORTANT! sets the above properties
if !m.success
return .f.
endif
* PLEASE NOTE
* --------------------------------------------------------------------------------------------
* FoxInCloud Adaptation Assistant has recycled the following code from
* 'C:\Test\awSadin_Administrador\login_administrador.prg'.
* This code has the main configuration features for your application.
* You probably need to review it to operate correctly in Web mode,
* especially regarding the PATHes and tests specific to LAN mode.
* Note: the awPublic.prg!wlWeb() function indicates if application runs in Web mode.
* --------------------------------------------------------------------------------------------
* If you perform a new installation after some manual modifications,
* FoxInCloud Adaptation Assistant will detect it and propose to check
* and/or save the file before eventually replace it
* --------------------------------------------------------------------------------------------
* If anything serious happens during class initialization, set:
* success = .F.
* result = [the reason(s) why environment could not be set and/or application should not start]
* in Web mode, this error will get written into the application log, and a mail sent to administrator.
* in LAN mode, you could do something similar
* Before this code executes, FoxInCloud Application Server has set CurDir() to
* the application's main folder, where project resides
* (C:\Test\awSadin_Administrador\)
* All the following pathes are relative to this folder …
SET PATH TO ".\BITMAPS\;.\CLASES\;.\DATOS\;.\FORMAS\;.\INFORMES\;.\PICTURE\;.\PROGRAMAS\" ADDITIVE
IF !InList(_VFP.StartMode, 2, 3, 5) && In COM automation mode, Visual FoxPro implicitly performs a SET PROCEDURE and a SET CLASSLIB to the entire server by default when you instantiate an .exe or .dll COM server - if you reissue SET PROC or SET CLASSLIB repeatedly, COM object performance will drop sharply
SET PROCEDURE TO age,analizar_acceso,conexionservidor,desconexionservidor,desencriptar,encriptar,foxydb,foxydb_library2.5.prg,foxyrb_class,hwlib,login_administrador,main_administrador,validar_fecha_vencimiento ADDITIVE
ClassLibAdd("gcbase.vcx,gcctrl.vcx,aws.vcx") && modify command abDev
EXTERNAL PROCEDURE ClassLibAdd
ENDIF
PUBLIC lcNombreEmpresa, lcDireccion, lcDepartamento, lcRif
PUBLIC lcRutaSistema, lcRutaOrigen, lcRutaSistema
PUBLIC lcPorcIva, lcFechaServicio, lcSimboloMoneda
PUBLIC lcIp, lcUser, lcPassw, lcBd, lcPuerto
PUBLIC oDb
PUBLIC lcCodigoUsuario, lcNombreUsuario, lcClaveUsuario, ;
lcGrupoUsuario, lcCodigoCentro, lcTipoUsuario, ;
lcCodigoVendedor, lcNombreVendedor, lcPorcentajeDcto
&& Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:01 PM
*-FIC- (see above) SET PATH TO (Home(1) + 'Tools\' + 'AB\') ADDITIVE
*-FIC- (see above) AB() && loads FoxInCloud public modules located in the above folder, and shared on GitHub: https://github.com/FoxInCloud/FoxInCloud-AB.git
*-FIC- (see above) SET CLASSLIB TO (Addbs(JustPath(Sys(16))) + 'CLASES\AWS.VCX') ADDITIVE && aws.vcx derives from aw.vcx
&& Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:01 PM
&& /!\ make sure all SET PATH/LIBRary/CLASslib/PROCedure
&& executed after this line have the ADDITIVE clause
*:****************************************************************************
*: Nombre Archivo : LOGIN_ADMINISTRADOR.PRG
*: Sistema : SISTEMA ADMINISTRATIVO INTEGRADO PARA NEGOCIOS ( SADIN )
*:
*: Objetivo : Programa Que Pide Clave De Acceso
*:
*: Autor : Gustavo Colmenares
*: Copyright (c)2017, (G. Colmenares)
*: Ult. Modif. : 25-10-2017
*:****************************************************************************
IF WVISIBLE( "Command" )
HIDE WINDOW "Command"
ENDIF
SET SYSMENU TO
DEACTIVATE WINDOW "Project Manager"
*-FIC- (see above) PUBLIC lcNombreEmpresa, lcDireccion, lcDepartamento, lcRif
*-FIC- (see above) PUBLIC lcRutaSistema, lcRutaOrigen, lcRutaSistema
*-FIC- (see above) PUBLIC lcPorcIva, lcFechaServicio, lcSimboloMoneda
IF !FILE( "\awSadin_Administrador\WinAcc.SIS" )
cMessageTitle = "ATENCION"
cMessageText = "SADIN No Está Inicializado...."
cDialogType = 0 + 48
*-FIC- Replaced by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:00 PM
*-FIC- nAnswer = MESSAGEBOX(cMessageText, cDialogType, cMessageTitle)
*-FIC- (In web mode, no user can attend modal state at app startup, please condition with [if this.wlLAN]) nAnswer = wMessageBox(cMessageText, cDialogType, cMessageTitle)
QUIT
ENDIF
USE WinAcc.SIS IN 0 SHARED
SELECT WinAcc
lcNombreEmpresa = nomb_empr
lcRutaOrigen = ALLTRIM( r_origen )
lcRutaDatos = ALLTRIM( r_datos )
lcRutaBitmaps = "\Bitmaps"
lcRutaFormas = "\Formas"
lcRutaClases = "\Clases"
lcRutaInformes = "\Informes"
lcRutaProgramas = "\Programas"
lcRutaPicture = "\Picture"
lcRutaSistema = lcRutaOrigen + ";" +;
lcRutaOrigen + lcRutaDatos + ";" +;
lcRutaOrigen + lcRutaBitmaps + ";" +;
lcRutaOrigen + lcRutaFormas + ";" +;
lcRutaOrigen + lcRutaClases + ";" +;
lcRutaOrigen + lcRutaInformes + ";" +;
lcRutaOrigen + lcRutaProgramas + ";" +;
lcRutaOrigen + lcRutaPicture + ";"
*-FIC- (see above) SET PATH TO ( lcRutaSistema ) ADDITIVE
* Llamar Forma Que Pide Clave De Acceso
MODIFY WINDOW SCREEN ;
TITLE "SISTEMA ADMINISTRATIVO INTEGRADO PARA NEGOCIOS ( SADIN )" ;
FONT "MS Sans Serif",8 ;
COLOR RGB(244,244,255,244,244,255) ;
STYLE "B"
CLEAR
*-FIC- (see above) PUBLIC lcIp, lcUser, lcPassw, lcBd, lcPuerto
*-FIC- (see above) PUBLIC oDb
* Leer parámetros de conexión con base de datos
USE SysServidor IN 0 SHARED
SELECT SysServidor
lcIp = ip_serv
lcUser = user_serv
lcPassw = passw_serv
lcBd = db_serv
lcPuerto = pto_serv
USE
DO FoxyPreviewer.app
oDb = NEWOBJECT("FoxyDb", "\awSadin\Programas\FoxyDb.prg")
*-FIC- (see above) PUBLIC lcCodigoUsuario, lcNombreUsuario, lcClaveUsuario, ;
lcGrupoUsuario, lcCodigoCentro, lcTipoUsuario, ;
lcCodigoVendedor, lcNombreVendedor, lcPorcentajeDcto
lcCodigoUsuario = SPACE( 12 )
lcNombreUsuario = SPACE( 40 )
lcClaveUsuario = SPACE( 8 )
lcGrupoUsuario = SPACE( 4 )
lcCodigoCentro = SPACE( 4 )
lcNombreCentro = SPACE( 30 )
lcCodigoVendedor = SPACE( 4 )
lcNombreVendedor = SPACE( 60 )
lcPorcentajeDcto = 0.00
return m.success && application won't start if .F.
endproc
is menu_administrador.scx
in any of these folders?
.\BITMAPS\
.\CLASES\
.\DATOS\
.\FORMAS\
.\INFORMES\
.\PICTURE\
.\PROGRAMAS\
Yes. In .\FORMAS\ folder
you get this message:
Form login_administrador_scx : AWAJAX.CRESULTADD - awserver.fxp!Awajax.navigate() - URL "Menu_administrator.scx" is not supported
What is your form's name? "Menu_administrator.scx" or "Menu_administrador.scx"?
Hi THIERRY
I told you that you were wrong with the name of the form. I already change it and the message no longer
In a little while I will continue with the tests and write you.
See you soon... THANKS
I told you that you were wrong with the name of the form
You know which form is what in your app. Free support requires tact from both sides.
Yes, Thierry had the wrong name. Sorry I had not noticed. It will not happen again
Thank you very much
OK meno male Gustavo
Hello Thierry
Again I'm here ... I finished the therapies for the foot and everything went very well. I'm already walking well.
Returning back to the tests I found these warnings
Awhtmlgen.ocnttabs.omain.ocontrol_aclass() - Class 'tab' can't be instantiated standalone: Method or procedure init(): error #1732 ("Data type is invalid for this property") at code line #1.339 ("this.Left = _position") However, if in Web mode the visual appearence of objects derived from this class is satisfactory, just ignore this warning
Awhtmlgen.ocnttabs.omain.ocontrol_aclass() - Class 'taboption' can't be instantiated standalone: Method or procedure init(): error #1732 ("Data type is invalid for this property") at code line #1.339 ("this.Left = _position") However, if in Web mode the visual appearence of objects derived from this class is satisfactory, just ignore this warning
Awhtmlgen.ofoxyrb.ocnttabs.omain.ocontrol_aclass() - Class 'tab' can't be instantiated standalone: Method or procedure init(): error #1732 ("Data type is invalid for this property") at code line #1.339 ("this.Left = _position") However, if in Web mode the visual appearence of objects derived from this class is satisfactory, just ignore this warning
Awhtmlgen.ofoxyrb.ocnttabs.omain.ocontrol_aclass() - Class 'taboption' can't be instantiated standalone: Method or procedure init(): error #1732 ("Data type is invalid for this property") at code line #1.339 ("this.Left = _position") However, if in Web mode the visual appearence of objects derived from this class is satisfactory, just ignore this warning
Awapphost.oform() - Access to form 'menu_administrador_scx' requires a prior user identification (see property menu_administrador_scx.wlAnonymousAllowed)
AWAJAX.CRESULTADD - awajax.lSuccess(.f.): Error detected at code line #69 of method 'login_administrador_scx.wformnoshow' "Instantiating a form is not supported while this master form is (un)loaded or destroyed" "awsFrmMB"
The property .wlAnonymousAllowed this .T.
Holà Gustavo
congratulations for you prompt relief
what is your question about these warnings?
Hello Thierry Thank you...
What I want you to tell me what I should do to correct those warning, please
Thank you
However, if in Web mode the visual appearance of objects derived from this class is satisfactory, just ignore this warning
do you have display problems?
Access to form 'menu_administrador_scx' requires a prior user identification
when login is OK, call thisForm.wUserLogin()
; eg.:
select users
locate for .T.;
AND username = Alltrim(thisForm.cntLogin.txtUserName.Value);
AND password = AllTrim(thisForm.cntLogin.txtPassWord.Value)
do case
case Found() and !users.lInactive
thisForm.wUserLogin(Users.userID)
success = .T.
…
Error detected at code line #69 of method 'login_administrador_scx.wformnoshow' "Instantiating a form is not supported while this master form is (un)loaded or destroyed" "awsFrmMB"
if you want to display a message box before displaying menu_administrador
, use a call-back:
procedure valid
…
thisForm.wMessageBox('wFormCallBack', …)
procedure wFormCallBack
…
thisForm.wFormMaster(…)
In this way, place the code
SELECT SysUsuario
LOCATE FOR UPPER( SysUsuario.cod_user ) = UPPER( ALLTRIM( THISFORM.txtUserName.Value ) )
IF FOUND() AND ALLTRIM(passw_user) == ALLTRIMTHISFORM.txtPassword.Value)
lcCodigoUsuario = ALLTRIM( SysUsuario.cod_user )
lcNombreUsuario = SysUsuario.nomb_user
lcPassUsuario = ALLTRIM( SysUsuario.passw_user )
lcGrupoUsuario = SysUsuario.cod_grupo
lcCodigoCentro = SysUsuario.cod_cent
lcNombreCentro = SysUsuario.nomb_cent
lcPorcentajeDcto = SysUsuario.pdcto_user
lcCodigoVendedor = SysUsuario.Cod_vend
lcNombreVendedor = SysUsuario.nomb_user
THISFORM.Release()
THISFORM.wUserLogin( lcCodigoUsuario )
Success = .T.
THISFORM.wForm( "Menu_Administrador.scx" )
ELSE
If you want to display a message box before displaying menu_administrador, use a call-back:
What is call-back for
Since you are running on the web, you want to remove this line which is giving some of your errors:
do foxypreviewer.app
also you cannot have this
QUIT
or this
MODIFY WINDOW SCREEN ;
TITLE "SISTEMA ADMINISTRATIVO INTEGRADO PARA NEGOCIOS ( SADIN )" ;
FONT "MS Sans Serif",8 ;
COLOR RGB(244,244,255,244,244,255) ;
STYLE "B"
CLEAR
Holà Gustavo,
In this way, place the code
please test and feedback
What is call-back for
Implementing Form Call and Callback [updated 12/15/2011, 1.36 MB]
please read the documentation
I sent you a video of how the application is running.
As you can see in WEB mode, you can not see the menu options while in another mode if you observe
When leaving, he sends me a warning that I sent to you to see what you:
thinkAwhtmlgen.ofoxyrb.ocnttabs.omain.ocontrol_aclass() - Class 'tab' can't be instantiated standalone: Method or procedure init(): error #1732 ("Data type is invalid for this property") at code line #1.339 ("this.Left = _position") However, if in Web mode the visual appearence of objects derived from this class is satisfactory, just ignore this warning
Awhtmlgen.ofoxyrb.ocnttabs.omain.ocontrol_aclass() - Class 'taboption' can't be instantiated standalone: Method or procedure init(): error #1732 ("Data type is invalid for this property") at code line #1.339 ("this.Left = _position") However, if in Web mode the visual appearence of objects derived from this class is satisfactory, just ignore this warning
foxyrb... It is the class that is instantiated for the ribbons type menu
This is the address of the video https://youtu.be/h318p8P2vRI
The problem seems to be with the adaptation of foxrb. It probably uses variables that are in scope within the prg but once adapted work differently. You need to look at the adapted code of foxrb.prg
Holà Gustavo,
I understand better now, you use "foxyRB", a 3rd party component that makes a ribbon menu à la MS Office.
You need to make sure that all classes can instantiate without thisForm
, this.Parent
or parameters.
Here is the adaptation you can try:
modify command foxyRB_class
DEFINE CLASS foxyrb as Container
…
procedure init
if !type('this.Parent') == 'O' && add these 3 lines
return
endif
…
…
enddefine
&& all other classes:
procedure init
lparameters …
if empty(pCount()) && add these 3 lines
return
endif
You may want to get in touch with the author to provide an adapted version of foxyRB
Hola Thierry
What I'm going to do is change the menu to a typical visual fox 9.0 menu and I'll continue with the adaptation.
If I make that change, do I need to adapt the project again or is it not necessary?
THANKS
Please try the solution I suggested and feedback the results you obtain; I'm curious to know if it can work.
Hello Thierry
I'm going to send the file Foxyrb_Class.prg to give you a review and give me your opinion.
The file is sent to you by gmail because it's long
Gustavo,
I already downloaded the class, reason why I could suggest adaptations.
Thierry
Ok, you already know the code.
FoxInCloud made the adaptations at the time.
Now it is required to change thisForm, this.Parent or parameters?
I'm going to see the class and make the adaptations
THANKS
I've given you the adaptations earlier in this thread
Where are there parameters I eliminate them?
For example
PROCEDURE tabMousePointer_assign
LPARAMETERS vNewVal
IF (Type('m.thisForm.wlPropsRestore') == 'L' AND m.thisForm.wlPropsRestore) && Added by FoxInCloud
this.tabmousepointer = m.vNewVal
RETURN
ENDIF && Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:46 PM
please, just the .Init()
methods as explained
Hello
To all the procedures of FoxyRb_Class I have to place the PROCEDURE init?
Gustavo, what is unclear in this?
Hola
I am making the manual adaptations to FoxyRb_Class
excellent, please feedback the result you obtain
Hello Thierry
After the manual adaptation, run the application
I sent him the address of the video that I made
congratulations Gustavo, you're almost done… the video shows that the form menu_administrador
was instantiated and HTML generated OK.
you probably have an empty record in wwRequestLog
; it can happen in development when you often start and stop the server (never happens in production however)
just erase wwRequestLog.*
and restart your server.
Hello Thierry
I did what you recommended.
I send you a new video and at the end of it you will observe some warning
THANKS
there's an issue with your log, please zip wwRequestLog.*
and send to support at foxincloud dot com
when you test you can just ignore the error 'uniqueness of index redID is violated'
you still have your messagebox while unloading the login_administrador
. I suggest you set a breakpoint on the instruction where this warning is issued in aw.vcx!awFrm.wFormNoShow()
(warning gives the line number) and see up the call stack where this messagebox is called.
Gustavo,
Thanks for sending wwRequestLog
; we could understand what happens as follows:
call stack:
15 menu_administrador.scx.init (15)
16 menu_administrador.scx.agregarpestana (10)
17 menu_administrador.scx.foxyrb.tabmainname_assign (410) && ROOT error here, on instruction "THIS.tabMainName = m.vNewVal"
18 menu_administrador.scx.error (23) && error caught here
19 menu_administrador.scx.wmessagebox (49)
20 menu_administrador.scx.wform (54)
21 menu_administrador.scx.wformnoshow (70) && FoxInCloud error generated here
then you have subsequent errors on menu_administrador.scx.foxyrb.tabmainname_assign (411)
, menu_administrador.scx.foxyrb.taborganize (606)
, etc.
you can browse these errors by:
use wwRequestLog
replace querystr with Strtran(Strtran(querystr, '_menu_administrador_scx', ' menu_administrador.scx'), ' > ', Chr(13)) all
browse for error
modify memo queryStr
Our request ID autoincrement mechanism fails because of the number of successive errors (49) -- we'll fix that.
We need to fix the root error in menu_administrador.scx.init()
and menu_administrador.scx.agregarpestana()
.
Can you post your code in menu_administrador.scx.init()
and menu_administrador.scx.agregarpestana()
?
Thanks,
Hello Thierry
To see if I understood ... I need to place the code that you sent me in menu_administrador.scx.init() and menu_administrador.scx.agregarpestana()
no…
the code I gave is for browsing the errors in the VFP IDE
for now please post the code you have in
menu_administrador.scx.init()
menu_administrador.scx.agregarpestana()
Gustavo, when you receive a notification for V 2.26.1-beta.9
, please install this version
Thierry sent you the code
Code in menu_administrador.scx.init()
&& Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:09 PM
if m.this.wlInitFirst or !m.this.wlWeb
DoDefault() && Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:09 PM
&& Move here the code to be executed IN DESKTOP MODE and only when form is first instantiated IN WEB MODE:
&& custom member initialization, BindEvent(member, 'event', thisform, 'method'), etc.
endif
if m.this.wlInitFirst
&& WEB MODE: form's initial instantiation; code below this block will later execute for each user of this form
return
endif
&& / Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:09 PM
THISFORM.AgregarPestana()
THISFORM.AgregarGrupo()
THISFORM.BotonesGrupoArchivos()
THISFORM.BotonesGrupoUtilitario()
menu_administrador.scx.agregarpestana()
WITH thisform.FoxyRb
* Agregar Pestañas
* Principal (TabMain)
* La pestaña principal se agrega por default, se puede ocultar si no se desea mostrar
* se manipula por medio de propiedades, el nombre del objeto es TABMAIN
* Mostrar / Ocultar Pestaña Principal
.tabMain = .T.
* Cambiar Nombre
.tabMainName = "SADIN"
* Acción a realizar al dar click
.tabMainAction = "MESSAGEBOX( 'Ver. 1.0', 0, 'SIGMA' )"
* Pestañas (addTab)
* Recibe 3 parámetros:
* Obligatorio - Nombre de la Pestaña (objeto)
* Descripción de la pestaña, si se omite se usa el nombre de la pestaña
* Para activar la pestaña,
* Ejemplos
* .AddTab("Catalogos", "Catálogos del Sistema", .t.)
* .AddTab("Catalogos", "Catálogos del Sistema")
* .AddTab("Catalogos")
* .AddTab("Catalogos", .t.)
.AddTab("Archivos", .T.)
.AddTab("Utilitarios", "Utilitarios")
* Opción (addOption)
* Agregar opciones sin pestaña, su comportamiento es igual que una pestaña
* con la diferencia que no muestra grupos ni botones
* Recibe 3 Parámetros:
* Obligatorio - Nombre de la opción (objeto)
* Obligatorio - Descripción de la opción
* Acción a ejecutar
.AddOption("Salir", "Salir", "CLEAR EVENTS")
ENDWITH
OK thanks, everything's OK here; next what code do you have in foxyrb.tabmainname_assign()
?
Hola
* Cambiar Nombre de la pestaña principal
PROCEDURE tabMainName_assign
LPARAMETERS vNewVal
&& Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:50 PM
IF (Type('m.thisForm.wlPropsRestore') == 'L' AND m.thisForm.wlPropsRestore)
this.tabmainname = m.vNewVal
RETURN
ENDIF
&& Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:50 PM
*To do: Modify this routine for the Assign method
IF THIS.tabMainName <> m.vNewVal
THIS.tabMainName = m.vNewVal
this.cntTabs.main.lbltitle.caption = this.tabMainName
this.cntTabs.main.Organize()
this.TabOrganize()
ENDIF
ENDPROC
Still don't understand what happens;
please add this code to your form.error()
method (either in the class or the form itself):
LPARAMETERS nError, cMethod, nLine
&& add these 2 lines
_cliptext = 'nError = ' + Transform(m.nError) + ', cMethod = ' + m.cMethod + ', nLine = ' + Transform(m.nLine)
assert .F.
&& rest of the existing code
assert .F.
will cause the program to stop until you click ignore all
in the assertion failure dialog.
When the program stops on assert, you can just PASTE here the string stored to _cliptext
above; this will help us understand what error occurs and why.
please post also:
- your code in the error method
- the code in the method and the line received as parameters to the
.error()
event when error occurs
Thanks
Hello
nError = 1925, cMethod = tabmainname_assing, nLine = 410
nError = 1925, cMethod = tabmainname_assing, nLine = 411
nError = 1925, cMethod = taborganize, nLine = 607
nError = 1925, cMethod = taborganize, nLine = 612
nError = 1925, cMethod = taborganize, nLine = 613
form.error()
LPARAMETERS nError, cMethod, nLine
&& add these 2 lines
_cliptext = 'nError = ' + Transform(m.nError) + ', cMethod = ' + m.cMethod + ', nLine = ' + Transform(m.nLine)
assert .F.
DEBUGOUT "gcfrm.Error"
LOCAL laError[1]
AERROR(laError)
IF !EMPTY( ON("error") )
DO Zerror IN HWLIB WITH ;
nError ,;
laError[2] ,;
laError[3] ,;
MESSAGEBOX(1) ,;
THIS.Name + "." + cMethod, nLine
ELSE
*-FIC- Replaced by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:07 PM
*-FIC- IF MESSAGEBOX("Error En Forma #" + LTRIM(STR(nError)) + " (" + laError[2] + ")" + ;
*-FIC- CHR(13) + "Ocurrido En Línea " + LTRIM(STR(nLine)) + " De " + cMethod, ;
*-FIC- 17, _VFP.Caption) = 2
IF thisForm.wMessageBox('', "Error En Forma #" + LTRIM(STR(nError)) + " (" + laError[2] + ")" + ;
CHR(13) + "Ocurrido En Línea " + LTRIM(STR(nLine)) + " De " + cMethod, ;
17, _VFP.Caption) = 2
* Cancel
ENDIF MESSAGEBOX ...
ENDIF TYPE("THIS.oError") = "O" ...
tabmainname_assing
PROCEDURE tabMainName_assign
LPARAMETERS vNewVal
IF (Type('m.thisForm.wlPropsRestore') == 'L' AND m.thisForm.wlPropsRestore) && Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:50 PM
this.tabmainname = m.vNewVal
RETURN
ENDIF && Added by FoxInCloud Adaptation Assistant version 2.25 (copy mode) on 10/30/2017 07:53:50 PM
*To do: Modify this routine for the Assign method
IF THIS.tabMainName <> m.vNewVal
THIS.tabMainName = m.vNewVal
this.cntTabs.main.lbltitle.caption = this.tabMainName
this.cntTabs.main.Organize()
this.TabOrganize()
ENDIF
ENDPROC
taborganize
PROCEDURE TabOrganize
LOCAL _tab as Integer, _tabName as Character
IF this.cntTabs.main.visible = .t.
this.cntTabs.tabNextPosition = 1
ELSE
this.cntTabs.tabNextPosition = 28
ENDIF
FOR _tab = 1 TO this.cntTabs.Objects.count
_tabName = this.cntTabs.Objects(_tab).name
IF this.cntTabs.&_tabName..visible = .t.
this.cntTabs.&_tabName..left = this.cntTabs.tabNextPosition
this.cntTabs.tabNextPosition = this.cntTabs.tabNextPosition + this.cntTabs.&_tabName..Width
ENDIF
NEXT
ENDPROC
cna you give the line number in the source code to see where the error occurs?
looks like this.cntTabs
does not exist; can you debug why ?
In the class foxyRB_class, the next class is found
* Contenedor de Pestañas
DEFINE CLASS CntTabs as awscnt
PROCEDURE init
IF !TYPE('this.Parent') == 'O'
RETURN
ENDIF
ENDPROC
wcPropSave = "tabactivecolor"
......
In the tabmainname procedure the error occurs in the following lines
*To do: Modify this routine for the Assign method
IF THIS.tabMainName <> m.vNewVal
THIS.tabMainName = m.vNewVal
this.cntTabs.main.lbltitle.caption = this.tabMainName && Fails
this.cntTabs.main.Organize() && Fails
this.TabOrganize()
ENDIF
ENDPROC