I ended up writing a method to obtain values from CustomActionData instances:

 private static string getCustomActionDataValue(CustomActionData
customActionData, string key)
        {
            try
            {
                return customActionData[key];
            }
            catch
            {
                return String.Empty;
            }
        }

So that when I want to do something based on whether key in customActionData
is populated or not I can just say

if (getCustomActionDataValue(customActionData, "key") != "") { doSomething;
}

I modeled this after how session["nonExistentKey"] works.  Is there a reason
why customActionData["nonExistentKey"] doesn't work this way (instead it
throws an exception)?
-- 
View this message in context: 
http://n2.nabble.com/Expected-behavior-of-customActionData-%22nonExistentKey%22--tp2188585p2188585.html
Sent from the wix-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to