Changeset 425 for EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Procedures.cs
- Timestamp:
- May 29, 2020, 10:45:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Procedures.cs
r321 r425 28 28 using Bridge; 29 29 using Bridge.Html5; 30 using Bridge.Text.RegularExpressions;31 30 32 31 namespace WebMrbc … … 504 503 public string validator_(string newVar) 505 504 { 506 newVar = newVar.Replace(new Reg ex("[\\s\\xa0]+", "g"), " ").Replace(new Regex("^ | $", "g"), "");505 newVar = newVar.Replace(new RegExp("[\\s\\xa0]+", "g"), " ").Replace(new RegExp("^ | $", "g"), ""); 507 506 return newVar; 508 507 } … … 630 629 this.quarkConnections_[this.quarkIds_[i]] = connection; 631 630 if (mutatorOpen && connection != null && 632 paramIds.IndexOf(this.quarkIds_[i]) == -1) {631 Array.IndexOf(paramIds, this.quarkIds_[i]) == -1) { 633 632 // This connection should no longer be attached to this block. 634 633 connection.disconnect(); … … 638 637 } 639 638 // Rebuild the block's arguments. 640 this.arguments_ = ( string[])(new string[0]).Concat(paramNames);639 this.arguments_ = (new string[0]).Concat(paramNames).ToArray(); 641 640 this.updateShape_(); 642 641 this.quarkIds_ = paramIds; … … 781 780 } 782 781 if (e.type == Events.CREATE && 783 ((Create)e).ids.IndexOf(this.id) != -1) {782 Array.IndexOf(((Create)e).ids, this.id) != -1) { 784 783 // Look for the case where a procedure call was created (usually through 785 784 // paste) and there is no matching definition. In this case, create … … 988 987 var block = (Block)this; 989 988 do { 990 if ( this.FUNCTION_TYPES.IndexOf(block.type) != -1) {989 if (Array.IndexOf(this.FUNCTION_TYPES, block.type) != -1) { 991 990 legal = true; 992 991 break;
Note:
See TracChangeset
for help on using the changeset viewer.