Skip to main content

eFlow 5.2 Switching Layout using API

Article # 3018278 - Page views: 231


Question / Problem: 

While upgrading an 4.5 application I’m using the following code to change the layout in Validate station on Key Press

IStationAccess station = StationCreator.SingletonInstance;

station.Layout.CurrentLayoutName = “MyLayout”;

The layout changes but a second after the station crashes giving the following error:

2019-02-08 13:38:06,109 [1] FATAL Source App: DataEntry.exe, Object reference not set to an instance of an object..  Details :     Machine: WIN-FLM9C3ONFBK  

TISAppenderLog4net.Log4NetException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.

   at TiS.DataEntry.ApplicationServices.Binding.Handlers.StationEventsFieldKeyHandler.HandleChange(IVisualListener binder, Object sender, PropertyChangedEventArgs e)

   at TiS.DataEntry.VisualBinding.Handlers.Mapping.HandlersMapManager.HandlePropertyChange(IVisualListener binder, Object sender, PropertyChangedEventArgs e)

   at TiS.DataEntry.VisualBinding.Binders.TisMaskedTextBoxBinder.HandlePropertyChanged(Object sender, PropertyChangedEventArgs e)

   at TiS.DataEntry.ApplicationServices.Binding.PropertyChangedHandler.Execute(IContextTree listenersTree, ISpecificProperty specificProperty, Type interfaceType, Object sender, PropertyChangedEventArgs e)

   at TiS.DataEntry.ApplicationServices.Binding.VisualListenerBase.PropertyChanged(Object sender, PropertyChangedEventArgs e)

   at TiS.DataEntry.VisualBinding.EventAdapters.TextBoxEventAdapter.OnPropertyChanged(String propertyName, KeyEventArgs keyEventArgs)

   at TiS.DataEntry.VisualBinding.EventAdapters.TextBoxEventAdapter.m_Control_KeyDown(Object sender, KeyEventArgs e)

   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)

   at TiS.Controls.CompletionUI.TisTextbox.OnKeyDown(KeyEventArgs e)

   at TiS.Controls.CompletionUI.TisMaskedTextbox.OnKeyDown(KeyEventArgs e)

   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)

   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)

   at System.Windows.Forms.Control.WmKeyChar(Message& m)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)

   at System.Windows.Forms.TextBox.WndProc(Message& m)

   at TiS.Controls.CompletionUI.TisTextbox.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

   --- End of inner exception stack trace ---

The OnKey event is already mapped to all the fields in Design

Does anyone experience such error before?

Reproducible also in eflow 5.3

Answer / Solution: 

The issue was actually a core bug and I got a fix for eFlow 5.3.0 from R & D Below is a screenshot of the dll Properties


Enter How to here:

  1. How to Step 1
  2. How to Step 2
  3. How to Step 3


Applies to:  

Product Version
eFlow 5.3



  • Was this article helpful?