How to test for cancel ChooseFile

Hi all

Yet once again, I'm stuck with some stupid problem.

When I cancel the ChooseFile dialogue, I want to shoot the GetTheFile function. However, I have not found the appropriate for this test.

The inputFile is reported to be null in the case of cancellation:

var prompt = "Select the formatted Citation file";
GetTheFile ();

function GetTheFile () {
  var inputFile = ChooseFile (prompt, GetDocPath (), "*.rtf", Constants.FV_ChooseSelect);
  if (inputFile == 0) {
    alert  ("No input - no processing");
    return;
  }
  alert ("Further processing of the inputfile = " + inputFile);
}

If I cancel, line 10 reports 'pursuit of the procedure of the inputfile = null ".

6 for online tests the string "null" doesn't help either.

The Scripting Guide says for this function:

"The method returns 0 if the user has clicked Open, Select, Save or use; "a value zero if the user has clicked on cancel or an error has occurred."

function GetDocPath () {
// ----------------------------------------------- Get the document/book path
  var docFile, scrPath, lastBSlash;
  if (app.ActiveBook.ObjectValid()) {
    docFile = app.ActiveBook.Name;
  } else {
    docFile = app.ActiveDoc.Name;
  }  
  lastBSlash = docFile.lastIndexOf("\\");        // \ needs escaping
  scrPath = docFile.substring(0, lastBSlash);
  return scrPath;                                 // no final \ !
} // --- end GetDocPath

The line 6 for testing! == 0 captures the file entry valid names (of course). So, what is a test valid for the Undo feature?

Hi Klaus

You must write the word "null":

If (Fichierentree is nothing)

then it should work

Tags: Adobe FrameMaker

Similar Questions

  • How to test for the node XML empty?

    If (selectedImage.detail! = "")

    works with
    < picture detail = "" >
    < / image >

    but not

    < image >
    < detail > < / details >
    < / image >


    Hope that makes sense for a person, can't think really how to explain it better, I'm sure it's a fairly simple thing

    Quote:
    Posted by: ntsiii
    I did not understand. You try to search the nodes in detail where the text node is empty?
    Tracy

    Yes - for that I can't ignore explicitly their.

    Seems that all I had to do was if(!selectedImage.detail)

    Thanks for the reply - despite my not knowing how to phrase the question.

  • How to test for lack of Tuples duplicate in a subquery in oracle

    ----------------------------------------------------------------------------------------
    SQL > select * from customer
    2 single cases (select * of the double);
    unique (select * twice)
    *
    ERROR on line 2:
    ORA-00936: lack of expression
    ------------------------------------------------------------------------------------

    unique construction does not work in oracle.
    Now how to check the Absence of Tuples to duplicate

    Published by: 816387 on December 18, 2010 21:23

    I want a unique construction to work.

    Assuming that this construction is supposed to operate the ANSI optional Unique predicate , then you can rewrite your query in the form

    select d1.customer_name
      from depositor d1
     where exists
             (  select null
                  from depositor d2, account a1
                 where d1.customer_name = d2.customer_name
                   and d2.account_number = a1.account_number
                   and branch_name = 'Perryridge'
                having count (customer_name) = count (distinct customer_name))
    
  • How to test and remove the loader object?

    Hello

    I am trying to load an object swfLoader on the scene and vimeo player (which I do with great success) and then delete them when I click on a button. I can remove it each separately, but when I put them in the same function I get an error. I think I need to test to see if they are on the stage with an if statement before I try to remove them, because I am getting an error NULL when I click the button. The problem is that I don't know how to test for them. I got as far to put the name of the variable in the condition. Can someone help me please?

    In an effort to keep the code as simple as possible, I do not understand the code where variables are declared and the swf loader and loader vimeo are instantiated on the stage. But if I need more for the problem to make sense, please let me know rather than pass on my request for help.

    Thank you.

    closePortfolio_but.addEventListener (MouseEvent.CLICK, onClickClose)

    function onClickClose (e:MouseEvent) {}

    If {(moogaloop)

    moogaloop.parent.removeChild (moogaloop);

         }

    If (swfLoader) {}

    swfLoader.parent.removeChild (swfLoader);

         }

    }

    closePortfolio_but.addEventListener (MouseEvent.CLICK, onClickClose)

    function onClickClose (e:MouseEvent)

    {

    moogaloop.parent.removeChild (moogaloop);

    swfLoader.parent.removeChild (swfLoader);

    }

  • How to test a motherboard for fualts?

    Looking for means test a Toshiba Satellite L20/L25 for fualts. How to test to see if it has a graphics chip fail or its ram reading high because it sounds like the RAM fail if I go out and if I put it in it beeps once like it wants to start

    As far as I know that it can be tested using diagnostic tools special but these tools are not for public use and are designed by Toshiba to only service providers.

    Have you tested different RAM modules?

  • I just upgraded to the Plan complete creative Cloud, but I also had a plan of individual photo, the upgrade to the PAC will cancel the individual level, or what I have to cancel and how can I make sure that I do not get penalized for cancellation?

    I just upgraded to the Plan complete creative Cloud, but I also had a plan of individual photo, the upgrade to the PAC will cancel the individual level, or what I have to cancel and how can I make sure that I do not get penalized for cancellation?

    [Duplicate message deleted... post the same question more than once is confusing... MOD]

    [This is an open forum, not a direct line to Adobe support... you have to wait a response]

    First of all, such that added to your message of origin by a Mod, please do not post the same question twice

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help
    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific time) <==> NOTE DAYS AND TIME

    Creative cloud support (all creative cloud customer service problems)
    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • How can I (for the love of God) cancel the membership creative cloud

    How do I (for the love of God) can I cancel membership creative cloud?

    Cancel your subscription or membership. Creative cloud

    https://helpx.Adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html

  • Flex 3: how to put a mark cross on this Canvas poster (for cancellations)

    Hello
    According to the click of the button, I display a component of research, made of canvas.
    public function openSearchCOmp (): void
    {
    var a: comps. SearchComp = new SearchComp();
    a.Height = 233;
    a.width = 450;
    a.x = 314;
    a.y = 106;
    a.verticalScrollPolicy = "off";
    a.horizontalScrollPolicy = "off";
    Application.application.addChild (a);

    }

    Now, please tell me, how to put a mark on this shown Cross Canvas (for cancellations) Please suggest.

    What is flase?

    The icon cancel must be in the component that you want to remove from the display list.

    Create a public function in the parent of the component to remove and cancel the icon click handler, try this:

    parentDocument.removeItem (this);

    If this post answers your question or assistance, please mark it as such. Thank you!

    http://www.chikaradev.com
    Adobe Flex development and Support Services

  • How to test the USB on Satellite Pro C870 speed?

    Hello

    Please I have connect WD item 10 B 8 USB drive to plug 750Go BLUE.
    Please how can test if USB3 uses full speed or lower connection USB2 bus?
    Brand of disk Crystal 3.03 said 31 MB/s reading and writing! (too low for USB3!)

    Thank you

    Hello

    You can use some freeware like tools
    -H2testw
    -Drive the speed Test 3.2
    I used the H2testw to SD card check and test USB memory stick and I was satisfied.

  • How to test the audio and the video on Android

    How to test audio and video on Android?

    How it is checked when installing Skype on Android?

    What I'm asking, is available in the desktop version to Tools-> Options-> Audio settings, and Tools-> Options-> video settings. And is checked during the installation of Skype for desktop PC as Configure Skype / check your audio and video files.

    (Of course I searched the whole Skype app and found no.) I have the echo service by my microphone is weak, I am lost.)

    Thank you.

    Sign in to your ID on Skype desktop and call your android phone to test

    It's something is broken, there is not that you can do, other than downgrading to an older version. There are also a couple of settings to activate the camera and photo qualityin settings in some versions.

  • How to test the switching PXI matrix

    Hello

    I have a PXI-2530 b and I was wondering is there an accepted practice to check the viability of relay out to just look at the number of relays?  I want to know if I've damaged a relay.  From what I read so far, I have to create my own connection matrix of switching to my PXI-4071 DMM test harness to check the status of network.   Is there another way.  NOR has considered adding a self-test for relay condition?

    Thanks for your quick response.

    I thought as well, but I wanted to be sure.  Even if I know that the reeds have a long service life, it is possible have to explode or cause damage.   And since there is no procedure for calibration to the switching matrix, I was wondering how to check that this component of the system is still usable.   We use the PXI system as a way to test and calibrate an internal pacemaker tester with 112 connections.  We partition the 2530 b in 5xBlocks, 1xBlock and 2xBlocks in independent mode and then using a custom internal test adapter to provide all interconnections.  The DMM and the multi-IO are distributed in these partitions.

    For this reason, I would recommend that future matrix systems have a rudimentary way to self-test the relays are less than 3 ohms (or all that apply regarding a particular switching matrix).   Pickering is advertising for cards supporting Birst.

  • How to test profibus is set up correctly?

    I profibus card installed in a PC.

    the pc is not installed LabVIEW. only testStand.

    purpose of this PC is like test panel for the execution of the TestStand test scenarios and this PC will be connected to the IO.

    How can test the profibus if there is no installed Labview?

    The vendor of your device must provide you with the GSD file. Each peripheral support profibus usually come with a GSD file.

  • "NaN" - how to test in VBAI <>- BT?

    I use VBAI to measure the length of a line.

    I use LabVIEW as the custom interface.

    In VBAI, I use "Update of Inspection" to send the data of length to LV

    How can I check in vi, that this figure is "NaN? This will happen when the line is not found.

    I tried to use ' NaN/path/RefNum"of the LV, but it simply doesn't.

    Help please...

    I don't know how you test this. I tried it and it works fine. Make sure the update of Inspection stage has the flag to 'Run the VI after update of the indicators'.

    If she still doesn't for you, let me know and I can send you a simple example (if you need an example, let me know what version of the VBAI you are using).

    Thank you

    Brad

  • How to test if the pc is connected to the TCP/IP protocol?

    Hello

    I have a VI how should the data received from another PC, using a TCP/IP connection.

    My VI could connect, receive data, but if I lose the connection im not able to reconnect, because I do not know how to test if my pc is connected to the other.

    Thank you for your help,

    Best regards

    salim_mjs wrote:

    Hey,.

    I was checking for error 66, I think that it check if the connection has been closed in order to reconnect

    do you not think that the error 56 or 60 are better?

    with respect,

    56 is the time-out. This will depend on your remote service if this should be considered as error or ignored. If it is a server application, it should certainly be able to respond within the time limit. But if your host application is the server and the remote application is the client it is very common to receive a time-out error when querying the client if it has new data to send.

    Order the examples mentioned previously, they really give you a good idea on how TCP/IP network communication must all work, even if there is still a lot to improve to create a truly reliable connection. But start from there come back if you get into trouble.

    Rolf Kalbermatter

  • How to test the backlight of the Simulator

    Hello Guyz

    Im kind again in the development of blackberry so its more than a new hobby as I recently an interest in java.  So my first app is an attempt to make an application which the camera back given the fon. so I would like to know how to test, without the need to put it on my son, how do I know if d backlight is turned on or off, is the way to display the interface back to the Simulator or something. I'm using eclipse and the blackberry 9800 torch Simulator. How to test the light from my pc?

    Thanks for your time, im hoping a response. Take advantage of the UL

    You can't test the flash of the camera in the BlackBerry smartphone Simulator.  You will need to test this on a real Smartphone BlackBerry.

Maybe you are looking for