Página 1 de 1

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 5:47 pm
por ChrisGillard
Hi,
I have 12 TDatePicker Controls on my form.
They are names oDatePicker1 to oDatePicker12.
I want to set their values in a loop so would like to write something like
this ...... can this be done ??
&( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) := dPeriodEndDate
This results in a GPF Access code 000005.
I suspect my problem it is to do with the :: object reference or something ?
The nearest I can get is this code that does work and works as expected in
the loop
&( "logdisplay(" + str( n ) + ")" )
My alternative approach would be to add all the oDatePicker controls to an
array and access them using
aControls[n]:dValue .... I'm sure this would work.
But I would like to know if its possible to do using the macro &.
Thanks
Chris Gillard

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 6:25 pm
por Ingo JH
Chris,
try that:
::&("oDatePicker"+LTRIM(STR(aC[n]))):dValue := dPeriodEndDate
Regards
Ingo
"Chris Gillard" <chris@bluesquare.co.uk> schrieb im Newsbeitrag
news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi,
>
> I have 12 TDatePicker Controls on my form.
>
> They are names oDatePicker1 to oDatePicker12.
>
> I want to set their values in a loop so would like to write something like
> this ...... can this be done ??
>
> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) := dPeriodEndDate
>
> This results in a GPF Access code 000005.
>
> I suspect my problem it is to do with the :: object reference or something
> ?
>
> The nearest I can get is this code that does work and works as expected in
> the loop
>
> &( "logdisplay(" + str( n ) + ")" )
>
> My alternative approach would be to add all the oDatePicker controls to an
> array and access them using
>
> aControls[n]:dValue .... I'm sure this would work.
>
> But I would like to know if its possible to do using the macro &.
>
> Thanks
>
> Chris Gillard
>
>
>
>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 6:25 pm
por Ingo JH
Chris,
try that:
::&("oDatePicker"+LTRIM(STR(aC[n]))):dValue := dPeriodEndDate
Regards
Ingo
"Chris Gillard" <chris@bluesquare.co.uk> schrieb im Newsbeitrag
news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi,
>
> I have 12 TDatePicker Controls on my form.
>
> They are names oDatePicker1 to oDatePicker12.
>
> I want to set their values in a loop so would like to write something like
> this ...... can this be done ??
>
> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) := dPeriodEndDate
>
> This results in a GPF Access code 000005.
>
> I suspect my problem it is to do with the :: object reference or something
> ?
>
> The nearest I can get is this code that does work and works as expected in
> the loop
>
> &( "logdisplay(" + str( n ) + ")" )
>
> My alternative approach would be to add all the oDatePicker controls to an
> array and access them using
>
> aControls[n]:dValue .... I'm sure this would work.
>
> But I would like to know if its possible to do using the macro &.
>
> Thanks
>
> Chris Gillard
>
>
>
>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 6:38 pm
por ChrisGillard
Ingo,
Thanks you very much ... works a treat.
This is now my code in 2 lines so I can understand it better.
cString := "oDatePicker" + alltrim( str( n ) )
::&( cString ):dValue := dPeriodEndDate
I will try to make sure I always know where to find this piece of useful
code.
Thank you again.
Chris
"Ingo" <support@mandantwin.com> wrote in message
news:4a3675ef$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> try that:
>
> ::&("oDatePicker"+LTRIM(STR(aC[n]))):dValue := dPeriodEndDate
>
> Regards
>
> Ingo
>
> "Chris Gillard" <chris@bluesquare.co.uk> schrieb im Newsbeitrag
> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Hi,
>>
>> I have 12 TDatePicker Controls on my form.
>>
>> They are names oDatePicker1 to oDatePicker12.
>>
>> I want to set their values in a loop so would like to write something
>> like this ...... can this be done ??
>>
>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>> dPeriodEndDate
>>
>> This results in a GPF Access code 000005.
>>
>> I suspect my problem it is to do with the :: object reference or
>> something ?
>>
>> The nearest I can get is this code that does work and works as expected
>> in the loop
>>
>> &( "logdisplay(" + str( n ) + ")" )
>>
>> My alternative approach would be to add all the oDatePicker controls to
>> an array and access them using
>>
>> aControls[n]:dValue .... I'm sure this would work.
>>
>> But I would like to know if its possible to do using the macro &.
>>
>> Thanks
>>
>> Chris Gillard
>>
>>
>>
>>
>>
>>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 6:38 pm
por ChrisGillard
Ingo,
Thanks you very much ... works a treat.
This is now my code in 2 lines so I can understand it better.
cString := "oDatePicker" + alltrim( str( n ) )
::&( cString ):dValue := dPeriodEndDate
I will try to make sure I always know where to find this piece of useful
code.
Thank you again.
Chris
"Ingo" <support@mandantwin.com> wrote in message
news:4a3675ef$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> try that:
>
> ::&("oDatePicker"+LTRIM(STR(aC[n]))):dValue := dPeriodEndDate
>
> Regards
>
> Ingo
>
> "Chris Gillard" <chris@bluesquare.co.uk> schrieb im Newsbeitrag
> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Hi,
>>
>> I have 12 TDatePicker Controls on my form.
>>
>> They are names oDatePicker1 to oDatePicker12.
>>
>> I want to set their values in a loop so would like to write something
>> like this ...... can this be done ??
>>
>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>> dPeriodEndDate
>>
>> This results in a GPF Access code 000005.
>>
>> I suspect my problem it is to do with the :: object reference or
>> something ?
>>
>> The nearest I can get is this code that does work and works as expected
>> in the loop
>>
>> &( "logdisplay(" + str( n ) + ")" )
>>
>> My alternative approach would be to add all the oDatePicker controls to
>> an array and access them using
>>
>> aControls[n]:dValue .... I'm sure this would work.
>>
>> But I would like to know if its possible to do using the macro &.
>>
>> Thanks
>>
>> Chris Gillard
>>
>>
>>
>>
>>
>>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 7:16 pm
por ignacio
Chris,
Avoid the use of macros. Use the function __ObjSendMsg
__ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The underscore
is necessary when setting the value.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi,
>
> I have 12 TDatePicker Controls on my form.
>
> They are names oDatePicker1 to oDatePicker12.
>
> I want to set their values in a loop so would like to write something like
> this ...... can this be done ??
>
> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) := dPeriodEndDate
>
> This results in a GPF Access code 000005.
>
> I suspect my problem it is to do with the :: object reference or something
> ?
>
> The nearest I can get is this code that does work and works as expected in
> the loop
>
> &( "logdisplay(" + str( n ) + ")" )
>
> My alternative approach would be to add all the oDatePicker controls to an
> array and access them using
>
> aControls[n]:dValue .... I'm sure this would work.
>
> But I would like to know if its possible to do using the macro &.
>
> Thanks
>
> Chris Gillard
>
>
>
>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 7:16 pm
por ignacio
Chris,
Avoid the use of macros. Use the function __ObjSendMsg
__ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The underscore
is necessary when setting the value.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi,
>
> I have 12 TDatePicker Controls on my form.
>
> They are names oDatePicker1 to oDatePicker12.
>
> I want to set their values in a loop so would like to write something like
> this ...... can this be done ??
>
> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) := dPeriodEndDate
>
> This results in a GPF Access code 000005.
>
> I suspect my problem it is to do with the :: object reference or something
> ?
>
> The nearest I can get is this code that does work and works as expected in
> the loop
>
> &( "logdisplay(" + str( n ) + ")" )
>
> My alternative approach would be to add all the oDatePicker controls to an
> array and access them using
>
> aControls[n]:dValue .... I'm sure this would work.
>
> But I would like to know if its possible to do using the macro &.
>
> Thanks
>
> Chris Gillard
>
>
>
>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 7:31 pm
por ChrisGillard
Ignacio,
Thank you for joining in.
Am happy to avoid macros if I can but in your example can I make the X a
variable in a loop.
That is what I am trying to do.
Please explain with a code sample if it is possible.
Regards
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> Avoid the use of macros. Use the function __ObjSendMsg
>
> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
> underscore is necessary when setting the value.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Hi,
>>
>> I have 12 TDatePicker Controls on my form.
>>
>> They are names oDatePicker1 to oDatePicker12.
>>
>> I want to set their values in a loop so would like to write something
>> like this ...... can this be done ??
>>
>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>> dPeriodEndDate
>>
>> This results in a GPF Access code 000005.
>>
>> I suspect my problem it is to do with the :: object reference or
>> something ?
>>
>> The nearest I can get is this code that does work and works as expected
>> in the loop
>>
>> &( "logdisplay(" + str( n ) + ")" )
>>
>> My alternative approach would be to add all the oDatePicker controls to
>> an array and access them using
>>
>> aControls[n]:dValue .... I'm sure this would work.
>>
>> But I would like to know if its possible to do using the macro &.
>>
>> Thanks
>>
>> Chris Gillard
>>
>>
>>
>>
>>
>>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 7:31 pm
por ChrisGillard
Ignacio,
Thank you for joining in.
Am happy to avoid macros if I can but in your example can I make the X a
variable in a loop.
That is what I am trying to do.
Please explain with a code sample if it is possible.
Regards
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> Avoid the use of macros. Use the function __ObjSendMsg
>
> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
> underscore is necessary when setting the value.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Hi,
>>
>> I have 12 TDatePicker Controls on my form.
>>
>> They are names oDatePicker1 to oDatePicker12.
>>
>> I want to set their values in a loop so would like to write something
>> like this ...... can this be done ??
>>
>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>> dPeriodEndDate
>>
>> This results in a GPF Access code 000005.
>>
>> I suspect my problem it is to do with the :: object reference or
>> something ?
>>
>> The nearest I can get is this code that does work and works as expected
>> in the loop
>>
>> &( "logdisplay(" + str( n ) + ")" )
>>
>> My alternative approach would be to add all the oDatePicker controls to
>> an array and access them using
>>
>> aControls[n]:dValue .... I'm sure this would work.
>>
>> But I would like to know if its possible to do using the macro &.
>>
>> Thanks
>>
>> Chris Gillard
>>
>>
>>
>>
>>
>>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 8:01 pm
por ignacio
Chris,
For example:
FOR EACH oControl IN ::oForm1:aControls
IF oControl:IsKindOff( "TDatePicker" )
__ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
ENDIF
NEXT
OR:
aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
FOR EACH oControl IN aControls
__ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
NEXT
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Ignacio,
>
> Thank you for joining in.
>
> Am happy to avoid macros if I can but in your example can I make the X a
> variable in a loop.
>
> That is what I am trying to do.
>
> Please explain with a code sample if it is possible.
>
> Regards
>
> Chris
>
> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
> news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Chris,
>>
>> Avoid the use of macros. Use the function __ObjSendMsg
>>
>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>> underscore is necessary when setting the value.
>>
>> Regards,
>>
>> --
>> Ignacio Ortiz de Zúñiga
>> Xailer support / Soporte de Xailer
>> http://www.xailer.com
>> http://www.xailer.info
>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>> Hi,
>>>
>>> I have 12 TDatePicker Controls on my form.
>>>
>>> They are names oDatePicker1 to oDatePicker12.
>>>
>>> I want to set their values in a loop so would like to write something
>>> like this ...... can this be done ??
>>>
>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>> dPeriodEndDate
>>>
>>> This results in a GPF Access code 000005.
>>>
>>> I suspect my problem it is to do with the :: object reference or
>>> something ?
>>>
>>> The nearest I can get is this code that does work and works as expected
>>> in the loop
>>>
>>> &( "logdisplay(" + str( n ) + ")" )
>>>
>>> My alternative approach would be to add all the oDatePicker controls to
>>> an array and access them using
>>>
>>> aControls[n]:dValue .... I'm sure this would work.
>>>
>>> But I would like to know if its possible to do using the macro &.
>>>
>>> Thanks
>>>
>>> Chris Gillard
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 8:01 pm
por ignacio
Chris,
For example:
FOR EACH oControl IN ::oForm1:aControls
IF oControl:IsKindOff( "TDatePicker" )
__ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
ENDIF
NEXT
OR:
aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
FOR EACH oControl IN aControls
__ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
NEXT
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Ignacio,
>
> Thank you for joining in.
>
> Am happy to avoid macros if I can but in your example can I make the X a
> variable in a loop.
>
> That is what I am trying to do.
>
> Please explain with a code sample if it is possible.
>
> Regards
>
> Chris
>
> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
> news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Chris,
>>
>> Avoid the use of macros. Use the function __ObjSendMsg
>>
>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>> underscore is necessary when setting the value.
>>
>> Regards,
>>
>> --
>> Ignacio Ortiz de Zúñiga
>> Xailer support / Soporte de Xailer
>> http://www.xailer.com
>> http://www.xailer.info
>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>> Hi,
>>>
>>> I have 12 TDatePicker Controls on my form.
>>>
>>> They are names oDatePicker1 to oDatePicker12.
>>>
>>> I want to set their values in a loop so would like to write something
>>> like this ...... can this be done ??
>>>
>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>> dPeriodEndDate
>>>
>>> This results in a GPF Access code 000005.
>>>
>>> I suspect my problem it is to do with the :: object reference or
>>> something ?
>>>
>>> The nearest I can get is this code that does work and works as expected
>>> in the loop
>>>
>>> &( "logdisplay(" + str( n ) + ")" )
>>>
>>> My alternative approach would be to add all the oDatePicker controls to
>>> an array and access them using
>>>
>>> aControls[n]:dValue .... I'm sure this would work.
>>>
>>> But I would like to know if its possible to do using the macro &.
>>>
>>> Thanks
>>>
>>> Chris Gillard
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 9:15 pm
por ChrisGillard
Ignacio,
Ok, I get the idea.
Thanks for your help on this.
Oh .... will we ever get a DatePicker control in a Browse Cell ... would be
really useful. We had these 10 years ago in Delphi Woll2Woll library.
Keep up the great work.
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:[email=4a368c72@svctag-j7w3v3j....]4a368c72@svctag-j7w3v3j....[/email]
> Chris,
>
> For example:
>
> FOR EACH oControl IN ::oForm1:aControls
> IF oControl:IsKindOff( "TDatePicker" )
> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
> ENDIF
> NEXT
>
> OR:
>
> aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
>
> FOR EACH oControl IN aControls
> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
> NEXT
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Ignacio,
>>
>> Thank you for joining in.
>>
>> Am happy to avoid macros if I can but in your example can I make the X a
>> variable in a loop.
>>
>> That is what I am trying to do.
>>
>> Please explain with a code sample if it is possible.
>>
>> Regards
>>
>> Chris
>>
>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
>> news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>> Chris,
>>>
>>> Avoid the use of macros. Use the function __ObjSendMsg
>>>
>>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>>> underscore is necessary when setting the value.
>>>
>>> Regards,
>>>
>>> --
>>> Ignacio Ortiz de Zúñiga
>>> Xailer support / Soporte de Xailer
>>> http://www.xailer.com
>>> http://www.xailer.info
>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>> Hi,
>>>>
>>>> I have 12 TDatePicker Controls on my form.
>>>>
>>>> They are names oDatePicker1 to oDatePicker12.
>>>>
>>>> I want to set their values in a loop so would like to write something
>>>> like this ...... can this be done ??
>>>>
>>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>>> dPeriodEndDate
>>>>
>>>> This results in a GPF Access code 000005.
>>>>
>>>> I suspect my problem it is to do with the :: object reference or
>>>> something ?
>>>>
>>>> The nearest I can get is this code that does work and works as expected
>>>> in the loop
>>>>
>>>> &( "logdisplay(" + str( n ) + ")" )
>>>>
>>>> My alternative approach would be to add all the oDatePicker controls to
>>>> an array and access them using
>>>>
>>>> aControls[n]:dValue .... I'm sure this would work.
>>>>
>>>> But I would like to know if its possible to do using the macro &.
>>>>
>>>> Thanks
>>>>
>>>> Chris Gillard
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Lun Jun 15, 2009 9:15 pm
por ChrisGillard
Ignacio,
Ok, I get the idea.
Thanks for your help on this.
Oh .... will we ever get a DatePicker control in a Browse Cell ... would be
really useful. We had these 10 years ago in Delphi Woll2Woll library.
Keep up the great work.
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:[email=4a368c72@svctag-j7w3v3j....]4a368c72@svctag-j7w3v3j....[/email]
> Chris,
>
> For example:
>
> FOR EACH oControl IN ::oForm1:aControls
> IF oControl:IsKindOff( "TDatePicker" )
> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
> ENDIF
> NEXT
>
> OR:
>
> aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
>
> FOR EACH oControl IN aControls
> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
> NEXT
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Ignacio,
>>
>> Thank you for joining in.
>>
>> Am happy to avoid macros if I can but in your example can I make the X a
>> variable in a loop.
>>
>> That is what I am trying to do.
>>
>> Please explain with a code sample if it is possible.
>>
>> Regards
>>
>> Chris
>>
>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
>> news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>> Chris,
>>>
>>> Avoid the use of macros. Use the function __ObjSendMsg
>>>
>>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>>> underscore is necessary when setting the value.
>>>
>>> Regards,
>>>
>>> --
>>> Ignacio Ortiz de Zúñiga
>>> Xailer support / Soporte de Xailer
>>> http://www.xailer.com
>>> http://www.xailer.info
>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>> Hi,
>>>>
>>>> I have 12 TDatePicker Controls on my form.
>>>>
>>>> They are names oDatePicker1 to oDatePicker12.
>>>>
>>>> I want to set their values in a loop so would like to write something
>>>> like this ...... can this be done ??
>>>>
>>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>>> dPeriodEndDate
>>>>
>>>> This results in a GPF Access code 000005.
>>>>
>>>> I suspect my problem it is to do with the :: object reference or
>>>> something ?
>>>>
>>>> The nearest I can get is this code that does work and works as expected
>>>> in the loop
>>>>
>>>> &( "logdisplay(" + str( n ) + ")" )
>>>>
>>>> My alternative approach would be to add all the oDatePicker controls to
>>>> an array and access them using
>>>>
>>>> aControls[n]:dValue .... I'm sure this would work.
>>>>
>>>> But I would like to know if its possible to do using the macro &.
>>>>
>>>> Thanks
>>>>
>>>> Chris Gillard
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Mar Jun 16, 2009 4:49 pm
por ignacio
Chris,
Is already on my TODO list, but no time frame for it. Sorry.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:4a369dba$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Ignacio,
>
> Ok, I get the idea.
>
> Thanks for your help on this.
>
> Oh .... will we ever get a DatePicker control in a Browse Cell ... would
> be really useful. We had these 10 years ago in Delphi Woll2Woll library.
>
> Keep up the great work.
>
> Chris
>
> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
> news:[email=4a368c72@svctag-j7w3v3j....]4a368c72@svctag-j7w3v3j....[/email]
>> Chris,
>>
>> For example:
>>
>> FOR EACH oControl IN ::oForm1:aControls
>> IF oControl:IsKindOff( "TDatePicker" )
>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>> ENDIF
>> NEXT
>>
>> OR:
>>
>> aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
>>
>> FOR EACH oControl IN aControls
>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>> NEXT
>>
>> Regards,
>>
>> --
>> Ignacio Ortiz de Zúñiga
>> Xailer support / Soporte de Xailer
>> http://www.xailer.com
>> http://www.xailer.info
>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>> news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>> Ignacio,
>>>
>>> Thank you for joining in.
>>>
>>> Am happy to avoid macros if I can but in your example can I make the X a
>>> variable in a loop.
>>>
>>> That is what I am trying to do.
>>>
>>> Please explain with a code sample if it is possible.
>>>
>>> Regards
>>>
>>> Chris
>>>
>>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in
>>> message news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>> Chris,
>>>>
>>>> Avoid the use of macros. Use the function __ObjSendMsg
>>>>
>>>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>>>> underscore is necessary when setting the value.
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Ignacio Ortiz de Zúñiga
>>>> Xailer support / Soporte de Xailer
>>>> http://www.xailer.com
>>>> http://www.xailer.info
>>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>>> Hi,
>>>>>
>>>>> I have 12 TDatePicker Controls on my form.
>>>>>
>>>>> They are names oDatePicker1 to oDatePicker12.
>>>>>
>>>>> I want to set their values in a loop so would like to write something
>>>>> like this ...... can this be done ??
>>>>>
>>>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>>>> dPeriodEndDate
>>>>>
>>>>> This results in a GPF Access code 000005.
>>>>>
>>>>> I suspect my problem it is to do with the :: object reference or
>>>>> something ?
>>>>>
>>>>> The nearest I can get is this code that does work and works as
>>>>> expected in the loop
>>>>>
>>>>> &( "logdisplay(" + str( n ) + ")" )
>>>>>
>>>>> My alternative approach would be to add all the oDatePicker controls
>>>>> to an array and access them using
>>>>>
>>>>> aControls[n]:dValue .... I'm sure this would work.
>>>>>
>>>>> But I would like to know if its possible to do using the macro &.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Chris Gillard
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Mar Jun 16, 2009 4:49 pm
por ignacio
Chris,
Is already on my TODO list, but no time frame for it. Sorry.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:4a369dba$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Ignacio,
>
> Ok, I get the idea.
>
> Thanks for your help on this.
>
> Oh .... will we ever get a DatePicker control in a Browse Cell ... would
> be really useful. We had these 10 years ago in Delphi Woll2Woll library.
>
> Keep up the great work.
>
> Chris
>
> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
> news:[email=4a368c72@svctag-j7w3v3j....]4a368c72@svctag-j7w3v3j....[/email]
>> Chris,
>>
>> For example:
>>
>> FOR EACH oControl IN ::oForm1:aControls
>> IF oControl:IsKindOff( "TDatePicker" )
>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>> ENDIF
>> NEXT
>>
>> OR:
>>
>> aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
>>
>> FOR EACH oControl IN aControls
>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>> NEXT
>>
>> Regards,
>>
>> --
>> Ignacio Ortiz de Zúñiga
>> Xailer support / Soporte de Xailer
>> http://www.xailer.com
>> http://www.xailer.info
>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>> news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>> Ignacio,
>>>
>>> Thank you for joining in.
>>>
>>> Am happy to avoid macros if I can but in your example can I make the X a
>>> variable in a loop.
>>>
>>> That is what I am trying to do.
>>>
>>> Please explain with a code sample if it is possible.
>>>
>>> Regards
>>>
>>> Chris
>>>
>>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in
>>> message news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>> Chris,
>>>>
>>>> Avoid the use of macros. Use the function __ObjSendMsg
>>>>
>>>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>>>> underscore is necessary when setting the value.
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Ignacio Ortiz de Zúñiga
>>>> Xailer support / Soporte de Xailer
>>>> http://www.xailer.com
>>>> http://www.xailer.info
>>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>>> Hi,
>>>>>
>>>>> I have 12 TDatePicker Controls on my form.
>>>>>
>>>>> They are names oDatePicker1 to oDatePicker12.
>>>>>
>>>>> I want to set their values in a loop so would like to write something
>>>>> like this ...... can this be done ??
>>>>>
>>>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>>>> dPeriodEndDate
>>>>>
>>>>> This results in a GPF Access code 000005.
>>>>>
>>>>> I suspect my problem it is to do with the :: object reference or
>>>>> something ?
>>>>>
>>>>> The nearest I can get is this code that does work and works as
>>>>> expected in the loop
>>>>>
>>>>> &( "logdisplay(" + str( n ) + ")" )
>>>>>
>>>>> My alternative approach would be to add all the oDatePicker controls
>>>>> to an array and access them using
>>>>>
>>>>> aControls[n]:dValue .... I'm sure this would work.
>>>>>
>>>>> But I would like to know if its possible to do using the macro &.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Chris Gillard
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Mié Jun 17, 2009 7:39 am
por ChrisGillard
Ok, sounds good.
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:4a37b0ea$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> Is already on my TODO list, but no time frame for it. Sorry.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:4a369dba$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Ignacio,
>>
>> Ok, I get the idea.
>>
>> Thanks for your help on this.
>>
>> Oh .... will we ever get a DatePicker control in a Browse Cell ... would
>> be really useful. We had these 10 years ago in Delphi Woll2Woll library.
>>
>> Keep up the great work.
>>
>> Chris
>>
>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
>> news:[email=4a368c72@svctag-j7w3v3j....]4a368c72@svctag-j7w3v3j....[/email]
>>> Chris,
>>>
>>> For example:
>>>
>>> FOR EACH oControl IN ::oForm1:aControls
>>> IF oControl:IsKindOff( "TDatePicker" )
>>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>>> ENDIF
>>> NEXT
>>>
>>> OR:
>>>
>>> aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
>>>
>>> FOR EACH oControl IN aControls
>>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>>> NEXT
>>>
>>> Regards,
>>>
>>> --
>>> Ignacio Ortiz de Zúñiga
>>> Xailer support / Soporte de Xailer
>>> http://www.xailer.com
>>> http://www.xailer.info
>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>> news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>> Ignacio,
>>>>
>>>> Thank you for joining in.
>>>>
>>>> Am happy to avoid macros if I can but in your example can I make the X
>>>> a variable in a loop.
>>>>
>>>> That is what I am trying to do.
>>>>
>>>> Please explain with a code sample if it is possible.
>>>>
>>>> Regards
>>>>
>>>> Chris
>>>>
>>>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in
>>>> message news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>>> Chris,
>>>>>
>>>>> Avoid the use of macros. Use the function __ObjSendMsg
>>>>>
>>>>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>>>>> underscore is necessary when setting the value.
>>>>>
>>>>> Regards,
>>>>>
>>>>> --
>>>>> Ignacio Ortiz de Zúñiga
>>>>> Xailer support / Soporte de Xailer
>>>>> http://www.xailer.com
>>>>> http://www.xailer.info
>>>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>>>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>>>> Hi,
>>>>>>
>>>>>> I have 12 TDatePicker Controls on my form.
>>>>>>
>>>>>> They are names oDatePicker1 to oDatePicker12.
>>>>>>
>>>>>> I want to set their values in a loop so would like to write something
>>>>>> like this ...... can this be done ??
>>>>>>
>>>>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>>>>> dPeriodEndDate
>>>>>>
>>>>>> This results in a GPF Access code 000005.
>>>>>>
>>>>>> I suspect my problem it is to do with the :: object reference or
>>>>>> something ?
>>>>>>
>>>>>> The nearest I can get is this code that does work and works as
>>>>>> expected in the loop
>>>>>>
>>>>>> &( "logdisplay(" + str( n ) + ")" )
>>>>>>
>>>>>> My alternative approach would be to add all the oDatePicker controls
>>>>>> to an array and access them using
>>>>>>
>>>>>> aControls[n]:dValue .... I'm sure this would work.
>>>>>>
>>>>>> But I would like to know if its possible to do using the macro &.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Chris Gillard
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Access control properties at runtime using macro ?? Expert needed!

Publicado: Mié Jun 17, 2009 7:39 am
por ChrisGillard
Ok, sounds good.
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:4a37b0ea$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> Is already on my TODO list, but no time frame for it. Sorry.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:4a369dba$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Ignacio,
>>
>> Ok, I get the idea.
>>
>> Thanks for your help on this.
>>
>> Oh .... will we ever get a DatePicker control in a Browse Cell ... would
>> be really useful. We had these 10 years ago in Delphi Woll2Woll library.
>>
>> Keep up the great work.
>>
>> Chris
>>
>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
>> news:[email=4a368c72@svctag-j7w3v3j....]4a368c72@svctag-j7w3v3j....[/email]
>>> Chris,
>>>
>>> For example:
>>>
>>> FOR EACH oControl IN ::oForm1:aControls
>>> IF oControl:IsKindOff( "TDatePicker" )
>>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>>> ENDIF
>>> NEXT
>>>
>>> OR:
>>>
>>> aControls := { oDatePicker1, oTDatePicker2, ..., oTDatePicker9 }
>>>
>>> FOR EACH oControl IN aControls
>>> __ObjSendMsg( oControl, "_dValue", dPeriodEndDate )
>>> NEXT
>>>
>>> Regards,
>>>
>>> --
>>> Ignacio Ortiz de Zúñiga
>>> Xailer support / Soporte de Xailer
>>> http://www.xailer.com
>>> http://www.xailer.info
>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>> news:4a368565$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>> Ignacio,
>>>>
>>>> Thank you for joining in.
>>>>
>>>> Am happy to avoid macros if I can but in your example can I make the X
>>>> a variable in a loop.
>>>>
>>>> That is what I am trying to do.
>>>>
>>>> Please explain with a code sample if it is possible.
>>>>
>>>> Regards
>>>>
>>>> Chris
>>>>
>>>> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in
>>>> message news:4a3681e9$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>>> Chris,
>>>>>
>>>>> Avoid the use of macros. Use the function __ObjSendMsg
>>>>>
>>>>> __ObjSendMsg( ::oDatePickerX, "_dValue", dPeriodEndDate ) // The
>>>>> underscore is necessary when setting the value.
>>>>>
>>>>> Regards,
>>>>>
>>>>> --
>>>>> Ignacio Ortiz de Zúñiga
>>>>> Xailer support / Soporte de Xailer
>>>>> http://www.xailer.com
>>>>> http://www.xailer.info
>>>>> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
>>>>> news:4a366d2e$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>>>>> Hi,
>>>>>>
>>>>>> I have 12 TDatePicker Controls on my form.
>>>>>>
>>>>>> They are names oDatePicker1 to oDatePicker12.
>>>>>>
>>>>>> I want to set their values in a loop so would like to write something
>>>>>> like this ...... can this be done ??
>>>>>>
>>>>>> &( "::oDatePicker" + alltrim( str( n ) ) + ":dValue" ) :=
>>>>>> dPeriodEndDate
>>>>>>
>>>>>> This results in a GPF Access code 000005.
>>>>>>
>>>>>> I suspect my problem it is to do with the :: object reference or
>>>>>> something ?
>>>>>>
>>>>>> The nearest I can get is this code that does work and works as
>>>>>> expected in the loop
>>>>>>
>>>>>> &( "logdisplay(" + str( n ) + ")" )
>>>>>>
>>>>>> My alternative approach would be to add all the oDatePicker controls
>>>>>> to an array and access them using
>>>>>>
>>>>>> aControls[n]:dValue .... I'm sure this would work.
>>>>>>
>>>>>> But I would like to know if its possible to do using the macro &.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Chris Gillard
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>