Page 20 of 28

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Wed Jun 27, 2012 5:44 pm
by Roberto Lopez
Gracias Luis, en cuanto puedo, lo reviso.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Wed Jun 27, 2012 5:48 pm
by Roberto Lopez
luisvasquezcl wrote:Estimado,
Error en la linea 233 demo.js
Esta linea da error en Firefox pero funciona bien en chrome.

function test_8()
{
oWin = new Form( "CheckBox Demo", 600 , 300 );

oCheck = new CheckBox( oWin , 140 , 280 , true );

233 -> Button( oWin , 240 , 080 , "isChecked" , "alert(oCheck.isChecked())" );
Button( oWin , 240 , 190 , "check" , "oCheck.check()" );
Button( oWin , 240 , 310 , "unCheck" , "oCheck.unCheck()" );
Button( oWin , 240 , 430 , "Close" , "oWin.release()" );

}
saludos cordiales,
Luis Vasquez
Lo probé en FireFox 13.0.1 y funciona correctamente.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Wed Jun 27, 2012 7:14 pm
by luisvasquezcl
Roberto,
efectivamente era un problema de version.
yo tenia Firefox 13.0.
actualizé y ya no mostró el error.
saludos cordiales,
Luis Vasquez

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Thu Jun 28, 2012 1:50 am
by Roberto Lopez
luisvasquezcl wrote:Roberto,
una observacion a la libreria.
leyendo sobre javascript indican que es mejor definir las funciones (metodos ) fuera de la declaracion de la clase para mejorar el uso de memoria.
por ejemplo
La clase form tiene el metodo this.release, es mejor declararlo de la siguiente forma :

form.prototype.release = function() {
... lo que tiene que hacer.
}
Es un tema que debería estudiarse en profundidad, ya que los navegadores usan diferentes motores JS, y lo que podría ser más eficiente en una, podría no serlo en otra, peor aún, podría ser más ineficiente.

Habrá sin dudas, una etapa de optimización, pero esta es la de experimentar.
luisvasquezcl wrote: Además, el div Form deberia ser contenido por el div Cover pero por lo que veo lo asigna al objeto body.
No es un problema pero no tendria sentido crear el div Cover si no se utiliza.
la solucion:
<...>
El div cover, está cumpliendo una misión que es la de evitar que el usuario interactúe con los elementos de la página que no están contenidos en el form actual. El hecho que el form esté contenido o no en el cover, no cambia esto.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Thu Jun 28, 2012 2:24 am
by brain
I salute you Sir Roberto! Hope you can answer my private message regarding CallDll32. Tnx and more power.

Is there a possible to use clipper commands to your java script? Tnx again

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Thu Jun 28, 2012 4:51 am
by Roberto Lopez
HMGSCRIPT R24

Grid added on this release.
GRID:

Elements: DIV/TABLE

Creates an HTML table inside a scrollable DIV.

Syntax:

Grid( oParent, nRow, nCol, nWidth, nHeight, aHeaders, nInnerWidth )

Methods:

- addRow(aRow)
- getSelectedRows()
- getRowCount()
- select()
- unSelect()
- getCell(nRow,nCount)
- setCell(nRow,nCount,cValue)
- getSelectedRowCount()
- deleteRow(nRow)
- getId()

Example:

oGrid = new Grid( oWin, 40, 020, 480, 190,
[ 'One' , 'Two' , 'Three' ], 550 );

oGrid.addRow ( [ 'cell 1.1' , 'cell 1.2' , 'Cell 1.3' ] );
Enjoy!

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Thu Jun 28, 2012 4:55 am
by Roberto Lopez
brain wrote:I salute you Sir Roberto! Hope you can answer my private message regarding CallDll32.
Tnx and more power.
Syntax for CallDll32 is in the HMG reference.
brain wrote: Is there a possible to use clipper commands to your java script? Tnx again
You can use Clipper commands in server modules.

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Thu Jun 28, 2012 5:02 am
by Rathinagiri
Grid! :D

That completes the circle. :)

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Thu Jun 28, 2012 5:09 am
by Roberto Lopez
rathinagiri wrote:Grid! :D

That completes the circle. :)
Almost... we could need listbox and radio too...

And there is some work to do styling grid and browse (ie: mouseover effect and change selected row color) and some new methods to better control handling.

But... as I've said in a previous message... we are on the (new) road again :)

Re: HMGSCRIPT 2012: Programming For The Web in The Right Way

Posted: Thu Jun 28, 2012 7:18 am
by brain
Hi again Sir Roberto. I may request if you can add footings to grid control so that it can add some functions with it such as computations, markings etc? Another one is do you have source about to set display resolution and can return to previous resolution once you exit with your executable program. Tnx and God Bless.