Dan,

Sounds like some debugging is in order which, as I’m sure you know, can be a 
little tricky for iOS apps. I would recommend using put statements and/or 
answer dialogs to try and narrow down where the problem lies. Since preOpenCard 
fires but openCard does not, my guess is you’ve got an error occurring at some 
point during preOpenCard, and it’s basically stopping the app in its tracks.

A handy little script I picked up along the way allows you to easily see when 
runtime errors occur in any app, but I find it especially useful for mobile 
apps when testing in the simulator or on a device. I got this from Jacque 
Landman-Gay, who I believe originally got it from Andre Garzia.


        constant kDebug = "answer"

on log pMsg 
    switch kDebug
        case "msg"
            put pMsg & cr
            break
        case "file"
            put pMsg & cr after url ("file:" && the effective filename of this 
stack & ".log")
            break
        case "answer" -- jlg: added
            answer pMsg titled the short name of this card
            break
    end switch
end log

on errorDialog pErr -- catches and reports system errors
    log pErr
end errorDialog


Place this in your stack script. Then set the kDebug constant to whichever 
debug method you prefer. If there’s an error somewhere in preOpenCard, this 
should catch it and help you get started with figuring out the problem

Good luck!

Chris


--
Chris Sheffield
Read Naturally, Inc.
www.readnaturally.com



On Apr 25, 2014, at 12:02 PM, Dan Friedman <[email protected]> wrote:

> I have an mobile project that I've been working on for some time now.  It's 
> already in the app store (and google play) and it's been running fine.  I 
> opened the stack this morning to make some updates, and I find that I have 
> one card that is no longer passing messages.  preOpenCard get's fired, but 
> openCard is not?  Other cards in the same stack work fine.  I don't have lock 
> messages on, or anything else I can think of that would cause this.
> 
> The card works fine in LiveCode, but fails in the simulator and on a real 
> device.
> 
> LC 6.5.2 and 6.6.1
> XCode 5.1.1
> 
> There must be some property or something that got set that I can't think of.  
> I have stepped through the code and I can't find anything.   I even created a 
> new card, and copied the objects and script to the new card, but got the same 
> result.
> 
> Any ideas?
> 
> -Dan
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to