<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ezMenu not declared in scope error]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I'm trying to use advanced functions with ezMenu addItem. The only example I can find for it is in the M5ez.ccp file <a href="https://github.com/ropg/M5ez/blob/master/src/M5ez.cpp" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ropg/M5ez/blob/master/src/M5ez.cpp</a> line 1248.</p>
<p dir="auto">So in my main.ino file I have</p>
<pre><code>void mainmenu_manage_boards() {
    // TODO
    prefs.begin("BOARDSTATUS");
    
    String idx;

    ezMenu savedBoards("Managing Boards");
    if (board_count &lt; 1) {
        ez.msgBox("No Boards", "You have no saved Boards.", "OK");
        return;
    }
    for (uint8_t n = 1; n &lt; board_count+1; n++) {
        idx = "NAME" + (String)n;
        String name = prefs.getString(idx.c_str(), "");
        savedBoards.addItem(name, NULL, _savedSelected);
    }
    savedBoards.txtSmall();
    savedBoards.buttons("up#Back#Forget##down#");
    savedBoards.run();
    
    prefs.end();
}

bool _savedSelected(ezMenu* callingMenu) {
  if (callingMenu-&gt;pickButton() == "Forget") {
    if (ez.msgBox("Forgetting board", "Are you sure you want | to forget board | " + callingMenu-&gt;pickName() + " ?", "Yes##No") == "Yes") {
      callingMenu-&gt;deleteItem(callingMenu-&gt;pick());
    }
  }
  return false;
}
</code></pre>
<p dir="auto">On compile I get the following error</p>
<pre><code>error: 'ezMenu' was not declared in this scope
 static bool _savedSelected(ezMenu* callingMenu) {
</code></pre>
<p dir="auto">Any suggestions? If I do</p>
<pre><code>savedBoards.addItem(name, NULL, NULL);
</code></pre>
<p dir="auto">The menu renders fine.</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://community.m5stack.com/topic/1737/ezmenu-not-declared-in-scope-error</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 02:46:12 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1737.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Mar 2020 21:34:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ezMenu not declared in scope error on Tue, 03 Mar 2020 19:53:53 GMT]]></title><description><![CDATA[<p dir="auto">I'm going to be cheeky here and say if this is Arduino then look at the first line of your code.<br />
<em>Hint</em> its whats not there that is the issue.</p>
]]></description><link>https://community.m5stack.com/post/7666</link><guid isPermaLink="true">https://community.m5stack.com/post/7666</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 03 Mar 2020 19:53:53 GMT</pubDate></item><item><title><![CDATA[Reply to ezMenu not declared in scope error on Tue, 03 Mar 2020 09:53:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/700">@lukasmaximus</a> thanks for the reply. Yeah I'm using the latest version 2.1.2 and have read the manual several times in places ha ha.</p>
<p dir="auto">So after messing around with it for too long last night this morning I figured I would try compiling it in the Arduino IDE rather than the VSCode Arduino extension that I have been using up until now.</p>
<p dir="auto">And it works! Obviously something going wrong with the extension. I will report the issue on their github.</p>
]]></description><link>https://community.m5stack.com/post/7659</link><guid isPermaLink="true">https://community.m5stack.com/post/7659</guid><dc:creator><![CDATA[richardmckenna]]></dc:creator><pubDate>Tue, 03 Mar 2020 09:53:38 GMT</pubDate></item><item><title><![CDATA[Reply to ezMenu not declared in scope error on Mon, 02 Mar 2020 22:46:08 GMT]]></title><description><![CDATA[<p dir="auto">Which version are you using? perhaps updating to the latest version in library manager will solve it. Otherwise I can't suggest anything as I never used M5EZ, but did you read the manual <a href="https://github.com/ropg/M5ez" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ropg/M5ez</a></p>
]]></description><link>https://community.m5stack.com/post/7653</link><guid isPermaLink="true">https://community.m5stack.com/post/7653</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Mon, 02 Mar 2020 22:46:08 GMT</pubDate></item></channel></rss>