En una aplicacion debo almacenar el directorio raiz de la aplicacion , ya que luego
tengo las bases de datos de cada empresa en "\RAIZ\EMP01".
etc. al final para no usar una cadena fija y que el usuario pueda instalar la aplicacion donde quiera.
He definido una variable publica en el PROCEDURE INIT de la aplicacion.
- Code: Select all Expand view
INIT PROCEDURE ObrasInit()
PUBLIC cDirectApp := "\" + CurDir()
// ...... Mas codigo
RETURN
Es porque tengo que utilizar la variable en otros modulos que no son el principal.
para otras variables las declaraba STATIC en el modulo principal
y para exportarlas definia una funcion
- Code: Select all Expand view
STATIC oWnd
STATIC GetoWnd() ; RETURN oWnd
luego en otro .PRG en el modulo a utilizarlas
definia una variable local
- Code: Select all Expand view
LOCAL oWnd := GetoWnd()
y esto me funciona con arrays y objetos pero si intento con esta variable de cadena no funciona.
¿Existe alguna alternativa mejor a definir una varialbe PUBLIC ?
Solo tengo una .
Saludos.
Jose.