HMG OOP?... WHY NOT?... ;) [UPDATED]

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 OOP?... WHY NOT?... ;) [UPDATED]

Post by Roberto Lopez »

Your OOP code is very elegant and very simple and yet very powerful. You have established the base class of the controls for which all controls can inherit. I tried to experiment with your sample. I modified Test1 and added grid on it.
Controls are not created until its parent window is activated, so method 'hide' can't be invoked.

To overcome this, you'll must explicity create the window and the control prior to the window activation using the 'create()' method available for windows and controls.
Regards/Saludos,

Roberto


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

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by Roberto Lopez »

Estimado Roberto
Mis felicitaciones, nuevamente me sorprendes con tus novedades.
sigues en un camino muy interesante, espero poder serte de utilidad.
saludos cordiales,
Luis Vasquez
Gracias Luis.
Regards/Saludos,

Roberto


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

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by Roberto Lopez »

Roberto Lopez wrote:
Your OOP code is very elegant and very simple and yet very powerful. You have established the base class of the controls for which all controls can inherit. I tried to experiment with your sample. I modified Test1 and added grid on it.
Controls are not created until its parent window is activated, so method 'hide' can't be invoked.

To overcome this, you'll must explicity create the window and the control prior to the window activation using the 'create()' method available for windows and controls.
Anyway, I'm making changes and fixing bugs, so please, wait a little until attempt to do more tests.

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
jortega
Posts: 27
Joined: Thu Oct 09, 2008 3:52 am
Location: Chile

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by jortega »

Español
Gracias Roberto, muy interesante el camino que estás siguiendo.
Saludos.
English
Thanks Robert, very interesting the way you are following.
Regards.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by sudip »

Hello,

I have very little knowledge about Harbour and OOP :(. But, I want to know if we can create a new control, inherited from 1) a single control or 2) inherited from multiple controls? :)

Can Polymorphism be used with Harbour/HMG? (again, sorry for my ignorance :( )

One small hope is coming to my mind - finally we are going to have a better (both in efficiency and simplicity) class than TBROWSE :D

With best regards.

Sudip
With best regards,
Sudip
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by apais »

Hi All:

Some few annotations

1) AFAIR, Harbour does not suport multiple inheritance by design.
2) Avoid the use of inline methods. Access to them is slower than normal ones.
3) Why do you need a GUI tbrowse if you already have a fantastic grid component ?
4) Objects and command are not incompatible. If a move to oop is made in HMG, the commad layer can be mantained as is. So 90% of users won't see the difference.

Regards
Angel
Angel Pais
Web Apps consultant/architect/developer.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by sudip »

Hi Angel,

Thank you very much :)

I got most of my answers from your post :)

Only one thing I want to say, yes, I also think grid will be a better candidate. By "tbrowse class", I actually wanted to say an object oriented grid class, where we can use any controls (eg, Combo Search Box) easily :)

Moreover, we can also refresh the lookup array of the combo box (if any) control of a grid class during runtime easily :)

(I have many wishes regarding grid, but I think this is not the proper thead to tell them. Roberto also may have different views regarding this matter, I don't want to disturb him :) )

Thank you again.

With best regards.

Sudip
Last edited by sudip on Tue May 04, 2010 5:56 am, edited 6 times in total.
With best regards,
Sudip
jparada
Posts: 430
Joined: Fri Jan 23, 2009 5:18 pm

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by jparada »

Hi,

I have also tried using combosearchbox within a grid control, but I have not been successful and I do not know if it's possible and how to implement it.

BTW, about the "problem" in the change event in the combosearchbox example I did not know what was the solution (if it was solved), I followed the thread about Rathinagiri post, but I have not been able to interpret the solution.

Thanks

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

Re: HMG OOP?... WHY NOT?... ;) [UPDATED]

Post by Roberto Lopez »

apais wrote:Hi All:

Some few annotations

1) AFAIR, Harbour does not suport multiple inheritance by design.
2) Avoid the use of inline methods. Access to them is slower than normal ones.
<...>
I'm a 'procedural guy' :)

I'm just learning about OOP, so any advices are welcome.

I'm amazed because it was possible for me to create an easy to use, elegant pure OOP interface.

There is some complexities to overcome yet, but I'm sure that it is possible.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply