Edit Extended / Edit WorkArea - ABM / ABM2
Moderator: Rathinagiri
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Rubenalf, bienvenido a HMGforum!!!
gracias por el interes y mejoras que propone.
gracias por el interes y mejoras que propone.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Thanks to you all
Gracias a todos
Gracias a todos
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Item 3 - Fine ajustment of the controls.
The aproach I've used is to save the arrays "aLabel" and "aControl" to a file in memory "(dbname).EditConfig".
Next time the function is used, it will load it from memory if it exist, else it will create it in the usual way.
That is done and seems to work fine. If you need to begin again just erase "(dbname).EditConfig"
Next step is to make a procedure to modify the arrays. I made it, based on Esgici's LSanyArr
It is meant just for small changes (no wysiwyg) even while you could change anything around it is not recomended because you can easily make a mess (no checks at all).
It is working standalone (atached), but when I try to integrate everything it won't compile.
I used the same code, only changing the name of the function (coudn't be "main") and the window attribute "main" to "modal" and compliler gives "error on windows definition".
It will compile defining the window as anything but "modal" of course gives error on execute time because it is called from a modal windows (and it should be modal too) if the atrib is "main" it will logically fail when executed (there is already a main window).
Any idea what is wrong? why it did not let me define the window as "modal" ?
______
Item 3 - Ajuste fino de los controles.
La idea inicial es grabar las matrices "aLabel" y "aControl" a un archivo en memoria llamado "(dbname).EditConfig".
La próxima vez que se use la función ABM2(), las leerá del mencionado archivo si este existe, caso contrario las crea en la forma habitual. Si necesitas volver a empezar simplemente lo borras
Esta parte ya está hecha y parece funcionar bien.
El próximo paso es desarrollar un procedimiento para modificar las matrices. Ya está hecho basado en LSanyArr de Mr Esgici.
El objetivo es realizar solamente pequeños cambios (no es visual) si bien puedes cambiar todo lo que quieras, no es recomendable porque no efectúa ninguna verificación.
Funciona bien por si mismo (adjunto) pero no puedo integrarlo con "edit extended".
Copio el mismo programa, cambiando solamente el nombre de la función (no puede llamarse "main") y el atributo "main" de la ventana a "modal" pero no compila: Da error en la definición de la ventana
Compila si en lugar de "modal" uso cualquier otra opción (como "main" ó "child) pero por supuesto da error al ejecutarlo: con "main" porque ya existe (obvio) y cualquier otro porque al ser llamado desde una ventana "modal" también debe ser "modal"
Alguna idea porqué no me deja compilar la ventana como "modal"?
The aproach I've used is to save the arrays "aLabel" and "aControl" to a file in memory "(dbname).EditConfig".
Next time the function is used, it will load it from memory if it exist, else it will create it in the usual way.
That is done and seems to work fine. If you need to begin again just erase "(dbname).EditConfig"
Next step is to make a procedure to modify the arrays. I made it, based on Esgici's LSanyArr
It is meant just for small changes (no wysiwyg) even while you could change anything around it is not recomended because you can easily make a mess (no checks at all).
It is working standalone (atached), but when I try to integrate everything it won't compile.
I used the same code, only changing the name of the function (coudn't be "main") and the window attribute "main" to "modal" and compliler gives "error on windows definition".
It will compile defining the window as anything but "modal" of course gives error on execute time because it is called from a modal windows (and it should be modal too) if the atrib is "main" it will logically fail when executed (there is already a main window).
Any idea what is wrong? why it did not let me define the window as "modal" ?
______
Item 3 - Ajuste fino de los controles.
La idea inicial es grabar las matrices "aLabel" y "aControl" a un archivo en memoria llamado "(dbname).EditConfig".
La próxima vez que se use la función ABM2(), las leerá del mencionado archivo si este existe, caso contrario las crea en la forma habitual. Si necesitas volver a empezar simplemente lo borras
Esta parte ya está hecha y parece funcionar bien.
El próximo paso es desarrollar un procedimiento para modificar las matrices. Ya está hecho basado en LSanyArr de Mr Esgici.
El objetivo es realizar solamente pequeños cambios (no es visual) si bien puedes cambiar todo lo que quieras, no es recomendable porque no efectúa ninguna verificación.
Funciona bien por si mismo (adjunto) pero no puedo integrarlo con "edit extended".
Copio el mismo programa, cambiando solamente el nombre de la función (no puede llamarse "main") y el atributo "main" de la ventana a "modal" pero no compila: Da error en la definición de la ventana
Compila si en lugar de "modal" uso cualquier otra opción (como "main" ó "child) pero por supuesto da error al ejecutarlo: con "main" porque ya existe (obvio) y cualquier otro porque al ser llamado desde una ventana "modal" también debe ser "modal"
Alguna idea porqué no me deja compilar la ventana como "modal"?
- Attachments
-
- lsArray.rar
- (1.03 MiB) Downloaded 271 times
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Hi Rubenrubenalf wrote:Item 3 - Fine adjustment of the controls.
...
Any idea what is wrong? why it did not let me define the window as "modal" ?
...
Probably you need to use SET WINDOW MAIN OFF/ON command.
Official sample : <your_HMG_Folder>\SAMPLES\Miscellaneous\ScreenSplash
Another approach is in here.
I hope this feature will help you
Happy HMG'ing
Viva INTERNATIONAL HMG
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Hi.
Finally it works .
Modification to alter the position of the controls.
It should be called as follows:
I did not try with different parameters . Probably it will fail
Attached comparative images with some changes
I hope someone like it
--------------------------Español--------------------------
Hola.
Finalmente trabaja.
Modificación para alterar la posición de los controles.
Debe ser llamada como sigue:
No lo probé con otros parámetros. Probablemente falle
Adjunto imagenes comparativas con algunos cambios
Espero que a alguien le interese
Finally it works .
Modification to alter the position of the controls.
It should be called as follows:
Code: Select all
LOCAL aOptions := Array( 1, 2 )
aOptions[1,1] := "Edit Control positions"
aOptions[1,2] := { || ModificarArray() }
ABM2("dbName", , , , , , aOptions )
Attached comparative images with some changes
I hope someone like it
--------------------------Español--------------------------
Hola.
Finalmente trabaja.
Modificación para alterar la posición de los controles.
Debe ser llamada como sigue:
Code: Select all
LOCAL aOptions := Array( 1, 2 )
aOptions[1,1] := "Alterar posición de Controles"
aOptions[1,2] := { || ModificarArray() }
ABM2("dbName", , , , , , aOptions )
Adjunto imagenes comparativas con algunos cambios
Espero que a alguien le interese
- Attachments
-
- After some editing / Con cambios manuales
- Concept2colAlter.png (11.86 KiB) Viewed 5022 times
-
- Auto generated / Autogenerada
- Concept2col.png (12.12 KiB) Viewed 5022 times
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Hola Rubenalf
se ve bastante bien, además de ser muy útil.
gracias por tu aporte.
saludos cordiales,
Luis Vásquez.
se ve bastante bien, además de ser muy útil.
gracias por tu aporte.
saludos cordiales,
Luis Vásquez.
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Gracias a vos Luis
I forgot to upload the program, sorry
Olvidé subir el programa acá va
I forgot to upload the program, sorry
Olvidé subir el programa acá va
- Attachments
-
- edit-SaveArr.prg.zip
- Edit Extended Modificado
- (18.27 KiB) Downloaded 290 times
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Hi all
(Español más abajo)
I have made some changes on Edit Extended to get ComboBox’s
This change is not related with any other change I have made
(I can easily made it over the original "h_edit.prg", if anyone ask for it)
You do not need to pass any parameters, only you must create a
simple function for each ComboBox needed before calling ABM2()
The function will be named “CB_dbasename_fieldname()”. That is:
“CB” → ComboBox
dbasename → name of the related .DBF file name (or alias if used)
fieldname → name of the related text FIELD
If the respective function is found, it will be used to make a ComboBox;
other way a standard TextBox is made.
The function should return an array with the list of options (see demo.prg near line 100)
I hope this be helpfull por someone else. I feel still this is a great tool.
_____________________
He realizado algunos cambios al Edit Extended para tener ComboBox’es
Esto no guarda relación con otros cambios que hice
(puedo aplicarlo fácilmente sobre el "h_edit.prg" original, si a alguien le interesa)
No se necesita pasar ningún parámetro, solamente se debe crear una
función para cada ComboBox necesario antes de llamar ABM2()
La función se llamará “CB_dbasename_fieldname()”. Esto es:
“CB” → ComboBox
dbasename → nombre de el ARCHIVO .dbf relacionado (o alias si es usado)
fieldname → nombre de el CAMPO de texto relacionado
Si la respectiva función es hallada, se usará para construir el ComboBox;
de lo contrario, se construirá un TextBox estándar.
La función deberá devolver (return) la lista de opciones (ver demo.prg cerca de la linea 100)
Espero que se útil para alguien más. Yo sigo pensando que es una gran herramienta.
(Español más abajo)
I have made some changes on Edit Extended to get ComboBox’s
This change is not related with any other change I have made
(I can easily made it over the original "h_edit.prg", if anyone ask for it)
You do not need to pass any parameters, only you must create a
simple function for each ComboBox needed before calling ABM2()
The function will be named “CB_dbasename_fieldname()”. That is:
“CB” → ComboBox
dbasename → name of the related .DBF file name (or alias if used)
fieldname → name of the related text FIELD
If the respective function is found, it will be used to make a ComboBox;
other way a standard TextBox is made.
The function should return an array with the list of options (see demo.prg near line 100)
I hope this be helpfull por someone else. I feel still this is a great tool.
_____________________
He realizado algunos cambios al Edit Extended para tener ComboBox’es
Esto no guarda relación con otros cambios que hice
(puedo aplicarlo fácilmente sobre el "h_edit.prg" original, si a alguien le interesa)
No se necesita pasar ningún parámetro, solamente se debe crear una
función para cada ComboBox necesario antes de llamar ABM2()
La función se llamará “CB_dbasename_fieldname()”. Esto es:
“CB” → ComboBox
dbasename → nombre de el ARCHIVO .dbf relacionado (o alias si es usado)
fieldname → nombre de el CAMPO de texto relacionado
Si la respectiva función es hallada, se usará para construir el ComboBox;
de lo contrario, se construirá un TextBox estándar.
La función deberá devolver (return) la lista de opciones (ver demo.prg cerca de la linea 100)
Espero que se útil para alguien más. Yo sigo pensando que es una gran herramienta.
- Attachments
-
- Editex_Demo.zip
- (49.28 KiB) Downloaded 238 times
-
- Editex_ComboBox.jpg (81.68 KiB) Viewed 4613 times
- serge_girard
- Posts: 3165
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Edit Extended / Edit WorkArea - ABM / ABM2
Thanks RubenAlf!
Serge
Serge
There's nothing you can do that can't be done...
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Edit Extended / Edit WorkArea - ABM / ABM2
Hola Ruben,
Muchas gracias por tu contribuicion.
Al compilar tu ejemplo emitió un error:
Pienso igual: Edit Extended es una excelente herramienta.
Un gran abrazo.
Googled
Hi Ruben,
Thank you very much for your contribution.
When you compiled your example it gave an error:
You missed attaching the BIGELEM function. I found it, would it be this ?
<See above source code>
I think the same: Edit Extended is an excellent tool.
Muchas gracias por tu contribuicion.
Al compilar tu ejemplo emitió un error:
Te faltó anexar la funcion BIGELEM. La encontré, seria esta ?hbmk2: Error: Referenciado, faltando, funciones desconocida(s): BIGELEM()
Code: Select all
/*
===============================================================
| FUNCTION BIGELEM()
===============================================================
|
| Short:
| ------
| BIGELEM() Returns length of longest string in an array
|
| Returns:
| --------
| <nLength> => Length of longest string in an array
|
| Syntax:
| -------
| BIGELEM(aTarget)
|
| Description:
| ------------
| Determines the length of the longest string element
| in <aTarget> Array may have mixed types
|
| Examples:
| ---------
| BIGELEM( {"1","22","333"} ) => returns 3
|
| Notes:
| -------
| This was a C function in previous SuperLibs
|
| Source:
| -------
| S_BIGEL.PRG
|
===============================================================*/
Function BigElem(aArray)
LOCAL nIterator, nLongest := 0
FOR nIterator = 1 to Len(aArray)
If ValType(aArray[nIterator])=="C"
nLongest := Max(nLongest, HMG_Len(aArray[nIterator]))
Endif
NEXT
Return nLongest
Si, a mi me vendrá de diez !Ruben wrote:Espero que se útil para alguien más. Yo sigo pensando que es una gran herramienta.
Pienso igual: Edit Extended es una excelente herramienta.
Un gran abrazo.
Googled
Hi Ruben,
Thank you very much for your contribution.
When you compiled your example it gave an error:
Hbmk2: Error: Referenced, Missing, Unknown Function(s): BIGELEM()
You missed attaching the BIGELEM function. I found it, would it be this ?
<See above source code>
Yes, I'll be ten for me !Ruben wrote:I hope it will be useful for someone else. I still think it's a great tool.
I think the same: Edit Extended is an excellent tool.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein