diff options
author | t-espave <unknown> | 2011-07-27 15:57:34 -0700 |
---|---|---|
committer | t-espave <unknown> | 2011-07-27 15:57:34 -0700 |
commit | 8f8feda4d3270ae78e4c03c34f5af151a2e164c1 (patch) | |
tree | 44721578e65c34fb2da545cc1ee9b7bcc470642d /BCT/BytecodeTranslator/Phone | |
parent | 61be97f174a8c90122b40937a17a1b87b12b0229 (diff) |
not handling property bindings for controls (for now)
Diffstat (limited to 'BCT/BytecodeTranslator/Phone')
-rw-r--r-- | BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs b/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs index 63e1321b..40d438c8 100644 --- a/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs +++ b/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs @@ -148,14 +148,16 @@ namespace BytecodeTranslator.Phone { // TODO check page name against container name
IEnumerable<ControlInfoStructure> controls= PhoneCodeHelper.PhonePlugin.getControlsForPage(methodBeingTraversed.Container.ToString());
IEnumerable<IStatement> injectedStatements = new List<IStatement>();
- foreach (ControlInfoStructure controlInfo in controls) {
- injectedStatements = injectedStatements.Concat(getCodeForSettingEnabledness(controlInfo));
- injectedStatements = injectedStatements.Concat(getCodeForSettingCheckedState(controlInfo));
- injectedStatements = injectedStatements.Concat(getCodeForSettingVisibility(controlInfo));
- }
+ if (controls != null) {
+ foreach (ControlInfoStructure controlInfo in controls) {
+ injectedStatements = injectedStatements.Concat(getCodeForSettingEnabledness(controlInfo));
+ injectedStatements = injectedStatements.Concat(getCodeForSettingCheckedState(controlInfo));
+ injectedStatements = injectedStatements.Concat(getCodeForSettingVisibility(controlInfo));
+ }
- int stmtPos= block.Statements.IndexOf(statementAfter);
- block.Statements.InsertRange(stmtPos+1, injectedStatements);
+ int stmtPos = block.Statements.IndexOf(statementAfter);
+ block.Statements.InsertRange(stmtPos + 1, injectedStatements);
+ }
}
private BoundExpression makeBoundControlFromControlInfo(ControlInfoStructure controlInfo) {
|