Article # 490, added by Geoworks, historical record
| first | previous | index | next | last |

What parts of Swat should I learn first?



Q. Swat is rather daunting to learn. What parts should I learn first?

A. My best suggestion for Swat is to check out the Tutorial book. It not
   only shows the basics of writing an application, but also how to debug
   one.

   Other things that are helpful to know:
   1) If your application crashes upon launching, then simply running it
      from Swat may give you a Death due to ... and explanations will tell
      you what is wrong.

   2) backtrace can give you an idea of what objects and methods the
      problem is in.

   3) GENTREE and VISTREE will display the object tree for you

   4) PGEN (and most other P... commands) is good for printing out the
      contents of a generic object. "pgen GI_link" can be used to see
      what the object is linked to (or what the link value is).

   5) SRCWIN will open a window to display any source code (when it is
      available).

   6) SSTEP (and ISTEP) can be quite usefull. You can even step through
      the kernel if you want to look at assembly.

   7) Set break points with BRK and STOP IN

   8) Use FRAME to check different methods/routines in the stack frame
      (show with a backtrace).

   9) MWATCH and OBJWATCH are very useful for watching messages