Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I guess that the code in <code>MyQuickFixApp</code> class access to the <strong>default instance</strong> of your <code>ClientGUI</code>, not the instance which is actually running, each time you write <code>ClientGUI.(...)</code>.</p> <p>See this thread <a href="https://stackoverflow.com/q/4698538/2387010">Why is there a default instance of every form in VB.Net but not in C#?</a> for more information about default instance, which is something you should avoid to use.</p> <p>So you could add a parameter in the <code>MyQuickFixApp</code> class constructor :</p> <pre><code> Public Class MyQuickFixApp Inherits MessageCracker : Implements IApplication Dim _clientGUI As ClientGUI = Nothing Public Sub New(cltGui As ClientGUI) _clientGUI = cltGui End sub (...) End class </code></pre> <p>Then, replace in the <code>MyQuickFixApp</code> class all the <code>ClientGUI.(...)</code>, with <code>_clientGUI.(...)</code> to be sure to access to the correct instance.</p> <p>And finally, initialize your <code>MyQuickFixApp</code> class in <code>ClientGUI</code> like this:</p> <pre><code>Dim myApp As New MyQuickFixApp(me) </code></pre> <p>Note that this code, you can only access to the method of the class in the <code>Form_Load</code> event. This variable should be declared in the class and initialized in the form_load if you want to access it later from the <code>ClientGUI</code> form.</p> <pre><code>Public Class ClientGUI Dim initiator As SocketInitiator Dim myApp As MyQuickFixApp() Public Sub ClientGUI_Load(sender As Object, e As EventArgs) Handles MyBase.Load (...) myApp =New MyQuickFixApp(Me) (...) End Sub (...) End Class </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload