problem with "launch" in a standalone

Phil Davis revdev at pdslabs.net
Tue Nov 26 05:10:48 CET 2013


Oops. it's a standalone. Try 'answer tFilePath' or some other display 
method instead of using the breakpoint.

Phil


On 11/25/13, 8:08 PM, Phil Davis wrote:
> Hi Peter,
>
> Have you tried putting a breakpoint at your "launch" line so you can 
> see what's in the tFilePath variable? It may not contain what you 
> think. At least that's how it sometimes works for me.
>
> Phil Davis
>
>
>
> On 11/25/13, 7:10 PM, Peter M. Brigham wrote:
>> So I have a handler that runs fine in the IDE, and even when I 
>> suspend the development tools it runs fine, but when I build the 
>> standalone it fails. The idea is to be able to store the locations of 
>> images and display them in the default image app when they are chosen 
>> from a pop-up list. In the standalone, when I select the name of the 
>> image from the pop-up, nothing happens.
>>
>> The script of my pop-up button includes the following (see the bottom 
>> section for where the problem lies):
>>
>> on menuPick u
>>     -- each card has a property storedImages
>>     -- which is an array of one or more images and info
>>     -- if <uTitle> is the title of the image, then
>>     --    each storedImages[<uTitle>] is an array:
>>     -- storedImages[<uTitle>]["uImage"] is an image
>>     -- storedImages[<uTitle>]["uFilepath"] is the location of the 
>> image file
>>     -- storedImages[<tTitle>]["uExtension"] is the file extension 
>> (file type) -- jpg, png, pdf, etc.
>>         put the shiftkey is down into deleting
>>     switch
>>        case u contains "store"
>>           answer file "Choose your image:"
>>           if it = empty then exit to top
>>           put it into tPath
>>           importImage tPath
>>           break
>>        default
>>           -- an image title was selected
>>           put the storedImages of this card into rImages
>>           if deleting then
>>             …  <snip> ..
>>           else -- display image
>>
>>              ******** this is the part that isn't working: ********
>>
>>              put rImages[u]["uImage"] into tImage
>>              put rImages[u]["uFilepath"] into tFilepath
>>              put lastThing(tFilepath,"/") into shortFileName
>>              if there is a file (tFilepath) then
>>                 launch document tFilepath
>>                 if the result <> empty then
>>                    answer the result as sheet
>>                 end if
>>              else…
>>                    <snip>
>>
>> The fact that I don't get an error answer dialog means that the 
>> launch command is not returning any indication of a problem. Any 
>> suggestions? 2008 MacBook, OSX 10.7.4 (Lion), Rev Studio 5.5.1, build 
>> 1487. Yes, I'm still running an older version of LC.
>>
>> -- Peter
>>
>> Peter M. Brigham
>> pmbrig at gmail.com
>> http://home.comcast.net/~pmbrig
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>

-- 
Phil Davis




More information about the use-livecode mailing list