HMG OBJECTS... A New Project!

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

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

Re: HMG OBJECTS... A New Project!

Post by Roberto Lopez »

Alex Gustow wrote: We are a humans?????.. :shock: 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 :)
Regards/Saludos,

Roberto


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

Re: HMG OBJECTS... A New Project!

Post 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?!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG OBJECTS... A New Project!

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

Roberto


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

Re: HMG OBJECTS... A New Project!

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

Roberto


(Veritas Filia Temporis)
User avatar
Alex Gustow
Posts: 290
Joined: Thu Dec 04, 2008 1:05 pm
Location: Yekaterinburg, Russia
Contact:

Re: HMG OBJECTS... A New Project!

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

Re: HMG OBJECTS... A New Project!

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

Roberto


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

Re: HMG OBJECTS... A New Project!

Post 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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG OBJECTS... A New Project!

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

Re: HMG OBJECTS... A New Project!

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

Roberto


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

Re: HMG OBJECTS... A New Project!

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

Roberto


(Veritas Filia Temporis)
Post Reply