[comp.sys.mac.programmer] When to draw rect around List in DLOG

jas@cadre.dsl.PITTSBURGH.EDU (Jeffrey A. Sullivan) (03/29/88)

I am maintaining a List (ala list manager) in a dialog using TransSkel.  The
list does not have arectangle around it, so you have to draw one in.  The
question is :  When exactly should I be drawing it in?  During updateEvent,
ActivateEvent, before calling the SkelDialog procedure, or what?

jas
-- 
..........................................................................
Jeffrey Sullivan			  | University of Pittsburgh
jas@cadre.dsl.pittsburgh.edu		  | Intelligent Systems Studies Program
jasper@PittVMS.BITNET, jasst3@cisunx.UUCP | Graduate Student

dwb@Apple.COM (David W. Berry) (03/30/88)

In article <1101@cadre.dsl.PITTSBURGH.EDU> jas@cadre.dsl.PITTSBURGH.EDU (Jeffrey A. Sullivan) writes:
>I am maintaining a List (ala list manager) in a dialog using TransSkel.  The
>list does not have arectangle around it, so you have to draw one in.  The
>question is :  When exactly should I be drawing it in?  During updateEvent,
>ActivateEvent, before calling the SkelDialog procedure, or what?
	The way I prefer to do it is to define a UserProc which handles
drawing the dialog.  That way I'm sure that anytime it needs to be drawn
it will be.  The proc need do little more than:

pascal void UserProc(dlog, item)
DialogPtr	dlog;
short		item;
{
	Rect	rect;

	GetDItem(dlog, item, &type, &hand, &rect);
	LUpdate(whatever it's args are);
	FrameRect(&rect);
}
>
>jas
>-- 
>..........................................................................
>Jeffrey Sullivan			  | University of Pittsburgh
>jas@cadre.dsl.pittsburgh.edu		  | Intelligent Systems Studies Program
>jasper@PittVMS.BITNET, jasst3@cisunx.UUCP | Graduate Student


-- 
David W. Berry
dwb@Delphi	dwb@apple.com	973-5168@408.MaBell
Disclaimer: Apple doesn't even know I have an opinion and certainly
	wouldn't want if they did.

joachim@iravcl.ira.uka.de (03/31/88)

In article <1101@cadre.dsl.PITTSBURGH.EDU>, jas@cadre.dsl.PITTSBURGH.EDU (Jeffrey A. Sullivan) writes:
> I am maintaining a List (ala list manager) in a dialog using TransSkel.  The
> list does not have arectangle around it, so you have to draw one in.  The
> question is :  When exactly should I be drawing it in?  During updateEvent,
> ActivateEvent, before calling the SkelDialog procedure, or what?
> 
I think the best solution is to define a custom control. This way you'll
get any events you need without messing up your code, as a UserItem would.

Joachim Lindenberg, University of Karlsruhe
Federal Republic of Germany - West Germany.