ExternalInterface.available returns true in standalone

Incredibly frustrating - no matter what I try, in standalone test environment it always returns true - it should return false - any thoughts on this anyone.
Its just ridiculous that Bugs like this occur.......
Cheers,

To add to this - I also have incubator "Molehill" build.
I can simply create a new document - place the following on the root timeline
trace(ExternalInterface.available);
and it will return true.
Anyone help with this ? Adobe needs to be aware of this as it may be an incubator issue, and therefore serious.

Similar Messages

  • ExternalInterface.available returns false on a Mac

    Hi there!
    I'm triyng to get the browsers back-button to work with my
    flash site. The general principle is this:
    There is an index.html page containing an (not yet) hidden
    Iframe and the flash movie.
    The Iframe contains page A, which starts with JavaScript
    calling a BACK-function on the index-page.
    The BACK-function triggers an AS-function in the flash-movie
    that activates its own back-button, and then changes the URL of the
    Iframe to Page B. This causes a new History to be added to the
    browser.
    The flash movie now contains 5 frames (labeled in the middle
    of the stage) and two navigation buttons: back (Terug) and forward
    (Verder). Those buttons do exactly what you'd expect them to do
    (prevFrame and nextFrame).
    On a PC (IE) this seems to work pretty well. But on a mac
    nothing seems to work propperly.
    I've got a testpage at:
    http://www.multimediamatters.nl/test
    Here's the code I have on the first frame.
    stop();
    _root.terug.onRelease = function(){
    prevFrame();
    terugF = function(){
    trace(_root._currentframe);
    if (_root._currentframe > 1){
    _root.terug.onRelease();
    else {
    _root.getURL("javascript::history.go(-2)");
    import flash.external.*;
    var isAvailable:Boolean = ExternalInterface.available;
    var txtField2:TextField = this.createTextField("txtField",
    this.getNextHighestDepth(), 300, 0, 200, 50);
    txtField2.border = true;
    txtField2.text = "ExternalInterface.available =
    "+isAvailable.toString();
    var methodName:String = "goHome";
    var instance:Object = null;
    var method:Function = terugF;
    var wasSuccessful:Boolean =
    ExternalInterface.addCallback(methodName, instance, method);
    var txtField:TextField = this.createTextField("txtField",
    this.getNextHighestDepth(), 0, 0, 200, 50);
    txtField.border = true;
    txtField.text = "ExternalInterface.addCallback =
    "+wasSuccessful.toString();
    Somehow the ExternalInterface doesn't seem to get loaded. Any
    suggestions to solve this?
    Thanks in advance.
    Yours,
    Andra
    P.S.
    The condition
    if (_root._currentframe > 1){ doesn't work on a PC
    either. It always calls
    _root.terug.onRelease(). I can't figure out why...

    Woops!! I guess I wasn't paying enough attention...
    On a mac using Internet Explorer, both
    ExternalInterface.available and
    ExternalInterface.addCallback return false. Using the back
    button does reload Page A into the Iframe, but doesn't execute any
    AS-functions.
    Using Safari, they both return true. However, using the back
    button reloads the entire index.html instead of loading Page A back
    into the Iframe. This means the flash-movie is reloaded aswell, so
    you're automatically back at frame 1.
    Is there any way I could get this working properly?
    Yours,
    Andra

  • InetAddress.isReachable() only returns true

    Hello,
    Im trying to use the InetAddress.isReachable() method to get the host reacheability, but it only returns true to all addresses, being available or not...... in sniffer all appear to be ok, i can see the icmp packets incoming and outgoing....
    Somene could help me? :D
    thanks...

    jverd, because the network address that im using in
    this test is not being used in my network, i can see
    it using ping tool from my desktop, and because the
    sniffer shows me that the ping is requested, but does
    not get response... ok?Okay, so this is a local address? Like a 192.168, or a 10. or 172.whatever? And you're certain there's no computer that has that address?
    Just because ping fails doesn't mean nothing's there. A host might be there and not answering ping. isReachable also tries a TCP connection on port 7.
    Try telnet the_supposedly_bad_address 7 and see if it responds. If so, then there's a host at that address, and isReachable is correct. If it doesn't, then it would seem to be a bug in isReachable (though I'm still not totally sure).

  • MachineID.matches() returns true for different devices

    We are seeing this issue when using Windows XP running IE6. Our customer is seeing the same issue when using IE8.
    In our testing we used two Macbook Pro devices running Windows XP Bootcamp. We used Internet Explorer 6.
    The following code returns true for bytes obtained from two different machine ids.
    currentMachineId.matches(new MachineId(registeredDeviceBytes)
    The two devices give us the following machine IDs, the Base64 representation is below
    MIIBezCBwgYJKoZIhvcvAwIAMYG0MCsGCSqGSIb3LwMCZDAeDBxtL2xwQWlPSGhibUNoemNNb0FoQzRoTG95bXM9MC sGCSqGSIb3LwMCZTAeDBx1YWhjL3haM3FBdlZoR21lU2tWaXRTc0xZV009MCsGCSqGSIb3LwMCZjAeDBxyQkFMeXBR YkZLaStTSlhGUm1CNHlUeXhBNmc9MCsGCSqGSIb3LwMCZzAeDBxYc0E3cXBzbGkrVFZveTkyRGhJbnhUMkJ3LzA9BC BmOGI0MTAzMTQ3MDNkMjYxNDc2ODI2YzIzMDMzNjdhMqCBkTCBjjAFDANXaW4xgYQwgYECAQECAQEweQIBPDF0MA4G CSqGSIb3LwMCaAIBCjAOBgkqhkiG9y8DAmkCAQowEwYJKoZIhvcvAwJkAgEPoAMBAf8wEwYJKoZIhvcvAwJlAgEPoA MBAf8wEwYJKoZIhvcvAwJmAgEUoAMBAf8wEwYJKoZIhvcvAwJnAgEeoAMBAf8=
    MIIBezCBwgYJKoZIhvcvAwIAMYG0MCsGCSqGSIb3LwMCZDAeDBx2dkZoNXRMOEFqK2NoSmVZVXc0T3dPUzZJcVE9MC sGCSqGSIb3LwMCZTAeDBxXYlJqcTl1N3Z4aUY2YnVqNWpBQTBhU1dUVEU9MCsGCSqGSIb3LwMCZjAeDBxyQkFMeXBR YkZLaStTSlhGUm1CNHlUeXhBNmc9MCsGCSqGSIb3LwMCZzAeDBxYc0E3cXBzbGkrVFZveTkyRGhJbnhUMkJ3LzA9BC A4NGFiZTJjN2VhM2M1NDgxOWQxM2RiZGNmYjVhMjgzNKCBkTCBjjAFDANXaW4xgYQwgYECAQECAQEweQIBPDF0MA4G CSqGSIb3LwMCaAIBCjAOBgkqhkiG9y8DAmkCAQowEwYJKoZIhvcvAwJkAgEPoAMBAf8wEwYJKoZIhvcvAwJlAgEPoA MBAf8wEwYJKoZIhvcvAwJmAgEUoAMBAf8wEwYJKoZIhvcvAwJnAgEeoAMBAf8=
    Can you tell us why this is happening? Under what circumstances can this happen? How to avoid this or any workarounds?
    We need an answer really soon. We are about to launch a service that counts on being able to restrict the number of devices for watching videos.
    Thanks

    Hi DruMmer,
    1. Nice play on words with your forum alias.  : )
    2. Adobe Access DRM's "Device Binding" algorithm takes into play several different available machine attributes (imagine a set of various attributes that we check every time you attempt to play protected content). Our MachineID.matches() allows for small variations in attributes, since it's expected that desktop users will likely upgrade their hardware over time.  Because of this, MachineID.matches() will allow for a small tolerance in difference before returning "FALSE".
    In your situation, you are seeing "TRUE" == MachineID.matches(otherMachineID) because surprisingly, almost all of the available attributes are the same between the 2 macbook pros' you're testing.  We will review our Device Binding Algorithm to determine if there should be some possible tweaking, as what we have access to on the MBP hardware may have changed.
    In the meantime, an additional check you can perform to see if 2 machines are different (without using the underlying hardware) is MahineID.getUniqueID.  However, please understand the limitations of this API (read the Javadocs).  Of particular interest is that across DRM resets, this ID is not resilient (as apposed to MachineID.matches()).
    cheers,
    /Eric.

  • Problem with return true and if statement

    I'm making a
    ship shooter
    game and I have a problem with the collision detection for the
    corners of the stage. When you hold down two of the arrows to move
    the ship into the corners of the screen, the ship will go past it.
    The function bellow is what I'm using to detect this collision. The
    reason I'm using a function is because it's used for the ship and
    for all the balls from the cannons (as shown in the last two lines
    of the attached code). This is the reason I need the return true,
    so the if statement can be evaluated to true and then unload the
    movieclip of the cannon ball. When I remove the return true, the
    collision works fine, but obviously my cannon balls all get stuck
    on the edges.
    Any ideas?

    Well the function is called every frame, for the ship and for
    every cannon ball that's on the screen. So it could be called about
    4 times or so per frame. The problem is that ship goes through the
    corners of the stage (btw, the green background is the stage area)
    when you go in a diagonal direction.
    Just curious...what's the unnecessary code you're talking
    about?

  • Exchange 2007 SP2: HasActiveSyncDevicePartnership Always Returns True

    I am currently work with a customer in an Exchange Server 2007 SP2 environment. A Powershell script that is used for gathering mobile device information begins with at the mailbox level and filters with
    HasActiveSyncDevicePartnership equal to true, as in -
    Get-casmailbox -Filter {HasActivesyncDevicePartnership -eq $true }
    We have discovered that it appears as though this flag is set to true for every mailbox account, despite the fact that only a few mailboxes have actual EAS partnerships with devices.
    My understanding was that this flag should only ever return true if there is an actual ActiveSync partnership. Is there something I am missing here? Can the flag be true even if there is no (or has never been) a partnership?
    Don Sorcinelli - Microsoft MVP, Mobile Devices

    Hi,
    Yes, the value of the " HasActiveSyncDevicePartnership " will be set to true if there is an actual ActiveSync partnership. Also you can use the following command to
    check the detail sync information such as device name,  last sync time:
    Get-ActivesyncDeviceStatistics -Mailbox [email protected]
    If no statistics information returns, The most probable cause 
    should be that someone set the HasActiveSyncDevicePartnership to true for all mailbox users accidently. Please run the following command to change them back:
    get-casmailbox |set-casmailbox -HasActivesyncDevicePartnership $false
    Then set the
    HasActiveSyncDevicePartnership to true for the users who have an actual ActiveSync partnership:
    Set-casmailbox –identity
    [email protected] -HasActivesyncDevicePartnership $true
    Gen Lin
    TechNet Subscriber Support
    in forum
    If you have any feedback on our support, please contact
    [email protected]
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Thanks
    Gen Lin-MSFT

  • Custom Login Module - Commit Method return TRUE always?

    Hi,
    I am creating a custom login module for my portal authentication.
    For the login module, should the commit() method always return TRUE?
    The example code on help.sap.com indicates yes to this question.
    However, the JAVA Sun standard indicates that commit should return FALSE if the preceding login method returned FALSE.
    Does the SAP example stray from the SUN standard?  How should I code the commit() method such that it works (Always TRUE, or follow lead of login() method)?
    Regards,
    Kevin

    Hi Kevin,
    I'm actually working with this document: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/webinars/jaas%20login%20module%20development%20on%20webas%20java%20640.pdf#search=%22classloader%20sda%20jar%20reference%22">JAAS Login Modules</a>.
    There is also example code. If it should be ignored they return false, otherwise true (page 32).
    Regards,
    Marcus
    Message was edited by: Marcus Freiheit

  • Searching for a string in an excel file and return true if found.

    How can I search for a string in an excel file and return true if found, its location and also a value.

    The problem with searching an excel file is that it contains a header. It would be easiest if you just read the file into a LabVIEW array and search the array. This way you can also get the index and the value of the location.

  • Doesn't return true value .........

    Hi All,
    please check the following code.
    password (originalPassword) from the database is : xyz
    password (password) from the login page is : xyz
    when I try for equality for the password :
    if(originalPassword.equalsIgnoreCase(password)) {
    it doesn't return true value while the password is same that is : xyz ?
    I an stuck in the problem.
    Please look into the code and solve my problem.
    Thanks
    public boolean verifyPassword(String username, String password) {
            String originalPassword=null;
            try {
                Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
               Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://sqlserver:1433","harish","harish");
               PreparedStatement pstmt = con.prepareStatement("select password from registration where username='"+username+"'");          
               //ResultSet rs = pstmt.getResultSet();
               ResultSet rs = pstmt.executeQuery();
               if(rs.next()) {
                   originalPassword=rs.getString(1);              
               pstmt.close();
               if(originalPassword.equalsIgnoreCase(password)) {
                              return true;
               } else {
                   return false;
           } catch (Exception e){
               System.out.println("Exception: verifyPassword="+e);
               return false;
         Harish Pathak

    Are you sure there's no space before or after "xyz"? Try adding some debug output to your code:
    if(originalPassword.equalsIgnoreCase(password)) {
      //foo
    } else {
      System.out.println("<" + password + "> does not match <" + originalPassword + ">");
    }

  • Query (Select) that return TRUE  or false

    Hi
    I Need to do a query that return true or false
    SELECT TRUE INTO v_Envia_Maplink
    FROM SNCDE, SNAPL
    WHERE SNCDE.CDESEQ = OLD.CDESEQ AND
             SNAPL.APLCFJSEQ = CFJSEQ_VR AND
             SNCDE.APLCOD = SNAPL.APLCODHow can to do it ?

    Hi,
    you can use DECODE and have TRUE or FALSE returned.
    SQL> SELECT comm, DECODE(COMM, NULL, 'FALSE', 'TRUE')
    FROM EMP;
    COMM DECOD
    FALSE
    FALSE
    FALSE
    TRUE
    500 TRUE
    FALSE
    1400 TRUE
    FALSE
    FALSE
    FALSE
    FALSE
    COMM DECOD
    0 TRUE
    FALSE
    FALSE
    FALSE
    FALSE
    FALSE
    FALSE
    selected.
    SQL>
    ThanksThanks
    something that retunr datatype BOOLEAN ?

  • Boolean User Properties always returns TRUE

    Hi, I am trying to get some propeties from the user on the AD and I found out with the following issue, all the boolean attributes always return TRUE as value. The Code that I am using to extract them is the following
    foreach ($objUser in $objUsers)
     $bolPasswordNeverExpires = [boolean] $objUser.Properties['PasswordNeverExpires'];
     $bolEnabled = [boolean] $objUser.Properties['Enabled'];
     $bolAccountExpired = [boolean] $objUser.Properties['AccountExpired'];
    Could you please guide me into the proper direction to solve it. I looked up in most of powershell related topic and did not find a way to solve it. I even attempt using UserAccountControl Attribute to check Enabled status do not matter agains which value
    I check it, it always returns TRUE.

    Thank´s for the tip. Unluckily when I attempt it, if I left only
    $objUsers.PasswordNeverExpires or $objUsers.Enabled, it only return whites spaces and no comparison from True or False is feasible.
    If I change it to [boolean] $objUsers.PasswordNeverExpires or $objUsers.Enabled instead of using the Properties option, it returns False for all values.
    I attempt to use the UserAccountControl field for look up the property Ex: (objUser.UserAccountControl AND 2) for Enabled and it also returns True for all situation
    I look up for the properties on the ISE interface and the only ones displayed are the following ones:
    distinguishedname
    displayname
    whencreated
    samaccountname
    sn
    accountexpires
    pwdlastset
    samaccounttype
    adspath
    useraccountcontrol
    whenchanged
    cn
    userprincipalname
    lastlogontimestamp
    msds-user-account-control-computed
    May it be an issue with the filter that does not load the specified properties?

  • Regex: how can Matcher.matches return true, but Matcher.find return false?

    Consider the class below:
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    public class RegexBugDemo {
         private static final Pattern numberPattern;
         static {
                   // The BigDecimal grammar below was adapted from the BigDecimal(String) constructor.
                   // See also p. 46 of http://www.javaregex.com/RegexRecipesV1.pdf for a regex that matches Java floating point literals; uses similar techniques as below.
              String Sign = "[+-]";
              String Sign_opt = "(?:" + Sign + ")" + "?";     // Note: the "(?:" causes this to be a non-capturing group
              String Digits = "\\p{Digit}+";
              String IntegerPart = Digits;
              String FractionPart = Digits;
              String FractionPart_opt = "(?:" + FractionPart + ")" + "?";
              String Significand = "(?:" + IntegerPart + "\\." + FractionPart_opt + ")|(?:" + "\\." + FractionPart + ")|(?:" + IntegerPart + ")";
              String ExponentIndicator = "[eE]";
              String SignedInteger = Sign_opt + Digits;
              String Exponent = ExponentIndicator + SignedInteger;
              String Exponent_opt = "(?:" +Exponent + ")" + "?";
              numberPattern = Pattern.compile(Sign_opt + Significand + Exponent_opt);
    //     private static final Pattern numberPattern = Pattern.compile("\\p{Digit}+");
         public static void main(String[] args) throws Exception {
              String s = "0";
    //          String s = "01";
              Matcher m1 = numberPattern.matcher(s);
              System.out.println("m1.matches() = " + m1.matches());
              Matcher m2 = numberPattern.matcher(s);
              if (m2.find()) {
                   int i0 = m2.start();
                   int i1 = m2.end();
                   System.out.println("m2 found this substring: \"" + s.substring(i0, i1) + "\"");
              else {
                   System.out.println("m2 NOT find");
              System.exit(0);
    }Look at the main method: it constructs Matchers from numberPattern for the String "0" (a single zero). It then reports whether or not Matcher.matches works as well as Matcher.find works. When I ran this code on my box just now, I get:
    m1.matches() = true
    m2 NOT findHow the heck can matches work and find NOT work? matches has to match the entire input sequence, whereas find can back off if need be! I am really pulling my hair out over this one--is it a bug with the JDK regex engine? Did not seem to turn up anything in the bug database...
    There are at least 2 things that you can do to get Matcher.find to work.
    First, you can change s to more than 1 digit, for example, using the (originaly commented out) line
              String s = "01";yields
    m1.matches() = true
    m2 found this substring: "01"Second, I found that this simpler regex for numberPattern
         private static final Pattern numberPattern = Pattern.compile("\\p{Digit}+");yields
    m1.matches() = true
    m2 found this substring: "0"So, the problem seems to be triggered by a short source String and a complicated regex. But I need the complicated regex for my actual application, and cannot see why it is a problem.
    Here is a version of main which has a lot more diagnostic printouts:
         public static void main(String[] args) throws Exception {
              String s = "0";
              Matcher m1 = numberPattern.matcher(s);
              System.out.println("m1.regionStart() = " + m1.regionStart());
              System.out.println("m1.regionEnd() = " + m1.regionEnd());
              System.out.println("m1.matches() = " + m1.matches());
              System.out.println("m1.hitEnd() = " + m1.hitEnd());
              m1.reset();
              System.out.println("m1.regionStart() = " + m1.regionStart());
              System.out.println("m1.regionEnd() = " + m1.regionEnd());
              System.out.println("m1.lookingAt() = " + m1.lookingAt());
              System.out.println("m1.hitEnd() = " + m1.hitEnd());
              Matcher m2 = numberPattern.matcher(s);
              System.out.println("m2.regionStart() = " + m2.regionStart());
              System.out.println("m2.regionEnd() = " + m2.regionEnd());
              if (m2.find()) {
                   int i0 = m2.start();
                   int i1 = m2.end();
                   System.out.println("m2 found this substring: \"" + s.substring(i0, i1) + "\"");
              else {
                   System.out.println("m2 NOT find");
                   System.out.println("m2.hitEnd() = " + m2.hitEnd());
              System.out.println("m2.regionStart() = " + m2.regionStart());
              System.out.println("m2.regionEnd() = " + m2.regionEnd());
              System.out.println("m1 == m2: " + (m1 == m2));
              System.out.println("m1.equals(m2): " + m1.equals(m2));
              System.exit(0);
         }Unfortunately, the output gave me no insights into what is wrong.
    I looked at the source code of Matcher. find ends up calling
    boolean search(int from)and it executes with NOANCHOR. In contrast, matches ends up calling
    boolean match(int from, int anchor)and executes almost the exact same code but with ENDANCHOR. Unfortunately, this too makes sense to me, and gives me no insight into solving my problem.

    bbatman wrote:
    I -think- that my originally posted regex is correct, albeit possibly a bit verbose, No, there's a (small) mistake. The optional sign is always part of the first OR-ed part (A) and the exponent is always part of the last part (C). Let me explain.
    This is your regex:
    (?:[+-])?(?:\p{Digit}+\.(?:\p{Digit}+)?)|(?:\.\p{Digit}+)|(?:\p{Digit}+)(?:[eE](?:[+-])?\p{Digit}+)?which can be read as:
    (?:[+-])?(?:\p{Digit}+\.(?:\p{Digit}+)?)        # A
    |                                               # or
    (?:\.\p{Digit}+)                                # B
    |                                               # or
    (?:\p{Digit}+)(?:[eE](?:[+-])?\p{Digit}+)?      # COnly one of A, B or C is matched of course. So B can never have a exponent or sign (and A cannot have an exponent and C cannot have a sign).
    What you probably meant is this:
    (?:[+-])?                                   # sign       
        (?:\p{Digit}+\.(?:\p{Digit}+)?)         #   A
        |                                       #   or
        (?:\.\p{Digit}+)                        #   B
        |                                       #   or
        (?:\p{Digit}+)                          #   C
    (?:[eE](?:[+-])?\p{Digit}+)?                # exponent
    and that this must be a sun regex engine bug, but would love to be educated otherwise. Yes, it looks like a bug to me too.
    A simplified version of this behavior (in case you want to file a bug report) would look like this:
    When `test` is a single digit, m.find() returns _false_ but matches() returns true.
    When `test` is two or more digits, both return true, as expected.
    public class Test {
        public static void main(String[] args) {
            String test = "0";
            String regex = "(?:[+-])?(?:\\p{Digit}+\\.(?:\\p{Digit}+)?)|(?:\\.\\p{Digit}+)|(?:\\p{Digit}+)(?:[eE](?:[+-])?\\p{Digit}+)?";
            java.util.regex.Matcher m = java.util.regex.Pattern.compile(regex).matcher(test);
            System.out.println("matches() -> "+test.matches(regex));
            if(m.find()) {
                System.out.println("find()    -> true");
            } else {
                System.out.println("find()    -> false");
    }

  • HasEventListener and willTrigger always return true

    Hi  everybody.
    I'm trying to achieve the following result.
    I'm listing all items in a form.
    When I encounter a button I check if it has already an event listener applied to it. If not , I apply the event Listener with addEventListener.
    In this way, the next time I'll list the whole form I won't apply the event listener another time (if for example I apply the same event listener twice to a button which insert a new record in a database as result I'll have 2 records added also if the user clicked once...no good at all!!!)
    To accomplish this task I'm using the Actionscript function hasEventListener(EventType) and here comes the weird thing.
    Eveytime I invoke hasEventListener on the form's button it always returns true event if is the first time a list the form (so no event listener applied yet) , even if before to invoke hasEventListener I run removeEventListener.
    I've got the same behavior when i use willTrigger() function, it always returns true no matter when i call it.
    One possible solution could be set a global boolean property to store if Ialready listed the form and applied the event listener to it, but it would be better using hasEventListener, because I've got a class that perform this form listing , and this class is used on wide project, so if I get to fix this problem inside the class I would fix the problem in the entire project in on shot (I love oop programming!!!!)
    Has anybody already addressed this problem?
    Any advisement would be really appreciated.
    Thanks in advance for the attention.
    Best regards!!
    Luke

    Hi, flex harUI.
    Thanks very much for your reply.
    I knew that if I apply an event listener twice it should fire up only once, but this isn't what happen.
    Here's my scenario:
    -  I've got a component with the form inside it
    - Through a menu a go to the state the component is in and I call an "init" function inside the component
    - In the init function I call the Class which activate the form by applying eventlistener on the button
    - The user can navigate away from the component by click another menu item and then return to the component invoking again the form activation (and so let my application apply once again the addEventListener)
    - Here's what happen: the second,third,... time the user return to the component, when he try - for example - to add a record, the record is added two,three... times according to how many times the users "reinitialized" the component. The same things happen when the user tries to delete a record, he is prompted two,three,.... times if he's sure to delete it.....
    It's a really strange behaviour.
    I've found i worked around, by setting a global bool var "initialized" and before call the form activation i check the value of this var, but It's not a very beautiful solution, 'cause I would prefer to fix this problem inside the class, so the fix the problem in the whole project just in one shot!!! (that's why I would like to use hasEventListener() to check if the button has already an eventListener)
    Thaks anyway for the reply!
    If I've some news I'll update ya.
    Bye!

  • CI - Powershell Boolean Rule Always Returns True

    I'm trying to create a configuration baseline / item for a particular piece of software using a powershell script of data type Boolean. However, I'm having the issue that the evaluation is always returning compliant whether the workstation is or not. The
    script is as follows:
    $ErrorActionPreference = "SilentlyContinue"
    $Condition1 = (Test-Path -LiteralPath 'HKLM:\SOFTWARE\Adobe\Premiere Pro')
    $Condition2 = (Test-Path -LiteralPath 'C:\Program Files\Adobe\Adobe Premiere Pro CS6\Presets\Textures\720_govt1_bar.png')
    if ($Condition1) {
    if ($Condition2) {echo $true}
    else {echo $false}
    else {echo $true}
    This script works perfectly fine when run locally and always returns $true or $false as expected. However it only ever returns Compliant when used in a CI. It doesn't matter what the state of the 2 conditions are, it always evaluates Compliant.
    Any ideas?

    I'm beginning to wonder if there is variation between how well this feature works on Windows 7 and Windows 8.1. I'm beginning to notice that it usually works well on 7 but I have constant hell with it on 8. The last thing I tried which seemed to work (assuming
    it was not just randomness) was accepting the default "Platform" settings of the CI/CB. Before I had chosen Windows 7 and 8.1 only and was never able to return any value except Compliant on 8. Accepting the all platforms default Finally
    allowed me to show a state of Non-Compliant on 8. This was using a powershell script of string data type as discussed previously.
    My latest torment is discovering how to force a true re-evaluation of an updated CI/CB. In my non-compliant Win8 example, I have added a remediation script to an existing Monitor-Only CI and configured it to remediate. In my Win 7 members of the collection,
    everything works successfully, the condition is remediated and the state reports Compliant but on the Win8, although the local Control Panel applet shows both the CB and CI to have new revisions and the evaluation shows it has run with a new date/time,
    the remediation script never runs and changes to Compliant.
    Any suggestions how I can force an updated CI/CB to really re-evaluate, not just report it has?

  • JTable Won't Allow Editing Despite isCellUpdatable is Set to Return True

    Mass apologies if I somehow sent this to the wrong forum by mistake. However, aid from the local Java gurus would be much appreciated since I'm the only Java programmer at this company, so I don't have anyone to really ask for advice or anything.
    I've been trying to enter an updatable ResultSet into a JTable for about a week now, but the issue I ended up running into was that if you click on a cell with the intention to edit the contents, it won't even highlight the cell, much less let you edit it.
    I've searched Google and this forum along with tried to hunt down more complex books on Java rather than your standard "So you want to learn Java" cookbooks, but I've come up with null. I've also created about five different variations of TableModels for the purposes of handling this, including one that used an array of Objects instead of the ResultSet, but the problem persists.
    Here is the latest version of the TableModel that I've come up with
    package EventCalGUI;
    import javax.swing.table.AbstractTableModel;
    import EventCalSQL.TableData;
    @SuppressWarnings("serial")
    public class UpdateRSModel extends AbstractTableModel
         /** <code>TableData</code> from database */
         private TableData data;
         public UpdateRSModel(TableData tdata)
              data = tdata;
         @Override
         public int getColumnCount()
              return data.getColCount();
         @Override
         public int getRowCount()
              return data.getRowCount();
         @Override
         public Object getValueAt(int row, int col)
              return data.getValue(row, col);
         @Override
         public boolean isCellEditable(int row, int col)
              return true;
         @SuppressWarnings("unchecked")
         @Override
         public Class getColumnClass(int col)
              return data.getColClass(col);
         @Override
         public String getColumnName(int col)
              return data.getHeader(col);
         @Override
         public void setValueAt(Object value, int row, int col)
              data.setValue(value, row, col);
    }The reason for suppressing the warnings is because Eclipse attempts to be too helpful with its cautions and I was sick of seeing a long list of unnecessary yellow caution signs.
    This is the TableData class that the above TableModel derives from. I hadn't added in the actual ResultSet updating capabilities until I was sure I could get the JTable to work.
    package EventCalSQL;
    import java.sql.*;
    public class TableData
         Object[][] data = null;
         String[] headers = null;
         int rows = 0;
         int cols = 0;
         @SuppressWarnings("unchecked")
         Class[] colclass = null;
         public TableData (ResultSet rs)
              try
                   ResultSetMetaData metadata = rs.getMetaData();
                   // -------------- SET COLUMN DATA ---------------
                   cols = metadata.getColumnCount();
                   headers = new String[cols];
                   colclass = new Class[cols];
                   String classname = "";
                   for (int b = 0; b < cols; b++)
                        headers[b] = metadata.getColumnName(b + 1);
                        classname = metadata.getColumnClassName(b + 1);
                        colclass[b] = Class.forName(classname);
                   // ------------ SET ROW DATA --------------
                   if (rs.last())
                        rows = rs.getRow();
                        rs.beforeFirst();
                   if (rows != 0)
                        data = new Object[rows][cols];
                        for (int i = 0; i < rows; i++)
                             rs.absolute(i + 1);
                             for (int a = 0; a < cols; a++)
                                  data[i][a] = rs.getObject(a + 1);
              catch (SQLException sql)
                   // I'M UNINTERESTING!
              catch (ClassNotFoundException cnf)
                   // BE BORED!
              catch (NullPointerException np)
                   // I'M BORING!
         public Object getValue(int row, int col)
              return data[row][col];
         public String getHeader(int col)
              return headers[col];
         public void setValue(Object value, int row, int col)
              data[row][col] = value;
         public int getRowCount()
              return rows;
         public int getColCount()
              return cols;
         @SuppressWarnings("unchecked")
         public Class getColClass(int col)
              return colclass[col];
    }I've checked the exceptions, and they work. I just added into the comments since nothing's really supposed to happen there if it's an empty set. I just have a weird sense of humor after twenty-plus hours of coding variations of the same thing over and over.
    Thank you very much for any and all help ahead of time!

    Hidralisk: Thank you for the suggestion, but that's not the problem I'm running into. I really appreciate you trying to help though.
    camickr: I'll double-check my code to see where I might've unintentionally strayed from your suggestion. I deeply appreciate the help.
    Edited by: wsizemore on Dec 6, 2007 6:51 AM
    Haven't had the time to double-check my code since I've been re-assigned to other projects (the joys of being the solo Java programmer here), but I awarded you the points, camickr, since your suggestion seems to be the one that could've put me on the right track. Thanks so much for your help.

Maybe you are looking for

  • DVD plays well on some machines, gets stuck on others

    Made a 20-minute DVD, having done all my editing, etc. in iMovie and exported to iDVD5. Once burned, tested it on my iMac and it worked fine. Also worked fine in a friend's stand-alone DVD player. But some users since have this problem: the DVD plays

  • SQL script works in SQL Developer but not when scheduled

    I have a script that I can run, logged onto my server as a user with full permissions and into my database as SYSDBA, that produces a CSV file on the server when I run it from SQL Developer ON the server. HOWEVER, when I set it up as a scheduled job,

  • Reoccurring problem with email.

    Anyone else having trouble sending emails?  Incoming is not a problem. 

  • Number of jobs squared

    I've seen others out there with this problem but have not seen a solutions. the number of jobs sent to our printer is squared. I've tried deleting the print ques and recreating them but no good. This is obviously a bug in the server software. Someone

  • Unfamilair with ADO DB connection​s

    Hi I am not familiar with ADO DB connection. I am using Labview 7.1, MySQL and LabSQL. To get LabSQL and MySQL, you can find http://jeffreytravis.com/lost/labsql.html and http://dev.mysql.com/downloads/mysql/4.1.html. In those LabsQL vi functions, th