Listening for UncaughtErrorEvents from SubApp loaded by SWFLoader

I can't seem to get my uncaughtErrorEvents listener to fire when attached to the loader.uncaughtErrorEvents  or loaded content's loaderInfo.uncaughtErrorEvents when loading a swf via SWFLoader.
I have a main Flex Application ('A.swf') loading a SubApplication  (defined in' B.swf') via a SWFLoader and I need to listen for  UncaughtErrorEvent from the SubApplication. I'm not able to get my event  listeners to be called when I throw an error from within the SubApp  ('B.swf').
After reading the asDoc for UncaughtErrorEvent and  UncaughtErrorEvents It states that the UncaughtErrorEvent should go through the normal capture, target, and bubble phases through the loaderInfo hierarchy. This doesn't seem to be the case or I'm not understanding the documentation/usage.
I have added an event listener to A.swf's loaderInfo  (The 'outter' main app) and also to B.swf's loaderInfo (though the Docs  say not to do it here it is part of the event sequence in the capture  and bubble phase...) as well as the SWFLoader internal  FlexLoader.uncaughtErrorEvent (per Docs) like so:
SWFLoader's internal FlexLoader uncaughtErrorEvents
swfLoader.content.loaderInfo.loader.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorFunction );
and the loaded SWF's loaderInfo:
swfLoader.content.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorFunction );
When I throw an Error from the SubApplication (B.swf). Only the 'outter' main app's (A.swf) event listener gets called. Which you expect, at first, if it is in the capture phase, but it isn't in that eventPhase at all. When debugging the eventPhase is in the EventPhase.AT_TARGET phase while being handled by A.swf's LoaderInfo, howeever the ASDoc says the Target phase should be B.swf's LoaderInfo.
Is this a bug between Flash player and Flex where the event isn't flowing correctly as stated in the ASDoc for UncaughtErrorEvent?

Thanks for the reply Alex.
The Outer main swf and the SubApp swf are in different ApplicationDomains (sibilings to each other) so they should not be sharing the class that is throwing the error. I should note that these two Applications are purely based on MX components, this is important later on.
I was originally throwing the error from a Button click handler from B.swf:
<mx:Button label="Throw Error" click="callLater( throwUncaughtError )" />
I was wrapping the handler function in a callLater because without it the error is not caught at all and the default flash dialog console just appears with the error. The A.swf's loaderInfo.uncaughtErrorEvents handler was not even firing unless I wrapped it a callLater.
I realized that Flash Builder's default to link the 4.1 SDK library via Runtime shared libraries was what was causing the A.swf's loaderInfo.uncaughtErrorEvent to fire in the AT_TARGET phase when using callLater. This is because the UIComponent's callLater method queue structure is shared between the two SWFs and therefore inside a function executing off the method queue A.swf's loaderInfo IS the TARGET... explainable, but at first thought that isn't how I'd expect this to work.
I then decided to test this out by setting the SDK library to merge into the code for both A.swf and B.swf and removing the  callLater. IT WORKS!  B.swf's (the SubApp) loaderInfo.uncaughtErrorEvents handler fires and I prevent the default (flash error console from appearing) and can stopImmediatePropagation so A.swf's loaderInfo.uncaughtErrorEvents handler doesn't fire.
Perfect besides having to merge the SDK libraries into each swf independently.... size killer.
In summary, using the same exact code for A.swf and B.swf:
1. When the SDK libraries are RSL - no UncaughtErrorEvents, neither A.swf's or B.swf's, is called. Instead the default flash error console appears with no chance to handle the uncaught error.
2. When the SDK libraries are Merged into the code - both A.swf's and B.swf's uncaughtErrorEvents  will be called, according to the asDoc documented sequence; B.swf's uncaughtErrorEvents in the AT_TARGET phase and A.swf's uncaughtErrorEvents in the BUBBLE phase.
Moreover, if I build a pure Spark implementation everything works even when referencing the SDK libraries as RSL.
Does this indicate a bug in the globalplayer (flash player code)'s logic for handling UncaughtErrorEvents listeners within the loaderInfo hierarchy when the Flex SDK is Shared code between the SWFs?
OR
Since it works in Spark, is it an issue with how the flex2.compiler.mxml.Compiler turns MX based mxml components into generated AS classes (it hooks up the inline event listeners of child UIComponentDescriptor using a generic object and the click function is specified as a STRING and has to use untyped bracket notation to lookup on the UICompoent when adding it as a listener:
new mx.core.UIComponentDescriptor({
              type: mx.controls.Button
              events: {
                click: "___B_Button1_click"
              propertiesFactory: function():Object { return {
                label: "Throw Error"
Where as Spark does this correctly and generates Factory functions for setting up child UIComponents when converting Spark component mxml to AS:
private function _B_Button1_c() : spark.components.Button
    var temp : spark.components.Button = new spark.components.Button();
    temp.label = "Throw Error";
   temp.addEventListener("click", ___B_Button1_click);
    if (!temp.document) temp.document = this;
    mx.binding.BindingManager.executeBindings(this, "temp", temp);
    return temp;
* @private
public function ___B_Button1_click(event:flash.events.MouseEvent):void
    throwUncaughtError()
Sadly, moving to pure Spark would be a big hit is my project's schedule and at this point and likely isn't feasible. I have examples (with view source) built in MX for both the RSL and MERGE cases, I just don't know how to attach them here.
Sorry for the long comments and thanks again!

Similar Messages

  • Listening to Events from inside loaded swf

    In Flash Builder 4 I have a swfLoader with which I load swf files. The swf files that get loaded get created in Flash Pro, and I would like to be able to listen for events from the level that they get loaded from. What would I have to specify in the Flash file for the path? Can't seem to be able to specify the right path.
    Thanks a lot for any help!

    I wouldnt say this is elegant but we have been having issues gaining direct access to the SWF's loaded in via OSMF. However I have done setups where I dispatch an event from a SWF and have it bubble up and catch it on the MediaContainer level. Not elegant but works- otherwise may need to make a custom MediaElement and bypass the SWFElement to gain tighter control - seems like there should be a better way, but I havnt found it.

  • Listen for Events from anywhere

    Hello!
    I have an application with a rather complicated component hierarchy.
    How can I have it so that I can listen for events from any component in any component, regardless of who is who's child?
    Thank you!

    You need a broadcasting mechanism.
    Many architecture framework offers this facility, but as a quick hack you can try something like
    public class Broadcaster extends EventDispatcher  ( singleton anti pattern   )
    instance
    then just do Broadcaster.instance.addEventListener or removeEventListener. it's a crappy singleton, but at least it does not hold any global state.
    I've also seen people use Application.application to dispatch/listen globally but really don't like it.
    Note : Use weak references or your views will never be eligible for garbage collections.

  • Listen for events from an embedded Swf

    Hi there,
    I have spend so long searching for an answer on the web but can not find any that works, please help!
    I'm not even sure if this is possible but if anyone can guide me in the right direction I would most appreciate it!
    Basically what I would like to do is to load a swf in to my flex application - contrary to my post title it doesnt even have to be embedded - when the loaded swf finishes playing it's animation I want for it to dispatch an event and for flex to listen for that event and trigger a function when the event is captured.
    The animation is made in Flash CS3. I have not used any classes, rather on the last frame I set up an action to dispatch an event like this:
    dispatchEvent(new Event("finishedPlaying"));
    In my Flex Application I load my swf using swfLoader and I add an event listener to it like so:
    mySwfLoader.addEventListener("finishedPlaying", test);
    and my function is like this:
    private function test():void
         trace("it worked!");
    This is not working at all and I'm sure I am missing something but I cant seem to find any straightforward answer on the internet!
    Is it at all possible for a swf made in flash to communicate with flex??
    Since they are both written in AS3, I figured it would be easy but alas!
    If anyone can help me I would most appreciate it, thank you in advance!!
    By the way I have also tried:
    mySwfLoader.content.addEventListener("finishedPlaying", test);
    but no luck....

    You have to wait for the swf to complete loading before adding the event listener.
    When are you adding the event listener?
    mySwfLoader.addEventListener("finishedPlaying", test);
    Have a look at the SWFLoader complete event:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html#event:complete

  • JTextfield  listening for changes from other class

    Hi,
    Assuming I have a Jtextfield in one of the class1 extend Jframe,
    how do I update the jtextfield so that it could up make accessible by other class and continuously updated to reflect the input for value rom another class2.
    In other words very much similar to the observable model view concept
    class 1 may be look like
    private void initComponents() {
    jTextField1 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jTextField1.setEditable(false);
    class 2 may be look similar to the following
    public void out_1(){
    setStop1("N");
    for (int i=1;i<100;i++){
    class_1.getJTextField1().setText(String.valueOf(i)); // System.out.println(i);
    setOuti(i);
    setStop1("N");

    HI,
    I have attempted with the following coding , test 1 the source display generated using Netbeans GUI , t est2 the worker code ,and mybean the bean , so far nothing seems to work .
    I have not try the threaded swing concept as I am not familar with the concurrency but i am not sure whether propertylistener will do the job or not
    In summary , list of method employed are :
    binding the jtextfield1 to a bean,
    jtextfield add document listener ,
    Coding objective
    1. Test 1 defined jtexfield1 and jbutton
    2 Jbutton added actionlistener , where upon click,
    Execute Test 2 which will assign a series of integer to the bean , own setters & getters, Output is achieved via Test 1 jtextfield1 supposingly to display all the running number from 1 to 99 continuously until the test2 out_1 method finished the execution
    Anyone could provide the assistance .
    Thank
    * Test_1.java
    * Created on July 25, 2007, 9:23 PM
    package sapcopa;
    import java.beans.PropertyChangeListener;
    import javax.swing.event.DocumentEvent;
    import javax.swing.event.DocumentListener;
    import javax.swing.text.Document;
    import sapcopa.MyBean.*;
    public class Test_1 extends javax.swing.JFrame {
    /** Creates new form Test_1 */
    // private Test_2 t2=new Test_2();
    private String input_txt;
    public Test_1() {
    myBean1=new MyBean();
    myBean1.addPropertyChangeListener(new java.beans.PropertyChangeListener(){
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    bean_chg(evt);
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
    myBean1 = new sapcopa.MyBean();
    jTextField1 = new javax.swing.JTextField();
    jTextField1.getDocument().addDocumentListener(new MyDocumentListener());
    jButton1 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jTextField1.setEditable(false);
    jTextField1.setText(myBean1.getRecord_Process());
    jTextField1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    txt1_chg(evt);
    jButton1.setText("jButton1");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    But1(evt);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(19, 19, 19)
    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(layout.createSequentialGroup()
    .addGap(32, 32, 32)
    .addComponent(jButton1)))
    .addContainerGap(131, Short.MAX_VALUE))
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(21, 21, 21)
    .addComponent(jButton1)
    .addContainerGap(216, Short.MAX_VALUE))
    pack();
    }// </editor-fold>//GEN-END:initComponents
    private void txt1_chg(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txt1_chg
    // TODO add your handling code here:
    //myBean1=new MyBean();
    try {
    jTextField1.setText(myBean1.getRecord_Process());
    } catch (Exception e){
    e.printStackTrace();
    }//GEN-LAST:event_txt1_chg
    private void bean_chg(java.beans.PropertyChangeEvent evt){
    jTextField1.setText(myBean1.getRecord_Process());
    private void But1(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_But1
    //getJTextField1().getDocument().addDocumentListener(new MyDocumentListener());
    Test_2 t2=new Test_2();
    t2.out_1();
    try{
    System.out.println("Button 1 mybean->"+myBean1.getRecord_Process());
    } catch (Exception e){
    e.printStackTrace();
    // TODO add your handling code here:
    }//GEN-LAST:event_But1
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Test_1().setVisible(true);
    public javax.swing.JTextField getJTextField1() {
    return jTextField1;
    public void setJTextField1(javax.swing.JTextField jTextField1) {
    this.jTextField1 = jTextField1;
    class MyDocumentListener implements DocumentListener {
    final String newline = "\n";
    public void insertUpdate(DocumentEvent e) {
    // updateLog(e, "inserted into");
    String vstr=myBean1.getRecord_Process().toString();
    jTextField1.setText(vstr);
    public void removeUpdate(DocumentEvent e) {
    //updateLog(e, "removed from");
    String vstr=myBean1.getRecord_Process().toString();
    jTextField1.setText(vstr);
    public void changedUpdate(DocumentEvent e) {
    //Plain text components don't fire these events.
    String vstr=myBean1.getRecord_Process().toString();
    jTextField1.setText(vstr);
    public void updateLog(DocumentEvent e, String action) {
    Document doc = (Document)e.getDocument();
    int changeLength = e.getLength();
    // jTextField1.setText(String.valueOf(changeLength));
    String vstr=myBean1.getRecord_Process().toString();
    jTextField1.setText(vstr);
    public String getInput_txt() {
    return input_txt;
    public void setInput_txt(String input_txt) {
    this.input_txt = input_txt;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JTextField jTextField1;
    private sapcopa.MyBean myBean1;
    // End of variables declaration//GEN-END:variables
    * Test_2.java
    * Created on July 25, 2007, 9:26 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package sapcopa;
    import sapcopa.MyBean.*;
    public class Test_2 {
    private Test_1 t1=new Test_1();
    private int outi;
    private String stop1;
    MyBean mybean;
    /** Creates a new instance of Test_2 */
    public Test_2() {
    public void out_1(){
    setStop1("N");
    mybean=new MyBean();
    for (int i=1;i<100;i++){
    mybean.setRecord_Process(String.valueOf(i));
    setOuti(i);
    setStop1("N");
    setStop1("Y");
    public int getOuti() {
    return outi;
    public void setOuti(int outi) {
    this.outi = outi;
    public String getStop1() {
    return stop1;
    public void setStop1(String stop1) {
    this.stop1 = stop1;
    * MyBean.java
    * Created on July 24, 2007, 12:00 AM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package sapcopa;
    import javax.swing.JTextField;
    public class MyBean {
    /** Creates a new instance of MyBean */
    public MyBean() {
    * Holds value of property record_Process.
    private JTextField txt_rec_process;
    private String record_Process;
    * Utility field used by bound properties.
    private java.beans.PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this);
    * Adds a PropertyChangeListener to the listener list.
    * @param l The listener to add.
    public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
    propertyChangeSupport.addPropertyChangeListener(l);
    * Removes a PropertyChangeListener from the listener list.
    * @param l The listener to remove.
    public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
    propertyChangeSupport.removePropertyChangeListener(l);
    * Getter for property record_Process.
    * @return Value of property record_Process.
    public String getRecord_Process() {
    return this.record_Process;
    * Setter for property record_Process.
    * @param record_Process New value of property record_Process.
    public void setRecord_Process(String record_Process) {
    String oldRecord_Process = this.record_Process;
    this.record_Process = record_Process;
    propertyChangeSupport.firePropertyChange("record_Process", oldRecord_Process, record_Process);
    * Holds value of property rec_Match.
    private String rec_Match;
    * Getter for property rec_Match.
    * @return Value of property rec_Match.
    public String getRec_Match() {
    return this.rec_Match;
    * Setter for property rec_Match.
    * @param rec_Match New value of property rec_Match.
    public void setRec_Match(String rec_Match) {
    String oldRec_Match = this.rec_Match;
    this.rec_Match = rec_Match;
    propertyChangeSupport.firePropertyChange("rec_Match", oldRec_Match, rec_Match);
    public JTextField getTxt_rec_process() {
    return txt_rec_process;
    public void setTxt_rec_process(JTextField txt_rec_process) {
    JTextField oldTxt_rec_process=this.txt_rec_process;
    this.txt_rec_process = txt_rec_process;
    propertyChangeSupport.firePropertyChange("txt_rec_process", oldTxt_rec_process, txt_rec_process);
    }

  • Listening for messages for a certain duration

    I have a situation where my JMS client should listen for messages from
              Queue for a certain amount of time. Is this possible?
              Thanks,
              Sanjay
              

    Why not create a timer and close the JMS subscriber (and maybe even the
              session and the connection) after the time elapses?
              --dejan
              Sanjay Ungarala wrote:
              >Gregory,
              >
              >Thanks for your reply.
              >
              >I was looking for Async message listener. I want my message listener to stop
              >listening to queue after certain duration. Is this possible?
              >
              >Thanks,
              >Sanjay
              >
              >Gregory Brail wrote:
              >
              >
              >
              >>I guess no one has answered yet, but what exactly do you mean? Obviously,
              >>when you receive a message synchronously the various "receive" calls give
              >>the option to specify how long you want to wait for a message to become
              >>available. But I imagine you want more than that...
              >>
              >> greg
              >>
              >>"Sanjay Ungarala" <[email protected]> wrote in message
              >>news:[email protected]..
              >>
              >>
              >>>I have a situation where my JMS client should listen for messages from
              >>>Queue for a certain amount of time. Is this possible?
              >>>
              >>>Thanks,
              >>>Sanjay
              >>>
              >>>
              >>>
              >>>
              >
              >
              >
              

  • DBCC for sqlServer from java program on solaris

    How to run DBCC for a MS-SqlServer database running on a NT machine from a
    java program running on a solaris 7 operating system ?
    Can we write any script on the solaris which interacts with the SQLServer and call this script from a java program ?

    thanks for the responses.
    But the design is like that.Then it needs to be fixed.
    I think this is why there's a shortage of people to write computer applications, they are all wasting their time struggling to implement bad designs.
    its a scheduler to be run on tomcat where we interact
    with the running batch files and can't be changed.A scheduler in Tomcat? Why run a scheduler in an application server?
    any help is appreciated.
    I tried to execute the batch file from servlet it
    runs , but i see the cmd.exe in windows task manager
    and need a dos box open.
    Any ideas?If you need a DOS box open then you need a signed-on user. So here's my patch:
    1. Write an application that listens for messages from this Tomcat scheduler, and when it receives those messages it does something in a DOS box.
    2. Have somebody sign on to the server and run that application.
    3. Change the Tomcat scheduler to send messages to that application instead of trying to actually run it.
    It's up to you what kind of messages you should send. There are plenty of choices.

  • Listen for a variable in externally-loaded interactive swf

    Hi,
    I'd like to set a variable inside an externally-loaded swf created in Flash Professional that is playing inside a Flex 4 application.  The swf will "signal" the end of an interaction (using a s:SWFLoader).  Once the variable is set (by arriving at a particular frame inside the externally-loaded swf, I'd like my Flex 4 application to "know" and take action to unload the swf and then "navigate" to another state with a new Flex-based interraction.
    Perhaps a step-based illustration will be more clear:
    1.  Clicking a textfield inside a Flex 4 application loads a custom component that uses an <s:SWFLoader> to load an external SWF that includes buttons to navigate through frames in a "slideshow" fashion.
    2.  Once the end of the "slideshow" is reached, a variable is instantiated by
                   var swfEND:String = "swfDne";
    3.  I'd like my Flex 4 calling application to know when this event occurs, then I'd like the sef to unload and Flex to goto another state.
    Any help, particularly on how to detect events in external swfs from Flex will be greatly appreciated.
    Thanks,
    Doug

    wanaryd,
    > In my main timeline on frames this variable is changed
    > (color = "red";) When the main timeline changes to a
    > different location a new color is set. How do I make the
    > movie clip listen for the color variable to change?
    When the timeline changes to a different location, something
    in that new
    location changes the value of your color variable -- so why
    not just update
    the code in that location (or those locations) and have them
    perform the
    functionality that depends on the variable's value?
    In any case, you should be able to use the Object.watch()
    method.
    Instead of creating a simple variable, create an instance of
    the Object
    class, then use the Object.watch() method to keep an eye on
    things.
    http://my.opera.com/darylducharme/blog/2007/02/13/the-object-watch-method
    David Stiller
    Co-author, Foundation Flash CS3 for Designers
    http://tinyurl.com/2k29mj
    "Luck is the residue of good design."

  • Listening for an event in main from a component

    Hi
    Ok so i have a Flash Builder project 4.5 that i created in Flash Catalyst thats draws all its data from MySql and four months into the build, as this is my first web project im noticing that when the page loads up in the browser it loads everything at once! and as im hoping to reuse some of the same components for diffrent tasks i assume that if i put the data retrivail under events that happen within the web page this will hopeful control the data flow as well as showing the correct data depending on CurrentState!
    The problem that im having is that my buttons are in my Main Application and the data retrival process is in my components! so i was trying to create addEventListener(MouseEvent.CLICK events in a component that was listening for events in my Main application. i have search the internet but every one is talking about the process in the main or component but not both!
    Does anyone know what im talking about and could you please share some light please

    Do you ever get to a point in programming where you think that perhaps i have choosen the wrong hobby to get infatuated about
    That code worked really well targetplanet but it had a side effect that just makes me nutts lol
      as it triggered a mouse event function in the component that was initialized in Main and just made my web site go nuts . the component that we initialized was a skin but its itemRenderer component that followed had the mouse event! perhaps i better start again with me learning perhaps i missed something
    or perhaps i should just have one component to one job instead of trying to be clever and mutitask with less components!

  • I want to use my old 4G ipod to listen to audio books I loaded into my computer from CD's

    I want to use my old 4G ipod to listen to audio books I loaded into my computer from CD's

    Another thing to remember is the phone is actually usable for 911 calls and maybe others. Not a real good idea. Especially for a child.
    It would depend however on the age of the child.
    Good Luck

  • HT201272 I purchased an audiobook from iTunes On my iPhone.  I got a new phone and after the back up, the books I downloaded were not there.  iTunes wants me to repurchase the books I downloaded.  Is there a way for me to Redon load my already purchased b

    I purchased an audiobook from iTunes On my iPhone.  I got a new phone and after the back up, the books I downloaded were not there.  iTunes wants me to repurchase the books I downloaded.  Is there a way for me to Redon load my already purchased books?

    Hi..
    On your new iPhone tap Settings > Store.
    Make sure Books is turned ON.
    You shouldn't need to re purchase the book >  Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • 'Uninstall app for SharePoint': Could not load type 'Microsoft.SharePoint.Administration.SPAppInstanceErrorDetails' from assembly 'Microsoft.SharePoint

    Hi there,
    I am new to developing with SharePoint and would like to create my first app for SP13 with VS12.
    To run SP13 and VS12 on the same virtual machine. The SP Tools Developer I have also installed.
    My problem:
    I select the Project Wizard from VS12 to create a new app SP13 using provider hosted option. After the project is created I want to directly deploy (F5), and yet I always get the following error:
    Error 1
    Error occurred in deployment step 'Uninstall app for SharePoint': Could not load type 'Microsoft.SharePoint.Administration.SPAppInstanceErrorDetails' from assembly 'Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.
    0 0
    SharePointApp20132106
    Does anybody advice?

    Please have a look at the below thread
    http://social.msdn.microsoft.com/Forums/en-US/7b8a50ed-651d-4aa5-95f0-a551edb95550/sharepoint-hosted-app-deployment-error-in-sharepoint-2013-preview?forum=appsforsharepoint
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Listening for keyPressed events from background?

    Is it possible to have a java program running in the background and listen for keyPressed events? I would like for the program to listen for certain keys to be pressed and when they are manipulate the mouse. From what I've looked at so far however it seems the listening component must have focus. Thanks.

    On any OS that would typically involve hooking into the OS itself.
    And then manipulating OS resources as well.
    Putting an app into the 'background' is also OS specific.
    Given that the above is all you want to do then java is not an appropriate language choice. C++ would be better.

  • Dispatching & listening for custom events from custom component [Flex 4.1]

    I'm giving this a try for the first time and I'm not sure I have the recipe correct!
    I have a custom component - it contains a data grid where I want to double click a row and dispatch an event that a row has been chosen.
    I created a custom event
    package oss
        import flash.events.Event;
        public class PersonChosenEvent extends Event
            public function PersonChosenEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
                super(type, bubbles, cancelable);
            // Define static constant.
            public static const PERSON_CHOSEN:String = "personChosen";
            // Define a public variable to hold the state of the enable property.
            public var isEnabled:Boolean;
            // Override the inherited clone() method.
            override public function clone():Event {
                return new PersonChosenEvent(type);
    Then I try to dispatch the event within the component when the datagrid is doubleclicked:
    import oss.PersonChosenEvent
    dispatchEvent(new PersonChosenEvent(PersonChosenEvent.PERSON_CHOSEN, true, false));
    And in the parent application containing the component I do on creationComplete
    addEventListener(PersonChosenEvent.PERSON_CHOSEN,addPersonToList);
    The event does not seem to fire though. And if I try to evaluate the "new PersonChosenEvent(..." code it tells me "no such variable".
    What am I doing wrong?
    (It was so easy in VisualAge for Java, what have we done in the last 10 years?? )
    Martin

    I've done this kind of thing routinely, when I want to add information to the event.  I never code the "clone" method at all.
    Be sure that you are listening to the event on a parent of the dispatching component.
    You can also have the dispatching component listen for the event too, and use trace() to get a debug message.
    I doubt if it has anything to to with "bubbles" since the default is true.
    Sample code
    In a child (BorderContainer)
    dispatchEvent(new ActivationEvent(ActivationEvent.CREATION_COMPLETE,null,window));
    In the container parent (BorderContainer)
    activation.addEventListener(ActivationEvent.CREATION_COMPLETE,activationEvent);
    package components.events
        import components.containers.SemanticWindow;
        import components.triples.SemanticActivation;
        import flash.events.Event;
        public class ActivationEvent extends Event
            public static const LOADED:String = "ActivationEvent: loaded";
            public static const CREATION_COMPLETE:String = "ActivationEvent: creation complete";
            public static const RELOADED:String = "ActivationEvent: reloaded";
            public static const LEFT_SIDE:String = "ActivationEvent: left side";
            public static const RIGHT_SIDE:String = "ActivationEvent: right side";
            private var _activation:SemanticActivation;
            private var _window:SemanticWindow;
            public function ActivationEvent(type:String, activation:SemanticActivation, window:SemanticWindow)
                super(type);
                _activation = activation;
                _window = window
            public function get activation():SemanticActivation {
                return _activation;
            public function get window():SemanticWindow{
                return _window;

  • Listening for mouse move from JFrame?

    Hi
    I'm facing a problem when I wanted to use the JFrame's method: addMouseListener( ) to listening for the mouse whether it moves from a JFrame.
    In my code the JFrame containts three components:
    public class NFrame extends JFrame{
    JPanel contentPane = (JPanel)super.getContentPane();
    contentPane.setLayout(new BorderLayout());
    JMenuBar jMenubar=new jMenuBar();
    JTabbedPane jTabPane=new JTabbedPane(JTabbedPane.LEFT,JTabbedPane.WRAP_TAB_LAYOUT);
    JPanel bottonPane=new JPanel();
    contentPane.add(jMenuBar,BorderLayout.NORTH);
    contentPane.add(jTabPane,BorderLayout.CENTER);
    contentPane.add(bottomPane,BorderLayout.SOUTH);
    addMouseListener(new MouseAdapter() {
    public void mouseExited(MouseEvent e) {
    System.out.println("Mouse remove from JFrame");
    Because the JTabbedPane has a default mouse Listener, thus the mouse event is caught by jTabPane and the application does not print the above message when mouse moves from jTabPane.
    Could anybody give me some hints?
    Thanks!

    In this case there should probably not be a sleep()
    at all. You might want to do that sort of thing when
    you have a new thread whose job is to have
    non-GUI-related functionality (like a clock ticking,
    or sprites moving in a game independently). For
    standard GUI interaction, the GUI thread takes care
    of things and you don't need to wait at all. You're
    already waiting, basically.Oh, I see! The OP is doing quite useless things!
    I didn't see such f**lish things in the past!
    The OP should learn the basics for GUI and event mechanism.
    http://java.sun.com/docs/books/tutorial/uiswing/

Maybe you are looking for

  • Solaris 10 - IPv6 Configuration

    Hey, i have some Problems with IPv6 configuration on Solaris 10 (SPARC). I can't configure an physical Interface with an IPv6-address. Every way I choose to configure, Solaris always create a virtual Interface, and give this Interfface the IP-address

  • Changes in Parked document as 'Cash Management Active'

    In document changes list for parked documents - CM Active field changed. What does it mean and which field has been changed.

  • Looking for a way to monitor forums for a text string.

    Hi as the subject says I'm looking for a way to monitor various forums for a list of text strings and give me a link to the post. I'm have tried googling but cant find anything specific enough I've tried looking at methabot but am unsure as to if thi

  • Error After Router Reset?

    Well, we had a weird power surge, and for some reason, when I went to go on the internet, it said no connection. I opened the Linksys program, but when I did that, it said configure a router :/ So, I go through all the steps, but now I get stuck at i

  • Slowing fcp footage down to zero

    Is there any way of grading footage so that it slows down from, say 50% to zero or close to? Thanks.