Newbie: Method should or should not have side effects

Hi experts,
What does it really mean when I read for the InputVerifier class that the method 'shouldYieldFocus' can have side effects but the method 'verify' should not have side effects.
Thanks for you comments.
tuckie

I am but a newbie only asked to learn and maintain. The reason I ask about side effects is that the shouldYieldFocus() method is invoked twice for the same tab key event. When the tab key (or mouse click) wants to move focus to another input the current input's shouldYieldFocus() is invoked, it in turn invokes verify() which validates data returning true or false and checks to see if a warning should be issued that the data is legal but high. If the data is not high it also returns true and the focus is yielded. Also shouldYieldFocus() is only invoked once. It is when the data is high and the showConfirmDialog() is put up that I get the second shouldYieldFocus() invocation. The previous coder put in a de-bouncing mechanism and I think this is where/how the problems with the next field are created. Sometimes the next field's focusLost() is invoked without the operator making any input. The focusLost() does some fill in the blank things that are reasonable only if the operator really wanted not to fill in any data in the field.
Back to my original point, I was wondering if the fact that the verify() method may have a dialog box put up before it returns to shouldYieldFocus() is the kind of thing that shouldn't be done - no side effects. If so then it could be the likely cause of the problem with the next field sometimes being automatically filled in as if it had received a focusLost() event.
tuckie

Similar Messages

  • My creative cloud does not have after effect? what should i do ?

    my creative cloud does not have after effect? what should i do ?

    you can download, install and run 32 bit trials but you cannot license them.
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct with. but also keep the aspect ratio correct? how

    I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct width. but also keep the aspect ratio correct, keep it looking as natural as possible (its a piece of jewlery) ? how can I begin to do this.

    The area circled in red is to wide (the width) the necklace's width is as wide as the models entire chest. And also the length of the necklace it's to long it should come down to the clevage area on the model/woman.

  • Compiler warning PLW-05003 parameter at IN and COPY may have side effects

    For the following Procedure:
    create or replace
    PROCEDURE lob_replace
    p_lob IN OUT NOCOPY CLOB,
    p_what IN VARCHAR2,
    p_with IN VARCHAR2 )
    AS
    n NUMBER;
    BEGIN
    dbms_output.put_line('p_what = ' || p_what);
    dbms_output.put_line('p_with = ' || p_with);
    n := dbms_lob.instr( p_lob, p_what );
    dbms_output.put_line('n = ' || n);
    IF ( NVL(n,0) > 0 ) THEN
    dbms_lob.copy( p_lob, p_lob, dbms_lob.getlength(p_lob), n+LENGTH(p_with), n+LENGTH(p_what) );
    dbms_lob.write( p_lob, LENGTH(p_with), n, p_with );
    IF ( LENGTH(p_what) > LENGTH(p_with) ) THEN
    dbms_lob.trim( p_lob, dbms_lob.getlength(p_lob)-(LENGTH(p_what)-LENGTH(p_with)) );
    END IF;
    END IF;
    END;
    When I compile this, I receive the following warning "Warning(15,5): PLW-05003: same actual parameter(P_LOB and P_LOB) at IN and NOCOPY may have side effect"
    Line 15, column 5 is:
    dbms_lob.copy( p_lob, p_lob, dbms_lob.getlength(p_lob), n+LENGTH(p_with), n+LENGTH(p_what) );
    I'm reading about the NOCOPY Compiler hint at
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/08_subs.htm#12813 but I'm not for sure what exactly the issue is here?
    The syntax for dbms_lob.copy is:
    DBMS_LOB.COPY (
    dest_lob IN OUT NOCOPY BLOB,
    src_lob IN BLOB,
    amount IN INTEGER,
    dest_offset IN INTEGER := 1,
    src_offset IN INTEGER := 1);
    Do I need to copy the p_lob to another variable, not sure what do here?

    Hi,
    Is this really a stand alone procedure, or is it in fact part of a package?
    That warning usually comes when parameter is declared with NOCOPY in specification but without in body. Or vice versa.
    Could this be the case?
    Regards
    Peter

  • Resizing a TIFF File: Overwriting TIFFFields does not have any effect

    Hi,
    I have some TIFF files that I am receiving through a FAX server. Some of the TIFF files have an image length of *1077 pixels and a DPI of 200x98*. These images open fine in generic viewers like Microsoft Image Viewer and IrfanView and the image size in the information dialog shows up fine (1752x2158). But when I open the images in a LeadTools viewer (that works off TIFF Header tags), the image appears stretched out.
    I am trying to re-sample the image to make it a true Letter size image (1700x2200) with resolution of 200x200. I have been able to set the TAG_X_RESOLUTION and TAG_Y_RESOLUTION which I can see changed in the Tag Viewer. But changing the following tags does not have any effect on the resulting image:
    TAG_IMAGE_WIDTH
    TAG_IMAGE_LENGTH
    TAG_ROWS_PER_STRIP
    the following is the code I am using, I have tried all possible ways (removing TIFFFeilds and then adding them), but it has no effect. The last options is to use a Print Driver from within Java and Print the image (that re-samples it into a 8.5x11 inch image with 200 DPI). At this point, I am just curious about writing TIFFFields with images. Any ideas are appreciated:
    Thanks,
    Manuj
    +
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.Iterator;
    import javax.imageio.IIOImage;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.ImageWriter;
    import javax.imageio.metadata.IIOMetadata;
    import javax.imageio.stream.ImageInputStream;
    import javax.imageio.stream.ImageOutputStream;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import com.sun.media.imageio.plugins.tiff.BaselineTIFFTagSet;
    import com.sun.media.imageio.plugins.tiff.TIFFDirectory;
    import com.sun.media.imageio.plugins.tiff.TIFFField;
    import com.sun.media.imageio.plugins.tiff.TIFFImageWriteParam;
    import com.sun.media.imageio.plugins.tiff.TIFFTag;
    import com.sun.media.imageioimpl.plugins.tiff.TIFFT6Compressor;
                   //set the input stream for to the reader
                   tiffFileReader.setInput(tiffFileInputStream);     
                   //define the writer
                   ImageWriter tiffWriter = (ImageWriter) ImageIO.getImageWritersByMIMEType("image/tiff").next();
                   //define the writer param with compression;
                   TIFFImageWriteParam writeParam = (TIFFImageWriteParam)tiffWriter.getDefaultWriteParam();
                   TIFFT6Compressor compressor = new TIFFT6Compressor();
                   writeParam.setCompressionMode(TIFFImageWriteParam.MODE_EXPLICIT);
                   writeParam.setCompressionType(compressor.getCompressionType());
                   writeParam.setTIFFCompressor(compressor);
                   writeParam.setCompressionQuality(Float.parseFloat("1"));
    // get the metaData
                   IIOMetadata imageMetadata = null;
                   IIOImage testImage = null;
                   for(int i=0;i<filePageCount;i++)
                        imageMetadata = tiffFileReader.getImageMetadata(i);
                        TIFFDirectory dir = TIFFDirectory.createFromMetadata(imageMetadata);
              // Get {X,Y}Resolution tags.
              BaselineTIFFTagSet base = BaselineTIFFTagSet.getInstance();
              TIFFTag tagXRes = base.getTag(BaselineTIFFTagSet.TAG_X_RESOLUTION);
              TIFFTag tagYRes = base.getTag(BaselineTIFFTagSet.TAG_Y_RESOLUTION);
              TIFFTag tagImageWidth = base.getTag(BaselineTIFFTagSet.TAG_IMAGE_WIDTH);
    TIFFTag tagImageLength = base.getTag(BaselineTIFFTagSet.TAG_IMAGE_LENGTH);
              TIFFTag tagRowsPerStrip = base.getTag(BaselineTIFFTagSet.TAG_ROWS_PER_STRIP);
              TIFFField fieldRowsPerStrip = new TIFFField(tagRowsPerStrip, TIFFTag.TIFF_SHORT, 1, (Object)new char[]{2200});
              // Create {X,Y}Resolution fields.
              TIFFField fieldXRes = new TIFFField(tagXRes, TIFFTag.TIFF_RATIONAL,1, new long[][] {{200, 1}});
              TIFFField fieldYRes = new TIFFField(tagYRes, TIFFTag.TIFF_RATIONAL,1, new long[][] {{200, 1}});
              // Create Width/Height fields.
              TIFFField fieldImageWidth = new TIFFField(tagImageWidth,TIFFTag.TIFF_SHORT,1, (Object)new char[]{1728});
              TIFFField fieldImageLength = new TIFFField(tagImageLength, TIFFTag.TIFF_SHORT,1, (Object)new char[]{2200});
              //TIFFTag imageLengthTag = fieldImageLength.getTag();
              // Append {X,Y}Resolution fields to directory.
              dir.addTIFFField(fieldXRes);
              dir.addTIFFField(fieldYRes);
              //add Image Length and height parameters
              dir.addTIFFField(fieldImageWidth);
              dir.addTIFFField(fieldImageLength);
              // dir.removeTIFFField(278);
              dir.addTIFFField(fieldRowsPerStrip);
    testImage = new IIOImage(tiffFileReader.read(i), null, dir.getAsMetadata());
    +
    The resulting image with this carries the updated DPI values (200x200) but still carries the old values of 1752x1077, the length being exactly half of what Irfan view is showing.
    Edited by: Manuj on Nov 2, 2010 10:48 AM

    Your problem for some reason sounds familiar.
    EDIT
    Ok, now I remember. Your post is like this one in the old forums,
    http://forums.sun.com/thread.jspa?forumID=540&threadID=5425983
    Basically, for viewing purposes Irfanview scales the image's height by 2 and changes the dpi to *200x196*. It does this to achieve a 'square' pixel. The image that appears on screen now looks roughly how a printer would print it. However, the image data is still the same squished 1752x1077 image.

  • IDocumentQuery.Execute() method throws user does not have edit permissions exception

    I'm trying to query a document folder for all of its containing documents. Its a basic query like this:
    IPortletContext PortletContext = PortletContextFactory.CreatePortletContext(Request,Response);IRemoteSession PTSession;PTSession = PortletContext.GetRemotePortalSession();IDocumentManager documentManager = PTSession.GetDocumentManager();
    IDocumentQuery documentQuery = documentManager.CreateQuery(FolderID); documentQuery.SetSortProperty(ObjectProperty.Name);IObjectQuery queryResults = documentQuery.Execute();
    When I'm logged into the portal as an administrator, everything works fine. However if I'm logged in as a "regular" user, I get this exception when calling the Execute() method:
    Plumtree.Remote.PRC.PortalException: Exception of type Plumtree.Remote.PRC.PortalException was thrown. ---> System.Web.Services.Protocols.SoapException: Server was unable to process request. --> Access denied: Current user does not have edit permission
    I'm sending the Login Token to the portlet. Now I've tried giving the user Edit rights on the document folder as well as Edit the Knowledge Directory rights in the Activity Manager, but neither gets rid of the exception. I'm not sure what other "Edit" permissions to check. I don't even see why the user would need "Edit" permission to anything in the first place since the Execute() method simply returns an IObjectQuery that doesn't have any ability to make changes to any objects. I know that I could use the SearchFactory interface, but I wanted the results to be real time. Any help would be much appreciated. Thanks!
    Jimmy

    The problem here is that the query is created with default settings to show unapproved documents -- only users with edit access can see unapproved documents. Add the bold line to your code and it will work.
    IDocumentManager docManager = prcSession.GetDocumentManager();IDocumentQuery docQuery = docManager.CreateQuery(iFolderID);docQuery.SetShowUnapproved(false);IObjectQuery queryResults = docQuery.Execute()

  • Personalising variable values does not have the effect

    Hello ,
    When the variable is personalised with a value and executed the query for the second time the variable does not have the personalised values again and it waits to enter the input!
    What is the reason behind this and are there any other settings to be done before personalising the variable value?
    Thanks in advance!
    Ram

    Hi BW,
        This is problem with one query or for all queries.
    you first have to activate the personalization in the BW backend system (via transaction RS_PERS_ACTIVATE or via Customizing path BW Customizing Implementation Guide -> Business Information Warehouse -> Reporting-Relevant Settings -> General Reporting Settings -> Activate Personalization in BEx
    And also check <a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1056690&nlang=EN&smpsrv=https%3a%2f%2fwebsmp110%2esap-ag%2ede">Note 1056690 - Query Designer: Variable personalization is deleted</a>
    Hope it Helps
    Srini

  • Changing CSS but some changes do not have any effect

    I am experimenting with customising CSSs, and having limited success.
    I have an application based on one of the default themes that uses einstein.css. I have taken a copy of einstein.css called desdir.css and loaded it into my workspace. I have changed the page template to reference this in the header as follows:
    <link rel="stylesheet" href="#WORKSPACE_IMAGES#desdir.css" type="text/css" />
    So far the only changes I have been making are to colours, relacing the default blue and gold with our corporate colours. For example:
    .tableheader
    {font-family: Arial, Helvetica, Geneva, sans-serif;
               font-size: 10pt;
               font-weight: bold;
               background: #FF9A52;
               color: #4E1B6F;}
    .TabForegroundColor { background-color: #4E1B6F; }
    .TabBackgroundColor { background-color: #FF9A52; }
    However, I am finding that some of the changes take effect and some do not. For example, TabForegroundColor changes but TabbackgroundColor does not.
    I have tried clearing the browser cache but to no avail.
    Could it be that HTMLDB is ignoring my CSS and using values from somewhere else (core.css?) for some items?

    Thanks.
    Further to my previous post, I have since found that when I export the application and re-import into another HTMLDB environment along with the CSS file, it all works perfectly!

  • Workaround for Bug ID 4532517:shouldYieldFocus does not allow side effects

    The work-around for this bug is to set the InputVerifier for the component to null, show the dialog, then set the InputVerifier back to the component. However, the behaviour is still not consistent with the Java 1.3 behaviour. The act of clicking in the currently active JTextField, causes the shouldYieldFocus method to be called, even though focus is not being changed to another component. Is there anyway to avoid this behaviour with the work-around (a work-around for the work-around)? Thanks.

    Thanky you for the fast reply!
    I meant what the author "xxx..@x..." means with "See comment section.". Which comment section is he referencing to?
    Greets Alexander

  • Android, default install location does not have any effect

    I have Just5 Spacer 2 phone running Android 4.4.2 and since I can not root it (the only application I found was supposed to support it was SRS Root, but I only managed to get partial root through it) I thought I'd at least be able to set default install location for applications to external storage, but apparently, despite the fact that adb shows those changes I made, phone continues to install to internal storage.
    [dainis@arch platform-tools]$ ./adb shell pm set-install-location 2
    [dainis@arch platform-tools]$ ./adb shell pm get-install-location
    2[external]
    Any suggestions?

    By digging deeper and deeper I found a few posts/pages somewhere (didn't save sources for some reason) mentioning that this stopped working somewhere at around Gingerbread.
    Those who know - is that true?

  • Right arrow & Enter key do not have any effect in Address/Awesome Bar

    I enter the first few characters of the website - I can use the down arrow and Enter key to select the website but nothing happens. I have the correct website address but neither right-arrow nor the Enter key (again) work to take me to the website I want to visit.
    This problem has only since I upgraded from FF 24 to FF 25.0.1.
    Anyone know how to fix this?

    Hi,
    Thanks for the quick response.
    I turned out to be a problem with the nURL Suffix extension. It turns out that there was an update available for FF25 but an update wasn't available (yet) through Add-ons Manager so I disabled/enable extensions to find the culprit.

  • HT201303 payment method i do not have credit card any more

    hi
    i do not have credit card any more so when i want to update my apps in my iphone it say (((tap continue and sign in to view billing information)) so i taped continue  it take me to payment method so i do not have credit card any more so what is should do ??? i really need your help im not in usa right now i do not know when im came back so pleas help to fix this 
    thank you so much 

    Consider setting up a paypal account.  You can use your bank information to create an account and then itunes can bill you to paypal who will automatically debit your bank account as needed.

  • Calendar Display Attributes have no effect

    Application Express 3.0.1.00.08
    I am having problems with the following attributes:
    Begin at Start of Interval
    Item Containing Start Date
    Item Containing End Date
    This is how you can reproduce my problems:
    Create page -> New page -> Calendar -> SQL Calendar-> "Calendar test page" -> SQL Query ( just to simulate whole month of activity ):
    select to_char(date_col, 'Day') char_col, date_col date_col
    from (SELECT trunc(sysdate, 'mm') + LEVEL - 1 as date_col
    FROM DUAL
    CONNECT BY LEVEL <= to_char(last_day(sysdate), 'dd'))
    ... next next next
    then I go to Calendar Attributes and uncheck "Begin at Start of Interval"
    But "Monthly" Calendar view does not change a bit ( it should not start at the begining of this month ). I also tried creating two hidden items and put their names into "Item Containing Start Date" and "Item Containing End Date" fields; and assigning them different values spanning from couple of days to couple of months. It does not have any effect.
    What am I doing wrong ? Can anyone reproduce this ? Did that ever worked ?
    Any help would be appreciated.
    Regards,
    Matjaz

    It doesn't seem to work for me neither...
    Not as explained here: http://download-uk.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/bldapp.htm#CEGIGEJI
    I also found an error in the help for the "Item Containing End Date". There's stated that the date format should be YYYMMDD... I suppose that's YYYYMMDD (like in the online doc)
    I didn't see that before... bizar.
    Dimitri
    -- http://dgielis.blogspot.com

  • What exactly are side-effects in #pragma no_side_effect?

    Which of the following qualify as side-effects for the purposes of #pragma [no_side_effect|http://docs.sun.com/app/docs/doc/819-5265/bjaby?a=view#bjacp]:
    1. dynamically allocating/deallocating memory using malloc/free or operator new/delete
    2. exiting the function by throwing a C++ exception
    3. temporarily changing the disposition for a signal (e.g., ignoring or suspending a signal)
    4. creating a thread and joining with it

    Thanks for your answers! Just to make sure I understand correctly: accessing the local state of the caller through a parameter is not a side-effect. I.e., in the following snippet the function has_no_side_effects() has no side-effects:
    int get (int *p) { return *p; }
    void set (int *p, int x) { *p = x; }
    void has_no_side_effects () {
        int x;
        int y;
        set (&x, 0);    // not a side-effect (x is local)
        y = get (&x);   // same
    }But in the following, has_side_effects() does:
    void has_side_effects () {
        static int x;
        static int y;
        set (&x, 0);    // side-effect: writing a "global"
        y = get (&x);   // side-effect: reading a "global"
    }Also, reading global const data (i.e., what might be in ROM) is not a side-effect. Correct? E.g.,
    static const int global[] = { 1, 2 };
    void has_no_side_effects () {
        int x;
        int y;
        x = global [0];   // not a side-effect, global is in ROM
        y = global [1];   // same
    }

  • HT1481 I have an ipod shuffle which i need to reset as i can not sinc it on my laptop which is using windows 8, but when i open itunes i d not have the 'source panel' on the left hand side which should show up my ipod. any ideas what i need to do? please

    Hi  I have an ipod shuffle which worked well on my old pc but since i have tried to link it with my new laptop I cant get it to sinc. I have athorised the device to my laptop so i thought it maybe worth resetting it but all the info I have read tells me that to reset my ipod i need to open i tunes and on the left hand side in the 'source panel' i will find my ipod listed but when i open itunes i do not have a source panel so i cant reset it. i have spent days trying to get this problem sorted and am about to throw the thing away. I have tried to manually sinc the thing, i have installed and reinstalled the latest version of itunes, i have restarted my laptop but i dont know what to do next. any help would be very much appreciated. Many thanks in advance

    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    iPod not recognised by windows iTunes
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

Maybe you are looking for