Would someone kindly help me understand this property. Below is their explanation:
<ig:TextColumn.FilterColumnSettings>
<ig:FilterColumnSettings FilterMenuFormatString="{}{Regex}"/>
</ig:TextColumn.FilterColumnSettings>
When you are applying the format through XAML and using special symbols in it you should escape it with {}.
I don't understand how to translate this to a pattern and replace. I'd like to replace the first underscore in the string with a double underscore (trying to defeat the RecognizesAccessKey behavior of the checkbox, without creating a new control template).
The FilterMenuFormatString allows you to apply a FormatString to the values displayed in the filter list similar to what the String.Format method does.
Note that the behavior that you are trying to workaround will be addressed in the Next NetAdvantage for WPF/Silverlight service release which is currently scheduled for April 5th according to the release schedule.
If you need to workaround the behavior before then you can use the workaround suggested on the Infragistics forums to set the RecognizesAccessKey of the ContentPresenter to false in the default templates.
Related
The following 'Auto Correct' issue occurs when typing e.g. std::cout <<.
After typing std::cout and a space this automatically gets corrected to std::count, which is the best match in the list.
I cannot find any setting to disable this 'feature'.
Update: Researching further, I find
Text Editor->C/C++->Advanced->Intellisense->Member List Filter Mode is the relevant setting. Default is "Fuzzy" and this makes count a match for cout. Setting to "Smart" removes this match.
Still I wonder why pressing Space "commits the member list". There are settings for chars which commit, but Space is not mentioned. I would be fine with Tab, but if I just type things (with spaces) I don't want any messing about.
I like the "fuzzy" matching in principle to get an overview, but I hate the auto-commit.
The relevant setting is this one found in Tools->Options->Text Editor->C/C++->Advanced->Intellisense
very aptly named - as per usual! The funny part is that the 'Aggressive Member List' is way less aggressive wrt. auto-correcting
Setting this to True leads to the desired effect:
Only Tab 'commits', i.e. inserts the (possibly inadvertently) selected member. Typing is not affected otherwise!
link of interest: https://developercommunity.visualstudio.com/idea/415157/not-possible-to-disable-c-autocomplete.html
I am trying to install one from two features based on the value that should be set inside of the custom action.
Firstly, I set the value of a property:
UINT __stdcall ConfigurationCheckAction(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_INSTALL_FAILURE;
hr = WcaInitialize(hInstall, "ConfigurationCheckAction");
if (condition) {
MsiSetProperty( hInstall, TEXT("STREAM"), TEXT("RED") );
}
else {
MsiSetProperty( hInstall, TEXT("STREAM"), TEXT("BLUE") );
}
return WcaFinalize(er);
}
Secondly, I make two conditions per two features:
<Feature Id='Complete' Level='1'>
<Feature Id="Red" ConfigurableDirectory="TARGETDIR" Title="F1" Level="0">
<Condition Level="1">STREAM</Condition>
</Feature>
<Feature Id="Blue" ConfigurableDirectory="TARGETDIR" Title="F2" Level="0">
<Condition Level="1">NOT STREAM</Condition>
</Feature>
</Feature>
Note that I don't define property inside of the wxs file previously, as I would like to set it from the custom action.
My custom action is called before InstallInitialize and Execute is immediate.
From the installation log I have confirmation that the property is set.
However, my conditional installation does not work, as it seems like what is in the condition is always evaluated as false.
I tried evaluating conditions:
STREAM, STREAM=RED, STREAM="RED", < ![CDATA[STREAM=RED]]>
I am running out of ideas what to do and would appreciate help.
Too late to test all of this, but here goes with some information. I will check back tomorrow. Essentially I think the problem is your custom action sequencing. Try before Costing.
Some things to consider:
Custom action sequencing: you need to sequence your custom action right and it needs to be present in both silent and interactive installation modes.
Did you try to sequence the set property custom action before CostInitialize? You state you set it before InstallInitialize, but try it before CostInitialize instead (you might have tried).
And did you remember to insert this custom action in the InstallUISequence as well as the InstallExecuteSequence? You need to insert in both sequences in case the setup runs in silent mode. Before CostInitialize in both sequences I believe.
Feature Level: manipulating features via the feature level and INSTALLLEVEL is just one way to do feature control, you can also set features via the command line or using a custom action.
Setting a feature level to 0 should hide the feature from view in the setup's custom dialog.
Setting a feature level higher than the setup's INSTALLLEVEL will deselect the feature from installation.
And the other way around setting a feature level lower or equal to the setup's INSTALLLEVEL will select the feature for installation.
The conditional syntax allowed is quite flexible, and could provide the functionality you need outright - but I have never used them properly. Here is an example from the Installshield forum.
ADDLOCAL & REMOVE: you can manipulate the feature selection by changing the values of the ADDLOCAL and REMOVE properties from a custom action (technically also REINSTALL and ADVERTISE) - and these properties can be set via the command line as well.
Win32: you can also use the Win32 functions MsiGetFeatureState and MsiSetFeatureState - from a C++ custom action - to set feature selection.
Frankly it is a bit mad the whole thing. Also keep in mind that there are feature action states (what is going to happen to a feature) and feature installed states (what state it is in). The Win32 function documentation should explain.
Cross-linking for easy retrieval:
Unselected Feature Being Installed
I have done something similar, but we ended up controlling this at a component level(adding the condition to the <Component/> elements instead of the feature element using a transform during heat). But our condition utilizes CDATA while also using double quotes for the value, which you don't list in what you've tried. So first I'd try the following conditions in your features:
<Condition><![CDATA[STREAM="RED"]]></Condition>
<Condition><![CDATA[STREAM="BLUE"]]></Condition>
If that still does not work, I would try the following:
Add the STREAM property with a default value to your WiX. Then test it with that default value to see if having the default value set to begin with makes it work. That could mean you need to set the property sooner, possibly off a UI event. <Property Id="STREAM" Value="RED"/>
As a last resort, you could add the conditions to each component as I did, but we only did that for very specific reasons, hopefully you can get the conditional feature to work with the above suggestions!
I hope the above fixes your problem, or at least leads you to the answer!
Thank you for your replies. In the end, a combination of your suggestions helped me.
I want to state what did and what did not work:
Adding property to WiX with a default value was not necessary (as well with adding property of this property Secure='yes')
Calling custom action before CostInitialize did not solve the problem on its own, but I believe it was one of the factors that resolved an issue.
Conditional sintax was corrected by:
a) Putting condition inside of CDATA and adding quotes to the value of property as suggested: <Condition><![CDATA[STREAM="RED"]]></Condition>
b) Reversing condition levels so feature has condition level 1 and condition has level 0. This means that feature is always installed, unless the condition expression is false.
Concerning the correct order of the custom actions, the description of the custom action type 51 contains the decisive hint:
"To affect a property used in a condition on a component or feature, the custom action must come before the CostFinalize action in the action sequence."
I have adopted the CFScript syntax for most of the work with ColdFusion now, since with the new version of ColdFusion v11(codenamed Splender), almost all the short-comings of the script style syntax has been given serious thoughts. Thought suprisingly, I came across a requirement where I needed to iterate throught the list with variable delimiter. So I choose the list.each function in CF11 and not any other option would do since I also need the current index value along the way as well.
list.each(function(element,index,list){
writeOutput("#index#:#element#;");
}, ";")
The problem is that this function surprisingly does not seem to support a custom delimiter.
To save the time, I would like to mention that I already tried the for (element in...) with a count variable for my needs.
var idx=1;
for (element in "a,b,c,d,e"){
writeOutput(element);
LOCAL.idx++;
}
But I would appreciate some help with the original list.each function in CF11, is it even possible somehow to implement? or is it what I think a shortcoming.
I'm not using CF11, but i would point you to this bug report, which seems to say the HF3 does exactly what you want.
If that doesn't work, or in the meantime, you could convert it to an array and use ArrayEach().
The National Weather Service (NWS) embeds machine readable components in its text bulletins and syndicated format feeds, called Valid Time Event Code (VTEC).
More information on VTEC http://www.nws.noaa.gov/os/vtec/
Example of Text Bulletins: http://www.nws.noaa.gov/view/national.php?prodtype=allwarnings
I am developing a parser to interpret a sequence of VTECs embedded within an NWS bulletin and have a regular expression to capture the logic, that I am happy to share, see below, but not 100% sure if I am doing this right.
Specifically,
1. Is there any specification on how many VTECs may be embedded in any one NWS message (or its update)? Usually seeing just one, but if there are multiple, what is the hierarchy, if any - does the last one cancel the previous? Or, do all the VTECs have the same weight?
2. If a Hydrological or H-VTEC is issued, is it always immediately following a P-VTEC?
3. Is there a "parent-child" relationship, in the XML document sense, between an H-VTEC element and P-VTEC element?
4. Can the VTEC be used as a unique identifier for a message or its update? If not, what would be the "primary key" in the database sense? Could perhaps a hash of the VTEC along with bulletin update date be used? Or is any other combination of fields recommended?
The following regular expression is able to pick up the VTEC, assuming any number of P-VTECs may be released and if there is an H-VTEC it will always be preceded by a "parent" P-VTEC.
[/][OTEX][.](NEW|CON|EXT|EXA|EXB|UPG|CAN|EXP|COR|ROU)[.][\w]{4}[.][A-Z][A-Z][.][WAYSFON][.][0-9]{4}[.][0-9]{6}[T][0-9]{4}[Z][-][0-9]{6}[T][0-9]{4}[Z][/]([^/]*[/][\w]{5}[.][[N0-3U]][.][A-Z][A-Z][.][0-9]{6}[T][0-9]{4}[Z][.][0-9]{6}[T][0-9]{4}[Z][.][0-9]{6}[T][0-9]{4}[Z][.](NO|NR|UU|OO)[/])?
The VTEC is described in more detail at: http://www.nws.noaa.gov/directives/sym/pd01017003curr.pdf
In case the link expires, this may be found also by drilling down as follows:
NWS directives. http://www.nws.noaa.gov/directives/
(Click on) Operations and Services.
(Scroll Down) Dissemination.
After reading the document, answers to #2 and #3 are a resounding YES. H-VTEC will always be supplemental to an immediately preceding P-VTEC. Regarding #1, multiple P-VTECs are possible and the logic is probably more complex than regex can weed out. Regarding #4, the answer is almost certainly NO, mainly because VTEC could be missing in an NWS bulletin, so does not classify as a primary key.
So the regex needed to parse out a VTEC string, thanks to Suamere, is most likely:
/[OTEX]\.(NEW|CON|EXT|EXA|EXB|UPG|CAN|EXP|COR|ROU)\.\w{4}\.[A-Z]{2}\.[WAYSFON]\.\d{4}\.\d{6}T\d{4}Z-\d{6}T\d{4}Z/([^/]*/\w{5}\.[N0-3U]\.[A-Z]{2}\.\d{6}T\d{4}Z\.\d{6}T\d{4}Z\.\d{6}T\d{4}Z\.(NO|NR|UU|OO)/)?
I have a continuous form in access 2003 on which i need to perform validation using regular expressions in textboxes. I want to call the validation using a button click. I want to use constracts similar to conditional formatting in vba for regular expresions on th textboxes used on th form.
Please suugest pointers for direction on how to do it. If you have a code snippet doin it, request to share.
Conditional Formatting doesn't support Regex directly. You would need to create a user-defined function (UDF) in VBA. For example:
Function FormatSalary(varField As Variant) As Boolean
FormatSalary = (varField) > 20000
End Function
This Function would use Regex before returning True or False. In the Conditional Formatting rule for the field, you would use Expression is and enter:
FormatSalary([Salary])
notice that there is no equals-sign preceding this.
You can, I believe, do this programmatically when clicking a button, working with the FormatConditions collection in VBA. However, I suspect that you might need to switch the form back and forth to Design View. (I haven't tried this recently.)