Page 1 of 2

More than one year

Posted: Thu Mar 11, 2010 6:28 am
by sudip
Hi All Friends,

I joined this forum 7th March, 2009. It's more than one year I am with this forum. During this year I learned many things. And still I am learning. Very recently I also changed my coding style (which was more complex and influenced by MS coding style) with more simple but effective codes.

I am enjoying this journey with all of you :D

With best regards.

Sudip

Re: More than one year

Posted: Thu Mar 11, 2010 8:54 am
by esgici
Hi Sudip

For me too, learning is most important process of the life and our forum is the greatest school for me :D

In other hand, I'm here primarily not only for learning, also for hang together with friends primary Roberto and Rathi and like you of course. :)

Best Regards

--

Esgici

Re: More than one year

Posted: Thu Mar 11, 2010 1:05 pm
by sudip
Yes brother Esgici,

About 1 year back when I joined this forum hearing from friend CCH, I found you, Rathi, Marek. At that time Roberto was busy. During the year we found many friends from different countries of the world :D

Regarding my recent changed coding style, previously I wrote @ .... syntax and now I started writing DEFINE ... END.. type of code. Moreover I also found some excellent tips from Rathi's code - especially using SQL.

With best regards.

Sudip

Re: More than one year

Posted: Thu Mar 11, 2010 3:48 pm
by Vanguarda
Hi friends,

Sudip, Esgici... i learn more things in this forum too, and, like said Esgici, i like many peoples of forum too. It is a family for me.

Many thanks for all.

With best regards,

Re: More than one year

Posted: Thu Mar 11, 2010 5:20 pm
by sudip
Yes Vanguarda,

Our forum is like a big family, world wide family :lol:

Today I bought a globe for my little son. I showed him many countries on the globe and told him my friends live in those places :D

With best regards.

Sudip

Re: More than one year

Posted: Thu Mar 11, 2010 6:11 pm
by swapan
sudip wrote:Yes Vanguarda,

Our forum is like a big family, world wide family :lol:

Today I bought a globe for my little son. I showed him many countries on the globe and told him my friends live in those places :D

With best regards.

Sudip
Sudip u r an asset for this forum..........
Keep contributing....

O! yes thanks for telling me bout this forum.....

Re: More than one year

Posted: Thu Mar 11, 2010 6:24 pm
by mol
I'm happy to be with all of you, too!

Best regards,Marek


PS.
It's fine you're treating the disease called M$, Sudip :D :D :D

Re: More than one year

Posted: Fri Mar 12, 2010 2:32 am
by Rathinagiri
Hi Sudip,

I am really happy to see this thread. Your contributions (also the expectations you have expressed) have really sharpened HMG a lot.

Apart from HMG, yes, you are a lot to me!

Re: More than one year

Posted: Fri Mar 12, 2010 6:10 am
by sudip
Hello Rathi, Marek, Vanguarda, Swapan, Esgici,

Thanks a lot for your kind words :D

Previously I thought using SQL cannot be as fast as using DBFCDX. But, recently after changing coding style (learning from Rathi's code), I found using SQL is as fast (if not better ;) ) using DBFCDX.

Too much GUI makes a program slow.

For writing programs, previously I thought control names like "txtInvdt" is better to show this is a textbox, or "cboCustid" is better for a combo box. But, writing codes using "invdt" as textbox and "custid" as combobox for 2 days, I found there is not very much problem to understand the logic. Code became smaller and typing time also got reduced ;)

I also found when we want to run some code at the starting of a window, it's better to put the code beteen END WINDOW and .... ACTIVATE WINDOW commands, than using ON INIT method.

When using SQL, it's always better to run the SQL commands at a time, than call different SQL commands separately.

Here I only expressed some of my findings. I may be wrong, as I am learning this software tool. So, please correct me, if you find any BUG in my views.

With best regards.

Sudip

Re: More than one year

Posted: Fri Mar 12, 2010 6:22 am
by Rathinagiri
Thanks Sudip.

I too prefer to enter the initial values of controls between "end window" and "activate window". On change procedure is getting triggered when a value is initialized and if in that "on change" procedure if you refer a control which is defined after the control which is initialized, then it gives a run time error. This can be illustrated as below:

Example 1: (gives runtime error)

Code: Select all

# include "hmg.ch"

function main

define window sample at 0,0 width 400 height 300 main
   define textbox t1
      row 10
      col 10
      width 100
      value "Giri"
      on change t1changed()
   end textbox
   define textbox t2
      row 10
      col 120
      width 100
   end textbox
end window
sample.center
sample.activate
return nil

function t1changed
   sample.t2.value := sample.t1.value
return nil
Example 2: (doesn't give runtime error)

Code: Select all

# include "hmg.ch"

function main

define window sample at 0,0 width 400 height 300 main
   define textbox t1
      row 10
      col 10
      width 100
      on change t1changed()
   end textbox
   define textbox t2
      row 10
      col 120
      width 100
   end textbox
end window
sample.t1.value := "Giri"
sample.center
sample.activate
return nil

function t1changed
   sample.t2.value := sample.t1.value
return nil