Newbie : Using "this" in a function

I have a function in my main class that spawns
a Dialog for user input. The strange thing is, that I get
a compiler error anytime i try to use "this" inside my
function. Please help. Can you see anything wrong
with the code in this function? I am calling it from
another class.
public static void createNewCell() {
JDialog newDialog = new JDialog();
newDialog.setTitle("New Cell Site");
newDialog.setResizable(false);
newDialog.setModal(true);
//create txt fields
CDBTextField txtCellID = new CDBTextField(15,10);
//create buttons
JButton btnOK = new JButton("OK");
btnOK.setActionCommand("ok");
btnOK.addActionListener(this);
JButton btnCancel = new JButton("Cancel");
btnCancel.setActionCommand("cancel");
btnCancel.addActionListener(this);
//Layout the labels in a panel
JPanel labelPane = new JPanel();
labelPane.setLayout(new GridLayout(0, 1));
labelPane.add(new JLabel("Cell ID:"));
//Layout the text fields in a panel
JPanel fieldPane = new JPanel();
fieldPane.setLayout(new GridLayout(0, 1));
fieldPane.add(txtCellID);
//Layout the buttons in a panel
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new GridLayout(0, 2));
buttonPane.add(btnCancel);
buttonPane.add(btnOK);
//Put the panels in another panel, labels on left,
//text fields on right
JPanel contentPane = new JPanel();
contentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
contentPane.setLayout(new BorderLayout(10,10));
contentPane.add(labelPane, BorderLayout.CENTER);
contentPane.add(fieldPane, BorderLayout.EAST);
contentPane.add(buttonPane, BorderLayout.SOUTH);
newDialog.setContentPane(contentPane);
newDialog.pack();
newDialog.show();
Here is the compiler message
CDBTest.java:152: non-static variable this cannot be referenced from a static co
ntext
btnOK.addActionListener(this);
^
CDBTest.java:155: non-static variable this cannot be referenced from a static co
ntext
btnCancel.addActionListener(this);
^
2 errors
I guess I don't really understand how to use static and
when not to use static, and how to use "this"
But I know I need to use "this" for the actionlisteners
on my buttons.
THanks
Josh

Thank you , Thank you, Thank you!
Here is my entire main class, and then below it I'll
paste the class that is calling my function.
import java.io.*;
import java.util.StringTokenizer;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.ArrayList;
public class CDBTest extends JFrame implements ActionListener {
        public static CellList cellList = new CellList();
        public static Tabs cdbTabs = new Tabs();
        public static ArrayList cellArrayList = new ArrayList();
        public static int internalCellId = 0;    
        public CDBTest() {
                JMenuBar mainMenuBar = new JMenuBar();
                JMenu mainMenu;
                JMenuItem mainMenuItem;
                JPanel mainPanel = new JPanel();
                //Attach Menu Bar
                setJMenuBar(mainMenuBar);
                //Build the first menu.
                mainMenu = new JMenu("File");
                mainMenu.setMnemonic(KeyEvent.VK_F);
                mainMenuBar.add(mainMenu);
                //JMenuItems
                mainMenuItem = new JMenuItem("New",KeyEvent.VK_N);
                mainMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));
                mainMenuItem.addActionListener(this);
                mainMenu.add(mainMenuItem);
                mainMenuItem = new JMenuItem("Open",KeyEvent.VK_O);
                mainMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
                mainMenuItem.addActionListener(this);
                mainMenu.add(mainMenuItem);
                mainMenu.addSeparator();
                mainMenuItem = new JMenuItem("Save",KeyEvent.VK_S);
                mainMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
                mainMenuItem.addActionListener(this);
                mainMenu.add(mainMenuItem);
                mainMenuItem = new JMenuItem("Save As",KeyEvent.VK_A);
                mainMenuItem.addActionListener(this);
                mainMenu.add(mainMenuItem);
                mainMenu.addSeparator();
                mainMenuItem = new JMenuItem("Exit",KeyEvent.VK_E);
                mainMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4, ActionEvent.ALT_MASK));
                mainMenuItem.addActionListener(this);
                mainMenu.add(mainMenuItem);
                //define main content panel
                mainPanel.setPreferredSize(new Dimension(600, 350));
                //Turn border off for now 3/19/02
                //mainPanel.setBorder(BorderFactory.createLineBorder(Color.black));
                setResizable(false);
                setTitle("Cell Site Database Editor");
                //define and add components
                mainPanel.add(cellList);
                mainPanel.add(cdbTabs);
                setContentPane(mainPanel);
        public void actionPerformed(ActionEvent e) {
                JMenuItem source = (JMenuItem)(e.getSource());
                if (source.getText() == "Open") {
                        // "." represents current dir, NOT APP-DIR,
                        // AND worse, the "Up" feature in filechooser now broken
                        // DAMNIT!
                        //final JFileChooser fc = new JFileChooser(".");
                        final JFileChooser fc = new JFileChooser();
                        fc.addChoosableFileFilter(new CDBFileFilter());
                        int returnVal = fc.showOpenDialog(this);
                        if (returnVal == JFileChooser.APPROVE_OPTION) {
                                File file = fc.getSelectedFile();
                                //this is where a real application would open the file.
                                //JOptionPane.showMessageDialog(this, "Opening " + file.getName());
                                try {
                                        // Clear out any existing entries
                                        if (cellList.isFilled()) {
                                                cellArrayList.clear();
                                                cellList.removeAllFromJList();
                                                internalCellId = 0;
                                        FileReader cdbReader = new FileReader(file);
                                        BufferedReader br = new BufferedReader(cdbReader);
                                        //JComboBox cellList = new JComboBox();
                                        //cellList.addActionListener(this);
                                        String line;
                                        while((line = br.readLine()) != null){
                                                // Looping through each line
                                                cellArrayList.add(internalCellId, Split(line,",")); //Add array with an index
                                                String[] arCells = (String[]) cellArrayList.get(internalCellId); //Extract array object and cast as a String Array
                                                cellList.AddCell(arCells[0] + " " + arCells[1]);
                                                //cellList.addItem(arCells[0] + " " + arCells[1]);
                                                internalCellId++;
                                        cellList.list.setSelectedIndex(0);
                                } catch (FileNotFoundException fnf) {
                                        System.err.println("Unable to open file for reading: " + fnf.getMessage());
                                } catch (IOException ioe) {
                                        System.err.println("unable to buffer read file: " + ioe.getMessage());
                        } else {
                                JOptionPane.showMessageDialog(this, "Cancelled ");
                } else if (source.getText() == "Exit") {
                        System.exit(0);
                } else {
                        String s = "Action event detected.\n"
                           + "    Event source: " + source.getText()
                           + " (an instance of " + getClassName(source) + ")";
                        JOptionPane.showMessageDialog(this, s);
        public static String[ ] Split(String str2Split, String separator) {
                StringTokenizer parser = new StringTokenizer(str2Split, separator);
                int numTokens=parser.countTokens( );
                String[ ] arString = new String[numTokens];
                for (int i=0; i < numTokens; i++) {
                        arString[i] = parser.nextToken( );
                return arString;
        public void createNewCell() {
                JDialog newDialog = new JDialog();
                newDialog.setTitle("New Cell Site");
                newDialog.setResizable(false);
                newDialog.setModal(true);
                //create txt fields
                CDBTextField txtCellID = new CDBTextField(15,10);
                CDBTextField txtCellName = new CDBTextField(15,20);
                CDBTextField txtSwitch = new CDBTextField(15,10);
                CDBTextField txtSectorID = new CDBTextField(1,1);
                CDBTextField txtSectorName = new CDBTextField(15,12);
                //create buttons
                JButton btnOK = new JButton("OK");
                btnOK.setActionCommand("ok");
                btnOK.addActionListener(this);
                JButton btnCancel = new JButton("Cancel");
                btnCancel.setActionCommand("cancel");
                btnCancel.addActionListener(this);
                //Layout the labels in a panel
                JPanel labelPane = new JPanel();
                labelPane.setLayout(new GridLayout(0, 1));
                labelPane.add(new JLabel("Cell ID:"));
                labelPane.add(new JLabel("Cell Name:"));
                labelPane.add(new JLabel("Switch:"));
                labelPane.add(new JLabel("Sector ID:"));
                labelPane.add(new JLabel("Sector Name:"));
                //Layout the text fields in a panel
                JPanel fieldPane = new JPanel();
                fieldPane.setLayout(new GridLayout(0, 1));
                fieldPane.add(txtCellID);
                fieldPane.add(txtCellName);
                fieldPane.add(txtSwitch);
                fieldPane.add(txtSectorID);
                fieldPane.add(txtSectorName);
                //Layout the buttons in a panel
                JPanel buttonPane = new JPanel();
                buttonPane.setLayout(new GridLayout(0, 2));
                buttonPane.add(btnCancel);
                buttonPane.add(btnOK);
                //Put the panels in another panel, labels on left,
                //text fields on right
                JPanel contentPane = new JPanel();
                contentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
                contentPane.setLayout(new BorderLayout(10,10));
                contentPane.add(labelPane, BorderLayout.CENTER);
                contentPane.add(fieldPane, BorderLayout.EAST);
                contentPane.add(buttonPane, BorderLayout.SOUTH);
                newDialog.setContentPane(contentPane);
                newDialog.pack();
                newDialog.show();      
        // Returns just the class name -- no package info.
        protected String getClassName(Object o) {
                String classString = o.getClass().getName();
                int dotIndex = classString.lastIndexOf(".");
                return classString.substring(dotIndex+1);
        public static void main(String args[]) {
                final CDBTest CDBApp = new CDBTest();
                CDBApp.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        System.exit(0);
                CDBApp.pack();
                CDBApp.show();
I'm new to Java and trying tio pick it up as I code
so please give me any recommendations you have
some things I don't really understand.
And here is the code of my class that calls the function
in my main class.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ActionButtons extends JPanel implements ActionListener {
        protected JButton btnNew, btnCopy, btnDelete;
        private int btnWidth = 35;
        private int btnHeight = 34;
        public ActionButtons() {
                ImageIcon icoBtnNew = new ImageIcon("images/new.gif");
                ImageIcon icoBtnCopy = new ImageIcon("images/copy.gif");
                ImageIcon icoBtnDelete = new ImageIcon("images/delete.gif");
                btnNew = new JButton(icoBtnNew);
                btnNew.setPreferredSize(new Dimension(btnWidth,btnHeight));
                btnNew.setToolTipText("Create a new cell site.");
                btnNew.setActionCommand("new");
                btnNew.addActionListener(this);
                add(btnNew);
                btnCopy = new JButton(icoBtnCopy);
                btnCopy.setPreferredSize(new Dimension(btnWidth,btnHeight));
                btnCopy.setToolTipText("Copy selected cell site.");
                btnCopy.setActionCommand("copy");
                btnCopy.addActionListener(this);
                add(btnCopy);
                btnDelete = new JButton(icoBtnDelete);
                btnDelete.setPreferredSize(new Dimension(btnWidth,btnHeight));
                btnDelete.setToolTipText("Delete selected cell site.");
                btnDelete.setActionCommand("delete");
                btnDelete.addActionListener(this);
                add(btnDelete);
       public void actionPerformed(ActionEvent e) {
                if (e.getActionCommand() == "new") {
                        //switch tabs to general tab
                        CDBTest.createNewCell();
Thanks
Josh

Similar Messages

  • Using 'this' in a function

    I have a function ('checkDrop') which I call in
    ‘onRelease’ for several draggable MCs. At present
    I’ve hard coded each draggable
    MC , eg:
    drag2_mc.onRelease = function() {
    stopDrag();
    checkDrop();
    if (HITtest == 2 or HITtest == 1) {
    this.gotoAndStop("_down");
    this.enabled = false;
    this._y = 115;
    It’s more sensible to put the 'if' statement in the
    function as this part is the same for every draggable MC (&
    there are about 20!), but using ‘this’ when the lines
    are placed in the function no longer references the draggable MC.
    Any ideas how I can reference them all in this way without naming
    each one individually. (I thought when a function was called, the
    ‘this’ referred to the object it was being called on
    – obviously not! - And I really thought I was getting the
    hang of things.)
    Attached function code if needed.
    Many thanks in advance if anyone can help at all :-)

    make it:
    drag2_mc.onRelease = function() {
    stopDrag();
    checkDrop(this);
    and your function:
    function checkDrop(clip) {
    //this line just defines the drop area from an array:
    if (_xmouse>cDrop[0] && _ymouse>cDrop[1]
    && _xmouse<(cDrop[0]+cDrop[2]) &&
    _ymouse<(cDrop[1]+cDrop[3])) {
    HITtest = 2;
    //if following 3 lines are placed here instead of in the
    draggable MC, it doesn’t work ‘cos ‘this’
    no longer refers to the MC being dragged:
    clip.gotoAndStop("_down");
    clip.enabled = false;
    clip._y = 115;
    } else if (_xmouse>ncDrop[0] &&
    _ymouse>ncDrop[1] && _xmouse<(ncDrop[0]+ncDrop[2])
    && _ymouse<(ncDrop[1]+ncDrop[3])) {
    HITtest = 1;
    }

  • FR Studio 11.1.1.3 : You're not authorized to use this function...

    Hi,
    we have FR Studio (client, v. 11.1.1.3.0238 and Report Server v. 11.1.1.3.0.0301) distributed on Citrix terminal server (windows 2003 32-bit) and on latest 2 prod servers we have this error "You're not authorized to use this function. Contact your administrator." appearing.
    On QA server FR Studio works fine, we had an issue there when we forgot to set ports
    8295-8299 to "listening mode" = they were not defined on FR server's FR_servp.properties config files.
    This is also fixed on Prod FR servers and we have double checked firewalls are open.
    After adding them to QA FR servers we had no issues with FR Studio on QA, but on PROD the issue still exists.
    We have also checked that this shouldn' have anything to do with authentication.
    Odd thing is that we get at least partially same sort of error messages on both working and non-working FRClient.log files.
    On FRClient.log there are for example following records:
    08-04 09:26:11 ERROR ConfigResourceBundle     Could not find fr_configcache.properties file
    08-04 09:26:11 ERROR SerializableResourceBundle     Could not get registry instance
    08-04 09:26:11 ERROR SerializableResourceBundle     java.io.FileNotFoundException: C:\Apps\Hyperion\common\config\9.5.0.0\reg.properties (The system cannot find the file specified)
    com.hyperion.hit.registry.exceptions.RegistryException: java.io.FileNotFoundException: C:\Apps\Hyperion\common\config\9.5.0.0\reg.properties (The system cannot find the file specified)
         at com.hyperion.hit.registry.RegistryUtils.createNewConnection(RegistryUtils.java:158)
         at com.hyperion.hit.registry.RegistryConnection.getInstance(RegistryConnection.java:155)
         at com.hyperion.hit.registry.Registry.getInstance(Registry.java:309).....
    Caused by: java.io.FileNotFoundException: C:\Apps\Hyperion\common\config\9.5.0.0\reg.properties (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at com.hyperion.hit.registry.RegistryUtils.createNewConnection(RegistryUtils.java:151)
         ... 15 more
    08-04 09:26:11 ERROR HRResourceBundleFactory     Could not locate registry
    08-04 09:26:11 ERROR HRResourceBundleFactory     5500
    com.hyperion.reporting.util.HyperionReportException: Server not yet configured. Please configure the server.
         at com.hyperion.reporting.config.ConfigResourceBundle.<init>(Unknown Source)
         at com.hyperion.reporting.config.ConfigResourceBundle.getInstance(Unknown Source)
         at com.hyperion.reporting.config.HRResourceBundleFactory.getConfigBundle(Unknown Source)...
    That propably gives already an idea what FR Studio is logging.
    Does anyone have idea about this .properties file for frconfig cache?
    Should that be defined somehow during system configuration as we don't find that from any of our environments?
    Just for additional info:
    We have used following packages and installed HFM Admin Client, FR Studio and EPMA File Generator GUI.
    •     02. installer - V17382-01.zip
    •     03. foundation 1 of 4 - V17397-01.zip
    •     03. foundation 2 of 4 - V17369-01.zip
    •     04. architect - V17398-01.zip
    •     08. financial reporting - V17378-01.zip
    •     11. financial management - V17365-01.zip
    Patches:
    + hfm_11113_50-p9976978_111130_WINNT.zip
    + financial reporting_11113_20-p9657652_11113_WINNT.zip
    During the installation we selected:
    Foundation \
    Performance Management Architect\Performance Management Architect File Generator
    Financial Management\
    Financial Management Client
    Financial ManagementADM Driver
    Financial Reporting\
    Financial Reporting Studio Client
    I noticed that apparently no configuration was run neither in QA or in PROD, not sure though if FR Studio even requires that? HFM Admin Client does work on all environments Citrix servers.
    But in Dev and LAB where FR Studio is working fine - FRClient logs absolutely no recods at all and there we did run configuration to tell which SQL db is on background.
    Not sure though whether that config run has any significance for FR Studio.
    Sorry for extremely long story, but just in case if anybody has faced similar issues and whether there could be something with Windows server settings I should go and check?
    Btw... even adding this fr_configcache.properties manually (to try to highlight FR server name and port) it seems FR Client can't find the file.
    Br, MJK

    Denis,
    Thank you for the prompt reply.
    >
    Denis Konovalov wrote:
    > if those reports were saved with security - you're not goingt o be able to open them with Xi3.1 Deski.
    Forgive me for my mundane question but what does saving with security mean?
    Thanks

  • When accessing shared folder - 'You might not have permission to use this network resource" .. A device attached to the system is not functioning

    On a Windows 2008 R2 server that had been working fine, all of a sudden some shared folders became inaccessible.  Clicking on them returned the following: "<Folder> is not accessible.  You might not have permission to use this network
    resource.  A device attached to the system is not functioning."
    If I create another share with a different name for that same folder, it works fine.  If I delete the original share then recreate it with the same name, I get the same error.  However, if I right click on the problematic share and select 'map
    network drive' that works.  So this would not appear to be a permission issue.
    I discovered this problem because the path for mapping the home folder as a property of their AD account stopped working.
    I have tried most of the common things found on the internet.  I've tried accessing via IP, same issue.  While I only have a couple 2003 servers, those can access this resource.
    At this point, I'm pretty much out of ideas.  Any help would be appreciated.  I also have some reports of potential issues with some printer mappings too which I will have to investigate in the morning.
    If anyone has a solution to this I would be extremely grateful.  Thank you.

    Hi,
    Can you access the shard folder locally? Is a specific server cannot access the shared folder? Please try to Boot your server in Clean Mode to check if some third-party software cause the issue.
    How to perform a clean boot in Windows
    http://support.microsoft.com/kb/929135
    Best Regards,
    Mandy
    If you have any feedback on our support, please click
    here .
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How do I copy and paste an image form the internet to Keynote. I have done this successfully in the past by selecting copy and then paste by using the right click function and now am unable to do so. I am thinking it is an outdate OS problem...not sure.

    How do I copy and paste an image from the internet to Keynote. I have done so successfully in the paste by using the copy and paste right click functions but am unable to do so now. That was about a year ago that I attempted that I was able to do this. Thank you for your help.

    Some images are copy-protected.
    If all else fails, you can make a screen shot of the image: 
    With the image visible in your browser, press CMD-Shift-4 and your cursor will change to crosshairs.
    Position the cross hairs at one of the corners of what you want to copy and drag to the opposite corner, then release the mouse. An copy of the image will be saved to your desktop.
    You can now edit and use this image.
    Be sure to respect copyrights.
    Message was edited by: bwfromspring hill

  • Elements 12 Organizer crashes every time I try to use the Photo Mail function. Has anyone else come across this bug?

    I highlight the photos I want to share, go to Photo Mail, select the addressees and press "Next". I then get the error message: "Elements Organizer has stopped working" and I have to close the program down.
    This is obviously a bug in the program and needs fixing. Has anyone else encountered it and found a solution. (I might add that the same crash happens if I try to use the "Email attachments" function.)

    Hi,
    Are you running on a Windows system?
    If so, use the windows explorer to navigate to one of the following files according to your system.
    64bit system: "C:\Program Files (x86)\Adobe\Elements 12 Organizer\PhotoshopElementsOrganizer.exe"
    32bit system: "C:\Program Files\Adobe\Elements 12 Organizer\PhotoshopElementsOrganizer.exe"
      Right click on that file and select Run as Administrator then try your email again.
      You should only have to do this once.
      Good luck
    Brian

  • How to use decode or case function in this?

    Hi,
    I want to implement this condition in a query without using any user defined functions
    1.if (T_fees = 'ABC' then if (p_fees>0) then nvl(p_fees,0) else (p_fees + a_fees) else 0)
    2. if(g_fees <> (if t_fees = 'ABC' then if (p_fees>0) then nvl(p_fees,0) else (p_fees)
    else 0
    Is it possible to use any nested 'CASE' statement ?
    This is very urgent...
    Regards,
    Shilpa

    Hi,
    Is it possible to use any nested 'CASE' statement ?Yes it it possible.
    "afiedt.buf" 7 lines, 89 characters
      1  SELECT sysdate FROM DUAL
      2  WHERE 1 = (CASE WHEN 1=1  AND 2=2 THEN
      3             1
      4       ELSE
      5             2
      6*     END)
    SQL>/
    SYSDATE
    07-AUG-06
    1 row selected.
    "afiedt.buf" 11 lines, 139 characters
      1  SELECT sysdate FROM DUAL
      2  WHERE 1 = (CASE WHEN 1=1  AND 2=2 THEN
      3             CASE WHEN 3=3 AND 4=4 THEN
      4                     1
      5             ELSE
      6                     0
      7             END
      8       ELSE
      9             0
    10*     END)
    SQL>/
    SYSDATE
    07-AUG-06
    1 row selected.
    You can implement your logic.
    Regards

  • How to use this function in crm5.2 -   /CEM/ENT_IMPORT_DATAFROMEXCEL

    i am having a problem regarding how to use this function to import values from an excel sheet.
    in call funtion what to specify at place of ct_ent_action = ?
    CALL FUNCTION '/CEM/ENT_IMPORT_DATAFROMEXCEL'
      CHANGING
        CT_ENT_ACTION       =
    EXCEPTIONS
      FILE_ERROR          = 1
      IMPORT_ERROR        = 2
      OTHERS              = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Hi
    The use of Standard Parner functions are as follows:
    1. Ordering Address (OA): The PO will be sent this vendor and not the main vendor.
    2. Goods Supplier (WL): In case of return deliveries, Goods will be returned to thsi vendor's address
    3. Invoicing party (RS): The payment will be made to this vendor.
    Hope this clarifies.
    Thansk

  • How can i use this  function module

    Hai
    How can i use this function module /SAPHT/SALES_ORDER_READ, already apply the some parameters in this function module, but it shows the error , please tell me, how to declare the parameters in this function module ,
    thanks
    neelima

    Hi
    For a particular sales order,you have to pass the order number and the item number in the sales order.
    It will display the rest of the values which u can capture them using internal tables.
    Regards,
    Vishwa.

  • I have Acrobat 9.5 and when I try to create pdf from scanner, it displays an error "Adobe acrobat has stopped working". Is there any way I can use this functionality?

    I have Acrobat 9.5 and when I try to create>pdf from scanner, it displays an error "Adobe acrobat has stopped working". Is there any way I can use this functionality?

    Provide you have Acrobat 9 installed in an OS for which Acrobat 9 is compatible then you can use the functionality.
    As well, you need a scanner connected, powered up, and the software installed. Acrobat 9 "prefers" TWAIN drivers.
    Always visit the scanner vendor's site and download - install the latest greatest software.
    n.b., The Acrobat 9.x product family passed into "End of Support" mid-year 2013.
    As well the Acrobat 9.x product family is not compatible with contemporary OSs.
    Be well...

  • How to use this function call function 'REUSE_ALV_COMMENTARY_WRITE' in alv

    hi all
    thanks in advance
    how to use this function in alv programming
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    why use and what purpose use this function plz tell me details
    plz guide me
    thanks

    Hi
    see this exmaple code where i had inserted a LOGO by useing this FM
    *& Report  ZTEST_ALV_LOGO
    REPORT  ztest_alv_logo.
    TYPE-POOLS : slis.
    *ALV Formatting tables /structures
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: gt_events   TYPE slis_t_event.
    DATA: gs_layout   TYPE slis_layout_alv.
    DATA: gt_page     TYPE slis_t_listheader.
    DATA: gs_page     TYPE slis_listheader.
    DATA: v_repid     LIKE sy-repid.
    *ALV Formatting work area
    DATA: w_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_events   TYPE slis_alv_event.
    DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
    INITIALIZATION.
      PERFORM build_events.
      PERFORM build_page_header.
    START-OF-SELECTION.
    *perform build_comment.     "top_of_page - in initialization at present
      SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
    *perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
    *USING = Row, Column, Field name, display length, table name, heading
    *OR
      PERFORM build_fieldcat.
      gs_layout-zebra = 'X'.
    *top of page event does not work without I_callback_program
      v_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program                = v_repid
          i_structure_name                  = 'BSID'
       i_background_id                   = 'ALV_BACKGROUND'
          i_grid_title                      = 'This is the grid title'
      I_GRID_SETTINGS                   =
          is_layout                         = gs_layout
          it_fieldcat                       = gt_fieldcat[]
          it_events                         = gt_events[]
        TABLES
          t_outtab                          = gt_bsid.
    Form..............:  populate_for_fm
    Description.......:  Populates fields for function module used in ALV
    FORM populate_for_fm USING p_row
                               p_col
                               p_fieldname
                               p_len
                               p_table
                               p_desc.
      w_fieldcat-row_pos      = p_row.          "Row Position
      w_fieldcat-col_pos      = p_col.          "Column Position
      w_fieldcat-fieldname    = p_fieldname.    "Field name
      w_fieldcat-outputlen    = p_len.          "Column Lenth
      w_fieldcat-tabname      = p_table.        "Table name
      w_fieldcat-reptext_ddic = p_desc.         "Field Description
      w_fieldcat-input        = '1'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " populate_for_fm
    *&      Form  build_events
    FORM build_events.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = gt_events.
      READ TABLE gt_events
                 WITH KEY name =  slis_ev_user_command
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_user_command TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
      READ TABLE gt_events
                 WITH KEY name =  slis_ev_top_of_page
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_top_of_page TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
    ENDFORM.                    " build_events
    *&      Form  USER_COMMAND
    When user command is called it uses 2 parameters. The itab
    passed to the ALV is in whatever order it currently is on screen.
    Therefore, you can read table itab index rs_selfield-tabindex to get
    all data from the table. You can also check r_ucomm and code
    accordingly.
    FORM user_command USING  r_ucomm     LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      READ TABLE gt_bsid INDEX rs_selfield-tabindex.
    error checking etc.
      SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
    ENDFORM.                    "user_command
    *&      Form  top_of_page
    Your own company logo can go here if it has been saved (OAOR)
    If the logo is larger than the size of the headings in gt_page,
    the window will not show full logo and will have a scroll bar. Thus,
    it is a good idea to have a standard ALV header if you are going to
    use logos in your top of page.
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_page
          i_logo             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "top_of_page
    *&      Form  build_fieldcat
    *Many and varied fields are available here. Have a look at documentation
    *for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
    FORM build_fieldcat.
      w_fieldcat-fieldname  = 'BUDAT'.
      w_fieldcat-seltext_m  = 'Dte pst'.
      w_fieldcat-ddictxt(1) = 'M'.
      w_fieldcat-edit = 'x'.
    Can change the position of fields if you do not want them in order
    of the DDIC or itab
    w_fieldcat-row_pos = '1'.
    w_fieldcat-col_pos = '10'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " build_fieldcat
    *&      Form  build_page_header
          gt_page is used in top of page (ALV subroutine - NOT event)
          *H = Header, S = Selection, A = Action
    FORM build_page_header.
    For Headers, Key is not printed and is irrelevant. Will not cause
    a syntax error, but is not used.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 2'.
      APPEND gs_page TO gt_page.
    For Selections, the Key is printed (bold). It can be anything up to 20
    bytes. It gets printed in order of code here, not by key value.
      gs_page-typ  = 'S'.
      gs_page-key  = 'And the winner is:'.
      gs_page-info = 'Selection 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'S'.
      gs_page-key  = 'Runner up:'.
      gs_page-info = 'Selection 2'.
      APPEND gs_page TO gt_page.
    For Action, Key is also irrelevant.
      gs_page-typ  = 'A'.
      gs_page-info = 'Action goes here'.
      APPEND gs_page TO gt_page.
    ENDFORM.                    " build_page_header

  • What is the difference this 2 sample pictures? Use IMAQ Detect Circles function to detect the GREEN button.

    Hi All,
    Please refer to the attached 2 pictures, they are the similar, just the size is defferent. (pass.PNG, 5478 pass.PNG).
    But now i try to use IMAQ Detect Circles to catch the GREEN button. For pass.PNG, it works fine, but for another sample, it is always fail to detect this button. 
    I also try to change the Curve Parameters and score as input, but still failed. Another way, i also try to use IMAQ find circles function, but the result is worse than IMAQ Detect Circles, so give up. 
    The code is detect the circles.png, copy it to block diagram enough.
    So, what is the root cause? Thanks for help.
    Colin
    LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
    Please Mark the solution as accepted if your problem is solved and donate kudoes
    Home--www.colinzhang.net
    Solved!
    Go to Solution.
    Attachments:
    pass.PNG ‏38 KB
    5478 pass.PNG ‏35 KB
    detect the circles.png ‏112 KB

    Hi colinzhang,
    The curve extraction mode if change it to Uniform mode, u can get the result.
    -Suggestion, if you want to use the entire image region as ROI no need to get the image size, getting rectangle and converting it to ROI descriptor. (I think this is unnecessary)
    -Be careful with color plane extraction, u're using by default which is Red plane. In this example it's fine. but make sure u know which plane u're extracting.
    -please find vi saved in 2010 version.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Attachments:
    Detect_Circles.vi ‏53 KB

  • How to use this function module on abap hr GET_PDSNR_RANGE

    how to use this function module on abap hr GET_PDSNR_RANGE
    thankx.

    PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE

  • Have tried to copy ratings over to a new computer using the export playlist function and this fails... can anyone suggest why?

    have tried to copy ratings over to a new computer using the export playlist function and this fails... can anyone suggest why?

    Because ratings don't travel with the files or the playlist.
    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
    tt2

  • Downloaded 11.0.3 (42) 64 bit to my MacBook Pro and it crashes every time I select a song a use the 'add to' function to add to a play list. It's never done this before, is it a bug with the new version?

    downloaded 11.0.3 (42) 64 bit to my MacBook Pro and it crashes every time I select a song a use the 'add to' function to add to a play list. It's never done this before, is it a bug with the new version?

    You could just disable updates. Change these settings in about:config.
    * app.update.auto - set to false
    * app.update.enabled - set to false
    You can still check for updates with the "Check for Updates" button in the About Firefox window, but it will download the update file anyway if there is an update available. You can also check which is the current release from here:
    * http://sjc.mozilla.com/en-US/firefox/new/

Maybe you are looking for

  • Facetime No Longer Works After 4.3.4 Update

    Has anyone else experienced this issue on their iPhone? After my wife upgraded her iPhone 4 to 4.3.4 her FaceTIme no longer sends a video signal. My iPhone 4 upgraded without a hitch, but hers doesn't send a video signal at all. She cannot see hersel

  • Error connecting UWL EP7.0 with SAP R/3 4.7

    Hello, We're trying to connect UWL of EP 7.0 with SAP R/3 4.7 Kernel 6.40  patch 247(ST-PI 2005_1_620) and we get the following error: "(Connector) :javax.resource.ResourceException:Failed getting the following function metadata from repository: URL_

  • Possible Bug?  NullPointerException on Transaction rollback

    Hi, Not sure if this is a known bug or not. I am using SQL Server 2000, Microsoft's JDBC driver, JDK 1.4.1_01 on a Win2k platform. With Kodo 2.3.3 I am getting the following exception when I call a transaction.rollback(). My update is failing because

  • HT204053 photo stream says my iCloud account can not be accessed

    Photo Stream says my iCloud account can not be accessed and I can't get rid of it

  • Adf Struts + Logon + Security

    Hi All I have developed an adf web application and have some questions about logging on and security. I have read the jaas security documents and understand the process. The application will have several users. My question is what is the best way to