Advantages of empty Application Base State?

Several examples are coded where the Main.mxml base state is
empty and there is a child state called e.g. main App (start)
containing the initial gui components. (These examples are based on
the Flex multi-window architectures).
Does this make cleaner coding? Because one could obviously
jump straight into things without the extra child state?
TIA.

Use currentState='' (that's two single quotes)

Similar Messages

  • Return to Base State

    Hello,
    I have a Flex canvas that contains several buttons. When I
    click the button it changes to the next state which brings up a
    custom component that has a panel with buttons on it. One of the
    buttons should close the panel and return to the original state.
    The exit button is a blue square and here is the actionscript:
    private function onBlueClick ( event:MouseEvent ):void {
    this.currentState=" ";
    Unfortunately, this gives me an "undefined state" error. Does
    anyone know how I can return to the base state through the
    actionscript of a custom component?
    Thanks in advance for any help.

    the problem is you are calling a state change on your custom
    component, and it has no states defined. You want to call the base
    state in the main app (parent app).
    Try something like Application.application.currentState = "";
    Having said that, you should look into simply dispatching an
    event from the component's button click back to the main app, and
    have the main app handle the event to switch the state. A component
    should not be controlling the main app like what you are trying as
    this will lead to issues where the component is too
    "tightly-coupled" to the main app.

  • Issue with : Stateful BSP Applications: New State Management Option

    Reference:weblog by Thomas Jung -  /people/thomas.jung3/blog/2004/11/09/updated-stateful-bsp-applications-new-state-management-option
    I see a comment by one user to send the complete code... I am not sure what else can be sent   - try it out rather than getting spoon-fed. - getting offline - sorry...
    I had two issues with this ITSM way of session handling.
    First - if you are using an SP42 environment, check CL_BSP_RUNTIME=>ON_SESSION_CMD() to see if CANCEL is defined as an option. If not make sure that you use &sap-sessioncmd=CLOSE" instead of the &sap-sessioncmd=CANCEL" . If CANCEL is not defined , it will give you shortdumps...
    Second - when I closed the window, the session was not terminated. I used onbeforeUnLoad="exitBSPApplication(); instead of onUnLoad="exitBSPApplication(); and it worked fine. Not sure if it has any other issues.
    But now I am facing a new issue... all but one application is not ending... I have no clue on why this is happening.. I am still checking..
    Thanks Thomas, you are the best, as always...

    Thanks for checking the code in your system.
    After some investigation, I found the behavior as explained below.
    If the actual url has any fields passed as parameters, e.g.. /default.htm?var1=a&var2=2 ...
    - if I use CANCEL as the option, a shortdump is created and the session is not closed. if I use CLOSE, Session is terminated and no shortdump happens.
    If the actual url does not have any parameters, e.g.. /default.htm ...
    - CANCEL does the work, but CLOSE does not exit the session.
    In my applications I used request->get_form_fields to see if there are any parameters, and if there are, then I use CLOSE as the option and else, I use CANCEL. So now, the session
    management works beautifully...
    There is a good chance that I am doing something wrong here too.

  • How change application´s state from a component´s function

    Hi, I´m doing an Flex application,
    I have created a component "usersRegister", that have next
    function:
    private function comprobacionBBDD():void{
    if(numero>0){
    mensaje="Perfect.\n\n\n Wellcome.";
    HERE I WANT CHANGE THE STATE
    }else if(numero==-1){
    mensaje=mensaje+"error1";
    }else if(numero==-2){
    mensaje=mensaje+"Error2 \n\n";
    Alert.show(mensaje);
    The problem is that when in my application I instances the
    component, I would like to change my application´s state when
    the first "if" from the function is true.
    Can you help me??
    thanks in advance, and excuse my bad english.

    Really thanks. I have try it and works perfectly.

  • [feature request] Editing base states in design mode

    Please tell me the the new Flash Builder Burrito will have the ability to edit the base state while in design mode, or at least have the ability to "make same in all states" like in Flash Catalyst.
    I really loved the old method where you could make a state based on another one. This added an enormous amount of functionality to the design mode. I realize the Flex 4 state concept doesn't support this, but maybe that could be added back in on an IDE level using state groups.
    Anyways, I love what you're doing with Burrito. Keep up the great work!

    Thanks, Jim! It is a very blog-like post. (I still haven't gotten around to starting a blog but keep thinking I should.)
    I figured the clearer and more thought-out the presentation, the greater the likelihood it might get implemented. Also, I was originally stuck on Scenario 1 as a solution, and writing this helped me see other options.

  • Can I rout audio on a PER APPLICATION basis?

    Is there a way (third party software included) to rout audio on a *per application* basis? I'd like internet audio (Safari, etc.) to go to just the normal line out, while iTunes audio would be sent to digital audio out.

    I've heard that audio hijack pro can do this.
    http://www.rogueamoeba.com/audiohijackpro/
    I don't use it myself but check this post for example
    http://discussions.apple.com/thread.jspa?messageID=9299023&#9299023
    Message was edited by: V.K.

  • How would you change the state to the base state?

    How would you change the state to the base state? Its not
    letting me do something like:
    currentState='<Base State>';

    Sorry about the vagueness of that last reply :)
    What I have done now in my code is this:
    viewstack1.addChildAt(loginCanvas,0);
    toggle.selectedIndex = 0;
    However nothing happens at this line of code:
    toggle.selectedIndex = 0;
    but this works:
    toggle.selectedIndex = 1; or ...
    toggle.selectedIndex = 2;
    toggle.selectedIndex = 3;
    toggle.selectedIndex = 4;
    toggle.selectedIndex = 5;
    toggle.selectedIndex = 6;
    The strange thing is that if I have a button on the screen:
    <mx:Button x="10" y="3" label="Button"
    click="toggle.selectedIndex =0"/>
    and the user clicks it the toggle.selectedIndex = 0; works.
    I'm stumped, any ideas?

  • E17 - Empty applications list in IBar/Favorite/Startup settings

    Hi,
    Recently I Installed fresh Archlinux system on my laptop. This time I wanted to try some lightweight WM so my choice was Enlightenment. Everything works perfectly on root but when I run WM from another (newly created) user I encounter some annoying trouble - there is empty applications list in IBar / Favorite / Startup Applications settings inspite of all installed apps are appearing in Main menu -> Applications.
    I have no idea what causes problem, maybe wrong permissions? I tried deleting .e/ directory, and I also installed newest E17 snapshot from svn via arche17 AUR package but nothing has changed.
    I also found possibly duplicate of this issue but there is no clues how to fix it.

    skottish wrote:
    I'm not sure if this will help, but E17 start up applications go into:
    /home/<YOUR_USER>/.e/e/applications/startup/.order
    It's a simple text file with line-delimited .desktop files.
    In my machine that directory is empty.

  • Empty Virtual Base Classes

    Calls made by my code to virtual functions within a class hierarchy were ending up elsewhere in the hierarchy; adding a dummy data member to the hierarchy's empty virtual base class removed the problem. Apparently this is a known problem in the Sun Workshop 6 update 1 C++ 5.2 compiler with the above-mentioned workaround. The readme for patch 109508-03 indicates the following problem fix:
    4309374 virtual table layout incorrect for empty virtual bases
    Will this patch remove the misdirected calls to virtual functions or do I have to get the latest compiler release, which is supposed to remove the need for dummy data members in empty virtual base class?

    Due to the fact that Java does not support multiple (implementation) inheritance, the diamon-shaped inheritance issue does not arise with Java, hence there is no need to distinguish between "plain" and "virtual" base class.
    (FYI: "Virtual base class" is C++ lingo.)

  • Empty Application Bar

    I've searched for anything related to this issue and I am comingup empty. When I open Illustrator CC, my application bar is completely blank. If I "restore" the window then maximize it again, the content comes back.
    I'm running Illustrator on a two-screen setup and it is set to open on the secondary desktop. But it does the same thing on the primary screen as well.
    Anyone have any suggestions or solutions?

    This procedure will reset the state of LaunchPad to its default. Any customization that you did will be removed.
    Back up all data before proceeding.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Application Support/Dock
    Right-click or control-click the highlighted line and select
              Services ▹ Open
    from the contextual menu.* A folder should open. Inside it are one or more files with long names ending in ".db". Move those files to the Desktop, leaving the folder open. Log out, log back in, and test. If there's no change, put the files you moved back where they were, overwriting the ones that may have been created in their place. Then log out and in again. Otherwise, delete the files you moved.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Can't read iPhoto library from external drive via airport extreme base stat

    I can't seem to open my iPhoto library from my external USB drive that is hooked and being shared through my airport extreme base station. If I plug the external drive directly to my mac via USB it works but not when going through the base station.
    This only started happening when I upgraded from iLife'06 to iLife'08.
    Anyone have any ideas on how to fix?

    That's a problem that many are posting about. Haven't read of a solution yet. Be sure to report the problem to Apple at: http://www.apple.com/feedback/iphoto.html.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • How to get application's state on weblogic server using jmx.

    I want to get application state using JMX, I am able to get application list, name but not able to find its state. Some code snippet mentioned below. Please let me know if I can use some other MBean
    Thanks in advance..
    static {
    try {
    service = new ObjectName("com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
    }catch (MalformedObjectNameException e) {
    throw new AssertionError(e.getMessage());
    * Initialize connection to the Domain Runtime MBean Server
    public static void initConnection(String hostname, String portString, String username, String password) throws IOException, MalformedURLException
    String protocol = "t3";
    int port = Integer.parseInt(portString);
    String jndiroot = "/jndi/";
    String mserver = "weblogic.management.mbeanservers.domainruntime";
    JMXServiceURL serviceURL= new JMXServiceURL(protocol,hostname, port, jndiroot+mserver);
    // JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, portString, jndiroot , mserver);
    Hashtable h = new Hashtable();
    h.put(Context.SECURITY_PRINCIPAL, username);
    h.put(Context.SECURITY_CREDENTIALS, password);
    h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
    "weblogic.management.remote");
    connector = JMXConnectorFactory.connect(serviceURL, h);
    connection = connector.getMBeanServerConnection();
    * Get an array of ServerRuntimeMBeans
    public static ObjectName[] getServerRuntimes() throws Exception {
    return (ObjectName[]) connection.getAttribute(service,
    "ServerRuntimes");
    * Get an array of WebAppComponentRuntimeMBeans
    public void getApplicationData() throws Exception {
    ObjectName[] serverRT = getServerRuntimes();
    int length = (int) serverRT.length;
    for (int i = 0; i < length; i++) {
    ObjectName[] appRT =
    (ObjectName[]) connection.getAttribute(serverRT,
    "ApplicationRuntimes");
    int appLength = (int) appRT.length;
    for (int x = 0; x < appLength; x++) {
    System.out.println("Application name: " +
    (String)connection.getAttribute(appRT[x], "Name")+"Application Status"+(String)connection.getAttribute(appRT[x], "State"));
    public static void main(String[] args) throws Exception {
    String hostname = "*****.us.oracle.com";
    String portString = "*****";
    String username = "***";
    String password = "****";
    JMXUtil s = new JMXUtil();
    initConnection(hostname, portString, username, password);
    s.getApplicationData();
    connector.close();

    register at elicense.bea.com and ask there.
    but, a license is a license, as long as the ipaddr is not restricted.
    Wayne
    Bora wrote:
    I downloaded an Evaluation copy from BEA but it expires in 30 days. The place I
    work has licenses for HPUX but I need to have a copy on my laptop for development
    & test.
    Thanks for help!
    Sincerely
    Bora

  • BUG?  Application Module State Management

    I have 2 read-only view objects VO1 & VO2 with a View Link that links them by a primary key field. VO1 (master) is on the first .jspx page and VO2 (detail) is on the 2nd .jspx page. VO1 has a SQL query, but is populated programmatically in an App Module Service method that sets the where clause parameters. VO2 is on a separate .jspx page. VO2 has one bind variable in its SQL query that is populated when the user clicks a commandLink on a row within VO1 - this takes the user to the 2nd .jspx page to view VO2 table results.
    The issue is that when the user navigates back to the first .jspx page containing VO1, a duplicate row is added to the end the data table (or as the first record on the second page of results if there are multiple pages.) If I re-query VO1, re-sort the data using the column headings, or passivate the data (see below), the duplicate row goes away. Note I have tried using the same iterator on both pages and this same issue occurs.
    Ok - after 5 days of troubleshooting, here is the potential bug. If Application Pooling is enabled on the Application Module, I experience the issue above. If I don't enale Application Pooling, and Passivate state for the App Module, this issue does not occur (see below):
    Application Module Settings - Error Occurs if Pooling is enabled
    (unchecked) Failover Transaction State Upon Managed Release
    (unchecked) Disconnect Application Module Upon Release
    (checked) Support Dynamic JDBC Credentials
    (checked) Reset Non-Transcational State Upon Unmanaged Release
    (checked) Enable Application Module Pooing
    If I un-check Enable Application Module Pooling the error does NOT occur. Note I've experimented with many combinations, and its only the Application Module Pooling that affects the behavior.
    Note both view objects are set to Passivate state (but not for transient values, though tested passivating those as well and there was no difference.)
    Can someone please advise? This is a showstopper for implementing our application to production. See the threads below for more information. Finally note that I have not yet been able to replicate this in a simple test case, but there is some specific characteristics about my current application causing this behavior (and it appears others have experienced as well.)
    Duplicate rows displayed in list
    Need help  - Duplicate Rows being added to View Object?
    Thanks.
    Here is the code on the AM service method to populate the rows for VO1 (no insert or create rows - only executing the query):
    ViewObject vo1 = findViewObject("VO1");
    vo1.setMaxFetchSize(250); // set max fetch size 250
    vo1.setWhereClauseParam(0, x0);
    vo1.setWhereClauseParam(1, x1);
    vo1.setWhereClauseParam(2, x2);
    vo1.setWhereClauseParam(3, x3);
    vo1.setWhereClauseParam(4, x4);
    vo1.setWhereClauseParam(5, x5);
    vo1.setWhereClauseParam(6, x6);
    vo1.setWhereClauseParam(7, x7);
    vo1.setWhereClauseParam(8, x8);
    vo1.setWhereClauseParam(9, x9);
    vo1.setWhereClauseParam(10, x10);
    vo1.executeQuery();
    Message was edited by:
    javaX

    More information on this issue:
    After further testing, I discovered that the 'Disconnect Application Module Upon Release' also plays a factor with this issue.
    If 'Enable Application Module Pooling' is unchecked the issue does not occur because the view object is passivated.
    If 'Enable Application Module Pooling' is checked (jbo.ampool.doampooling=true), then the issue occurs UNLESS I also set 'Disconnect Application Module Upon Release' (jbo.doconnnectionpooling=true). If I set the latter to true, then I do not experience the duplicate row issue. I would rather not have to enable jbo.doconnectionpooling=true because of the performance impacts as recommended in the dev guide. Any Suggestions?
    -- updated on 10/1/06 ----
    Setting jbo.doconnectionpooling=true only fixes this issue when I use a ViewLink as the mechanism to pass the row Id from VO1 (master on .jspx page #1) to VO2 (detail on page #2.) If I use an actionListener to pass the value from page #1 to page #2, setting jbo.doconnectionpooling=true does not fix the issue.
    <af:commandLink actionListener="#{bindings.setCurrentRowWithKey.execute}"
    action="page2" text="#{row.Name}">
    <af:setActionListener from="#{row.Id}" to="#{backing_bean_page2.rowid}"/>
    </af:commandLink>
    Message was edited by:
    javaX

  • Entity Framework in WPF Application - Using Statement or Implement IDisposable

    I have a WPF application that uses Entity Framework.
    I have implemented a Repository that implements IDisposable, that holds my EF context.  When the application starts up I new up a Repository, which news up an EF context, then when the application shuts down, I dispose of my Repository, which disposes
    the EF context as well.
    The end result is that my context remains open during the entire lifetime of the application.  
    I've been reading up on EF, and all the examples put the operations against the EF context in a using statement.  Is that the preferred approach?  What is the priority: to keep the context open briefly, or just to make sure you properly dispose
    of it when you're finished with it.
    Thanks.
    Aaron

    >
    https://msdn.microsoft.com/en-us/library/aa355056(v=vs.110).aspx
    That link is only for WCF and it's broken implementation of the Dispose pattern.
    >I have been burnt in doing it where the connection was not closed or disposed when it short-circuted out of the Using statement on exception
    If so, it was a bug.  You should expect that not to happen.
    'using' will close your connection, unless the connection was open before the DbContext and was passed in.  'using' is the safest way to ensure that the connections are closed in a timely manner.
    David
    David http://blogs.msdn.com/b/dbrowne/
    I absoultly do not agree with you. I have been burnt in using the Using statment. And it was along the lines that an excpetion was thrown within the Using statement and no closing of the connection or dispoiong of it ever occured, which is what the WCF example
    is showing on how a Using statement can be short-circuted and things can go wrong.
    I don't care if the Using statement issue is being shown on a WCF typed cleint. I do the same thing in using straight up ADO.NET or EF, becuase I have been burnt by the Using statement, and I dont use them to open,  close or dispose of a connection.

  • Application View States -vs- Windows

    Hello,
    I'm a new Flex user, and have just gotten started using Flex
    2. I have lots of experience developing web apps using ASP.NET. I
    have poured over all the downloadable documentation, and most of
    what I see in the docs are single window samples. I have a flex
    application to develop that will probably end up being about 25
    different screens. I am wondering what the proper way to partition
    the source code should be. Do I need to create one "MXML
    Applicaton" per screen? If so, that would result in a different SWF
    file for each screen, right? When I move from screen to screen, is
    it going to keep the same session object so I can retain the
    context of the user's actions? Or, is it the standard practice to
    try to cram all of the screens into a single MXML Application file
    as different "View States" and have the entire application load up
    when they hit the huge single SWF file?

    I have the same question !!
    I too have to develop a rather complex
    Ordering-Production-Shipping-Billing application. Many screens and
    lots of business logic.
    I will use ColdFusion for the backend and lots of data logic
    will be in the database and CFC. Flex will handle the user
    interface part.
    But I am not quite sure how to handle the windows part and
    also the "modal" aspect of the interface.
    For now my prototype uses ViewStacks and some panels uses
    states depending on customer type or product type selected. The
    user needs to be at the top most view of a main function to access
    other main functions like Production or Shipping. If a user digs
    into a main function I remove the options (using states) to jump to
    other main functions.I want them to close the transactions before
    jumping to other things in the application.
    The main MXML file contains the application bar and
    MainViewStack. Each main function is in a separate MXML file (as
    per examples in the documentation).
    The swf is likely to be large but I do not mind so much, it
    will be used on the Intranet on a 1gb network.
    Steve

Maybe you are looking for

  • Creating .app folders in other operating systems?

    I'm working on a cross-platform game and am hoping to create an OS X port of it. I don't have access to a mac, and so am unable to use the xcode tool for creating .app folders. Are there any tools for creating .app folders on other operating systems?

  • [SOLVED]Is my hosts file functioning as it should?

    I'm using this script to update my hosts file with ad blocking settings. #!/bin/bash # Hosts file updater HFSERVER="http://hostsfile.mine.nu.nyud.net" HFILE="hosts.zip" ORIGFILE="/etc/hosts.original" clear echo "--------------------------------------

  • IdeaPad Flex 15D no virtualization option in BIOS 94CN07WW (AMD APU A6-5200)

    Lenovo IdeaPad Flex 15D (AMD APU A6-5200) does not have virtualization option in BIOS version 94CN07WW. What this means is if one wants to run for example Virtualbox, then one would only be able to vitualize a 32-bit operating system, instead of eith

  • How to Drag and drop Mail message in Calendar event in Yosemite

    Hi,   I am not sure if this has already been answered or if Yosemite Mail is missing one cool feature. In Mavericks and before, it was every easy to drap and drop a email message to a calendar event in the "URL" attachment section where it appeared a

  • Unable to do Software update, access iTunes, use widgets on dash and upload

    *_Here is the problem:_* 1. Unable to use Software Update. When I try I get: "+A networking error has occurred: timed out (-1001). Make sure you can connect to the Internet, then try again+" This is despite being connected to the internet and getting