As always, Tracy hits right on the nail.

However, I would discourage the use of public properties.
It is better if you create a form property, which will be available to all the form's methods, but will not interfere with any other form or program that you run.

In that case, your code would be:

** form init event
thisform.addproperty('mproceed',.t.)

** button code

thisform. mproceed = .t.

thisform.whatever()

** there is no need for you to pass the value of thisform.mproceed as a parameter to the whatever method, since it can pick up the property value directly, as it is a form property


Rafael Copquin


El 31/10/2012 04:18 p.m., Desmond Lloyd escribió:
Awesome,  it worked!  8-)  Ahhh,  but you already knew that....

Thanks Again!
Desmond




On 31 October 2012 14:00, Tracy Pearson <[email protected]> wrote:

Desmond Lloyd wrote on 2012-10-31:
  Click on a command button does some stuff
  I have this code:

  public mproceed
  mproceed = .t.

  thisform.whatever(mproceed)

  Inside whatever:  If this condition,  mproceed = .f.
                                  return mproceed
  go back to the button click and mproceed is .t.

  Code blows up....

  Long day I guess...

  Yikes....

Desmond,

Public?

Try this
     local mproceed
     mproceed = .t.

     mproceed = thisform.whatever(mproceed)



Tracy Pearson
PowerChurch Software


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to