Question

I have the following section of code. What method is supposed to be in the place of local 36?

   public void Alert()
  {
    AlertDialog.Builder localBuilder1 = new AlertDialog.Builder(this);
    AlertDialog.Builder localBuilder2 = localBuilder1.setMessage("You lost").setCancelable(false);
    36 local36 = new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        paramDialogInterface.cancel();
        Pokemon.this.setContentView(2130903046);
        Pokemon.this.mainmenu();
      }
    };
    AlertDialog.Builder localBuilder3 = localBuilder2.setPositiveButton("OK", local36);
    AlertDialog localAlertDialog = localBuilder1.create();
    this.alert = localAlertDialog;
    this.alert.show();
  }
Was it helpful?

Solution

I expect that the original code looked something like this:

AlertDialog.Builder localBuilder3 =
  localBuilder2.setPositiveButton
  (
    "OK",
    new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        paramDialogInterface.cancel();
        Pokemon.this.setContentView(2130903046);
        Pokemon.this.mainmenu();
      }
    }
  );

rather than having two separate statements. So the 36 wasn't in the original code; it represents the name of the anonymous inner class.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top