PopupMenu behavior

Hi all!
I have a problem with the JPopupMenu behavior. My popup menu has a submenu:
JPopupMenu p = new JPopupMenu();
JMenu menu = new JMenu();
menu.add(new JMenuItem("1"));
menu.add(new JMenuItem("2"));
p.add(menu);
p.setVisible(true);
It works, but it doesn't have the 'normal' menu behavior, like the ones in a JMenuBar. I mean when I click on the submenu, the components don't popup. Is there a way to change this with a specific method ?
Thanks!

Hello
Try this:
JTextArea text = new JTextArea(10,20);
JMenu menu = new JMenu("Menu");
JPopupMenu popup = new JPopupMenu();
JMenuItem mnitm1 = JMenuItem("1");
JMenuItem mnitm2 = JMenuItem("2");
menu.add(mnitm1);
menu.add(mnitm2);
popup.add(menu);
// add mouse listener to pop up menu
MouseListener popuplistener = new popupListener();
text.addMouseListener(popuplistener);
class popupListener extends MouseAdapter {
public void mousePressed(MouseEvent e) {
showPopup(e);
try{
}catch(Exception ex){
public void mouseReleased(MouseEvent e) {
showPopup(e);
private void showPopup(MouseEvent e) {
if (e.isPopupTrigger()) {
popup.show(e.getComponent(),
e.getX(), e.getY());
This will work!!!!
Rana

Similar Messages

  • PopUpMenu's "work", but crash on exit when compiled.

    I've been fooling around with PopUp menu's using the USER32 DLL. One question I still have is should I destroy all submenus, or will destroying the top popup destroy all the submenus. It doesn't seem to make a difference.
    Also, when I compiled a demo program, I noticed the USER32.DLL showed up in my data folder. The program seems to work, until I close the window, when I get a bomb window titled "Quincy Fatal Error". The text in the window is
    Could not attach to the application
    Windows Error Code = The parameter is incorrect.
    The program seems to work fine, I can start and restart it all I want. It's when I click on the CloseWindow X in the upper RHCorner that I get this error. I've looked at some other
    code on the forums and it looks like everything is OK.
    Has anyone else seen this behavior, or could steer me in the right direction?
    Thanks, Bob
    Attachments:
    PopUpTesty.llb ‏125 KB

    Wiebe,
    I'm glad I was able to help you, even if I didn't realize I was doing it.
    I don't know if this info means anything, but I ran a test to see what would happen.
    I wrote a VI that creates a PopUpMenu with one entry, a submenu. The submenu had 10 items in it. I then just deleted the parent menu, and didn't do anything with the child menu. (I never called TrackMenu, I just created and destroyed. I assume this is not a factor)
    Then I brought up the Win2K Task Manager, and included handles in the Process Window. I noted the numbers for Handles and available memory. I started my program. The handles number never seemed to change. Availiable memory would start shrinking, and then jump back up to where it started. (This is
    what I expected to see.) After 5,000,000 iterations, everything still seemed the same. While the actual memory requirements for menus is probably small, I would think I would have seen the effect of 5 million orphan menus. Note that if I comment out DestroyMenu altogether, AppendMenu fails after about 1200 iterations (and LabVIEW bombs on the first user interaction)
    The reason I'm so interested in this is because I only have 2 VI's to support PopUpMenu's; One to create them and one to track them. After I get the MenuItemID, I destroy the hMenu I tracked in the "Track" VI, making everything nice and neat (to me anyway).
    All this is related to the TreeView ActiveX control that you helped me with earlier. In this case, if a user MouseDown's with the right button, I generate a PopUpMenu based on data the node (if any) represents. The Tag property of the Node tells me what "kind" of node it is (a value for a Case selector), which then grabs the appropriate data to build the PopUpMen
    u (along with any submenus).
    Once again, thank you very much for your help. I've learned a great deal in the last week or two trying to get my LV programs do what I want them to do.
    Bob

  • MDB Timeouts and transaction behavior

    Hi, thanks in advance for any help with this.
    We have a MDB where we have set the timeout to five minutes. In a particular case this timeout is being reached but even though the MDB times out the transaction and sends the message for redelivery the original transaction that was processing the message continues until something happens from an application standpoint to cause that original transaction to complete. This means that we have the same message processed twice under these circumstances.
    I would have expected that if a transaction timed out that the transaction would have been terminated and therefore our processing would have stopped. Is there a way to force this behavior or do we have to put an alarm in our code and kill ourselves such that we never encounter the transaction time out?
    Thanks,
    Sue Shanabrook

    I should have mentioned that we are using container managed transactions.

  • Unexpected Behavior error while creating a connection in IDT

    Hi Everyone,
    I have created a connection on top of a database using ODBC.
    I could able to see the connection in IDT.
    I have mentioned the user name and pw correctly  and tried testing the connection and got the error "unexpected behavior"
    PFA error.
    what could be the reason? any idea?
    Thanks.

    I find this 32-bit vs. 64-bit ODBC somewhat confusing.  I know you aren't dealing with Crystal Reports, but this blog post does provide some clarity.  It has a link to this Microsoft knowledge base article from which I quote...
    A 64-bit version of the Microsoft Windows operating system includes the following versions of the
    Microsoft Open Database Connectivity (ODBC) Data Source Administrator tool (Odbcad32.exe):
    The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
    The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.
    One other warning.  In my experience I have found that you cannot run both the 32-bit and 64-bit ODBC admin tools at the same time.  If you have one running and try and start the other one it will just bring up the one you already had running.
    To make sure I know which instance I am in at any give time I have created a dummy data source that corresponds to the instance; 32-bit or 64-bit.
    Let us know how it goes.
    Noel

  • Capturing DVCAM in FCP 6.0.2 and encountering strange capture behavior

    I have FCP 6.0.2 and OSX 10.5.2 and QT 7.3.1. I have been capturing several DVCAM cassettes using my Sony DSR-20 deck. Although I have done this countless times before in earlier versions of FCP, I am encountering some strange repetitive behavior. I am capturing 30 minute clips one at a time. When I use batch capture it will cue the tape up properly to the in point...and then start capturing until it gets to about 10-12 minutes in, and then capture unexpectedly stops, no dialogue box, the tape rewinds and starts capturing again from the original in point. On this second capture, the tape sails past the 10 minute mark and keeps going to the end of the 30 minute clip. It then stops, gives me the dialogue box that it has successfully captured. And it has.
    But every DVCAM tape I captured today exhibited the same behavior. Capture would be successful until about about 10 minutes in, then FCP aborts (no dropped frame message, no dialogue box) rewinds the tape back to the in point, tries again, and this time succeeds with the second pass capturing the entire clip. Note at the 10 minute mark there is no scene change or no camera start/stop.
    Have other users experienced this issue? And if so, is there a workaround or a possible patch forthcoming from FCP?
    Many thanks,
    John

    Yes, each tape has an in and out point defined. In my 6 years of editing with Final Cut and DVCAM tapes I've never encountered this issue before in the capturing process until now. I will have to see in future weeks with other captures whether this is an on-going issue or not, but at least I can capture for now.

  • Dynamic PHTMLB PopupMenu

    Anyone have any idea why I can't get my popupmenu to work?  I have two sets of data, one we'll call code groups and the other group items.  I simply want the group items to be a submenu of their group.  I can get exactly one group item to slide out, and it looks strange in a large font.
    Anyone see something I don't? 
    method ZFILL_OTEIL_POPUP .
    data: wa_popup like line of oteilgroup,
          lv_group type zqpgt_tab,
          lv_item  type zqpct_tab,
          lv_text type string,
          separator(3) value ' - '.
    field-symbols: <group> type zqpgt,
                   <item>  type zqpct.
    lv_group = me->zget_group_codes( p_katalogart = 'B' ).
    lv_item = me->zget_item_codes( p_katalogart = 'B' ).
    data: id type string,
          index type string.
    loop at lv_group assigning <group>.
      clear wa_popup.
      clear id.
        refresh oteilitem.
      move sy-tabix to index.
      concatenate 'oteilSubPopup' index into id.
      concatenate <group>-codegruppe <group>-kurztext into lv_text
                  separated by separator.
      wa_popup-menuitemid = 'oteilPopup'.
      wa_popup-submenuid  = id.
      wa_popup-text = lv_text.
    wa_popup-cancheck = 'X'.
      wa_popup-enabled  = 'X'.
      append wa_popup to oteilgroup.
      loop at lv_item assigning <item>
           where codegruppe = <group>-codegruppe.
        clear wa_popup.
        concatenate <item>-code <item>-kurztext into lv_text
                    separated by separator.
        wa_popup-menuitemid = id.
        wa_popup-text = lv_text.
       wa_popup-cancheck = 'X'.
        wa_popup-enabled  = 'X'.
        append wa_popup to oteilitem.
      endloop.
        append oteilitem to oteilitems. "deeply structured itab
    endloop.
    endmethod.
    LAYOUT
                    <td><htmlb:label for="object" text="Object Code"/></td>
                    <td><htmlb:inputField id="damage" value="//model/notif_fields.fecod" disabled="true"/>
                        <phtmlb:popupTrigger id="oteilTrigger"
                                             popupMenuId="oteilPopup"
                                             isInteractive="true" >
                        <htmlb:image src="s_b_hint.gif" />
                        </phtmlb:popupTrigger>
                        <phtmlb:popupMenu id="oteilPopup"
                                          firstVisibleItemIndex="1"
                                          maxVisibleItems="25"
                                          items="<%=oteilgroup%>">
                        </phtmlb:popupMenu>
    <% data: wa_item type PHTMLB_POPUPMENUITEMS,
             id type string,
             index type string. %>
    <% loop at oteilitems into wa_item.
           move sy-tabix to index.
           concatenate 'oteilSubPopup' index into id. %>
           <phtmlb:popupMenu id="<%= id %>"
                             onSelect="myOteil"
                             firstVisibleItemIndex="1"
                             maxVisibleItems="25"
                             items="<%= wa_item %>">
           </phtmlb:popupMenu>
           <% refresh wa_item. %>
    <% endloop. %>

    Hi Thomas,
             Thanks for the reply.
             As you have said there are no background or MouseOver color for popupMenu. I am using a workaround for this by putting the popMenuItems in an html table and then changing the above said attributes for the individual cells. This works fine in normal menu but no effect when used with popupMenu. If you want I can send you the code but that will be possible tomorrow.
    Regards
    PRAFUL

  • Is there any way to add dynamic parameter in sql without breaking Server Behavior

    Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
    For example:
    mysql_select_db($database_dxc_conn, $dxc_conn);
    $query_Recordset1 = "SELECT article.articleName, article.articleDesc FROM article";
    $Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    will become something like this:
    $additionalSQL=", article.articleName_en";
    mysql_select_db($database_dxc_conn, $dxc_conn);
    $query_Recordset1 = "SELECT article.articleName, article.articleDesc $additionalSQL FROM article";
    $Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    this is just an example, my real scenarion is far more complicated than this... however this kind of approach break the server behavior and force to do hand-coding...
    i would like to know if there's better way to do such thing like this...

    viktor.iwan wrote:
    Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
    Server behaviors are simply bits of boilerplate code automatically generated by Dreamweaver. Editing the code doesn't "break" it (unless your edits are badly written). However, once you edit the code, Dreamweaver no longer recognizes it, so you lose the ability to drag recordset results from the Bindings panel.
    If you want to edit server behavior code, the best way to handle it is to lay out your page as you want, using the Bindings panel. Once everything has been done, only then edit the server behavior code.

  • Odd behavior when using custom Composite/CompositeContext and antialiasing

    Hi,
    I created a custom Composite/CompositeContext class and when I use it with antialiasing it causes a black bar to appear. I seems it has nothing to do with the compose() code but just that fact that I set my own Composite object. The submitted code will show you what I mean. There are 3 check boxes 1) allows to use the custom Composite object, 2) allows to ignore the compose() code in the CompositeContext and 3) toggles the antialiasing flag in the rendering hints. When the antialiasing flag is set and the Composite object is used the bar appears regardless of if the compose() method is executed or not. If the Composite object is not used the bar goes away.
    The Composite/CompositeContext class performs clipping and gradient paint using a Ellipse2D.Float instance.
    a) When the Composite is not used the code does a rectangular fill.
    b) When the Composite is used it should clip the rectangular fill to only the inside of a circle and do a gradient merge of background color and current color.
    c) If the compose() method is ignored then only the background is painted.
    d) When antialiasing is turned on the black bar appears, i) if you ignore the compose() method it remains, ii) if you do not use the Composite object the bar disappears (???)
    NOTE: the compose method's code is only for illustration purposes, I know that AlphaComposite, clipping and/or Gradient paint can be used to do what the example does. What I am trying to find out is why the fact of simply using my Composite object with antialiasing will cause the odd behavior.  Been trying to figure it out but haven't, any help is appreciated.
    Thx.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                for(int sy = src.getMinY(); sy < src.getMinY() + src.getHeight(); sy++) {
                    for(int sx = src.getMinX(); sx < src.getMinX() + src.getWidth(); sx++) {
                        int cx = sx - dstOut.getSampleModelTranslateX();
                        int cy = sy - dstOut.getSampleModelTranslateY();
                        if(!clippingShape.contains(cx, cy)) continue;
                        srcPixel = src.getPixel(sx, sy, srcPixel);
                        int ox = dstOut.getMinX() + sx - src.getMinX();
                        int oy = dstOut.getMinY() + sy - src.getMinY();
                        if(ox < dstOut.getMinX() || ox >= dstOut.getMinX() + dstOut.getWidth()) continue;
                        if(oy < dstOut.getMinY() || oy >= dstOut.getMinY() + dstOut.getHeight()) continue;
                        dstPixel = dstIn.getPixel(ox, oy, dstPixel);
                        float mergeFactor = 1.0f * (cy - 100) / 100;
                        dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                        dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                        dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                        dstOut.setPixel(ox, oy, dstPixel);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

    I got a better version to work as expected. Though there will probably be issues with the transformation to display coordinates as mentioned before. At least figured out some of the kinks of using a custom Composite/CompositeContext object.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
    //            dumpRaster("SRC   ", src);
    //            dumpRaster("DSTIN ", dstIn);
    //            dumpRaster("DSTOUT", dstOut);
    //            System.out.println();
                if(dstIn != dstOut)
                    dstOut.setDataElements(0, 0, dstIn);
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                int w = Math.min(src.getWidth(), dstIn.getWidth());
                int h = Math.min(src.getHeight(), dstIn.getHeight());
                int xMax = src.getMinX() + w;
                int yMax = src.getMinY() + h;
                for(int x = src.getMinX(); x < xMax; x++) {
                    for(int y = src.getMinY(); y < yMax; y++) {
                        try {
                            // THIS MIGHT NOT WORK ALL THE TIME
                            int cx = x - dstIn.getSampleModelTranslateX();
                            int cy = y - dstIn.getSampleModelTranslateY();
                            if(!clippingShape.contains(cx, cy)) {
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                dstOut.setPixel(x, y, dstPixel);
                            else {
                                srcPixel = src.getPixel(x, y, srcPixel);
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                float mergeFactor = 1.0f * (cy - 100) / 100;
                                dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                                dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                                dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                                dstOut.setPixel(x, y, dstPixel);
                        catch(Throwable t) {
                            System.out.println(t.getMessage() + " x=" + x + " y=" + y);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            protected void dumpRaster(String lbl,
                                      Raster raster) {
                System.out.print(lbl + ":");
                System.out.print(" mx=" + format(raster.getMinX()));
                System.out.print(" my=" + format(raster.getMinY()));
                System.out.print(" rw=" + format(raster.getWidth()));
                System.out.print(" rh=" + format(raster.getHeight()));
                System.out.print(" tx=" + format(raster.getSampleModelTranslateX()));
                System.out.print(" ty=" + format(raster.getSampleModelTranslateY()));
                System.out.print(" sm=" + raster.getSampleModel().getClass().getName());
                System.out.println();
            protected String format(int value) {
                String txt = Integer.toString(value);
                while(txt.length() < 4)
                    txt = " " + txt;
                return txt;
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

  • Is Mail.app one of the "erratic" behavior apps with a reset system clock?

    I am hoping someone can help with a fine detail of mail.app (v2.1.3) behavior.
    I had an incident where an iMac sent out 200+ smtp hits a minute and was tossed of the network for presumed zombie spaming.
    I think I have actually tracked the problem to an unfortunate conjunction of circumstances that is actually innocent (if still annoying)
    Let me set up the story:
    1. This is a common use computer, so Mail is not configured (except that it is --I'll get to that in a moment) and
    2. Safari will invoke Mail when you click on an "email link"
    Mostly everyone just quits mail if they goof and click an email link.
    BUT some time ago at least one person invoked Mail and composed a message. This message, naturally, remained in the outbox ever since. That person learned that they can't send email that way, so ever since they just cmd-Q Mail.
    BUT Before this person learned, they walked through the mail-config and told mail to try hitting smtp.mac.com:"nonExistantUser".
    So that covers the lead-up. Two days ago, mail was invoked via a Safari link, BUT it wasn't quit, it was sent to the background.
    Where it undoubtedly tried to send the outbox repeatedly until it was kicked off the network.
    Here is what I don't understand:
    Under this scenario of a mis-configured .mac address, will mail repeatedly try and fail to smtp at the maximum possible rate?
    OR
    Is the one other factor I am about to describe responsible?
    The one other factor:
    The clock battery is dead and there was a power failure at 4am that day.
    The system clock reset to 1969.
    Of course, nobody reset it.
    Is mail.app one of the apps that the finder message warns "may behave erratically"?
    (a GROSS simplification) does it have a bit of code like:
    1 check time-of-last-send-mail-attempt
    check newest-item-in-outbox
    if newest-item more recent then last-send-attempt
    do send-mail and record time-of-last-send-mail-attempt
    and go to 1
    else wait X minutes and go to 1
    which, if the clock was mis-set to 1969 would always record a last-send-attempt prior to anything in the outbox and trigger a send loop.
    Does anyone know if either Mail is tenacious about sending to a bad .mac address, or gets ridiculous under this circumstance for bad-clock-set?
    Marc

    I am hoping someone can help with a fine detail of mail.app (v2.1.3) behavior.
    I had an incident where an iMac sent out 200+ smtp hits a minute and was tossed of the network for presumed zombie spaming.
    I think I have actually tracked the problem to an unfortunate conjunction of circumstances that is actually innocent (if still annoying)
    Let me set up the story:
    1. This is a common use computer, so Mail is not configured (except that it is --I'll get to that in a moment) and
    2. Safari will invoke Mail when you click on an "email link"
    Mostly everyone just quits mail if they goof and click an email link.
    BUT some time ago at least one person invoked Mail and composed a message. This message, naturally, remained in the outbox ever since. That person learned that they can't send email that way, so ever since they just cmd-Q Mail.
    BUT Before this person learned, they walked through the mail-config and told mail to try hitting smtp.mac.com:"nonExistantUser".
    So that covers the lead-up. Two days ago, mail was invoked via a Safari link, BUT it wasn't quit, it was sent to the background.
    Where it undoubtedly tried to send the outbox repeatedly until it was kicked off the network.
    Here is what I don't understand:
    Under this scenario of a mis-configured .mac address, will mail repeatedly try and fail to smtp at the maximum possible rate?
    OR
    Is the one other factor I am about to describe responsible?
    The one other factor:
    The clock battery is dead and there was a power failure at 4am that day.
    The system clock reset to 1969.
    Of course, nobody reset it.
    Is mail.app one of the apps that the finder message warns "may behave erratically"?
    (a GROSS simplification) does it have a bit of code like:
    1 check time-of-last-send-mail-attempt
    check newest-item-in-outbox
    if newest-item more recent then last-send-attempt
    do send-mail and record time-of-last-send-mail-attempt
    and go to 1
    else wait X minutes and go to 1
    which, if the clock was mis-set to 1969 would always record a last-send-attempt prior to anything in the outbox and trigger a send loop.
    Does anyone know if either Mail is tenacious about sending to a bad .mac address, or gets ridiculous under this circumstance for bad-clock-set?
    Marc

  • Can anyone explain this behavior and tell me how to fix it?

    Using NetBeans 6.5 on Windows, Glassfish v2.1
    I have a JSF application with a page that has a tab set.
    On one of the tabs I have a panel with company information.
    One of the components on the page is an InputText field with the value bound to a session bean variable.
    The tab also has an Add button.
    Here is what the JSP looks like for the input text and button components
       <h:inputText binding="#{MainPage.companyNameTF}" id="companyNameTF" readonly="#{SessionBean1.readOnlyFlag}"
       <h:commandButton action="#{MainPage.mainAddBtn_action}" disabled="#{SessionBean1.disableEdit}" id="mainAddBtn"
            style="font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; left: 425px; top: 380px; position: absolute; width: 75px" value="Add"/>
         This is all plain vanilla stuff and I would expect that when the Add button is pushed, the session bean property would be filled with
    the value entered in the input text field.
    In the java code for the page, I have a method to process the Add button push.
    Originally, it just called a method in the session bean to check that a value was entered in the input text field by checking the bound
    session bean property.
    For some reason, that was not getting filled and I was getting either a null or empty string rather than the value in the text field.
    I added some checking in the method that processes the Add button push so I could check the values in the debugger.
    Here is a sample of that code:
        public String mainAddBtn_action() {
            String s = sb1.getCompanyName();
            s = (String)this.companyNameTF.getValue();
            s = (String)this.companyNameTF.getSubmittedValue();I check this in the debugger and NONE of the variants that I have listed have the value that was entered into the text field.
    The submittedValue is null and the others are empty strings (that is what they were initalized to).
    This is all pertty straight forward stuff and I am at a loss to explain what is happening.
    Can anyone expain this behavior, and, most important, how can I force the values to be present when the Add button is pushed.
    I have never experienced this problem before, and have no clue what is causing it.
    Thanks.

    Basically, the component bindings are just being used in plain vanilla get/set modes.
    I set them to "" when I do a clear for the fields and they are set to a value via the text field.
    No other action other than to read the values via get to insert them into the database.
    And, I always use the get/set methods rather than just setting the value directly.
    This is what is so strange about this behavior - I have created dozens of database add/update/delete pages using this same model and have not had a problem with them - even in a tab context.
    Not a clue why this one is different.
    I did notice that I had an error on the page (in IE7, you get a small triangle warning sign when something is not right).
    I figured that might be the problem - maybe buggering up the rendering process.
    I tracked that down and do not get that anymore (it had to do with the PDF display I was trying to get working a while back), but that did not resolve the problem.
    I don't think there are any tab conflicts - none of the components are shared between tabs, but I will see what happens when I move a couple of the components out of the tab context.
    I noticed that it seems to skip a cycle. Here is what I can do.
    1) Fill in text fields and add a record - works fine the first time.
    2) Clear the text fields
    3) Enter new data in the text fields and push Add
    4) I get an error saying fields are blank from my data check process.
    5) Enter new data and push Add - the record is added with the new data.
    My work around is to not enter data in step 3 and just accept the error message in step 4, then go ahead and enter the real data in step 5.
    Very ugly, but it works every time.

  • How do I fix this 'funny' JavaScript/Ajax behavior?

    Hello all!
    I have this kind of funny problem, or, well, a funny result...
    The problem is almost solved tho, but it's just this strange behavior that I can't solve.
    You can see what I mean here:
    http://apex.oracle.com/pls/apex/f?p=9949:101:1370355978553401
    Username: visitor
    Password: visitor
    Login first, then edit the URL to go to page 24 (or just click on "Web Platform", then in the submenu click on "Meals and templates", and then in the custom menu on the left click on "Show templates".
    If you have done that, click on any of the two links in the report.
    You'll see that suddenly, the whole page seems to be shown inside another region (the region named "Menu2", underneath the normal menu region).
    It's like... A page within a page. Pageception (Inception... Pageception... Get it?).
    Now, all this happens WITHOUT refreshing. Yes, I want this to be dynamic. My question is:
    How do I change my code in such a way, that it does NOT display the whole page 24 inside that menu2 region? Because I want to display a popup, not a page within a page...
    My code for doing so is in my Page Attributes. In the JavaScript tab, I have the following code for the popup, and in it you will find the code to get these values in the page items as well:
    $( function(){
      $('#ModalForm').dialog(
         modal: true,
         autoOpen: false,
         width: 500,
         height: 350,
         buttons:{ Calculate: function(){calculateTotal();},
                   Close: function(){closeForm();}        
    function openForm(pFoodTemplateId, pMealTypeId)
    var getone = new htmldb_Get('shiny',&APP_ID., null, 24); // initialize get
    getone.add('P24_TEMPLATEID', pFoodTemplateId);
    getone.add('P24_MEALID', pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $('#ModalForm').dialog('open');
    function closeForm()
    { $('#ModalForm').dialog('close');}
    $(document).ready(function()
        {$('a.temppop').click(function() {openForm();});
    });"Shiny" is the name of the ID of my "menu2" region.
    In case I'm not clear (which I probably am, since I'm in a rush):
    I have 2 page items that get the value of the selected row's foodtemplateid and mealtypeid. The column link URL from my report is:
    javascript: openForm(#FOODTEMPLATEID#, #MEALTYPEID#); So, in a nutshell, item :P24_TEMPLATEID gets the value of the foodtemplateid that corresponds to the row you selected, and item :P24_MEALID gets the value of the mealtypeid that corresponds to the row you selected.
    Thank you for your time. I really appreciate it.
    Apex version: 4.1.1.00.23

    Hi,
    Maybe JavaScript should be something like this
    function openForm(pFoodTemplateId, pMealTypeId){
    $("#P24_TEMPLATEID").text(pFoodTemplateId);
    $("#P24_MEALID").text(pMealTypeId);
    var getone = new htmldb_Get(null, &APP_ID., "APPLICATION_PROCESS=DUMMY", &APP_PAGE_ID.);
    getone.add("P24_TEMPLATEID", pFoodTemplateId);
    getone.add("P24_MEALID", pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $("#ModalForm").dialog("open");
    }Or
    function openForm(pFoodTemplateId, pMealTypeId){
    $s("P24_TEMPLATEID", pFoodTemplateId);
    $s("P24_MEALID", pMealTypeId);
    var getone = new htmldb_Get(null,&APP_ID.,"APPLICATION_PROCESS=DUMMY",&APP_PAGE_ID.);
    getone.add("P24_TEMPLATEID", pFoodTemplateId);
    getone.add("P24_MEALID", pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $("#ModalForm").dialog("open");
    }Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai
    Edited by: jarola on Apr 19, 2012 3:56 PM

  • Surface Pro 3 Type Cover Scrolling Behavior

    I asked the same question in the surface comminity forum, and the support engineer suggested that I relay my question here.
    I've just purchased a surface pro 3 with type cover. It's a great machine and I use it for web developement projects on the go. A major part of the stack I use has to be run in linux, so I run a virtual machine with ubuntu server. I use putty to ssh into
    the vm, and rely on vim for code editing. On my previous machine I was able to get mouse scrolling support working in vim, as the events are relayed over by putty. This works even with 2 finger scrolling on trackpads of various sorts. However, this does not
    work on the type cover for surface pro 3.
    After some observations, I realized that the 2 finger scrolling on type cover's trackpad would trigger a screen scrolling animation when the scrollbars hit the end points, a behavior similar to scrolling via the touch screen. So I am guessing that instead
    of using the traditional mouse wheel events, the new trackpad uses screen scrolling events? Which explains why putty couldn't relay the scrolling to vim.
    I am wonder if this behavior can be optional or not. Perhaps a configuration somewhere would allow me to make the trackpad fire the usual mouse wheel like scrolling events so that my putty + vim combination could still benefit from the trackpad?

    Hi,
    Regarding Surface pro 3 type cover issue, we may first take a look at the following troubleshooting guide:
    Troubleshoot your Surface Cover
    For the type cover usage, please see:
    Type Cover
    Apologize for that we don't have enough materials to check the issue you mentioned here, for the usage of surface Pro 3 and its type cover, for special personal support, please take a try with the
    Contact us.
    Thank you for your understanding.
    Best regards
    Michael Shao
    TechNet Community Support

  • Swap Image Behavior with Text

    I am trying to figure something out but can't seem to find
    it. I'm sure it must be pretty simple, but I'm stumped. Basically,
    I have a main image and a few thumbnail images below it. I've
    attached the Swap Image behavior to each thumb to change the main
    image to a different photo and then changed the onMouseOver to
    onClick.
    The problem is I want to also have some photo text or caption
    below the main image to change. Does anyone know how to do this
    with more or less stock DW behaviors? Or if not, how to do it in
    the most efficient way possible?
    Thanks in advance.
    -Bill

    You could always embed the caption information in the image,
    you know? That
    would be the simplest way. Is that possible?
    Alternatively you could create a series of stacked
    containers, each hidden,
    in the location where you want your captions. Then you would
    make your
    onclick event do both the image swap and the Show/Hide on the
    associated
    caption container (*and* a hide on all the rest of the
    caption containers).
    This can be pretty tedious when there are lots of images, and
    you are using
    only the DW User interface (as opposed to Code view). It will
    also take you
    into the realm of positioned elements (probably) which can be
    troublesome
    themselves.
    Finally, if this is all too much for you, there are EXCELLENT
    alternatives
    over at projectseven ($) for doing something like this right
    out of the box.
    http://www.projectseven.com/
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "captcashew" <[email protected]> wrote in
    message
    news:[email protected]...
    >I am trying to figure something out but can't seem to
    find it. I'm sure it
    >must
    > be pretty simple, but I'm stumped. Basically, I have a
    main image and a
    > few
    > thumbnail images below it. I've attached the Swap Image
    behavior to each
    > thumb
    > to change the main image to a different photo and then
    changed the
    > onMouseOver
    > to onClick.
    >
    > The problem is I want to also have some photo text or
    caption below the
    > main
    > image to change. Does anyone know how to do this with
    more or less stock
    > DW
    > behaviors? Or if not, how to do it in the most efficient
    way possible?
    >
    > Thanks in advance.
    >
    > -Bill
    >
    > <p><img src="images/215-suite-2.jpg" alt="Main
    Photo" name="mainImage"
    > width="300" height="225" id="mainImage" /></p>
    > <p> </p>
    > <p> </p>
    > <p><img src="images/215-suite-2.jpg"
    alt="Thumbnail Photo 1"
    > name="thumb1"
    > width="100" height="75" id="thumb1"
    >
    onclick="MM_swapImage('mainImage','','images/215-suite-2.jpg',1)"
    />
    > <img src="images/renovations_02-after.jpg"
    alt="Thumbnail Photo 2"
    > name="thumb2" width="100" height="75" id="thumb2"
    >
    onclick="MM_swapImage('mainImage','','images/renovations_02-after.jpg',1)"
    > />
    > <img src="images/renovations_03-after.jpg"
    alt="Thumbnail Photo 3"
    > name="thumb3" width="100" height="75" id="thumb3"
    >
    onclick="MM_swapImage('mainImage','','images/renovations_03-after.jpg',1)"
    > /></p>
    >

  • Each time I click the "Open a New Tab" button, how do I make FF open to my homepage and why isn't this default behavior?

    Firefox does not default to your homepage when you manually open a new tab. It should do so.
    Is there a way to make FF do this? Is it an addon? If so, should this not be default behavior and just be incorporated into the browser?

    # Type ''about:config'' in Firefox's location bar
    # Find ''browser.newtab.url''
    # Double click on it
    # Paste your homepage link into the text box
    # Click ''Ok''

  • Nasty table behavior (bug?) in FM 7.1 (structured)

    Hello,
    I have found that an Import => Element Definitions... command changes paragraph styles in tables.
    Here what I've done (all in structured FM 7.1 WinXP):
    1. opened new doc based on template.
    2. added two identical tables - formats came from template:
    - 1 head row (white text, black background),
    - 2 body rows (black text),
    - 3 cols in every row.
    3. typed some text in header row and in body rows.
    4. put cursor in second table, selected and applied (to selection) another format via Table Designer.
    5. run File => Import => Element Definitions... from template (the same one I've used in step 1)
    6. RESULT: all para styles in second table became Body; table where original format was not changed kept the original styles.
    Does anybody knows how to deal with it? Template/EDD problem?
    Thanks
    Slava

    Slava,
    Since the table is part of a structured flow, importing element definitions may indeed affect its formatting.
    If the new element definitions do not contain format rules that apply directly to the content of your table cells, the formatting of the cells is determined by the table format. In particular, the information in the table format includes the paragraph format used for each cell in the first row of each of the three parts of the table (heading, body, and footing) in the table from which the format was created (or updated). Since an actual table may have more columns than stored in the table format, FrameMaker's default behavior is to apply the paragraph format stored in the table format for the first cell in the row associated with that table part.
    Your two tables have different table formats. If different paragraph formats are stored in the two table formats, then, yes, importing element definitions will apply different paragraph formats to the cells in the two tables.
    --Lynne

Maybe you are looking for

  • New MacBook Pro App Migration results in strange icons

    I recently got a new MacBook Pro and went through the automatic Migration Assistant process to transfer info off my Power Mac G5. 1. When it was all over, several of the icons in the dock were replaced with question marks. I figured that was because

  • The majority of music on my ipad is greyed out and will not play.   .

    The majority of music is greyed out and will not play. None of it is downloaded. It is all from CDs. I only have the one account. Please help.

  • How do I make a loader image similar to those shown at program opening?

    I'm looking to build a loader image, that opens up at the start of my script, and automatically closes after a few seconds. I opened up the image processor script to see how Adobe has added images to alerts, but it's an extensive doc, and I couldn't

  • Shockwave plug-in incompatibility

    My Director 11 shockwave files will not run on a Mac with OS X "Tiger" 10.4.11. With the older plug-in (10) I get an alert that the browser cannot open the "new" format, and it asks if I want to install the newer version. Yet when I install the most

  • From Clause Query

    Designer Version 6.5.95.4.8 Configuration: 4.0.12 Release 4.10 Database 10g Forms [32 Bit] Version 6.0.8.25.2 (Production) Can someone help me with From Clause query in Designer? Designer Help files do not seem to cover this in depth. Here is what I