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

Moderator: Rathinagiri

User avatar
luisvasquezcl
Posts: 1259
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,
Gracias por la libreria...está genial.
ahora, tengo problemas para ejecutar el uhttp.exe.
cambié el número de puerto pero queda en un loop esperando.
con las primeras versiones no tenía ese problema... que será?.
saludos cordiales,
User avatar
Roberto Lopez
HMG Founder
Posts: 4012
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,
Gracias por la libreria...está genial.
ahora, tengo problemas para ejecutar el uhttp.exe.
cambié el número de puerto pero queda en un loop esperando.
con las primeras versiones no tenía ese problema... que será?.
saludos cordiales,
Siempre ha side exactamente el mismo ejecutable con la misma configuración. Nada cambió.

Si cambias el puerto, el firewall pedirá autorización nuevamente y además, si no es el 80 (por ejemplo 2000), deberás indicarlo en la dirección: localhost:2000.
Regards/Saludos,

Roberto


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

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

Post by Roberto Lopez »

WOW!

More than 1000 downloads in the first 10 hours after R24 publishing.

There are two possible explanations:

1. HMGSCRIPT is becoming a huge worldwide success that will change the web programming history (*)

2. Someone fell asleep while clicking his mouse left button.


(*) Just a joke ;)
Regards/Saludos,

Roberto


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

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

Post by Roberto Lopez »

THE NEXT STEPS:

I'm very busy with other stuff right now, so these things could take some time, but my main goals are the following:

1. Add classes for RadioGroup and ListBox controls.

2. Work on styles for Grid and Browse.

3. Add more methods for all widgets to have better functionality.

4. Create two more versions of server functions, with the exactly the same syntax as current ones. One will be PHP_DBF and the other PHP_MYSQL (being the current one HRB_DBF). These back-ends should be interchangeable without affecting our application sources. Please, note that having PHP backends we can use any standard hosting service.

5. Extend Browse and Query server functions to allow a secondary (child) table and a set relation expression to be sure that we can handle any situation without the need to create custom server procedures.

As I've said, I'm pretty busy with other works right now, so, all these things could take some time.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5480
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 »

So nice of you Roberto.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4012
Joined: Wed Jul 30, 2008 6:43 pm

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

Post by Roberto Lopez »

HMGSCRIPT R25

- New: ListBox control.

- New: RadioGroup control.

- New: Spinner Control.

- New: Slider Control.

- New: DatePicker Control.

- Changed: 'nWidth' optional parameter for Button.

- Changed: Browse and Grid styles (they look very good now!).

- Fixed: IE Browse incompatibility.

- Fixed: IE/FF Grid incompatibility.


This is the updated reference:
HMGSCRIPT 2012 FUNCTION REFERENCE (R25) - Roberto Lopez (http://www.hmgforum.com)


FORM:

Element: DIV

You can use all the properties, events and methods availables for it via DOM.

Syntax:

Form( cCaption , nWidth , nHeight )

Methods:

- release( cValue )
- getId()

Example:

oWin = new Form ( "Window Demo", 600 , 300 );

oWin.release()

------------------------------------------------------------------------------------------------

BUTTON:

Element: INPUT (Type: BUTTON)

You can use all the properties, events and methods availables for it via DOM.

Syntax:

Button( oParent , nRow , nCol , cCaption , cOnClick [,nWidth] )

Methods:

- setValue( cValue )
- getValue()
- getId()

Example:

oBtn = new Button( oForm ,
50 , 240 ,
"Set Btn Value" ,
"oBtn.setValue('New Value')" );

------------------------------------------------------------------------------------------------

LABEL:

Element: SPAN

You can use all the properties, events and methods availables for it via DOM.

Syntax:

Label( oParent , nRow , nCol , cValue )

Methods:

- getId()

------------------------------------------------------------------------------------------------

TEXTBOX:

Element: INPUT (Type: TEXT)

You can use all the properties, events and methods availables for it via DOM.

Syntax:

TextBox( oParent , nRow , nCol , cValue )

Methods:

- setValue( cValue )
- getValue()
- getId()

Example:

oText = new TextBox( oForm , 130, 230, "TextBox!" );

alert( oText.getValue() );

------------------------------------------------------------------------------------------------

EDITBOX:

Element: INPUT (Type: TEXTAREA)

You can use all the properties, events and methods availables for it via DOM.

Syntax:

EditBox( oParent , nRow , nCol , cValue )

Methods:

- setValue( cValue )
- getValue()
- getId()

Example:

oEdit = new EditBox( oForm , 130, 230, "TextBox!" );

alert( oEdit.getValue() );

------------------------------------------------------------------------------------------------

CHECKBOX:

Element: INPUT (Type: CHECKBOX)

You can use all the properties, events and methods availables for it via DOM.

Syntax:

CheckBox( oParent , nRow , nCol , bChecked )

Methods:

- check()
- unCheck()
- isChecked()
- getId()

Example:

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

alert(oCheck.isChecked())
oCheck.check()
oCheck.unCheck()

------------------------------------------------------------------------------------------------

COMBOBOX:

Element: SELECT

You can use all the properties, events and methods availables for them via DOM.

Syntax:

ComboBox( oParent , nRow , nCol , aOptions , aValues [, nSelectedIndex] )

Methods:

- getValue( nIndex )
- setValue( nIndex , cValue )
- setSelectedIndex ( nIndex )
- getSelectedIndex()
- getId()

Example:

oCombo = new ComboBox( oForm , 140 , 270 ,
[ 'one' , 'two' , 'three' ] ,
[ 'value one' , 'value two' , 'value three' ] , 0 );

alert ( oCombo.getSelectedIndex() );

------------------------------------------------------------------------------------------------

IMAGE:

Element: IMAGE

You can use all the properties, events and methods availables for it via DOM.

Syntax:

Image( oParent , nRow , nCol , cSrc )

Methods:

- getId()

------------------------------------------------------------------------------------------------

PANEL:

Element: DIV

You can use all the properties, events and methods availables for it via DOM.

Syntax:

Panel( oParent , nRow , nCol , nWidth , nHeight , cValue )

Methods:

- getId()

------------------------------------------------------------------------------------------------

APPEND:

Appends a record.

Syntax:

Append( cTable , aColumns , aValues )

------------------------------------------------------------------------------------------------

DELETE:

Delete records matching the cForExpr.

Syntax:

Delete( cTable , cForExpr )

------------------------------------------------------------------------------------------------

MODIFY:

Modifies records matching the cForExpr.

Syntax:

Modify( cTable , aColumns , aValues , cForExpr )

------------------------------------------------------------------------------------------------

LOGIN:

Syntax:

Login( cUser , cPassword )

------------------------------------------------------------------------------------------------

LOGOUT:

Syntax:

Logout()

------------------------------------------------------------------------------------------------

BROWSE:

Elements: DIV/TABLE

Creates an HTML table inside a scrollable DIV, loaded with the specified dbf query.

Syntax:

Browse( oParent , nRow, nCol, nWidth, nHeight, cDbfFile, aColumns,
aHeaders , cForExpr , cOrder , nInnerWidth )

Methods:

- refresh()
- getSelectedRows()
- getRowCount()
- select()
- unSelect()
- getCell(nRow,nCount)
- getSelectedRowCount()
- getId()


Example:

oBrowse = new Browse( oParent , 050 , 050 , 550 , 300 ,
'test' , [ 'code' , 'first' , 'last' , 'birth' , 'married' ] ,
[ 'Code' , 'First' , 'last' , 'Birth' , 'Married' ] ,
'code < 100' ,
'code' , 700 );

oBrowse.refresh()

------------------------------------------------------------------------------------------------

QUERY:

Returns a recordset from a server table as an array.

Syntax:

Query ( cDbf, aColumns, cForExpr, cOrder )

Example:

aRecordSet = Query ( 'test' ,
[ 'code' , 'first' , 'last' , 'birth' , 'married' ] ,
'code<=10' , '' );

------------------------------------------------------------------------------------------------

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' ] );


------------------------------------------------------------------------------------------------

RADIOGROUP:

Element: INPUT (Type: RADIO)

You can use all the properties, events and methods availables for them via DOM.

Syntax:

RadioGroup( oParent , nRow , nCol , aOptions , nSelectedIndex )

Methods:

- setSelectedIndex ( nIndex )
- getSelectedIndex()
- getId( nIndex )

Example:

oRadio = new RadioGroup( oForm , 140 , 270 ,
[ 'one' , 'two' , 'three' ] ,
1 );

alert ( oRadio.getSelectedIndex() );


------------------------------------------------------------------------------------------------

LISTBOX:

Element: SELECT

You can use all the properties, events and methods availables for them via DOM.

Syntax:

ListBox( oParent , nRow , nCol , aOptions , aValues , nSize [, nSelectedIndex] )

Methods:

- getValue( nIndex )
- setValue( nIndex , cValue )
- setSelectedIndex ( nIndex )
- getSelectedIndex()
- getId()

Example:

oList = new ListBox( oForm , 140 , 270 ,
[ 'one' , 'two' , 'three' ] ,
[ 'value one' , 'value two' , 'value three' ] , 3 , 1 );

alert ( oList.getSelectedIndex() );


------------------------------------------------------------------------------------------------

SPINNER:

Element: INPUT (Type: number)

You can use all the properties, events and methods availables for them via DOM.

Syntax:

Spinner( oParent , nRow , nCol , nValue )

Methods:

- getValue( nIndex )
- setValue( nIndex , cValue )
- setMin( nValue )
- setMax( nValue )
- setStep( nValue )
- getId()

Example:

oSpinner = new Spinner( oWin , 130, 230, 5 );

oSpinner.setMin(1);
oSpinner.setMax(10);
oSpinner.setStep(0.5);

alert( oSpinner.getValue() );


------------------------------------------------------------------------------------------------

SLIDER:

Element: INPUT (Type: range)

You can use all the properties, events and methods availables for them via DOM.

Syntax:

Slider( oParent , nRow , nCol , nValue )

Methods:

- getValue( nIndex )
- setValue( nIndex , cValue )
- setMin( nValue )
- setMax( nValue )
- setStep( nValue )
- getId()

Example:

oSlider = new Slider( oWin , 130, 230, 5 );

oSlider.setMin(1);
oSlider.setMax(100);
oSlider.setStep(50);

alert( oSlider.getValue() );

------------------------------------------------------------------------------------------------

DATEPICKER:

Element: INPUT (Type: DATE)

You can use all the properties, events and methods availables for it via DOM.

Syntax:

DatePicker( oParent , nRow , nCol , dValue )

Methods:

- setValue( cValue )
- getValue()
- getId()

Example:

oDate = new DatePicker( oForm , 130, 230, "2012-12-31" );

alert( oDate.getValue() );
Enjoy!
Attachments
hmgs025.zip
(1.42 MiB) Downloaded 322 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

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

Post by bpd2000 »

Excellant Roberto Sir
BPD
Convert Dream into Reality through HMG
User avatar
luisfrancisco62
Posts: 66
Joined: Thu Mar 18, 2010 12:16 am
Location: Colombia
Contact:

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

Post by luisfrancisco62 »

congratulations

como seria una funcion de menu?

en win7 starter 64 no me funciona el uhttpd.exe

podrias subir los fuentes?

gracias muchas gracias
User avatar
Rathinagiri
Posts: 5480
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 »

It is so cool Roberto!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4012
Joined: Wed Jul 30, 2008 6:43 pm

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

Post by Roberto Lopez »

luisfrancisco62 wrote:congratulations

como seria una funcion de menu?

en win7 starter 64 no me funciona el uhttpd.exe

podrias subir los fuentes?

gracias muchas gracias
No hay una función 'menu'. La librería usa tecnología estándar, (html, css, javascript) por lo cual puede mezclarse sin problemas con cualquier otro código que use esas tecnologías, si decides hacerlo tu mismo.

No me interesé por el desarrollo de una clase menú, ya que sería muy difícil de usar desde interfaces táctiles, desde donde (en mi opinión) es preferible el uso de botones.

uhttpd.exe está incluido (con código fuente) en la distribución de Harbour (esto se aclara en el archivo 'read.me.first.txt').

Funciona perfectamente a menos que esté bloqueado por el firewall de Windows o que el puerto 80 esté en uso. En ese caso, puede cambiarse desde uhttpd.ini.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply