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

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post by Roberto Lopez »

Gracias Luis, en cuanto puedo, lo reviso.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
luisvasquezcl
Posts: 1261
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

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

Post 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
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
brain
Posts: 26
Joined: Tue Aug 02, 2011 5:01 pm

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

Post 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
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post 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!
Attachments
hmgs024.zip
(1.42 MiB) Downloaded 1509 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

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

Post by Rathinagiri »

Grid! :D

That completes the circle. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post 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 :)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
brain
Posts: 26
Joined: Tue Aug 02, 2011 5:01 pm

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

Post 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.
Post Reply