Consistency of "Cancel" parameter in events |
Post Reply |
Author | ||
Carlos Rocha
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 92 |
Post Options
Thanks(0)
Posted: 16 March 2011 at 12:40pm |
|
Hi,
In some CJ events there is a parameter, usualy called "Cancel", that allow us to cancel a operation. This parameter is, in the majority of the cases, a boolean, but in some cases is a "Variant". When it happens the operation is never canceled when I change the parameter value to TRUE, and I need to wrap the control in VB6 to change the parameter type to boolean. I believe that there isn't a real reason to define the "Cancel" parameter as a Variant, and it's just a programmer decision at the moment. There are only a few cases in just a few CJ Controls (KeyBindings, TabControl, TabToolbar, PropertyGrid, ReportControl and TrackControl). In all other cases the parameter is properly defined as a boolean. As I don't think I'm the only one (potentially) having problems with this, do you think it's possible to change it in the future? Thank you
|
||
SuitePro 20.3.0
OS: Windows 10 Language: Visual Objects 2.8 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Never tried Visual Objects, but maybe you need something Cancel = VARIANT_TRUE or something like that ?
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Carlos Rocha
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 92 |
Post Options
Thanks(0)
|
|
Thanks for replying so fast
Yes, I'm sure the problem is in Visual Objects side as it doesn't support the VB variant type, but it's more or less common with non MS languages, I believe. Still, unless there's a reason to not do so, it seems logical that the Cancel parameter should be always a boolean for product consistency, efficiency and performance.
|
||
SuitePro 20.3.0
OS: Windows 10 Language: Visual Objects 2.8 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
still please try VARIANT_TRUE or ((VARIANT_BOOL)0xffff)
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Carlos Rocha
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 92 |
Post Options
Thanks(0)
|
|
I don't have that, but I will investigate. Thanks
|
||
SuitePro 20.3.0
OS: Windows 10 Language: Visual Objects 2.8 |
||
Carlos Rocha
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 92 |
Post Options
Thanks(0)
|
|
It doesn't work. Besides, nothing works. Visual Objects transforms the parameter in an internal type, named USUAL, with half the struct VARIANT size. I can't even cast it. I was able to create a Variant in my side and assign 0xfff to it, but I can't replace the parameter with it Maybe someday you'll define those Cancel as boolean |
||
SuitePro 20.3.0
OS: Windows 10 Language: Visual Objects 2.8 |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |