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

Moderator: Rathinagiri

Post Reply
User avatar
luisvasquezcl
Posts: 1258
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 »

Hi again,

new method setget value for controls.

function Value( cid, cvalue ) {
var el = document.getElementById( cid );

switch ( arguments.length ) {
case 1:
el.value; break;
case 2:
el.value = cvalue; break;
}

return el.value;
}

best regards,
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
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:Hi again,

new method setget value for controls.

function Value( cid, cvalue ) {
var el = document.getElementById( cid );

switch ( arguments.length ) {
case 1:
el.value; break;
case 2:
el.value = cvalue; break;
}

return el.value;
}

best regards,
Thanks!

I still working in server communication, when finished, I'll include these new functions on the library.
Regards/Saludos,

Roberto


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

Estimado,
para solucionar el problema con el control imagen cambia lo siguiente en el archivo hmgscript.js


function Image( cId , cParentId , nRow , nCol , cSrc )
{
Dice : var control = document.createElement( "image" ) ;
Cambiar por : var control = document.createElement( "img" ) ;


Esto soluciona el problema de imagen en Firefox.
Saludos cordiales,
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

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

Post by Pablo César »

Cambiar document.createElement( "image" ) ;
por document.createElement( "img" ) ;

Esto soluciona el problema de imagen en Firefox.
Increíble, funciona en FieFox, IE y G.Chrome.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

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

Post by Pablo César »

To further mimic the window with the Windows style, I´ve changed at hmgs.xp.css adding border-top-left-radius and border-top-right-radius:

Code: Select all

.window
{
   position                 : absolute                 ;
   background-color         : rgb(236,233,216)         ;
   text-align               : center                   ;
   border                   : 3px solid rgb(2,106,254) ;
   border-top-left-radius   : 0.5em                    ;
   border-top-right-radius  : 0.5em                    ;
}   

.window h1
{
   font-family              : Arial                    ; 
   font-size                : 12pt                     ;
   background               : rgb(2,106,254)           ;
   color                    : white                    ;
   margin                   : 0                        ;
   padding                  : 4px                      ;
   border-top-left-radius   : 0.2em                    ;
   border-top-right-radius  : 0.2em                    ;
} 
It is not working in lower version of IE9, but in G.Chrome, FireFox it´s works !
Image

I have a question, why not use myWindow=window.open("","","width=600,height=400"); ? With it is going to open a windows of OS.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
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,
para solucionar el problema con el control imagen cambia lo siguiente en el archivo hmgscript.js


function Image( cId , cParentId , nRow , nCol , cSrc )
{
Dice : var control = document.createElement( "image" ) ;
Cambiar por : var control = document.createElement( "img" ) ;


Esto soluciona el problema de imagen en Firefox.
Saludos cordiales,
Gracias!

AHora funciona bien en FF.
Regards/Saludos,

Roberto


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

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

Post by Roberto Lopez »

Pablo César wrote:To further mimic the window with the Windows style, I´ve changed at hmgs.xp.css adding border-top-left-radius and border-top-right-radius:
It looks good!

I've already applied your changes.
Pablo César wrote: I have a question, why not use myWindow=window.open("","","width=600,height=400"); ? With it is going to open a windows of OS.
It is only a design decision, based on that (AFAIK) we has not full control over it. ie: (AFAIK again) you can't make it modal or avoid minimize and maximize buttons, etc. Maybe I'm missing something, since I'm just learning.

More important, being non-modal clicking outside it, it will simply disappear (you must search it at taskbar).

Another consideration is how it behaves in other OSs than Windows.

Anyway, it can be added as an alternate way to do things.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

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

Post by Pablo César »

I see. Thank you Roberto for clarifying.

I also will see what I can do with Standard ou Win7 style. I saw another frame with rounded border.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

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

Post by Roberto Lopez »

Hi All,

R005 with this new features:

- Server demo: you must start the included server before test.
- Contrib demo: a separated .html page and .js files for contributed samples.
- Contrib lib: A separated library for contributions.

Spliting the core from contrib (library and demos) will make easier and more effective our work.

I've included Rathi, Luis and Pablo contributions.

The server access requires a lot of work yet... I know :)

Enjoy!
Attachments
hmgs005.zip
(601.25 KiB) Downloaded 373 times
Regards/Saludos,

Roberto


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

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

Post by Roberto Lopez »

Hi All,

I want to turn the server in a way that no recompile be required.

I'm thinking on make it able to run precompiled .hrb files called from the web client.

Anybody knows how to invoke (run) a .hrb file from an application?

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply