Fill handle question

Hi (again).
This is a problem I have had with Excel as well and I don't know if it is possible to do with Numbers.
I want to use the fill handle to automatically fill in a table with calculation but without changing one of the argument in the formula.
In cell A2, I have the formula "=A1+B2". If I use the handle to drag that cell to the right, I will get "=A2+B3", where I would like to have "=A1+B3", so only increment one part of the formula and consider the other part as a reference.
Is this possible ?

Michael,
Place a $ in front of the row or column you want to remain absolute.
When you drag = $A2+B2 to the right you will get =$A2+C2, =$A2+D2, etc.
Dragging down =$A$2+B2 gives, =$A$2+B3, =$A$2+B4, etc.
Dragging to the right changes the column letter unless there is a $ in front of it.
Dragging down changes the row number unless there is a $ in front of it.
pw

Similar Messages

  • Merging cells and using the fill handle to copy the merge in subsequent...

    My problem can be best illustrated by me by explaining how I could achieve it in Excel.
    In Excel, this is how it would be done for example:
    I select two horizontal cells and click on the merge button to merge them. They are now one cell, with the fill handle (small circle) on the bottom right corner. Clicking on that circle and dragging it down will merge both cells in each row into a single cell. i.e. each subsequent row will look like the row above until I stop dragging.
    How can I do this in Numbers. Obviously I don't want both columns to become one wider column, but just a certain selection of rows within the two columns.

    doktor_florian wrote:
    Either this answer does not have anything to do with the original question or I just don't get the link.
    If I select 20 rows with two columns and press "merge" I get one cell with the content of 20 rows. This is utterly useless.
    Hi,
    1.) I think you do not entirely understand my poing. Unfortunately, I cannot upload images of what I am trying to illustrate in words.
    I am not trying to merge 2 columns and their 20 rows into one cell. What I want to do is to merge two cells horizontally.
    Open Numbers and open a blank spread sheet. You have numerous columns and rows, but for simplicity, concentrate on columns A and B and rows 1-5.
    The illustrations below show what it is I want to achieve. You start of with (1), two columns with 5 rows making a total of 10 cells. For what ever reasons, I need to merge the 2nd row (A2+B2) into a single cell. I select them, click on merge and that's it. [Illustration (2)] However, I also need the 2nd and 3rd row merged. In Excel. I would click on the bottom-right corner of the 2nd row which was recently merged and drag down. This would copy the merged cell onto the rows below and the result is shown in illustration (3). Now, I could just repeat the procedure that I did the first time I merged the two cells in row 2, but imagine if you need to do this for 10 or 20 rows. That's extremely time consuming and certainly there must be an easier way.
    (1) (2) (3)
    A B A B A B
    1 l___l___l 1 l___l___l 1 l___l___l
    2 l___l___l 2 l_______l 2 l_______l
    3 l___l___l 3 l___l___l 3 l_______l
    4 l___l___l 4 l___l___l 4 l_______l
    5 l___l___l 5 l___l___l 5 l___l___l
    2.) +"If I select 20 rows with two columns and press "merge" I get one cell with the content of 20 rows. This is utterly useless."+
    I think this is a very patronizing comment. How can you know what needs I or other Numbers users have? Perhaps it is very useless to you, in which case you should have said so, but it is not objectively useless.
    P.S. I apology for the messiness of the illustrations. It's the best I can do.

  • Autofill without dragging fill handle?

    Is there a way to fill down a formula or function in a empty column without dragging the fill handle through ~2500 rows in a worksheet?

    If your numbers are in column B for instance, just insert the formula
    =ROW()
    Doing that when you created the document, you just would have to drag the formula on a short range.
    After that, when using the document, the formula will be created automatically when you add rows at the bottom or when you insert rows somewhere in the table.
    If you already have a large table, you may use this AppleScript:
    --[SCRIPT autoNumber]
    Enregistrer le script en tant qu'Application ou Progiciel : autoNumber.app
    déplacer l'application créée dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Sélectionnez la première cellule à numéroter.
    menu Scripts > Numbers > autoNumber
    Saisir le numéro de départ.
    Le script remplit la cellule de départ et les cellules de rang supérieur dans la colonne ave la formule =LIGNE()-xx, xx étant calculé pour que la numérotation commence comme prévu.
    +++++++
    Save the script as an Application or an Application Bundle: autoNumber.app
    Move the newly created application into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Select the first cell to fill.
    menu Scripts > Numbers > autoNumber
    Type tha value of the starting number.
    The script fills selected cell and those of higher index in its column with the formula =ROW()-xx where xx is calculated given the starting number.
    Yvan KOENIG (Vallauris, FRANCE)
    7 février 2009
    property theApp : "Numbers"
    property delim : missing value
    property ROW_loc : missing value
    --=====
    on run
    if delim is missing value then
    if character 2 of (0.5 as text) is "." then
    set delim to ","
    else
    set delim to ";"
    end if
    set p2lproj to my getLproj(theApp)
    set ROW_loc to my getLocalizedFuncName(p2lproj, "ROW")
    end if
    set {rName, tName, sName, dName} to my getSelection()
    if rName is missing value then error "No selected cells"
    set twoNames to my decoupe(rName, ":")
    set {colNum1, rowNum1} to my decipher(item 1 of twoNames)
    (* Here we know the starting point of the destination area. *)
    tell application (path to frontmost application as string)
    if my parleFrancais() then
    set msg to text returned of (display dialog "Tapez le premier numéro à utiliser" default answer "1")
    else
    set msg to text returned of (display dialog "Enter the first number to use" default answer "1")
    end if
    end tell
    try
    set msg to msg as integer
    on error
    if my parleFrancais() then
    error "Nombre entier attendu !"
    else
    error "Must be an integer number !"
    end if
    end try
    set prem to rowNum1 - msg
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName to tell column colNum1
    set cMax to (get count row)
    repeat with y from rowNum1 to cMax
    set value of cell y to "=" & ROW_loc & "()-" & prem
    end repeat
    end tell
    end run
    --=====
    on getSelection()
    local mySelectedRanges, sheetRanges, thisRange, _, myRange, myTable, mySheet, myDoc, mySelection
    tell application "Numbers" to tell document 1
    set mySelectedRanges to selection range of every table of every sheet
    repeat with sheetRanges in mySelectedRanges
    repeat with thisRange in sheetRanges
    if contents of thisRange is not missing value then
    try
    --return thisRange --poorly formed result
    thisRange as text
    on error errmsg number errNum
    set {_, myRange, _, myTable, _, mySheet, _, myDoc} to my decoupe(errmsg, quote)
    --set mySelection to (a reference to (range rn of table tn of sheet sn))
    return {myRange, myTable, mySheet, myDoc}
    end try
    end if -- contents…
    end repeat -- thisRange
    end repeat -- sheetRanges
    end tell -- document 1 of application
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on decipher(n)
    local letters, colNum, rowNum
    set letters to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    if (character 2 of n) as text > "9" then
    set colNum to (offset of (character 1 of n) in letters) * 64 + (offset of (character 2 of n) in letters)
    set rowNum to (text 3 thru -1 of n) as integer
    else
    set colNum to offset of (character 1 of n) in letters
    set rowNum to (text 2 thru -1 of n) as integer
    end if
    return {colNum, rowNum}
    end decipher
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    on getLocale(a, x)
    tell application a to return localized string x
    end getLocale
    --=====
    on getLocalizedFuncName(f, x)
    return localized string x from table "Localizable" in bundle file f
    end getLocalizedFuncName
    --=====
    on getLproj(aa)
    local lprojName
    set lprojName to my getlprojName(aa) & ".lproj"
    return (path to application support as text) & "iWork '09:Frameworks:SFTabular.framework:Versions:A:Resources:" & lprojName
    end getLproj
    --=====
    on getlprojName(aa)
    local lprojs, localId, lproj
    set lprojs to {{"da_DK", "da"}, {"nl_NL", "Dutch"}, {"en_US", "English"}, {"fi_FI", "fi"}, {"fr_FR", "French"}, {"de_DE", "German"}, {"it_IT", "Italian"}, {"ja_JP", "Japanese"}, {"ko_KR", "ko"}, {"no_NO", "no"}, {"pl_PL", "pl"}, {"pt_BR", "pt"}, {"pt_PT", "pt_PT"}, {"ru_RU", "ru"}, {"es_ES", "Spanish"}, {"sv_SE", "sv"}, {"zf_CN", "zh_CN"}, {"zh_TW", "zh_TW"}}
    if aa starts with "Pages" then (* why are they using different strings ? *)
    set localId to my getLocale(aa, "http://support.apple.com/manuals/#iwork")
    else (* here for Keynote or Numbers *)
    set localId to my getLocale(aa, "http://support.apple.com/en_US/manuals/#iwork")
    end if
    set localId to text (1 + (count of "http://support.apple.com/")) thru -1 of localId
    set localId to text 1 thru ((offset of "/" in localId) - 1) of localId
    set lproj to ""
    repeat with i from 1 to count of lprojs
    if localId is item 1 of item i of lprojs then
    set lproj to item 2 of item i of lprojs
    exit repeat
    end if
    end repeat
    if lproj = "" then
    if my parleFrancais() then
    error "Le fichier FrameWorks " & localId & " manque !"
    else
    error "The Frameworks file " & localId & "is missing !"
    end if
    else
    return lproj
    end if
    (* returns
    da
    Dutch
    English
    fi
    French
    German
    Italian
    Japanese
    ko
    no
    pl
    pt
    pt_PT
    ru
    Spanish
    sv
    zh_CN
    zh_TW
    given the language used to display the program's GUI. *)
    end getlprojName
    --=====
    on parleFrancais()
    local z
    try
    tell application theApp to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z = "Annuler")
    end parleFrancais
    --=====
    --[/SCRIPT]
    Yvan KOENIG (from FRANCE samedi 7 février 2009 19:55:27)

  • Import u2013 MDIS handling Question

    This is for auto import and I have two fields and both are lookup fields.
    FIELD  A  -  Lookup field
    FIELD B  - Lookup field
    Requirements
    FIELD A,  I have a new lookup field value in the import file and I want to add this new field value to the lookup table  then map and import the file.
    FIELD B,  I have a new lookup field value in the import file but I want to set this as ERROR and  donu2019t import this record.
    How  do we handle these two fields differently?
    The Import manager configuration section of the default  MDIS handling,  unmapped value handling, I have  IGNORE, ADD & FAIL.  I can select one of the option and continue.
    But how to handle this based on individual fields has individual requirements?
    My another question is:-
    My import file has 100 records.  Import Manager configuration option, Default MDIS handling -> Unmapped value handling = Fail.
    Out of the 100 records, only one record has the error so that record will not be loaded  and remaining 99 records will be loaded.
    But the exception folder, the file has all the records (100 records) if I am not mistaken. So it is pretty difficult to identify which record has error.  Again if the input file has more records then it is more difficult.
    Is there a way we can identify only records that are in error instead of looking the whole file in the exception folder?

    Hi,
    The Import manager configuration section of the default MDIS handling, unmapped value handling which you set, by default is applicable to all of the look up fields.
    But if you want to handle it individually for two fields, you can.
    In Map Fields/Values Tab Say Source Field A map with Target Destination field TrgA, Right click on TrgA Set Unmapped Value handling as Add.
    IIy, you can set for Field B as per your requirement as Add, Ignore, Fail etc. As i see select here Fail.
    For Second Question you asked,
    Is there a way we can identify only records that are in error instead of looking the whole file in the exception folder
    Whenever you get file into exception folder, Go to Import Manager, Select Type as Port, Remote system as per your requirement, Port as Filename(Exception) select and Finish it. Once your Import Manager opens, Go to Import Status Tab check Action Items for take the desired action to import that file. In this way you will come to know what are the fields and values which need to be mapped. Once it maps you can import this file in one shot and data will be populated into MDM.
    Thanks and Regards,
    Mandeep Saini

  • Fault and Error handling questions

    Hi,
    I have a few of questions regarding exception handling :
    1. Where can I find documentation (i.e. details and when thrown) on all the Standard faults available with BPEL ie. those in
    http://schemas.xmlsoap.org/ws/2003/03/business-process/" and
    http://schemas.oracle.com/extension
    2. Let's say I do not know in advance what specific fault to catch. I add a catchAll inside my scope. When catchAll triggers, I want to get the detail faultmessages of whatever fault caused the catchAll.
    3. I want to use a message type from the RuntimeFault.wsdl in my project. Should I copy over the wsdl file to my project folder ? If I do not copy over and import it from it's location (integration/orabpel/system/xmllib), the console is failing runtime when I try to render the input page.
    How can I do that ?
    Thanks
    Arindam

    You can find the standard faults from the BPELspec
    1.1.
    In 10.1.2.0.2 (the latest released version), youcan
    use some system xpath functions to extract thefault
    information in <catchAll> block:
    getFaultAsString( ) returns String
    Or
    getFaultName( ) returns QName as fault name.Hi Muruga,
    Thanks for your reply.
    Can you please also let me know :
    1. what's the signature of these methods ?
    2. I have 10.1.2.0.2 local version. However under
    catchall -> assign -> xpath expression builder, I do
    not see these 2 functions.
    Can you please help.
    ThanksHi Muruga,
    I tried doing the following :
    <faultHandlers>
    <catch faultName="bpelx:bindingFault" faultVariable="bindingFaultVar">
    <assign name="assignBindingFault">
    <copy>
    <from expression="concat(bpws:getVariableData('bindingFaultVar','code'),bpws:getVariableData('bindingFaultVar','summary'),bpws:getVariableData('bindingFaultVar','detail'))"/>
    <to variable="outputVariable" part="payload" query="/ns1:TransmissionAck/ns1:StackTrace"/>
    </copy>
    </assign>
    </catch>
    <catchAll>
    <assign name="assignCatchAll">
    <copy>
    <from expression=""Unexpected Error in the BPEL Process""/>
    <to variable="outputVariable" part="payload" query="/ns1:TransmissionAck/ns1:TransmissionText"/>
    </copy>
    <copy>
    <from expression="bpws:getFaultAsString()"/>
    <to variable="outputVariable" part="payload" query="/ns1:TransmissionAck/ns1:StackTrace"/>
    </copy>
    </assign>
    </catchAll>
    </faultHandlers>
    I got the following runtime error when an actual catchAll was caught :
    [2006/02/24 17:09:36] "{http://schemas.oracle.com/bpel/extension}remoteFault" has been thrown. less
    <remoteFault>
    <part name="code" >
    <code>17410</code>
    </part>
    <part name="summary" >
    <summary>file:/C:/OraBPELPM_2/integration/orabpel/domains/default/tmp/.bpel_WshOtmSyncInboundShipment_19.0.jar/WSH_OTM_INBOUND_GRP.wsdl [ WSH_OTM_INBOUND_GRP_ptt::WSH_OTM_INBOUND_GRP(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'WSH_OTM_INBOUND_GRP' failed due to: Error while converting to a Java array object. Unable to convert the XSD element P_INT_TRIP_INFO whose collection type is WSH_OTM_TRIP_TAB. Cause: java.sql.SQLException: No more data to read from socket ; nested exception is: ORABPEL-11801 Error while converting to a Java array object. Unable to convert the XSD element P_INT_TRIP_INFO whose collection type is WSH_OTM_TRIP_TAB. Cause: java.sql.SQLException: No more data to read from socket Check to ensure that the XML data describing the collection matches the definition of the array in the XSD. Contact oracle support if error is not fixable. </summary>
    </part>
    <part name="detail" >
    <detail>No more data to read from socket</detail>
    </part>
    </remoteFault>
    WS-T Complete
    WS-T Close
    WS-T Fault
    WS-T Cancel
    WS-T Compensate
    </sequence>
    <catchAll>
    assignCatchAll (faulted)
    [2006/02/24 17:09:36] Updated variable "outputVariable" less
    <outputVariable>
    <part name="payload" >
    <TransmissionAck>
    <EchoedTransmissionHeader>
    <TransmissionHeader>
    <UserName/>
    <Password/>
    </TransmissionHeader>
    </EchoedTransmissionHeader>
    <TransmissionAckStatus/>
    <TransmissionAckReason/>
    <StackTrace/>
    <TransmissionText>Unexpected Error in the BPEL Process</TransmissionText>
    </TransmissionAck>
    </part>
    </outputVariable>
    [2006/02/24 17:09:37] "XPathException" has been thrown. less
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "bpws:getFaultAsString()", the reason is function "bpws:getFaultAsString" not registered.
    Please verify the xpath query.
    </catchAll>
    WS-T Complete
    WS-T Close
    WS-T Fault
    WS-T Cancel
    WS-T Compensate
    <scope>
    WS-T Complete
    WS-T Close
    WS-T Fault
    WS-T Cancel
    WS-T Compensate
    </sequence>
    [2006/02/24 17:09:37] "XPathException" has not been caught by a catch block.
    [2006/02/24 17:09:37] BPEL process instance "4503" cancelled
    Can you please help.
    Thanks

  • Simple Error Handling Question

    I know that in general, when you are handling an error, you can either pass the back by adding a throws declaration to the method in question, or surround with try/catch and handle the error.
    What do you do if you want the error to force the application to stop? Just send a simple output message and then stop.
    Thx,
    hqd

    What do you do if you want the error to force the
    application to stop? Just send a simple output
    message and then stop.You should stop wanting that. If the code in method X
    encounters an error it can't deal with, it should
    throw that error to whoever calls it. It is the
    responsibility of the caller to decide what to do,
    not the responsibility of method X.But the buck has to stop somewhere. Are you saying that only the main method should ever stop a program?
    Maybe this is one of the gaps in my understanding of good overall design, but it seems perfectly valid to me to have certain methods that, when they error, I know I always want my application to stop. Passing it along up the chain might involve adding a whole bunch of throws declarations.... why... just to say we have no methods that stop the application. Say this piece of code is not longer used in the spot that throws it's possible error up the chain.... now you have to remove all those throws.... isn't this ripple effect on our code bad design?
    What am I missing?
    Thanks,
    hqd

  • TS1702 Hello , i m having troubles installing new applications . Everytime i try to install a new application , my iphone asks me to answer questions to verify my ID. i have never filled these questions . What ever answer i put , it s wrong. what ca i do

    troubles installing apps from appstore. everytime i try to install an app , the system asks me to answer  verification questions that i don t remember having ever filled . So whatever i answer , it s a wrong answer ; and i can not download any app .
    what can i do ???????????????

    Welcome to the Apple Community and a merry Christmas.
    Start here, and reset your security questions, you will receive an email to your rescue address, use the link in the email and reset your security questions.
    If that doesn't help or you don't have a rescue address, you might try contacting Apple throughiTunes Store Support

  • Pen tool handle question: clear one handle only

    I feel pretty comfortable with the Pen Tool; however there is one small question that I haven't been able to solve.
    If a point has 2 handles, how do I get rid of just ONE handle? I can kind of do it by dragging the handle to the anchor point, but it is still there, to drag out again.
    I read that Opt-Clicking (I think) the handle will do it, but that does not work for me.
    Thanks,
    Sonny

    Sonny:
    I don't think that you quite understand what the handles are indicating:
    No Handles = a Corner Point;
    Two handles (that move in concert) = a Smooth Point
    Two handle which can move independently) = a Cusp Point
    Option Click on the end of a Smooth Point's Handle to make the Point into a Cusp Point.
    Option Click on the Node of a Smooth Point or a Cusp point to make the Point into a Corner Point.
    Option Click on the Node of a Corner point to make the Point into a Smooth Point.
    The Handles are there to help you use them to shape your Paths.

  • CSS11500 SSL handling question for multiple url/FQDNs with the same ip address

    I know that it's possible on the CSS to handle multiple incoming HTTP requests that terminate on the same IP address and port and balance them to various servers based on the url.   For instance, I can set up www.cats.com and www.dogs.com at the same 192.168.35.12 address in DNS, and set up two different content rules:
    content cats
    vip address 192.168.35.12
    port 80
    url "//www.cats.com/*"
    add server cats1
    add server cats2
    active
    content dogs
    vip 192.168.35.12
    port 80
    url "//www.dogs.com/*"
    add server dogs1
    add server dogs2
    active.
    Easy and straightforward.
    But what if I want to add SSL handling for https://www.cats.com and https://www.dogs.com?
    I'm not sure how to create the ssl-proxy-list where one content rule (ip address/port) combination needs to pass through the ssl module and get matched with the proper ssl certificate.
    Can this be done?  Can one associate multiple certs and keys with a single ssl-server entry and a single ssl accelerator service?  Or do I have to create multiple ssl-proxy-lists for cats and dogs and build multiple ssl services each referring to a unique ssl-proxy-list, and then use the url parameter in the https content rule to determine which ssl service (and therefore which key/cert pair) gets the traffic?
    Thanks in advance for any insights.

    Hi Tim,
    Unfortunately this is not possible; you can't associate multiple certificates to a single proxy list due to the fact that SSL handshake is done first with no visibility of the URL being requested, so the CSS won't know which public server to use in order to perform the traffic decryption.
    But there are a couple of options that you may want to look at (depending on the URL string)
    If your URLs are subdomains and you hold a wildcard SSL certficate to match multiple requests, i.e your domain being "pets.com" you can have a certficate that will match request for dogs.pets.com or cats.pets.com because the cert will be in the form *.pets.com
    The second option is SAN (Subject alternative names) certificates; which give you the option to include up to 4 flavors of the domain within the same file, such as pets.com, pets.net, www.1pets.com.
    I hope this helps.
    Pablo

  • Event handling question

    I am very new to Swing....I am very confused about how event handling works. I created a button called "remove" and a list. When a user selects an item in the list and then clicks on the remove button, then the item should be deleted from the list. I am able to display the list and the button. I create a listener for the button in a separate class as follows:
    class MyActionListener implements ActionListener
    public void actionPerformed (ActionEvent e)
    if(e.getActionCommand().equals("remove"))
    {System.out.println("remove works");
    Now my problem is ..how do i access the list in this class..because my list is set up in the other class (main class). Because if i try to do anything with the list in this class it shows the compile time error saying it cannot identify what list is. Please tell me how i can use the list in the MyActionListener class. Here is the code that sets up the list:
    public abstract class VetNet extends JFrame implements ListSelectionListener
    static DefaultListModel listM= new DefaultListModel();
    static DefaultListModel listModel;
    public static void main (String[] args)throws IOException
    JPanel panel= new JPanel();
    JLabel j=new JLabel("Welcome");
    panel.add(j,BorderLayout.NORTH);
    BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer reader;
    reader=new StringTokenizer(stdin.readLine());
    String first_name=reader.nextToken();
    while(!first_name.equals("end"))
    { String last_name=reader.nextToken();
    add_name(first_name,last_name);
    reader=new StringTokenizer(stdin.readLine());
    first_name=reader.nextToken();
    }//while
    DefaultListModel listModel=new DefaultListModel();
    listModel=return_fname();
    String first= (String)(listModel.firstElement());
    JList sampleJList= new JList(listModel);
    sampleJList.setVisibleRowCount(2);
    // sampleJList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    //sampleJList.setSelectedIndex(0);
    //sampleJList.addListSelectionListener(sampleJList);
    JScrollPane listPane=new JScrollPane(sampleJList);
    panel.setBorder(BorderFactory.createEmptyBorder(60,60,30,60));
    panel.add(listPane);
    JButton b1=new JButton("add");
    panel.add(b1);
    JButton b2=new JButton("remove");
    panel.add(b2);
    JButton b3=new JButton("edit");
    panel.add(b3);
    JFrame frame = new JFrame ("VetNet");
    frame.getContentPane().add(panel);     
    frame.addWindowListener(new WindowAdapter() {
         public void windowClosing (WindowEvent e) { System.exit(0); }
    frame.pack ();
         frame.setVisible(true);
    //MyActionListener myListener= new MyActionListener();
    b1.addActionListener(new MyActionListener());
    b2.addActionListener(new MyActionListener());
    b3.addActionListener(new MyActionListener());
    //sampleJList.addActionListener(new MyActionListener());
    }//main
    private static void add_name(String f_name, String l_name)
    listM.addElement(l_name+ ", " + f_name);
    }//method add_fname
    private static DefaultListModel return_fname()
    return listM;
    }//method return_fname

    Ok! This is the LONG answer, but I think you would benefit from reading it all.
    Making something public means that it can be accessed from other classes; however, it must be accessed using an object(instance) of that class. This means, if I have a class MyJFrame that extends JFrame, then in another class, I can do this:
    MyJFrame myFrame = new MyJFrame();
    myFrame.dispose();
    myFrame.isShowing = false;
    Given that dispose() is a public method and isShowing is a public boolean variable that's in the MyJFrame object. Note: the opposite of public is private meaning that the variable/function is only accessible within the class. Also, in all my examples, I assume each class has access to the others.(in same Package, or imported)
    There are times at which you do not want to call a function on a given object or you want variables that are defined in the CLASS context, not the OBJECT context. As in, I have the class MyJFrame, and I always want to be able to access every object(instance) of this class that I've created. I would accomplish this using a static variable. Define the variable the same place you would define any other variable of the class, but inclued the reserved word "static". As in:
    public class MyJFrame{
    public static Vector allFrames = new Vector();
    then in my contructor, I would add this frame to the vector:
    public MyFrame(){
    allFrames.add(this);
    Now that I have this set up, I can access all the frames I've made from anywhere using MyJFrame.allFrames (note that I use the CLASS name, and I don't have an instance of the object anywhere)
    Another use of static is for functions. Going along with the same example, I could add a closeAllJFrames function:
    public static void closeAllJFrames(){
    for(int x=0; x<allFrames.size(); x++){
    allFrames.elementAt(x).dispose();
    then I can call this function from any other class using: MyJFrame.closeAllJFrames();
    Also worth noting, this function could be placed in any other class(other than inner classes, which cannot have static functions), you'd just need to put MyJFrame. in front of the allFrames.
    One last tip is: If you use code like I've shown, consider using a Hashtable instead of a Vector if you need to access certain frames(or whatevers) from afar. This will keep you from iterating thru the Vector and will decrease overhead significantly.
    Hope this helps
    --Zephryl

  • Page Error handling question..

    Using APEX 4.1.1.. Hosted instance.. I am testing various error handling functions (Oracle's standard one from documentation and others). I have a page with a standard report, I have defined the page to have an associated error handling function. On the report I have a calculated column that should error out due to a division by 0 error..
    Now what I had thought was, the page would handle the error more gracefully than previous version, in that it would show the custom error message I define in the constraints table...
    Is there a section of the documentation I am missing that shows at what point the error handling function kicks in and where we need to invoke it otherwise?
    Thank you,
    Tony Miller
    Dallas, TX

    Interesting. Had never considered this aspect.
    Just did a couple of tests - so it must only come into play from the PL/SQL engine.
    Created an sql report:
    select floor(dbms_random.value(1,10))/0 num
    from dual
    connect by level <= 10But the error function never gets hit.
    begin
    for i in (select floor(dbms_random.value(1,10))/0 num
    from dual
    connect by level <= 10) loop
    htp.p(i.num);
    end loop;
    end;Function gets hit.
    Just looking at the docs, there doesn't appear to be any indication of processing point.
    But from Patrick's blog:
    This includes errors raised by validation, process, … and all errors raised by the Application Express engine itself.http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    I guess an SQL report isn't considered as an 'all errors raised by the apex engine'.

  • HTTPService error handling question

    When i am using HTTPService for Flex-PHP communication i set
    HTTPService's 'fault' property which handles error event. So
    basically if i have HTTPService set up like this:
    <mx:HTTPService id="test" url="
    http://localhost/test/test.php"
    contentType="application/xml" useProxy="false" method="POST"
    fault="httpServiceError(event)">
    </mx:HTTPService>
    Then 'httpServiceError' method is fired in case of
    HTTPService error. What i would like to do in httpServiceError
    method is trace the id of the failed HTTPService. I tried with:
    public function httpServiceError(evt:FaultEvent):void{
    trace(evt.currentTarget.id);
    But soon realized that FaultEvent doesn't conatin
    'currentTarget' property so this failed. What's the correct way to
    find out id of the failed HTTPService?
    thanks in advance,
    best regards

    Which version of flex are you on?
    I'm not sure about version 2 but in Flex 3 fault event does
    have currentTarget property. What do you get in the trace if you
    just say event.currentTarget?
    from the docs:
    The FAULT event type.
    The properties of the event object have the following values:
    Property Value
    bubbles false
    cancelable true, calling preventDefault() from the associated
    token's responder.fault method will prevent the service or
    operation from dispatching this event
    currentTarget The Object that defines the event listener that
    handles the event. For example, if you use
    myButton.addEventListener() to register an event listener, myButton
    is the value of the currentTarget.
    fault The Fault object that contains the details of what
    caused this event.
    message The Message associated with this event.
    target The Object that dispatched the event; it is not always
    the Object listening for the event. Use the currentTarget property
    to always access the Object listening for the event.
    token The token that represents the call to the method. Used
    in the asynchronous completion token pattern.
    ATTA

  • Event Handling Question! Please help me!

    can a JTextField component generate a KeyEvent? Is it possible for the class used to create JTextField object implements KeyListener and fufilled a keyTyped or a keyPressed method created by a keyListener interface

    The best way to find answers to questions like these is to search the API. Near the top of this page is a drop down for APIs, or go here for 1.5 API http://java.sun.com/j2se/1.5.0/docs/api/
    In the API frame look for JTextField and see if it implements a method, or inherits a method that will add a KeyListener. If it does, then the answer to your question is yes.
    Depending on what you want to do, it might be better to use a custom Document instead of a KeyListener.

  • Apex 4.1 Error handling question

    Apex 4.1
    Hi There,
    Just had a query regarding error handling. As per Apex documentation we can add more information to our error messages. I wanted to add custom text and also the actual Ora or any other message
    E.g
    begin
      if 1=1 then
        l_error := 1/0;
    end if;
    exception
    when others then
        APEX_ERROR.ADD_ERROR (
        p_message          => 'Error1',
        p_additional_info  => 'Test1',
        p_display_location => apex_error.c_inline_in_notification);
    end;Wanted to know, if we want to add the actual error message also, what do we need to add to the ADD_ERROR procedure? I wanted to record the sqlerrm message.
    Thanks

    The only problem with the example was I don't think it handles not null constraints real well. Usually have a constraint name like 'SYS_SOMENUMBER'. So as a result, the extract_constraint_name is not successful.
    I handled this by doing the following:
    if l_constraint_name IS NULL AND p_error.ora_sqlerrm IS NOT NULL THEN
         --NOT NULL constraints don't display the constraint name in the error, find another way
        --Added check for ora_sqlerrm as if there is a page validation, it still enters the function, but with no sqlerrm
            declare
                l_cons_split APEX_APPLICATION_GLOBAL.VC_ARR2;
                l_owner user_constraints.owner%type;
                l_table_name user_constraints.table_name%type;
                l_column_name user_cons_columns.column_name%type;
                l_table_column varchar2(400);
            BEGIN
                --get the section enclosed in parenthesis
                l_table_column := regexp_substr(p_error.ora_sqlerrm, '\([^)]*\)');
                --remove parenthesis and quotes
                l_table_column := regexp_replace(l_table_column, '[(")]');
                --split the data by period
                l_cons_split := apex_util.string_to_table(l_table_column, '.');
                --determine the constraint name by querying user_constraints
                l_table_name := l_cons_split(l_cons_split.COUNT-2);
                l_table_name := l_cons_split(l_cons_split.COUNT-1);
                l_column_name := l_cons_split(l_cons_split.COUNT);
                select uc.constraint_name into l_constraint_name
                from user_constraints uc, user_cons_columns ucc
                where uc.constraint_name = ucc.constraint_name
                and uc.owner = ucc.owner
                and uc.table_name = l_table_name
                and ucc.column_name = l_column_name
                and get_search_condition(uc.constraint_name, uc.owner) like '%IS NOT NULL%'; --gets the search condition as varchar
            END;
        END IF;{code}
    That's slightly off topic, but just thought i'd mention it :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • "Touch up inside" button handler question

    Say, if I assign a handler for the "Touch up inside" event for UIButton, what is the correct way to write the handler for it?
    Both of the following ones seems to work for me:
    -(IBAction) clickedButton
    or
    -(IBAction) clickedButton:(id)sender

    Both exists.
    Use the first form if you have a dedicated action to one button. Use the second one if your action could be fired by several event; in this case use the 'sender' parameter to know what object fired the event.

Maybe you are looking for

  • Get VI ref for LV executable set to allow multiple instances

    I have inherited some LabVIEW code, which I'm not inclined to change, that will run as an executable with multiple instances set to true on a standard Windows PC. There could be up to four of these executables running in parallel on one machine. I ne

  • Apple store credit, can't change my region!

    i bought a few 50 dollar cards back when i was at USA. I have been happily using those credits and buying apps from the US store. Now i have 4.78$ left and i want to change my region and buy from my onw countries store, because there is less than 5 b

  • 0008 install error for upgrade playbook app

    Hi,  BlackBerry approved and we were able to upgrade our apps. However, we found that they are unable to install. The error mesasge shows "Install Error: [0008] There was a problem during installation. Please try again".   I had looked around other s

  • URL error when processing request ITS 6.40

    Hi all I have a problem at customers site and below is a description of the case. All input in this issue is appreciated of course since I am running out of ideas. Problem: When accessing transaction WW20 via internet explorer (http://server.domain:8

  • Please help - synthesist making videos

    I have a Sony DCR-DVD403 camcorder connected to my G4 iMac via a Canopus ADVC-100 firewire converter box. Using iMovie, I've been recording videos of myself playing keyboards "live" in my home electronic music studio and sharing them on YouTube. The