Print Page | Close Window

Consistency of "Cancel" parameter in events

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=18063
Printed Date: 29 April 2024 at 7:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Consistency of "Cancel" parameter in events
Posted By: Carlos Rocha
Subject: Consistency of "Cancel" parameter in events
Date 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. Ermm

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



Replies:
Posted By: Oleg
Date Posted: 17 March 2011 at 2:20am
Never tried Visual Objects, but maybe you need something Cancel = VARIANT_TRUE or something like that ?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Carlos Rocha
Date Posted: 17 March 2011 at 6:56am
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


Posted By: Oleg
Date Posted: 17 March 2011 at 8:30am
still please try VARIANT_TRUE or ((VARIANT_BOOL)0xffff)

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Carlos Rocha
Date Posted: 17 March 2011 at 2:56pm
Originally posted by oleg oleg wrote:

still please try VARIANT_TRUE or ((VARIANT_BOOL)0xffff)

I don't have that, but I will investigate.

Thanks


-------------
SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8


Posted By: Carlos Rocha
Date Posted: 19 March 2011 at 10:52pm
Originally posted by Carlos Rocha Carlos Rocha wrote:

Originally posted by oleg oleg wrote:

still please try VARIANT_TRUE or ((VARIANT_BOOL)0xffff)

I don't have that, but I will investigate.

Thanks

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 Ouch

Maybe someday you'll define those Cancel as boolean Approve



-------------
SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net