Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Posts
    160

    Variable Persistence

    If I set a variable mydir = Dialog.FolderBrowse("Please select a folder:", "C:\\"), will mydir be usable from another button. Does it hold its value and, if so, when is it cleared.

    Any info APPRECIATED!

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Quote Originally Posted by NitLions View Post
    If I set a variable mydir = Dialog.FolderBrowse("Please select a folder:", "C:\\"), will mydir be usable from another button. Does it hold its value and, if so, when is it cleared.

    Any info APPRECIATED!

    If you declare the variable as local as in:
    local mydir = Dialog.FolderBrowse("Please select a folder:", "C:\\")

    then the variable is only held within the event or function it is declared in.

    If you don't use "local" then the variable is global to the project and can be used anywhere within.

  3. #3
    Join Date
    Jan 2007
    Posts
    160
    On a page OnShow script, I'm searching for a registry key.

    Then on a button click script (same page), if this registry key that holds a previous installation directory is not found, I want to present a folder browse dialog.

    The part I'm hitting a snag on is determining the value of avdir to decide whether to presend the browse dialog or not.

    I currently have

    if avdir == nil then
    present dialog to set avdir
    end

    It doesn't appear to be working as I've rigged the key in the registry for testing, but it isn't grabbing it for some reason.

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I'd have to see how you're setting "avdir" to be able to help

Similar Threads

  1. problem with variable
    By UweGeercken in forum Setup Factory 6.0
    Replies: 2
    Last Post: 07-12-2004, 04:15 AM
  2. Variable in a variable name??
    By GurkGager in forum Setup Factory 6.0
    Replies: 1
    Last Post: 05-18-2004, 02:31 PM
  3. Can't copy files with variable??
    By SonG0han in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 03-06-2004, 03:58 AM
  4. Replies: 1
    Last Post: 11-21-2001, 01:10 PM
  5. Validation of custom variable references?
    By John Schacher in forum Setup Factory 5.0
    Replies: 1
    Last Post: 07-18-2000, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts