Page 3 of 5
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 4:27 pm
by Roberto Lopez
Alex Gustow wrote:
We are a
humans?????..

Thanks for clarification (because sometimes I'm not too sure about it).
Roberto Lopez wrote:
Or 'biological machines'... who knows

Or just "objects" of any program maded with the use of "Super-HMG"

My top one wish for my life is that finally, sometime, someone allows me to know the right answer
Note: We should stop this thread before programmers here ban us

Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 4:30 pm
by Rathinagiri
I am so happy that, how like minded people are we. I think we can start a separate area for general topics too for sharing pictures, thoughts, movie reviews, book reviews, interesting videos etc.
What do you think friends?!
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 4:44 pm
by Roberto Lopez
rathinagiri wrote:I am so happy that, how like minded people are we. I think we can start a separate area for general topics too for sharing pictures, thoughts, movie reviews, book reviews, interesting videos etc.
What do you think friends?!
YES, PLEASE!
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 4:48 pm
by Roberto Lopez
Roberto Lopez wrote:And (if you not watched already) "The Hitchhiker's Guide to the Galaxy" is a GREAT sci-fi movie (my second favorite).
And... if you want some funny sci-fi to watch while eating popcorn (or french fries in my case) please, watch 'The Omega Man', it's GREAT!
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 4:53 pm
by Alex Gustow
Ok! Let's do it in "General Discussions"! It's quite in the style of our HMG-family, I think - to exchange our knowleges about... everything!
And here... maybe we can return from this "SF-function"

to subject of this thread - HMG Objects?
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 5:00 pm
by Roberto Lopez
Alex Gustow wrote:And here... maybe we can return from this "SF-function"

to subject of this thread - HMG Objects?
I'm not sure... I guess I've forgot that...

Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 5:58 pm
by luisvasquezcl
Estimado Roberto,
Hay un problema con los objetos, éstos no destruidos cuando se invoca el evento release del control.
Hice un ejemplo, modifiqué el demo_1 y le agregue el obutton4.
Al hacer click sobre el boton se destruye button.release pero si consultas por su valor verás que aún sigue existiendo como objeto. Al hacer click sobre la ventana podrás ver el valor despues de destruirlo.
Espero te sea de utilidad.
Saludos cordiales,
Luis VAsquez
#include "include\objects.ch"
Set Procedure To lib\objects
Function Main
Local oWindow, oFrame, oButton1, oButton2, oButton3, oButton4
_HMG_SYSDATA [ 323 ] := 0
With Object oWindow := Window():New()
:Row := 10
:Col := 10
:Width := 400
:Height := 400
:Title := 'Nice OOP Demo!!!'
:Type := WND_MAIN
:OnInit := { || oWindow:Center() }
:bOnClick := { || MSGINFO(VALTYPE(oButton4)) }
With Object oFrame := Frame():New()
:Row := 10
:Col := 10
:Width := 350
:Height := 340
:Caption := 'This is an OOP Frame!!!'
End With
With Object oButton1 := Button():New()
:Row := 40
:Col := 40
:Caption := 'OOP Button!!!'
:OnClick := { || Button1Click( oWindow , oButton1 ) }
End With
With Object oButton2 := Button():New()
:Row := 70
:Col := 40
:Width := 30
:Height := 30
:Picture := 'button.bmp'
:OnClick := { || Button2Click() }
End With
With Object oButton3 := Button():New()
:Row := 110
:Col := 40
:Width := 90
:Height := 90
:Caption := 'OOP Button!!!'
:Picture := 'button.bmp'
:PictAlignment := BTN_TOP
:OnClick := { || MsgInfo('Click!') }
End With
With Object oButton4 := Button():New()
:Row := 200
:Col := 40
:Width := 30
:Height := 30
:Caption := 'Close'
:Picture := 'button.bmp'
:PictAlignment := BTN_TOP
:OnClick := { || oButton4:Release() }
End With
End With
oWindow:Activate()
Return
Procedure Button1Click ( oWindow , oButton1 )
oButton1:Caption := 'New Caption'
oWindow:Title := 'New Title'
Return
Procedure Button2Click()
Local oModal
With Object oModal := Window():New()
:Row := 10
:Col := 10
:Width := 600
:Height := 300
:Title := 'Nice OOP Modal Window!!!'
:Type := WND_MODAL
:OnInit := { || ( oModal:Center() ) }
End With
oModal:Activate()
Return
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 7:26 pm
by esgici
rathinagiri wrote:
...
What do you think friends?!
Great idea Rathi, thanks
Since we are all human, we need somethings other than (hard) working
Regards
--
Esgici
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 9:03 pm
by Roberto Lopez
luisvasquezcl wrote:Estimado Roberto,
Hay un problema con los objetos, éstos no destruidos cuando se invoca el evento release del control.
Thanks for the report.
I've already knew, but I'm focused on basic design yet.
Re: HMG OBJECTS... A New Project!
Posted: Thu May 06, 2010 9:46 pm
by Roberto Lopez
Roberto Lopez wrote:luisvasquezcl wrote:Estimado Roberto,
Hay un problema con los objetos, éstos no destruidos cuando se invoca el evento release del control.
Thanks for the report.
I've already knew, but I'm focused on basic design yet.
Anyway, the method 'Release()' is aimed to end the control, but this not necessarily implies that the object variable containing the control instance should be released too, perhaps this should be responsibility of the app programmer...