Note that there are some explanatory texts on larger screens.

plurals
  1. POC++ wxwidgets comparing wxstrings
    primarykey
    data
    text
    <p>I am trying to compare wxstrings to determine what my program will do. The string I am comparing is based on a file I am reading in and is the only line in the file.</p> <p>I am using codeblocks with wxSmith activated.</p> <p>This is the section of my program that I am trying to get working.</p> <pre><code>void Disc_MasterFrame::OncdiscClick(wxCommandEvent&amp; event) { system("sh detect-disc.sh"); wxString file; file &lt;&lt; wxT("detect-disc"); wxTextFile tfile; tfile.Open(file); detectdiscw=tfile.GetFirstLine(); //std::ifstream myfile ("detect-disc"); //getline (myfile,detectdisc); //myfile.close(); cd &lt;&lt; wxT("An audio cd was inserted."); dvd &lt;&lt; wxT("A dvd was inserted."); if (detectdiscw == cd){ //musicrip-&gt;Show(); //this-&gt;Disc_MasterFrame::ripmusic(); void ripmusic(); } else if (detectdiscw == dvd) { manipdvd-&gt;Show(); void dvdmanip(); } } void Disc_MasterFrame::ripmusic() { musicrip-&gt;Show(); system("sh disc-info.sh"); ... </code></pre> <p>When the button is clicked, the script should run, it does because it generates a file using the cdde command (linux/ubuntu cli program). The result of this command is "An audio cd was inserted." so I have consistency when testing.</p> <p>Then it opens and reads the file and attempts to compare it to two predefined strings. Once that is done it should 'show' one of two panels already created.</p> <p>I pretty sure I'm doing something wrong because it just sits there after the button is clicked. </p> <p>Any help or direction would be greatly appreciated, thanks.</p>
    singulars
    1. This table or related slice is empty.
    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. This table or related slice is empty.
    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