Java Question cannot find symbol

mshafiee110

Active Member
Licensed User
Longtime User
This code works fine in my activity.
And I want it to become library.but this error occurs.



B4X:
Compiling generated Java code.  Error
javac 1.7.0_05
src\de\amberhome\appcompat\serachviewexample\mydialog.java:80: error: cannot find symbol
  processBA.raiseEvent2(dialog, false, "alert_onclick", false, 0);
  ^
  symbol: variable processBA
1 error
 

Attachments

  • createdialoglib.zip
    8.9 KB · Views: 248

DonManfred

Expert
Licensed User
Longtime User
instead of compiling a app which uses inline-java you better should directly create the lib with java and compile it with slc
 

mshafiee110

Active Member
Licensed User
Longtime User
HI @DonManfred
oops, I wrote this code in eclipse and compile(with slc) successfully,but not working
B4X:
package anywheresoftware.b4a;

import android.app.AlertDialog;
import android.content.DialogInterface;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;



@Author("wey")
@Version(1.00f)
@ShortName("dialogme")
public class dialogme {

   
private BA processBA;


    public void dialogmmmmm(String title) {

    AlertDialog.Builder builder = new AlertDialog.Builder(processBA.context);
            builder.setTitle(title)
            .setMessage("Txs for Inline Erel ;-)")
                .setPositiveButton("yes", new DialogInterface.OnClickListener() {
               

                @Override
                public void onClick(DialogInterface dialog, int which) {
               
                   processBA.raiseEvent2(dialog, false, "alert_onclick", false, 1);
               
    
          }
            })
              
                .setNegativeButton("no", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    dialog.dismiss();
                  
                  processBA.raiseEvent2(dialog, false, "alert_onclick", false, 0);
                }
            });
    builder.create();
    builder.show();
    }

}
 
Top