xHarbour doesn't seem to have a HB_setenv or a setEnv, so I tried
switching my Xailer project to Harbour, but am receiving errors.
Can you give me some advice on the following problem:
From a form, in a checkbox, I want to set a flag that later tells a
class whether or not to output trace/log messages while processing. The
DATA variable in the class is called bIsTrace.
So the idea is to set a variable from the form, perhaps a global appdata
variable or an environmental variable TRACE=ON/OFF, that the class can
use to determine whether the user wants trace messages.
I keep getting an error that the newsgroup doesn't take articles longer
than some number of bytes, even though the article + attachment is not
that big. So I'll try sending the screen print separate from the main body.
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Advice about setting a flag in a form, to be used inside a separate class
Advice about setting a flag in a form, to be used inside a separate class
Does the group accept attachments? It seemed to have been sent, but
after several minutes, it's not there.
after several minutes, it's not there.
Advice about setting a flag in a form, to be used inside a separate class
....so the idea is to use the Trace button, to signal the class (when
it's instantiated later) to output log messages, e.g.
Local sPreProcessedBooleanExpression := ""
Local bIsTrace := FALSE
// ::SetTraceStatus()
bIsTrace := ::GetTraceStatus()
sPreProcessedBooleanExpression := PreProcessBooleanExpression(
sBooleanExpression )
If bIsTrace
WriteLog( "Original boolean expression: " + sBooleanExpression )
Endif
If bIsTrace
WriteLog( "Preprocessed boolean expression: " +
sPreProcessedBooleanExpression )
Endif
If !::IsWellFormedBooleanExpression( sPreProcessedBooleanExpression )
Return Self
Endif
If bIsTrace
WriteLog( "Generating Boolean Object " + Time() )
Endif
DEFAULT sBooleanExpression TO "xyz' + x'y'z + xy"
If ::HasAnyLiteralsFromAlphabet( sBooleanExpression )
::SetBooleanExpression( sBooleanExpression )
::PreProcessBooleanExpression( sBooleanExpression )
::sUsedVariables := ::CalculateUsedVariables(sBooleanExpression)
::PopulateTruthTableRows()
::PopulateTruthTableResults()
ASize( ::aSolutions, Len( ::sUsedVariables ) )
::aRowsEquatedToOne := ::GetOneMinTerms()
::aRowsEquatedToZero := ::GetZeroMinTerms()
Else // If the boolean expression has no variables, e.g. if it's
only a value like 'F = 0' or 'F = (1)'
// , then just populate with empty lists.
::sBooleanExpression := ::EvaluateNonVariableExpression(
sBooleanExpression )
::sUsedVariables := ""
::aTruthTableRows := {}
::aTruthTableResults := {}
::aSolutions := {}
::aRowsEquatedToOne := {}
::aRowsEquatedToZero := {}
Endif
Return Self
it's instantiated later) to output log messages, e.g.
Local sPreProcessedBooleanExpression := ""
Local bIsTrace := FALSE
// ::SetTraceStatus()
bIsTrace := ::GetTraceStatus()
sPreProcessedBooleanExpression := PreProcessBooleanExpression(
sBooleanExpression )
If bIsTrace
WriteLog( "Original boolean expression: " + sBooleanExpression )
Endif
If bIsTrace
WriteLog( "Preprocessed boolean expression: " +
sPreProcessedBooleanExpression )
Endif
If !::IsWellFormedBooleanExpression( sPreProcessedBooleanExpression )
Return Self
Endif
If bIsTrace
WriteLog( "Generating Boolean Object " + Time() )
Endif
DEFAULT sBooleanExpression TO "xyz' + x'y'z + xy"
If ::HasAnyLiteralsFromAlphabet( sBooleanExpression )
::SetBooleanExpression( sBooleanExpression )
::PreProcessBooleanExpression( sBooleanExpression )
::sUsedVariables := ::CalculateUsedVariables(sBooleanExpression)
::PopulateTruthTableRows()
::PopulateTruthTableResults()
ASize( ::aSolutions, Len( ::sUsedVariables ) )
::aRowsEquatedToOne := ::GetOneMinTerms()
::aRowsEquatedToZero := ::GetZeroMinTerms()
Else // If the boolean expression has no variables, e.g. if it's
only a value like 'F = 0' or 'F = (1)'
// , then just populate with empty lists.
::sBooleanExpression := ::EvaluateNonVariableExpression(
sBooleanExpression )
::sUsedVariables := ""
::aTruthTableRows := {}
::aTruthTableResults := {}
::aSolutions := {}
::aRowsEquatedToOne := {}
::aRowsEquatedToZero := {}
Endif
Return Self
Advice about setting a flag in a form, to be used inside a separate class
Resolved. Instead of instantiating the Boolean Class from a button,
it's now instantiating during the creation of the form, and the Boolean
object is a property of the form. Then, if the checkbox is checked, the
change event will set the bIsTrace property of the Boolean object.
Will keep the project in xHarbour mode, until the Harbour issue can be
resolved.
it's now instantiating during the creation of the form, and the Boolean
object is a property of the form. Then, if the checkbox is checked, the
change event will set the bIsTrace property of the Boolean object.
Will keep the project in xHarbour mode, until the Harbour issue can be
resolved.