Recuperer le chemin de l'application pendant l'execution

Bonjour,
Dans le code Labview , y-a t il moyen de faire reference au chemin de l'application au moment où elle sera executée ?
Par exemple quand j'execute une application , je souhaiterais creer un fichier texte dans le repertoire où se situe l'application sans le connaitre à l'avance ...
Dans l'aide on trouve une propriété  "App.Rép" mais je ne vois pas comment l'utiliser 
Cordialement. 

Merci sérgio,
Le lien m'a bien aidé.
J'ai pu retrouver les elements utilisés dans la palette de fonction .
Il faut utiliser:
Programmation > Controle d'application > Ouvrir une reference d'application 
Programmation > Controle d'application > Noeud de propriété
puis Creer > Propriété de la classe application > Application > Chemin du repertoire 
Cordialement
Gregory 

Similar Messages

  • Boutton ouvre un sous vi pendant l'execution

    bonjour,
    je suis une débutante en Labview.
    je suis en train de réaliser une interface sur labview, et je voudrais mettre un boutton dans mon programme pour appeler un sous VI pendant l'execution et sur lequel je peux controler des valeurs grace à des controleurs.
    merci de me donner les étapes à suivre
    (j'utiliser labview 2011) 

    Bonjour,
    Placez un bouton sur l’interface. Ce bouton (suivant son état : pressé ou pas)
    retourne une valeur ou bien vrai ou bien faux. Si vous connectez ce
    bouton a la marque d’interrogation d’une structure de cas (case
    structure en englais), vous pourrez atteindre votre but. La structure
    fonctionne différemment en fonction du résultat du bouton : si le
    bouton est pressé, la version « vraie » de la structure exécutera, si
    le bouton ne l’est pas, la version « fausse » exécutera. Vous pouvez
    alors placer votre sous VI dans la version « vraie » de la structure:
    cette partie de ton code ne s’exécutera que lorsque le bouton est
    pressé.
    Blake C.
    National Instruments
    Blake C.
    Applications Engineer
    National Instruments
    www.ni.com/support
    Attachments:
    ForumHelp.png ‏263 KB

  • Wf application in Logistic execution

    Hello ,
    Can someone give me any example of SAP workflow application  in Logistics execution particularly in
    Warehouse Management .
    Thank You .
    Krsto

    Hi,
    Try:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMLO/BCBMTWFMLO.pdf
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/f1/499a34272a5f2ee10000009b38f83b/frameset.htm
    Good luck!
    Kleber

  • Application Pending Connection On Playback

    I am using Adobe FMS 4.5 for streaming live and for VOD playback. Using DVRCast for the recording application. sometimes in the player, after the live stream is recorded, playback will not occur. It is very random. in the logs, when playback does not occur, the status is "pending connection." checked what the status code means and it means the application is pending connection. Does anyone know why this occurs. I checked the application files and see no limitations.

    Hi,
    I am having a similar problem getting my i88s phone to communicate to my server application using TCP sockets. It has been working fine when I am using an emulator inside my network or outside my network to communicate to the server application so I have ruled out the firewall as a possible problem.
    But the same application on the i88s phone never connects to the server application.. it eventaully times out but it never connects to get a succesful or unsuccesful message.
    Are there other configuration settings that you know of that I need to check to make sure the phone is able to use TCP sockets? In this case the phone is not using WAP but it is running a J2ME midlet that is attemping to communicate using TCP sockets.
    Thanks in advance!

  • Executer un sous VI independamment pendant l'execution du VI principal

    Bonjour,
    Je suis étudiant, dévellopant un programme sur Labview 2010.
    Je souhaiterais pouvoir intégrer un sous-VI dans mon VI principal, et choisir de l'executer ou non a partir de la face avant durant l'execution du VI principal.
    Est-ce possible?
    Merci d'avance.

    Salut Gabouch,
    Je pense qu'avec une structure "évènement" gérée par une commande boléenne disposée sur ta face avant tu devrais pouvoir t'en sortir. Je t'ai joint un exemple si cela peut t'aider.
    Cordialement
    Jean-Baptiste C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Téléchargez dès maintenant toutes les présentations techniques !
    Pièces jointes :
    Exemple.vi ‏8 KB

  • Application update problem with v5 core applications

    The version 6 Desktop Manager consistently tells me that I have a 34.1 MB update of the 5.0.0 core applications pending.  If I "Apply", everything seems to go reasonably well (except that I usually have to fix this or that annoying change the procedure causes in some of my settings) but at the end I'm still told I need to do this update.  When I try to exit from the Desktop Manager it beseeches me one last time to do this download.
    The only thing I can figure is that I haven't downloaded about 90% of the many languages available in this software version, English, French, and German being all I can handle (does anyone know any speakers of Galician?  I'm embarrassed to admit I don't even know where that language is commonly used!), and that the updater won't rest until I've installed them all.  Purely a guess, and probably not a good one.
    Any thoughts?  I haven't seen reference to this (or haven't looked in the right places).  Thanks.
    Mike

    I have the same problem as well. The 5.0.0 Core Application has a red star next to it and says  "available update" but there's no where to update it in the summary listing below. There's a yellow exclamation mark on the bottom that says  I've exceeded available storage but the update is 35.2 MB and I currenlty have 124.5 available.  Also, the "Apply" button below does nothing when I press it.
    Like Mike, I removed all languages except for English because this devise has so little memory capacity that it would freeze if I didn't.
    Any information known would be appreciated. When I try to exit the program it, too, reprimands me saying that I haven't finished the necessary updates.
    Molly

  • POWL empty for pending travel expenses

    Hi, folks
    We're in a travel management project with ESS/MSS integrated into a Portal (versions: NW Portal 7.0 and ECC 6.0).
    Our problem raise in "Approval travel and expenses" iView (FITV_POWL_APPROVER application). When we launch this iView/application, pending travel expenses table is always empty (even if we use a different user). However, we can see this pending expenses in GUI transaction (PRAP).
    We've made some changes in POWL customizing, but we're able to hide some tabs or something similar, however, we haven't found any customizing related to this behaviour.
    Any help will be appreciated.
    Best regards,
    Sergio Sánchez

    hi
    check whether the below mentioned SAP Notes can help to solve your problem
    1388211 Web: Status des Antrages nach Storno in FITV_POWL_APPROVER 23.09.2009
    1350672 UI Enhancement for Travel Approval: adding tooltip 12.06.2009
    1314796 FITV_POWL_APPROVER: Error in miles/kms cumulation 09.03.2009
    1287152 WEB: Travel requests are missing in worklist of approver 16.12.2008
    1235459 FITV_POWL_APPROVER: Problems with employee list

  • How to call a web Service from Oracle Applications?

    Hi friends,
    I've posted this question on OA Framework forum , but may be it's more appropiated put it here. Sorry for do it again:
    It's about how to call a web service from a Form or a .sql (via Request) in Oracle Applications:
    Could you please explain here the detailed steps (with code example if it's possible) to invoke a webservice from Oracle Applications?.. how did yo do it...?
    I've read differents posts here and the 33097.1 metalink note (by the way, the first recommended link in this note is broken...), but there are lots of theorical concepts and no real examples to see how/from where invoke the WS
    I'll have to call one webservice (I suppose the customer will give me the interface implementation)...but I've never did it with Applications so that's why I ask you for all the detailed steps...
    I work with Forms 6i, Apps 11.5.10.2 and DB 9.2.0.7.
    Thanks a lot.
    Jose.

    Hello Jose,
    I did using java program to call BPEL web services in 11.5.10.
    I pasted below the metalink note for your reference (Note:250964.1)
    The idea is first write a java program to call the webservice (in my case it is calling an BPEL web service, so this may not help directly), test it.
    Then port the java program as specified in the note, so that you could call your web service through concurrent manager scheduler.
    Is this ok?
    Thanks
    Arun.
    ======================================================
    Checked for relevance on 25-Apr-2007
    Application Install - Version: 11.5.8 to 11.5.10
    Goal
    ====
    How to register and create a Java concurrent program for Oracle Applications
    Release 11i
    Solution
    ========
    1. Create your Java Concurrent Program (JCP) , using a text editor.
    /*===========================================================================+
    | Concurrent Processing Sample Code |
    | |
    | FILENAME |
    | Hello.java |
    | |
    | DESCRIPTION |
    | Sample Java concurrent program |
    | About the simplest possible program, just writes a message to the |
    | logfile and output file. |
    | |
    | HISTORY |
    | $Log$ |
    | |
    +===========================================================================*/
    package oracle.apps.fnd.cp.sample;
    import oracle.apps.fnd.cp.request.*;
    public class Hello implements JavaConcurrentProgram {
    public static final String RCS_ID = "$Header$";
    public void runProgram(CpContext ctx) {
    ctx.getLogFile().writeln("-- Hello World! --", 0);
    ctx.getOutFile().writeln("-- Hello World! --");
    ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
    =======================================
    End Sample
    =======================================
    2. Create a sample directory under $JAVA_TOP:
    $ mkdir $JAVA_TOPoracle/apps/fnd/cp/sample
    3. Copy Hello.java into $JAVA_TOP/oracle/apps/fnd/cp/sample:
    $ cp $HOME/Hello.java $JAVA_TOP/oracle/apps/fnd/cp/sample
    4. Compile your java program:
    javac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java
    5. Test at the command line with following syntax:
    jre -Ddbcfile=$FND_TOP/secure/your_dbc_file.dbc \
    -Drequest.outfile=./outfile \
    oracle.apps.fnd.cp.request.Run \
    oracle.apps.fnd.cp.sample.Hello
    6. Register your custom java concurrent program with Oracle Applications.
    a. Navigate: Concurrent > Program > Executable
    b. Enter details into the form
    Executable: JCPHELLO
    Shortname: JCPHELLO
    Application: Application Object Library
    Execution Method: Java Concurrent Program
    Execution File Name: Hello (Insert a name that does not contain space or period)
    Execution File Path: oracle.apps.fnd.cp.sample
    c. Save the details
    d. Navigate: Concurrent > Program > Define
    e. Enter details into the form
    Program Name: JCPHELLO
    Program Shortname: JCPHELLO
    Application: Application Object Library
    Executable: Choose JCPHELLO from LOV
    Executable Options :
    f. Save the details
    7. Add this new concurrent request to your responsibility request group.
    a. Navigate > Security > Responsiblity > Request
    b. Query System Administrator
    c. Add new row and choose TestJava
    d. Save the changes.
    8. Run your new Hello Java Concurrent Program
    Navigate: Request > Run
    References
    ~~~~~~~~~~~
    Oracle Applications Developers Manual for Release 11i A75545-01
    ====================================================

  • Quit an Application at a specific time each day.

    I know how to do something as simple as Quiting an application with AS, but what if I want to run it at say 7pm everyday. Not using iCal.
    Any Ideas?

    You can use the unix-side launchd application to trigger execution of an application at a specific time. In your case you'd want it to launch an AppleScript that tells your other app to quit.
    Programming launchd to do this is easy with an app like Lingon (http://lingon.sourceforge.net/), which provides a gui to set schedules in launchd.
    I use to run two applescripts every 30 seconds and a third one once an hour. Works a treat... and it's free.
    Robert

  • SocketTimeoutException when calling a web service from a WD application

    I'm trying to call a method of a web service from my WD application. The execution of the method longs more than 60 sec, so I'm always getting:
    Service call exception; nested exception is: java.net.SocketTimeoutException: Read timed out
    I've got this post, which tells to change the property "socketTimeout" of the client.
    Read Timed Out Error
    But I don't know what is the client in my WD application, does this refer to the logical port ?
    I've tried inserting this into wdInit:
    com.hesa.hesanet3.h3wsmodel.proxies.Hesanet3Impl service = com.hesa.hesanet3.h3wsmodel.H3WSModel.getServiceImpl();
    logicalPort =(com.hesa.hesanet3.h3wsmodel.proxies.Hesanet3ViDocument) service.getLogicalPort("Config1Port_Document", com.hesa.hesanet3.h3wsmodel.proxies.Hesanet3ViDocument.class);
    logicalPort._setProperty("socketTimeout", "30000");
    But it doesn't work.
    I've tried getting the logical port from the model object corresponding to the method of the webservice unsuccesfully.
    I've tried with Visual Administrator -> instance -> Web Service Container -> Settings -> WS Clients Socket Timeout, increasing to 120 secs. No result, still stop at 60s.
    I've tried with Visual Admin -> global configuration -> Http provider -> KeepAliveTimeout, increasing to 120 secs, and still stop at 60s.
    I can't change model object code, but I've tried to debug it and setting the property in stubForLogicalPort and in _getGlobalFeatureConfig(), without change.
    I'm using a HTTP Destination, does this have something to do?
    I'm getting insane with this and I'm in urgent need of help.
    How can I change the time the WD waits for the WebService to answer ?
    Thanks in advance.

    Find solution. Check this thread:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2bweb%2bservice
    The com.sap.tc.webdynpro.model.webservice.api.IWDWSInvocationModifier interface can be implemented by an application using the Adaptive Web Service model in order to modify the web service invocation object just before it's execution. Invocation modifiers need to be registered with the executable model class for which invocation is to be modified:
    Request_NumberToWords requestMO = new Request_NumberToWords(model);
    requestMO.wdSetInvocationModifier(
      new IWDWSInvocationModifier() {
        public void doModifyInvocation(Object port) {
          HTTPControlInterface httpItf = HTTPControlFactory.getInterface(port);
          //timeout for this WS invocation is 120 sec; don't use global config. setting of WS-Runtime
          httpItf.setSocketTimeout(120000);
        public void doModifyAfterInvocation() {}
    Best regards.

  • How to determine "fetch size" of an application?

    Hi, all.
    The db is 11.2.0.3 on a linux machine.
    I would like to know the "fetch size" of an application, but I was not able to find any related meteris in v$statname.
    The application configruation is invisible to me.
    Do I need to do some calculations based on statistic metrics from v$statname?
    If so, what meteris should be considered for the assumption for "fetch size" ?
    The following is from manual, but the application configuration is invisible to me.
    http://docs.oracle.com/cd/E11882_01/java.112/e16548/resltset.htm#i1023619
    Setting the Fetch Size
    The following methods are available in all Statement, PreparedStatement, CallableStatement, and ResultSet objects for setting and getting the fetch size:
    •void setFetchSize(int rows) throws SQLException
    •int getFetchSize() throws SQLExceptionThanks in advance.
    Best Regards.

    or;
    compare rows_processed, executions and fetches from v$sql for queries from your application.
    HASH_VALUE EXECUTIONS    FETCHES ROWS_PROCESSED
    4157030199      39288     510744       50193247
    SQL> select
      fetches/executions "fetch per exec",
      rows_processed/executions "rows per exec",
      rows_processed/(executions+fetches) "avg fetch size"
    from v$sql where hash_value=4157030199;
    fetch per exec rows per exec avg fetch size
                13    1277.57439     91.2553134the query assumes the app is doing it 'right', and is fetching from the first execute as well as the following fetches.
    the 91.25... is not the real fetch size ofcourse, as the #rows returned will typically not be an exact multiple of the 'application fetch size', but we can guess it may be 100 in this case.
    also note that you speak of an application fetch size, but the fetch size is really specified per-statement (OCIStmtExecute). some applications (or API's) do indeed use a 'one size fits all', which is still better than using no array fetching at all.

  • SQL Azure: Query Analyzer VS Web Application - Calling Stored Prcocedure

    I have a stored procedure in SQL Azure.
    Calling this stored procedure normally would take 30 minutes.
    I need to call this Stored procedure multiple times (18 times, with different input)
    Scenario 1: When I call this asynchronously from the Web Application, all 18 calls run concurrently so the whole process take about 30 minutes.
    Scenario 2: When I call this same stored procedure from Microsoft SQL Server Management Studio, (each process in a different TAB) they seem to be running very slowly, it has already taken more than 5 hours.
    Is there a reason for this ?
    Is there any difference in calling multiple stored procedures from different tabs ?
    Is this process running Asynchronously ?
    What is the best was to achieve scenario without going via the front end ?

    Is there a reason for this ?
    --When you are running the query, no matter application or SQL Server, please check sys.dm_exec_requests and check the session status in SQL Server and see if any difference.
    Maybe it is caused by blocking when running in SSMS. We need to dig into it.
    I am not sure how you call the procedure asynchronously  in application, but if they are sent to SQL Server within different connections/sessions, then it should be the same as SSMS.
    Is there any difference in calling multiple stored procedures from different tabs ?
    --No.
    Is this process running Asynchronously ?
    --When you start the procedure in SSMS, it is a synchronize session.
    However, the slowness should not be associated with the synchronization or not.
    Per my understanding, for the asynchronously calling in application, it simply means that application goes to execution other code without for SQL Server.
    This does not affect the real time cost in SQL Server.
    What is the best was to achieve scenario without going via the front end ?
    --We need to understand what cause the issue first. Normally they should be almost the same.
    Right now the procedure caused 30 minutes to complete and it is really too long. I think you'd better make adjustment to the code or logic to tune the performance first.

  • Tab Bar Application save order

    Hi,
    I am creating a Tab Bar application with 8 Tabs. As usual, at the fith tab, the More appears. When the user goes there, he/she can modify the order of tab bars, as he/she wants.
    My problem is, that I want to save the order of these tabs, and display it in the same order, when the user opens the app again.
    I am using storyboard, so the views are created, and hooked up over there.
    The AppDelegate looks like this:
    //  AppDelegate.h
    #import <UIKit/UIKit.h>
    @interface AppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate>
    @property (strong, nonatomic) UIWindow *window;
    @end
    //  AppDelegate.m
    #import "AppDelegate.h"
    @interface AppDelegate()
    @property (nonatomic, retain) UITabBarController *mainTabBarController;
    @end
    @implementation AppDelegate
    @synthesize window = _window;
    @synthesize mainTabBarController;
    - (void)customizeInterface
        UIImage* tabBarBackground = [UIImage imageNamed:@"tabbar.png"];
        [[UITabBar appearance] setBackgroundImage:tabBarBackground];
    #pragma mark UINavigationControllerDelegate
    - (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
        [[NSUserDefaults standardUserDefaults] setInteger:mainTabBarController.selectedIndex forKey:@"mainTabBarControllerSelectedIndex"];
    - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
        [[NSUserDefaults standardUserDefaults] setInteger:mainTabBarController.selectedIndex forKey:@"mainTabBarControllerSelectedIndex"];
    #pragma mark UITabBarControllerDelegate
    - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
        [[NSUserDefaults standardUserDefaults] setInteger:tabBarController.selectedIndex forKey:@"mainTabBarControllerSelectedIndex"];
    #pragma mark UITabBarControllerDelegate
    - (void)tabBarController:(UITabBarController *)tabBarController didEndCustomizingViewControllers:(NSArray *)viewControllers changed:(BOOL)changed {
        int count = mainTabBarController.viewControllers.count;
        NSMutableArray *savedTabsOrderArray = [[NSMutableArray alloc] initWithCapacity:count];
        for (int i = 0; i < count; i ++) {
            [savedTabsOrderArray addObject:[NSNumber numberWithInt:[[[mainTabBarController.viewControllers objectAtIndex:i] tabBarItem] tag]]];
        [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithArray:savedTabsOrderArray] forKey:@"tabBarTabsOrder"];
        [[NSUserDefaults standardUserDefaults] synchronize];
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        [self customizeInterface];
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        mainTabBarController.delegate = self;
        int count = mainTabBarController.viewControllers.count;
        NSArray *savedTabsOrderArray = [defaults arrayForKey:@"tabBarTabsOrder"];
        if (savedTabsOrderArray.count == count) {
            BOOL needsReordering = NO;
            NSMutableDictionary *tabsOrderDictionary = [[NSMutableDictionary alloc] initWithCapacity:count];
            for (int i = 0; i < count; i ++) {
                NSNumber *tag = [[NSNumber alloc] initWithInt:[[[mainTabBarController.viewControllers objectAtIndex:i] tabBarItem] tag]];
                [tabsOrderDictionary setObject:[NSNumber numberWithInt:i] forKey:[tag stringValue]];
                if (!needsReordering && ![(NSNumber *)[savedTabsOrderArray objectAtIndex:i] isEqualToNumber:tag]) {
                    needsReordering = YES;
            if (needsReordering) {
                NSMutableArray *tabsViewControllers = [[NSMutableArray alloc] initWithCapacity:count];
                for (int i = 0; i < count; i ++) {
                    [tabsViewControllers addObject:[mainTabBarController.viewControllers objectAtIndex:
                                                    [(NSNumber *)[tabsOrderDictionary objectForKey:
                                                                  [(NSNumber *)[savedTabsOrderArray objectAtIndex:i] stringValue]] intValue]]];
                mainTabBarController.viewControllers = [NSArray arrayWithArray:tabsViewControllers];
        // Override point for customization after application launch.
        return YES;
    - (void)applicationWillTerminate:(UIApplication *)application {
        [[NSUserDefaults standardUserDefaults] synchronize];
    - (void)applicationWillResignActive:(UIApplication *)application
         Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
         Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
    - (void)applicationDidEnterBackground:(UIApplication *)application
         Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
         If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    - (void)applicationWillEnterForeground:(UIApplication *)application
         Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
    - (void)applicationDidBecomeActive:(UIApplication *)application
         Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    - (void)dealloc {
    @end
    This is where I am currently, and it is not working.
    I checked the .plist file, and there is no entry called tabBarTabsOrder, so it is not evan saving it.
    I'm really confused at this point, got no idea what to do.
    Does anyone know, ehat's the problem? What am I missing?
    Thank you very much in advance!
    Daniel

    This works in a project created from the Tabbed Application template. I set the tag on each TabBarItem in the storyboard.
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
        tabBarController.delegate = self;  // couldn't figure out how to do this in the storyboard
        [self orderTabBar:tabBarController];
        return YES;
    - (void)orderTabBar:(UITabBarController *)tabBarController {
        NSArray *tabsOrderArray = [NSUserDefaults.standardUserDefaults arrayForKey:@"tabBarTabsOrder"];
        if (tabsOrderArray) {
            NSMutableArray *orderedViewControllers = [[NSMutableArray alloc] initWithCapacity:tabBarController.viewControllers.count];
            for (NSNumber *tabOrder in tabsOrderArray) {
                [orderedViewControllers addObject:[self viewControllerForTabBar:tabBarController TabBarItemTag:tabOrder.integerValue]];
            tabBarController.viewControllers = orderedViewControllers;
    - (UIViewController *)viewControllerForTabBar:(UITabBarController *)tabBarController TabBarItemTag:(NSInteger)tag {
        for (UIViewController *viewController in tabBarController.viewControllers)
            if (viewController.tabBarItem.tag == tag)
                return viewController;
        return nil;
    - (void)tabBarController:(UITabBarController *)tabBarController didEndCustomizingViewControllers:(NSArray *)viewControllers changed:(BOOL)changed {
        NSMutableArray *tabsOrderArray = [[NSMutableArray alloc] initWithCapacity:tabBarController.viewControllers.count];
        for (UIViewController *viewController in viewControllers) {
            [tabsOrderArray addObject:[NSNumber numberWithInt:viewController.tabBarItem.tag]];
        [NSUserDefaults.standardUserDefaults setObject:[NSArray arrayWithArray:tabsOrderArray] forKey:@"tabBarTabsOrder"];
        [NSUserDefaults.standardUserDefaults synchronize];

  • Detect call state while application is in background

    how can detect the call state , for example : exit the app when call disconnected .
    I tried this code but it wasn't workfor me .The code:
    - (void)applicationDidEnterBackground:(UIApplication *)application
          [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitDisconnected) name:CTCallStateDisconnected object:nil];
        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    I googled so much , but I dont find anything.
    thanks.

    First thing .. your application will not be a J2EE application and EJBs will be definitely an overkill ....
    Write a small stand alone java program ( I don't think it will be large) and do the needful.
    Schedule your java process as a cron job (in UNIX) or as a sceduled task (In NT)
    I need to create J2EE application that should every
    day grab some information from the database, write it
    in a file and send this file to the ftp server.
    Could you recommend me better solution?
    Is it possible no window exists while application is
    running in order nobody could close window
    accidentaly?
    Thank you.
    Qand

  • HashCode - Not Equal between subsequent runs of application

    Good day to the forum. It's been a long time.
    The java Object.hashCode method as seen at:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()
    states:
    ...This integer need not remain consistent from one execution of an application to another execution of the same application.
    Possibly a dumb question but based on that I should NOT be able to trust this methodology:
    I have a large DB in one part of the world. I want to insure that another DB has the same data. My idea is to build a hashtable containing important table info as the key ex: tableName.PKfield, and a hashcode of the data. The slave would send a master of this info via serialization to the master server. Based on the differences in the data a set of instructions or data would be returned to the slave.
    So, can I not trust that the hash code would be correct in both places?
    server."dog".hashCode() may not equal slave."dog".hashCode()?
    Thanks
    ST

    My initial test have been favorable. I'm not testing solely on the hash code. In it's simplest form, this is what I'm doing...
    slave -
    Select [unique identifier field shared by systems], [all other data] from myTable
    myHashtable.put(tableName + uniqueID, Integer(alldata.hashCode))
    I have some simple methods to insure that dates come through in a standardized format. Numbers are numbers, strings are strings. The table definitions should be identical.
    master -
    Get each entry and build a select statement from it. Note that both systems use identical field lists in the code, not the DB.
    Select [all data] from myTable where uniqueID = [foo from hashtable]
    concatenate data and generate hash
    if the hash is different the data must be different.
    I'll keep testing.
    BTW - The reason I can't use the built in DB mechanism is that I only have access to certain tables in the system. This application is part of a suite of apps that live on the same DB.
    Thanks again. I'll keep testing.

Maybe you are looking for