I think that yours and Tom's reply contain the key to my suprise. I was referencing the html documentation that was installed with prc-tools and when I go the "special projects" link installed by the cygwin installer, it only contains the top section (the online docs include the subsections on the same page). Something that's frustrating about the installed documentation is that it's divided up into hundreds of independent html files which makes reading related data cumbersome.
I knew that globals weren't available but hadn't forced myself past the frustration about the documentation (combined with the fact I was doing this work at 5am) to read the paragraph that stated that globals were required for different code sections. Obviously I've got some more reading to do. Thanks for the nudge. On Sat, 16 Nov 2002 19:06:30 +0100, John Marshall <[EMAIL PROTECTED]> wrote: > >On Sat, Nov 16, 2002 at 10:08:03AM -0600, Michael Harrison wrote: >> I've recently had to divide my first palm app into two sections and >> was suprised to discover that when I initiate a find (which my app >> supports), my application would crash during a call to a function that >> wasn't in the default section. > >You really should not have been surprised :-). If you know about launch >codes, then you know that many of them do not get global variables. >This really must be one of the top three "Palm OS quirks that aspiring >Palm OS programmers learn very quickly". > >And it's equally well known that access to code sections other than the >main one requires global variables. See for example "Responding to >Other Launch Codes" in the Application Startup and Stop chapter of the >Companion, and also in particular > >http://prc-tools.sf.net/cgi-bin/info/multiple+code+resources+and+global+data > >> If Yes, did you find a solution other than merely making sure that >> your search function only called routines in the default segment? > >That is the standard solution. The other solution is "manually cons up >and initialise global variables yourself for launch codes that don't >give you globals" which isn't a lot of fun, is fragile, and, if you >believe the original Palm OS design decisions, will slow down Find and >such unacceptably in general. > > John > Michael S. Harrison michaelh.dragonseye@com (reverse the dot and at to send email) * The opinions expressed here are those of my iguana * and I never know what he's going to say next. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
