Article View: comp.sys.mac.oop.macapp3
Article #162Re: TDialogView in Ad Lib
From: Kent Sandvik
Date: Wed, 16 Dec 1992 02:03
Date: Wed, 16 Dec 1992 02:03
61 lines
2538 bytes
2538 bytes
In article <724462717.0501359@AppleLink.Apple.COM>,
BARBOSE@AppleLink.Apple.COM (Amoco Technology, Jeff Barbose,VAR) wrote:
>
> Ken,
>
> In the attribs window, make a window a Dialog by clicking the radiobutton
> "Dialog".
>
> This doesn't make it a TDialogView, but rather adds a TDialogBehavior to the
> window's/view's behavior lists.
>
> Voila! Instant dialog.
Are we talking about Ad Lib, or ViewEdit 3.0? Nota bene, MacApp 3.0.1 won't
add in any TDialogBehaviors when creating TDialowViews inside the window.
This is documented in MacApp 3.0.1 Bug Doc (the non Doc Viewer document).
The workaround is (for the N time):
----
1. Problem with displaying dialogs, especially if created
with ViewEdit.
A drawback in ViewEdit 3.0.1 is that it does not provide
for behaviors and TDialogBehaviors in particular to be
specified. A work around for TDialogBehaviors is to fix
the bug in TWindow::PoseModally() that causes what would
otherwise be the automagic creation of the
TDialogBehavior not to take effect. If the following
lines in PoseModally
TDialogBehavior* itsDialogBehavior = this-
>GetDialogBehavior();
IDType result = kNoIdentifier;
this->Open();
this->Select();
are changed to
TDialogBehavior* itsDialogBehavior;
IDType result = kNoIdentifier;
this->Open();
this->Select();
itsDialogBehavior = this->GetDialogBehavior();
then the automagically created behavior is correctly
assigned to the window and functions correctly.
Alternate ways that you can get a behavior into a view
resource are to
- DeRez an existing view or create the view with Rez
initially; then specify a dialog behavior in the Rez text
format; then re-Rez, or
- create your TDialogBehavior or entire dialog
procedurally.
----
Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
Technical Details
Message-ID:
<ksand-151292175325@wintermute.apple.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!apple!mumbo.apple.com!gallant.apple.com!wintermute.apple.com!userReferences:
<724462717.0501359@AppleLink.Apple.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.oop.macapp3 Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!apple!mumbo.apple.com!gallant.apple.com!wintermute.apple.com!user From: ksand@apple.com (Kent Sandvik ) Subject: Re: TDialogView in Ad Lib Sender: news@gallant.apple.com Message-ID: <ksand-151292175325@wintermute.apple.com> Date: Wed, 16 Dec 1992 02:03:02 GMT References: <724462717.0501359@AppleLink.Apple.COM> Organization: (Evil Eye Creature from Mars, Inc.) Followup-To: comp.sys.mac.oop.macapp3 Lines: 61