Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-06-2009, 12:14 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
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?
Reply With Quote
  #2  
Old 10-06-2009, 12:33 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
  #3  
Old 10-06-2009, 01:22 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
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.
Reply With Quote
  #4  
Old 10-06-2009, 01:30 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
  #5  
Old 10-06-2009, 01:57 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
See attached file.
Attached Files
File Type: zip versioninfo.zip (80.7 KB, 1827 views)
Reply With Quote
  #6  
Old 10-06-2009, 03:46 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Add

, VariantType.Integer

to the ExpProperty call.

http://www.kinook.com/VisBuildPro/Ma...xpproperty.htm
Reply With Quote
  #7  
Old 10-07-2009, 07:47 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
That did the trick!!! Thanks for the quick response!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:30 PM.


Copyright © 1999-2023 Kinook Software, Inc.