Help with Backend

i have problem with this ilbrary the problem is on photo http://pokit.org/get/?fa2a4c630c68e0ed5a2e2b948b9846e8.jpg can someone help me to fix it

Instead of a picture of code, post your actual code here along with the actual error messages you get. We can’t try to compile or work on a picture of code. Also provide links to the exact libraries you are having issues with.

Delta_G:
Instead of a picture of code, post your actual code here along with the actual error messages you get. We can’t try to compile or work on a picture of code. Also provide links to the exact libraries you are having issues with.

#include <MenuBackend.h>

/*
This program demonstrates a menu modeled after the menubar in the Arduino IDE

+root
+file +edit +sketch +tools +help
+new +cut +verify (V) +autoformat +environment
+open
+examples
+ArduinoISP
*/

//this controls the menu backend and the event generation
MenuBackend menu = MenuBackend(menuUseEvent,menuChangeEvent);
//beneath is list of menu items needed to build the menu
MenuItem miFile = MenuItem(“File”);
MenuItem miNew = MenuItem(“New”);
MenuItem miOpen = MenuItem(“Open”);
MenuItem miExamples = MenuItem(“Examples”);
MenuItem miArduinoISP = MenuItem(“ArduinoISP”);

MenuItem miEdit = MenuItem(“Edit”);
MenuItem miCut = MenuItem(“Cut”);

MenuItem miSkecth = MenuItem(“Sketch”);
MenuItem miVerify = MenuItem(“Verify”,‘V’);

MenuItem miTools = MenuItem(“Tools”);
MenuItem miAutoformat = MenuItem(“Autoformat”);

MenuItem miHelp = MenuItem(“Help”);
MenuItem miEnvironment = MenuItem(“Environment”);

//this function builds the menu and connects the correct items together
void menuSetup()
{
Serial.println(“Setting up menu…”);
//add the file menu to the menu root
//when add is used, as opposed to addX as you see below, the item is added below the item it’s added to
menu.getRoot().add(miFile);
//add all items below File to the file menu item,
//notice the arduino isp item is added to the right of the examples item
miFile.add(miNew).add(miOpen).add(miExamples).addRight(miArduinoISP);
//because edit item is to the right of the file item, we use the addRight method when inserting this item
//then we add the cut item, because it is below the edit
miFile.addRight(miEdit).add(miCut);
miEdit.addRight(miSkecth).add(miVerify);
miSkecth.addRight(miTools).add(miAutoformat);
miTools.addRight(miHelp).add(miEnvironment);
}

/*
This is an important function
Here all use events are handled

This is where you define a behaviour for a menu item
*/
void menuUseEvent(MenuUseEvent used)
{
Serial.print("Menu use ");
Serial.println(used.item.getName());
if (used.item == “ArduinoISP”) //comparison using a string literal
{
Serial.println(“menuUseEvent found ArduinoISP”);
}
if (used.item == miVerify) //comparison agains a known item
{
Serial.println(“menuUseEvent found Verify (V)”);
}
}

/*
This is an important function
Here we get a notification whenever the user changes the menu
That is, when the menu is navigated
*/
void menuChangeEvent(MenuChangeEvent changed)
{
Serial.print("Menu change “);
Serial.print(changed.from.getName());
Serial.print(” ");
Serial.println(changed.to.getName());
}

void setup()
{
Serial.begin(9600);

menuSetup();
Serial.println(“Starting navigation (see source for description):”);

menu.moveDown(); //move to file
menu.moveDown(); //move to new
menu.moveDown(); //move to open
menu.moveDown(); //move to examples
menu.moveRight(); //move to arduinoisp
menu.use(); //use arduniisp
menu.moveLeft(); //move to examples
menu.moveUp(); //move to open
menu.moveUp(); //move to new
menu.moveUp(); //move to file
menu.moveRight(); //move to edit
menu.moveRight(); //move to sketch
menu.moveDown(); //move to verify
menu.use(); //use verify
menu.moveBack(); //move back to sketch
menu.moveBack(); //move back to edit
menu.moveBack(); //move back to file
menu.moveBack(); //move back to new
menu.use(); //use new

menu.use(‘V’); //use verify based on its shortkey ‘V’
}

void loop()
{
//
}

this code i have poblem on this line MenuBackend menu = MenuBackend(menuUseEvent,menuChangeEvent);

Do you get any OTHER errors?

OK, so there's the code. I asked for three things and you only gave one of them. The other two are needed to help solve your problem.

Delta_G: Instead of a picture of code, post your actual code here [u]along with the actual error messages you get[/u]. We can't try to compile or work on a picture of code. [u]Also provide links to the exact libraries[/u] you are having issues with.

johnwasser: Do you get any OTHER errors?

only this can you help

'menuUseEvent' was not declared in this scope

this is error library link is good

t0r30rs: 'menuUseEvent' was not declared in this scope

this is error library link is good

What link?

t0r30rs: 'menuUseEvent' was not declared in this scope

this is error library link is good

Compile the code. Copy the complete error output from the bottom and paste it here. The compiler said more than just this and there may be clues there.

Why is it like pulling teeth to get people to give up information like this. It's like you say you want help, but you want to make it harder for people to help you. Why???

Delta_G: ... Why is it like pulling teeth ...

I always figure it's for a top secret KGB project.

Add prototypes for those functions, at the top of your script.

https://en.wikipedia.org/wiki/Forward_declaration

I think the fact that the first non-preprocessor line is the start of a block comment “/*” causes the Arduino IDE to accidentally put the generated forward declarations inside the comment. After I added the forward declarations near the top of the file (see below) it got past the initial error to encounter these following errors in lines 67 and 71:

/Users/john/Documents/Arduino/sketch_jun12a/sketch_jun12a.ino: In function 'void menuUseEvent(MenuUseEvent)':
sketch_jun12a:67: error: no match for 'operator==' (operand types are 'MenuItem' and 'const char [11]')
   if (used.item == "ArduinoISP") //comparison using a string literal
                 ^
sketch_jun12a:71: error: no match for 'operator==' (operand types are 'MenuItem' and 'MenuItem')
   if (used.item == miVerify) //comparison agains a known item
                 ^
exit status 1
no match for 'operator==' (operand types are 'MenuItem' and 'const char [11]')

The example sketches for that library use “used.item.isEqual(MenuItem)” instead of trying a direct comparison between two MenuItem objects or a MenuItem object and a string constant.

#include <MenuBackend.h>

void menuUseEvent(MenuUseEvent used);  // Forward Declaration
void menuChangeEvent(MenuChangeEvent changed);  // Forward Declaration

/*
  This program demonstrates a menu modeled after the menubar in the Arduino IDE

  +root
  +file +edit   +sketch +tools +help
  +new +cut +verify (V) +autoformat +environment
  +open
  +examples
  +ArduinoISP
*/

//this controls the menu backend and the event generation
MenuBackend menu = MenuBackend(menuUseEvent, menuChangeEvent);

//beneath is list of menu items needed to build the menu
MenuItem miFile = MenuItem("File");
MenuItem miNew = MenuItem("New");
MenuItem miOpen = MenuItem("Open");
MenuItem miExamples = MenuItem("Examples");
MenuItem miArduinoISP = MenuItem("ArduinoISP");

MenuItem miEdit = MenuItem("Edit");
MenuItem miCut = MenuItem("Cut");

MenuItem miSkecth = MenuItem("Sketch");
MenuItem miVerify = MenuItem("Verify", 'V');

MenuItem miTools = MenuItem("Tools");
MenuItem miAutoformat = MenuItem("Autoformat");

MenuItem miHelp = MenuItem("Help");
MenuItem miEnvironment = MenuItem("Environment");

//this function builds the menu and connects the correct items together
void menuSetup()
{
  Serial.println("Setting up menu...");
  //add the file menu to the menu root
  //when add is used, as opposed to addX as you see below, the item is added below the item it's added to
  menu.getRoot().add(miFile);
  //add all items below File to the file menu item,
  //notice the arduino isp item is added _to the right_ of the examples item
  miFile.add(miNew).add(miOpen).add(miExamples).addRight(miArduinoISP);
  //because edit item is to the right of the file item, we use the addRight method when inserting this item
  //then we add the cut item, because it is below the edit
  miFile.addRight(miEdit).add(miCut);
  miEdit.addRight(miSkecth).add(miVerify);
  miSkecth.addRight(miTools).add(miAutoformat);
  miTools.addRight(miHelp).add(miEnvironment);
}

/*
  This is an important function
  Here all use events are handled

  This is where you define a behaviour for a menu item
*/
void menuUseEvent(MenuUseEvent used)
{
  Serial.print("Menu use ");
  Serial.println(used.item.getName());
  if (used.item == "ArduinoISP") //comparison using a string literal
  {
    Serial.println("menuUseEvent found ArduinoISP");
  }
  if (used.item == miVerify) //comparison agains a known item
  {
    Serial.println("menuUseEvent found Verify (V)");
  }
}

/*
  This is an important function
  Here we get a notification whenever the user changes the menu
  That is, when the menu is navigated
*/
void menuChangeEvent(MenuChangeEvent changed)
{
  Serial.print("Menu change ");
  Serial.print(changed.from.getName());
  Serial.print(" ");
  Serial.println(changed.to.getName());
}

void setup()
{
  Serial.begin(9600);

  menuSetup();
  Serial.println("Starting navigation (see source for description):");

  menu.moveDown();  //move to file
  menu.moveDown();  //move to new
  menu.moveDown();  //move to open
  menu.moveDown();  //move to examples
  menu.moveRight(); //move to arduinoisp
  menu.use();       //use arduniisp
  menu.moveLeft();  //move to examples
  menu.moveUp();    //move to open
  menu.moveUp();    //move to new
  menu.moveUp();    //move to file
  menu.moveRight(); //move to edit
  menu.moveRight(); //move to sketch
  menu.moveDown();  //move to verify
  menu.use();       //use verify
  menu.moveBack();  //move back to sketch
  menu.moveBack();  //move back to edit
  menu.moveBack();  //move back to file
  menu.moveBack();  //move back to new
  menu.use();       //use new

  menu.use('V');    //use verify based on its shortkey 'V'
}

void loop()
{
  //
}