Page 3 of 3

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

Posted: Mon May 03, 2010 8:14 pm
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.

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

Posted: Mon May 03, 2010 8:15 pm
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.

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

Posted: Mon May 03, 2010 8:30 pm
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.

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

Posted: Mon May 03, 2010 11:01 pm
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.

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

Posted: Tue May 04, 2010 2:31 am
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

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

Posted: Tue May 04, 2010 3:31 am
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

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

Posted: Tue May 04, 2010 5:26 am
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

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

Posted: Tue May 04, 2010 5:45 am
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

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

Posted: Tue May 04, 2010 1:29 pm
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.