Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Custom Actions (https://www.kinook.com/Forum/showthread.php?t=4199)

HippyCraig 10-06-2009 12:14 PM

Custom Actions
 
I created a custom action that calls a .net DLL. I want to pass in a name of a Macro and what type it is. I created two properties one for the MacroName and the other for the MacroType.

The MacroType Property is a Radio Button with a List Data = "Temporary; Project; Global". I can pass in the value to my action only if its not the first option. If Project or Global is selected a value of 1 or 2 is passed in. If Temporary is selected a null value is passed in.

I checked the build script if I select the first value "Temporary" then nothing is stored in the script file. This occurs even if I make the defualt value for that property a value of 2. It still doenst conatin any data in the DLL or the script file.

I would have expected a value of 0 (zero) to be passed in. Am I doing something wrong?

kinook 10-06-2009 12:33 PM

The default value refers to what the field will default to when a new step of that action type is displayed in the GUI (and stored in the .bld file if the default is used).
http://www.kinook.com/VisBuildPro/Ma...propguitab.htm

For radio and combo property types, a value of 0 (the first item in the list/radio) is not stored in the .bld file and it will default to 0 when retrieved.

HippyCraig 10-06-2009 01:22 PM

If the default is 0 then when my DLL is called a value of null is passed in. If in the property window of the custom action I set the default to another value other then 0 then if the first value is selected then the approprate value is passed in.

Also the value is now stored in the script file itself.

kinook 10-06-2009 01:30 PM

Are you using Step.ExpProperty to retrieve the value in the custom action (see the NETAction or VBNETAction sample)?
http://www.kinook.com/VisBuildPro/Ma...rdefaction.htm

Please send a reproducible test case.
http://www.kinook.com/Forum/showthre...?threadid=3044

Thanks.

HippyCraig 10-06-2009 01:57 PM

1 Attachment(s)
See attached file.

kinook 10-06-2009 03:46 PM

Add

, VariantType.Integer

to the ExpProperty call.

http://www.kinook.com/VisBuildPro/Ma...xpproperty.htm

HippyCraig 10-07-2009 07:47 AM

That did the trick!!! Thanks for the quick response!!


All times are GMT -5. The time now is 09:31 AM.


Copyright © 1999-2023 Kinook Software, Inc.