• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. LEARNING LINGO > TROUBLESHOOTING LINGO

TROUBLESHOOTING LINGO

  • Remember that the concept of breaking big problems into smaller ones is the most important aspect of programming. If you get stuck while programming in Lingo, it is likely to be because you have not broken the problem down into small enough pieces. Take a step back and decide how you can break the problem down before continuing.

  • Remember that a local variable is destroyed when a handler is done. The next time that handler begins, it will not have a value. If you want a variable to retain its value, you should use a global or a behavior property variable, which is introduced in Chapter 14, “Creating Behaviors.”

  • Even if you don't plan on using them all, you should familiarize yourself with the different messages and event handlers. You should not try to use an event handler name as a custom handler or a variable name. You should also avoid using any other Lingo syntax as handler names or variable names.

  • Every Lingo programmer eventually runs into the problem of a movie script not working when it should. The code might seem perfect—the Score, Cast, and Stage are all set up as they should be—yet the script acts as if it weren't even there. Sure enough, the simple solution is that the movie script is set to be a behavior script by mistake. Keep this in mind, because it will happen to you one day. To fix it, just use the member's Script Cast Member Properties dialog box to change it to the proper script type.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint