Getting a coherent behaviour between two extensions of a bundle

Hi,
I have two extensions in my bundle. The first (A) needs the second (B) OPEN in order to get datas. I have fixed the problem of communication with CSXSEvents.  When the A is open, the B must be open too. But the B must evoluate by herself if the A is closed.
The only solution i have found to get a coherent behaviour is to do "requestOpenExtension(B)"  on the following Event (com.adobe.indesign.Event.AFTER_SELECTION_CHANGED) of A.
Obviously, even if I close those  two extensions and then, I change the selection, the extension B appears again.
How can i  fix the problem? i have thought to close definitely the extension A on closing event of extension B but i'm not familiar with StateChangeEvent events and i'm not sure if it's the right solution. How can I close définitely an extension?
Thanks for help .

A solution which has worked for me in the past is to communicate via CSXS events - your first extension would register a listener for certain event types, and your second extension would dispatch events with that same type. Something like:
// Extension A:
CSXSInterface.getInstance().addEventListener(B_TO_A_EVENT, myEventHandler);
// Extension B:
CSXSInterface.getInstance().dispatchEvent(B_TO_A_EVENT, myCSXSEvent);
If you need two way communication then you can additionally add an event listener in Extension B and dispatch from Extension A.
Hope that helps!
--Louis

Similar Messages

  • How can I get extract the data between two cursors on an XY graph

    How can I get extract the data between two cursors on an XY graph

    Well, you say xy graph, so this might be a more complicated problem.
    For a waveform graph it's trivial. Simply get the two cursor indices (property: cursor index) and apply them to array subset of the data. Is that all you need?
    Here's how the above code would look like. using cursor.index instead of cursor.x elimnates the need to include scaling information.
    For an xy graph, there could be multiple segments (e.g. imagine a spiral that passes the desired x range multiple times from both sides). This would neeed significantly more code for a general solution.
    Message Edited by altenbach on 11-24-2009 07:53 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    cursorsubset.png ‏17 KB

  • How do you get FaceTime to work between two Mac's with the same email address? Thanks, Mike

    How do you get FaceTime to work between two Mac's with the same email address?

    I would like to know the same thing.  How does facetime work between a MacBook Pro and an I Pad that run off the same email address/mac id

  • How can i get number of days between two dates represented by two dates?

    how can i get number of days between two dates represented by two date objects. One is java.sql.Date, the other is java.util.Date?

    tej_222 wrote:
    But how do I do that conversion. from java.sql.date and java.util.date to calender?
    -thanks for the quick response.You may find the following utility code samples useful:
    [http://balusc.blogspot.com/2007/09/calendarutil.html]
    [http://balusc.blogspot.com/2007/09/dateutil.html]
    ganeshmb wrote:
    (date1.getTime() - date2.getTime())/(1000*60*60*24) should do.
    getTime returns millsecond value of date object and the difference divided by no of milliseconds in a day should fetch you the difference in terms of days.This doesn't respect the DST. Use java.util.Calendar.

  • Cannot get Telnet to work between two servers on same subnet

    I need to test if communication is open on port 8444 between two servers.
    I installed telnet client on a Server 2008 R2 server and telnet server on a Server 2008 SP2 server.  I also manually started the Telnet service that was set to disabled on the SP2 server.  I disabled the Windows firewall on both servers.  They
    are both on the same subnet so they don't need to go through any routers and I can ping successfully.
    When I try to telnet to the remote server by typing telnet "ip address" 8444, I get an error that says "Could not open connection to host, on port 8444:  Connection failed.
    I tried other ports like port 80 and got the same error.
    What else is needed to get this to work?

    VMs have nothing to do with it, as long as there's network communication between the servers.
    As I said, there must be a service or application listening on that port for it to respond. For example, try this:
    C:\> telnet
    When the telnet prompt opens, type in:
    open mail.messaging.microsoft.com 25
    If it works, you should see this:
    220 CH1EHSMHS035.bigfish.com Microsoft ESMTP MAIL Service ready at Thu, 7 Feb 2013 00:57:33 +0000
    That means that Microsoft's mail servers are LISTENING on port 25 and it responded. And note, telnetting to port 25 is a non-default telnet port, because port 23 is the default telnet port. When you type in a space and then a port number, you're telling
    the telnet client to use that port.
    That is the SAME THING if some sort of application or service is listening on port 8444 on that other server you're trying to telnet to. If there is no app or service listening, it will just time out.
    And no, installing the TELNET service on that sercver will NOT answer to any port other than 23. The telnet service by default, uses TCP 23, unless you specify otherwise.
    So once again, what service or app on that server is supposed to be listening on 8444?
    Ace Fekay
    MVP, MCT, MCITP/EA, MCTS Windows 2008/R2 & Exchange 2007, Exchange 2010 EA, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Technical Blogs & Videos: http://www.delawarecountycomputerconsulting.com/
    This post is provided AS-IS with no warranties or guarantees and confers no rights.

  • Customer  exit to get the result in between two fiscal periods

    Hi Guys,
    I have a requirement  to write customer exit, in which i have to get the result for a range of fiscal periods,
    that is in Between   fiscal period1 and fiscal period3,
    and i am getting this Fiscal period from other variable called version in which it consists of combination of fiscalperiod and text
    and now i have filtered the fiscal period and stored in Final_val ( this is an interger), but  how can i use dynamically this Final_val to get the results in between Final_val1 and Final_val3 ( that means if the Final_val is 2008010 then i have to get the results in between 2008011 and 2009001).
    Please provide me the solution, with the possible piece of code

    Hi Diogo,
    Here is the code
    WHEN 'ZC_PVR'.
        DATA: FIN_YEAR(4) TYPE C,
              FIN_DATE(3) TYPE C,
              FIN_VAL(7) TYPE C.
        IF I_STEP = 2.
          READ TABLE I_T_VAR_RANGE INTO LT_VAR_RANGE WITH KEY VNAM = 'ZC_VCS'.
          IF SY-SUBRC EQ 0.
            CONCATENATE '20' LT_VAR_RANGE-LOW+2(2) INTO FIN_YEAR.
            CONCATENATE '0' LT_VAR_RANGE-LOW+4(2) INTO FIN_DATE.
            CONCATENATE FIN_YEAR FIN_DATE INTO FIN_VAL.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW =  FIN_VAL.
            L_S_RANGE-HIGH =  ''.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDIF.
        ENDIF.
    which i am using for Filter the fiscal period, after this when i tried to restrict on this "ZC_PVR" vairable and  set the offset like
    zc_pvr 1 to zc-pvr3 under value of ranges, but i am facing an error saying the " variable may be deleted or used incorreclty",
    could u plz suggest

  • Get number of hours between two dates and two hours using factory calendar

    Hello all,
    I have the following requirement: I need to calculate the number of hours between two dates and two hours (start date- finish date and start hour-finish hour) or timestamps using a factory calendar. I must program it on CRM environment.
    Does anybody know a function module that makes it?
    Thanks in advance.
    Carmen

    Please check function module DURATION_DETERMINE.
    - April King

  • How to get days , months , years between two dates with groovy

    I've a table that contains Start Date and End Date and I want to get the difference between then in this format 2 days , 1 moth , 1year
    Can I make this with Groovy
    I've added a transient attribute to a view object and make its value      return (EndDate) - (StartDate); but this returns the difference of days like 200 day
    I want it in this format 2 days , 1 moth , 1year

    AFAIK - You cannot do it in groovy.
    You can achieve the same using the transient variable approach.
    Create a VORowImpl Class for VO, and in the getter method of the transient variable - do the necessary logic and return the string as required in your use-case.
    Thanks,
    Navaneeth

  • Getting attributes from session between two different applications

    I'm developing with JDK 1.3 and deploying my webapp at ORACLE 9iAS.
    I would like to jump between JSPs deployed at differents OC4J instances and
    keep session object. I've seen I can get sessionID and it's the same but the attributes have disapeared.
    I jump using JavaScript code (document.location.href).
    Should I use a <form> ?
    Should I use getServletContext() method ?
    I dont know even if it's possible and I don't want to loose my time looking for a solution that doesn't exist.
    NEED HELP, AN EXAMPLE OR WHATEVER USEFUL.
    ... THE SOON AS POSSIBLE
    THANX in advance
    PS..- I have already look for in this forum but I didn't get any info to solve my doubts. If I mistaken please let me know

    Ok.
    getServletContext().getContext() may return null in 'security conscious' servers. Apparently this is your case, therefore you wouldn't be able to use it to store global data...
    As for sharing sessions directly between different web apps, the servlet spec (since 2.2 at least) explicitely prohibits it.
    The link provided by tolmank about pseudo-sessions should address your issue, since it will allow you to distribute your session data on your different webapps.
    Some other alternatives would be :
    -store the session data in the DB (slow)
    -use java serialization
    -use RMI
    -use JNDI
    -if you're using Tomcat, you can implement single-signon accross multiple apps using cookies :
    http://www.ingrid.org/jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/singlesignon.html

  • How can i get my Dashboard sync between two macs?

    I have mabbok pro and imac how can i make this possible??????

    POP accounts can be set up to leave mail on the server. Thus this mail could be accessed from several different computers.
    I used Eudora a while ago, and set up 2 accounts, one left email on the server, and one did not. I would normally check mail from the one that left it on the server (accounts like this on several macs). When I was ready to download the mail, then I would check it from the other account that existed on only one of the macs.
    So in Mail, you could set up for POP and leave mail on the server. Then when ready to download (and not be able to see mail from various macs) you could switch to another user account, where Mail would be set up to not leave mail on the server.
    However, iMap makes this whole process easier.
    Normally, iMap mail can stay on the server forever. But I do like to get my mail and store it on my Mac after an arbitrary period of time. So I have set up a smart rule in Mail.
    It is GET MAIL:
    if Date received is less than 10 days old
    perform the following actions: stop evaluating rules
    So every day the mail is received, and of course it is less than 10 days old, so the rules stop evaluating.
    When I am ready to download the messages I select all in the mailbox, and use command-option-L to apply the rules. Any messages less than 10 days old stay on the server, Older messages then follow the other rules which are listted after GET MAIL. Usually these just filter mail into specific dumb mailboxes on my Mac. And/Or they could color the mail, or whatever else I choose to do with the mail.

  • Mapi connection behaviour between two sites-Exchange 2010

    Hello,
    I have small doubt, need help from you guys,
    i have two sites A, B,  DAG is span over the two sites;
    Both site has array Of different FQDN
    site A has active copies, its PASSIVE copies are in site-B
    i have witnesserver in third location
    if Active mailbox database in Site-A fails, passive copy on Site-B will become active;  i guess
    My question is ===>  without downtime or without MANUAL Task, will mapi connection goes to site-B copy ??? ,

    Hi,
    In Cross Site maintainence we, have to work out mainly on Database Activation Coordination Mode(DAC) which avoids the split brain syndrome.
    below URL's gives you clear vision on how we can do that and what it is for.
    - http://www.msexchange.org/articles-tutorials/exchange-server-2010/management-administration/planning-deploying-testing-exchange-2010-site-resilient-solution-sized-medium-organization-part7.html
    - https://technet.microsoft.com/en-us/library/dd979790.aspx
    Regards,
    Gowtham T

  • How do i get the difference information between two B1 version

    Hi all,
       i want to know what are the difference between 2004a and 2005a , for example, any fields existin B1 2005A but not exist in B1 2004A form, any form exist in B1 2005A, but not in B1 2004
       For fields ,  Can icompare the XML? but there are may forms in B1, is there any simple way to make this work?
    i appreciate any help and suggestions!
    thanks in advance!

    Hi Liu,
    in the XML-output of the objects, you have every field.
    You have to set SAPbobsCOM.BoXmlExportTypes.xet_AllNodes
    for the fields to be displayed as in SQL-Server.
    xet_ExportImportMode shows different names for the fields
    Regards,
    Holger

  • Modal-like behaviour between two Jframes

    Let�s say my app has 2 JFrames. The main JFrame is already loaded and from it, there is a menuitem that loads and shows the 2nd JFrame. I�d like to know how can I disable the main JFrame until the users requests to do so, clicking on some button or alike on the 2n JFrame.
    I have tried to do .getContenPane().setEnabled(false) on the main JFrame before loading the 2n one, but it seems not wo work.
    I have also considered going across all components inside the main JFrame, using getContentPane().getComponents() an on the returing array, do a setEnabled(false). But this seems quite a dirty way to accomplish it.
    Any idea? JFrame does not offer a setModal() method? It�s kinda sick...
    (No , I don�t want to make the 2nd JFrame into a JDialog that I know offers the setModal() method)....

    I have tried to do .getContenPane().setEnabled(false) on the main JFrame
    before loading the 2n one, but it seems not wo work.seems to work OK in this
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Testing
      public void buildGUI()
        JButton btn = new JButton("Show Other Frame");
        JPanel p = new JPanel(new GridBagLayout());
        p.add(btn,new GridBagConstraints());
        final JFrame f1 = new JFrame("f1");
        f1.getContentPane().add(p);
        f1.setSize(200,200);
        f1.setLocationRelativeTo(null);
        f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f1.setVisible(true);
        btn.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            final JFrame f2 = new JFrame("f2");
            f2.addWindowListener(new WindowAdapter(){
              public void windowClosing(WindowEvent we){
                f1.setEnabled(true);
            f2.setBounds(100,100,150,100);
            f2.setVisible(true);
            f1.setEnabled(false);
      public static void main(String[] args)
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new Testing().buildGUI();
    }

  • Can't get homesharing to work  between two computers on same network

    we have been using homesharing for a long time and now all of a sudden homesharing isn't working. Turned it off on both computers and then turned it back on, but still doesn't work. What do I do now?

    Have you tried restarting the router.

  • How to get percentage difference between two matrices?

    Good day everyone, I just want to ask how to get the percentage difference between two binary matrices. This is for comparing two images converted to matrices in LabView. Thank you. 
    Solved!
    Go to Solution.

    pinkman wrote:
    Good day everyone, I just want to ask how to get the percentage difference between two binary matrices. This is for comparing two images converted to matrices in LabView. Thank you. 
    You probably converted it to a 2D array (A matrix in LabVIEW has a special meaning).
    "Binary" is not very well defined (unless you are looking for the number of bits that are different). What is the datatype? Was it a color image or a greyscale image? Are both arrays the same size?
    How do you define "percentage difference"? Which one of the two is the 100% reference?
    Do you want a new 2D array where each element is the difference of the second array compared to the first (or vice versa), expressed in percentages?
    Do you want to know what percentage of array elements are different between the two arrays?
    Do you want to know the average difference between all array elements?
    All possible interpretations can be easily solved with very little code, but you need to explain in more detail what you actually want?
    Here is a simple solution for case #2, for example (assuming the array have the same size, and we only want a rought estimate, rounded down to the nearest integer percent):
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    PCT-Difference.png ‏16 KB

Maybe you are looking for

  • No access to IMAP server in Mail after installing Yosemite.

    Installed Yosemite on my I-mac and now cannot access email on  SMTP IMAP server. Keep getting error messages. Black triangles with an exclamation mark appear beside account name  in the mailbox. Spent 2 hrs. on the phone  with my Internet Service Pro

  • R3load -testconnection failed in import abap for EHP7-HANA

    Hi, Iam facing an error of r3load -testconnection failed in import abap step.The r3load is not able to communicate with my DB. Please find below the error message and log.We are using HANA db path 68 & its an distributed installation(Separate HANA bo

  • Couldn't Imessage on his mobile number

    Hi, I am a new Iphone user,I got an Iphone4s in UK.I have added a contact of a friend of mine who also have an Iphone 4s and his contact have his mobile number and appleid. When trying to Imessage him.Its showing whether to send  through number or ap

  • Budget Amount Restore for adjustment entries....

    Hi All, I have a scenario on hand, a PR and PO was created on GL/CI which commited budget correctly, the commitment was converted to actuals with service entry sheet and the vendor also is also honored with payment. After the payment was made we real

  • APEX 4.1 - Problem with session and cookie

    Hi, I have 2 applications with both public pages and pages needs authentication. The 2 apllication have same authentication model and are using subscription to have like an SSO. So they share the same cookie. My problem is when i'm loged on the first