Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 28

Thread: cancel error

  1. #1
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534

    cancel error

    when i ccancel to load a page to web object it loads
    Code:
    http://cancel/
    this is the code i have on button click :
    Code:
    File = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", false, false);
    Web.LoadURL("Web1", File[1]);

  2. #2
    Join Date
    Apr 2007
    Location
    Suffolk, UK
    Posts
    176
    Code:
    File = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", false, false);
    if File ~= "CANCEL" then
        Web.LoadURL("Web1", File[1]);
    end
    that should fix it.

  3. #3
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    Quote Originally Posted by screwed over View Post
    Code:
    File = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", false, false);
    if File ~= "CANCEL" then
        Web.LoadURL("Web1", File[1]);
    end
    that should fix it.
    it didnt fix it !!!

  4. #4
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    this doesnt load cancel page but neither any hmtl page !!!

    Code:
    File = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.html)|*.html|(*.htm)|*.htm|", "", "dat", false, false);
    if (File ~= "CANCEL") then else
        Web.LoadURL("Web1", File[1]);
    end

  5. #5
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Quote Originally Posted by screwed over View Post
    Code:
    File = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", false, false);
    if File ~= "CANCEL" then
        Web.LoadURL("Web1", File[1]);
    end
    that should fix it.
    Shouldn't it be

    if File[1] ~= "CANCEL" then


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  6. #6
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    thanks jassing thats it

  7. #7
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Actually, the above examples are wrong, As in doing Dialog.FileBrowse and making the result variable "File". You are overriding a table, So doing File.DoesExsist, or anything else it would fail as you overrided a table created by AutoPlay Media Studio.

  8. #8
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Quote Originally Posted by ShadowUK View Post
    Actually, the above examples are wrong, As in doing Dialog.FileBrowse and making the result variable "File". You are overriding a table, So doing File.DoesExsist, or anything else it would fail as you overrided a table created by AutoPlay Media Studio.
    GOOD CATCH! I'm embarassed that I didn't pick up on it...

    I always use bastardized hungarian notation for my vars.

    cVariable = String/Text
    tVariable = table
    nVariable = number/integer
    bVariable = Logical/boolean

    Ultimately; I find it easier to follow later down the line in a complex script -- and I don't run the risk of doing exactly what you pointed out.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  9. #9
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    I do:
    • sString
    • fFunction
    • bBoolean
    • tTable

    Etc.

  10. #10
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    can u give me a better code than i have ? well i just want to load html and htm files...

  11. #11
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Quote Originally Posted by ShadowUK View Post
    I do:
    • sString
    • fFunction
    • bBoolean
    • tTable

    Etc.
    Same Idea -- with one exception -- for my functions (I'd say better than 90% of them) I "integrate" them into existing objects or create new ones.

    For instance, I have a function that returns just the filename ("file.ext") of a full path name (c:\program files\appdir\file.exe) -- that is called:

    File.NameOnly()

    that, I think, makes it very obvious; for new things; I just create the object itself.

    -josh


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  12. #12
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    Quote Originally Posted by jassing View Post
    Same Idea -- with one exception -- for my functions (I'd say better than 90% of them) I "integrate" them into existing objects or create new ones.

    For instance, I have a function that returns just the filename ("file.ext") of a full path name (c:\program files\appdir\file.exe) -- that is called:

    File.NameOnly()

    that, I think, makes it very obvious; for new things; I just create the object itself.

    -josh
    can u give an example of
    Code:
    File.Nameonly()
    ?

  13. #13
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Quote Originally Posted by jackdaniels View Post
    can u give an example of
    Code:
    File.Nameonly()
    ?
    Code:
    function File.NameOnly( cFile )
      local tFile = String.SplitPath( cFile );
      return tFile.Filename .. tFile.Extension;
    end


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  14. #14
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Or then again :P

    Code:
    01 function File.GetName(sFile) 
    02 	return String.SplitPath(sFile).Filename..String.SplitPath(sFile).Extension 
    03 end

  15. #15
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    And if you really want to take it out all the way... you may include one of these versions of the function into a .lua file say .. called constants.lua and then drag-n-drop it onto the default page, for example, in your AMS project. Then the constants you have in that file are accessible throughout the entire project.
    Intrigued

Similar Threads

  1. FTP cancel error code 31023?
    By troydawsonvw in forum TrueUpdate 2.0
    Replies: 1
    Last Post: 03-24-2007, 03:52 PM
  2. Cancel button
    By Ham in forum AutoPlay Media Studio 6.0
    Replies: 6
    Last Post: 09-25-2006, 01:25 PM
  3. ZipExtract "callback" error
    By Darwin in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 02-21-2005, 06:34 PM
  4. Function: Blowfish Encrypt/Decrypt Strings
    By Lorne in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-31-2004, 03:16 PM
  5. SUF6.0.0.2 -- installer hangs.
    By jassing in forum Setup Factory 6.0
    Replies: 4
    Last Post: 12-19-2001, 11:28 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