[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems writing an NDA



>From: vandry@CAM.ORG (Phillip Vandry)
>Subject: Problems writing an NDA
 
>This is my first desktop program
 
Your first desktop program should probably be an application, as there is less
to worry about.
 
 
> How does an NDA go about obtaining it's own UserID? EXEs get it from the
>   accumulator and S16s from _MMStartUp, but how do DAs do it?
 
Just call _MMStartUp. MMStartUp can be thought of WhatIsMyID. The memory
manager is always started up anyway. This is documented in one of the DA
technotes. You can call MMStartUp multiple times with no harm.
 
> My NDA creates a _NewModelessDialog. Currently there are no items in the
>   dialog. The problem is that if the window gets opened while there is a
>   pending update event for another window, the update only executes after
>   the modeless dialog is closed. Is this normal? If so, I don't like it.
>   I tried to follow the code more or less exactly from someone else's NDA
>   for which I have the soure code. The only difference is that the other
>   NDA calls NewWindow, not NewModelessDialog, but what's the difference.
>   And this other NDA works well (the pending update runs immediately)
 
I've never used NewModelessDialog, but opening windows in an NDA is a bit
tricky. You have to call SetSysWindow on the window, and if you want multiple
windows, you have to fill out an AuxWindowInfo record, new in System 6. Modal
alerts don't count, but I imagine modeless ones would.
 
Be sure to read technotes:
 
 *R* 53    Desk Accessories and Tools                             5/92
 *R* 71    DA Tips and Techniques                                 5/92
 
  --Jay, jay.krell@cornell.edu