Page 1 of 1

JiwaApplicationManagerPlugin v7.2

PostPosted: Tue Oct 16, 2018 9:28 pm
by Riyaz
Hi There

Need some guidance in converting the below code snippet to v7.2 , pls advise
Code: Select all
Public Sub Setup(ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaApplicationManagerPlugin.Setup
      AddHandler JiwaApplication.Manager.Instance.Search.Showing, AddressOf Search_Showing
    End Sub
      
   Private Sub Search_Showing(sender As Object, e As System.EventArgs)
      'System.Diagnostics.Debugger.Launch
      With JiwaApplication.Manager.Instance.Search

'some code here
End With

End Sub
[/code]

Re: JiwaApplicationManagerPlugin v7.2  Topic is solved

PostPosted: Wed Oct 17, 2018 7:12 am
by SBarnes
There are individual managers attached to objects now in this case the Plugin object so use the below

Code: Select all
Plugin .Manager;

Re: JiwaApplicationManagerPlugin v7.2

PostPosted: Wed Oct 17, 2018 10:35 am
by Scott.Pearce
Yes, Stuart is correct.

Don't use .Instance anymore. You should always be able to find a .Manager object to use hanging off whatever Jiwa object is available to you.

Your code would become:

Code: Select all
Public Sub Setup(ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaApplicationManagerPlugin.Setup
    AddHandler Plugin.Manager.Search.Showing, AddressOf Search_Showing
End Sub
     
Private Sub Search_Showing(sender As Object, e As System.EventArgs)
    'System.Diagnostics.Debugger.Launch
    Dim searchObject  as JiwaFinancials.Jiwa.JiwaApplication.JiwaSearch.clsSearch = sender
    With searchObject 
        'some code here
    End With
End Sub

Re: JiwaApplicationManagerPlugin v7.2

PostPosted: Wed Oct 17, 2018 1:22 pm
by Riyaz
Thanks Stuart and Scott