[comp.sys.mac.programmer] List Manager Problem

johnston@dalcsug.UUCP (Bruce Johnston) (12/14/88)

I am a new poster so here goes........

I am trying to create a list that combines text (a file name) and
graphics (simple lines, horizontal and vertical) into one cell of
a list. How can this be done? Do I need to create my own LDEF or
can I use an LDEF from the system resource file? If an LDEF can
be ported from somewhere else, how do I use the LSetCell to
put both graphics and text into one cell?

thanx for any help in advance..

P.S. I haven't got around to creating a signature yet.. sorry

Bruce Johnston

bob@accuvax.nwu.edu (Bob Hablutzel) (12/14/88)

> I am a new poster so here goes........

Welcome

>I am trying to create a list that combines text (a file name) and
>graphics (simple lines, horizontal and vertical) into one cell of
>a list. How can this be done? Do I need to create my own LDEF or
>can I use an LDEF from the system resource file? If an LDEF can
>be ported from somewhere else, how do I use the LSetCell to
>put both graphics and text into one cell?>

You have to create your own LDEF. Read the List Manager chapter carefully,
then just jump right in - the LDEF is one of the simplest types of stand-
alone code.

> P.S. I haven't got around to creating a signature yet.. sorry

> Bruce Johnston

Bob Hablutzel	BOB@NUACC.ACNS.NWU.EDU
Disclaimer:	A .sig file would require learning Unix. I already know
		how to type :-)

oster@dewey.soe.berkeley.edu (David Phillip Oster) (12/21/88)

Here is how you mix text and graphics in a LDEF:
Create a record that has everything the LDEF will need to do the
drawing (for example, it might be a polygon followed by a string.) Just
set the cell to the entire record.  Watch your step if the data needs
to be aligned to word boundaries (because it has integers in it) but
might be odd in length (because it has strings in it.) If this can
happen, you should pad so you always call LSetCell with an even count.
Or, you can set the cell to a pointer to the record.

jct@geowhiz.UUCP (John C. Terranova) (12/24/88)

In article <221@dalcsug.UUCP> johnston@dalcsug.UUCP (Bruce Johnston) writes:
>I am a new poster so here goes........
    Welcome.

>I am trying to create a list that combines text (a file name) and
>graphics (simple lines, horizontal and vertical) into one cell of
>a list. How can this be done? Do I need to create my own LDEF or
>can I use an LDEF from the system resource file?

    Unless you can masquerade your simple lines as text characters (probably
    not) you will need to write your own custom LDEF.  LDEF 0 in the system
    file is for plain text lists only.  Any type of special text formatting
    or graphics requires a custom LDEF.

    IM IV had a chapter on the List Manager and how to write LDEFs.  They
    are not hard to write.  Trust me.  ;-)

>thanx for any help in advance..
    You're quite welcome.

>P.S. I haven't got around to creating a signature yet.. sorry
    You're forgiven . . . this time.

>Bruce Johnston

------------------------------------------------------------------------------
John Terranova     |  What the hell do I know? | I'm not a Computer Science
   CS, BS to be    |  I come from Waunakee!    | undergraduate, but I play
-------------------+---------------------------+ one at school.
ARPA:   jct%geowhiz.uucp@spool.cs.wisc.edu     +------------------------------
BITNET: jct%geowhiz.uucp%spool.cs.wisc.edu@vms3.macc.wisc.edu
------------------------------------------------------------------------------
I once believed in causes, too.  And had my pointless point of view.
    --Billy Joel, "Angry Young Man"

jamesm@sco.COM (James M. Moore) (12/30/88)

Is there a way to use the Lightspeed C debugger to debug custom LDEFs?

-- 
** James Moore **
** Internet:  jamesm@sco.com **
** uucp:  {decvax!microsoft | uunet | ucbvax!ucscc | amd}!sco!jamesm **
** Nil clu no suim ar bith ag SCO ceard a bhfuil me ag scriobh anois. **

siegel@endor.harvard.edu (Rich Siegel) (12/31/88)

In article <1235@viscous> jamesm@sco.COM (James M. Moore) writes:
>Is there a way to use the Lightspeed C debugger to debug custom LDEFs?

	I usually implement custom defprocs by creating a dummy defproc
resource that's only six bytes long, containing $4EF9 0000 0000, and at
program startup, I patch the last four bytes to point at my custom defproc
which is implemented as a procedure in my program.

	It's wise to put the defproc in a segment which will not move
or be purged, e.g.,the main segment.

	It's a good way to debug defprocs...

		--Rich




Rich Siegel
Staff Software Developer
THINK Technologies Division, Symantec Corp.
Internet: siegel@endor.harvard.edu
UUCP: ..harvard!endor!siegel
Phone: (617) 275-4800 x305

Any opinions stated in this article do not necessarily reflect the views
or policies of Symantec Corporation or its employees.

holland@m2.csc.ti.com (Fred Hollander) (01/01/89)

In article <896@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes:
>In article <1235@viscous> jamesm@sco.COM (James M. Moore) writes:
>>Is there a way to use the Lightspeed C debugger to debug custom LDEFs?
>
>	I usually implement custom defprocs by creating a dummy defproc
>resource that's only six bytes long, containing $4EF9 0000 0000, and at
>program startup, I patch the last four bytes to point at my custom defproc
>which is implemented as a procedure in my program.

That sure is a lot easier than building the defproc in a seperate project
and then copying the resource to the application's project.  Thanks for the
tip.  But, don't tell me (it would be too good to be true) that you can
now debug the defproc at source level.

Fred Hollander
Computer Science Center
Texas Instruments, Inc.
holland%ti-csl@csnet-rela

The above statements are my own and not representative of Texas Instruments.

siegel@endor.harvard.edu (Rich Siegel) (01/02/89)

In article <66569@ti-csl.CSNET> holland@m2.UUCP (Fred Hollander) writes:
>tip.  But, don't tell me (it would be too good to be true) that you can
>now debug the defproc at source level.

	In fact, you can. LDEFs are quite easy to debug. Other defprocs
that are event-driven, such as CDEFs and MDEFs, can also be debugged
at the source level. Unfortunately, you can't debug WDEFs at the source level,
because of some tricks that the debugger pulls; however, you can embed
them in your program the same as any other defproc.

		--Rich



Rich Siegel
Staff Software Developer
THINK Technologies Division, Symantec Corp.
Internet: siegel@endor.harvard.edu
UUCP: ..harvard!endor!siegel
Phone: (617) 275-4800 x305

Any opinions stated in this article do not necessarily reflect the views
or policies of Symantec Corporation or its employees.

cyosta@taux01.UUCP (Yossie Silverman) (01/02/89)

In article <900@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes:
.In article <66569@ti-csl.CSNET> holland@m2.UUCP (Fred Hollander) writes:
.>tip.  But, don't tell me (it would be too good to be true) that you can
.>now debug the defproc at source level.
.
.	In fact, you can. LDEFs are quite easy to debug. Other defprocs
.that are event-driven, such as CDEFs and MDEFs, can also be debugged
.at the source level. Unfortunately, you can't debug WDEFs at the source level,
.because of some tricks that the debugger pulls; however, you can embed
.them in your program the same as any other defproc.
.
.		--Rich
.
.
.
.Rich Siegel
.Staff Software Developer
.THINK Technologies Division, Symantec Corp.
.Internet: siegel@endor.harvard.edu
.UUCP: ..harvard!endor!siegel
.Phone: (617) 275-4800 x305
.
.Any opinions stated in this article do not necessarily reflect the views
.or policies of Symantec Corporation or its employees.

I had some horrible problems trying to debug a program with a custom WDEF
included in it (and installed as described in IM-1).  When I moved the WDEF
into a seperate project and compiled it into a code segment of type WDEF
in the first project's resource file, the problems went away.  I experienced
ver noisy system crashes before I did this.  I was running with LSP 1.11 at
the time.  Maybe LSP 2.0 addressed this problem.  I haven't used it yet so
I don't know for sure.


-- 
Yossie Silverman                                   What did the Caspian sea?
National Semiconductor Ltd. (Israel)				- Saki
UUCP: taux01!yossie@nsc.UUCP
NSA LSD FBI KGB PCP CIA MOSAD NUCLEAR MI5 SPY ASSASSINATE SDI -- OOCLAY ITAY

mnkonar@pavo.SRC.Honeywell.COM (Murat N. Konar) (01/04/89)

>I had some horrible problems trying to debug a program with a custom WDEF
>included in it (and installed as described in IM-1).  When I moved the WDEF
>into a seperate project and compiled it into a code segment of type WDEF
>in the first project's resource file, the problems went away.  I experienced
>ver noisy system crashes before I did this.  I was running with LSP 1.11 at
>the time.  Maybe LSP 2.0 addressed this problem.  I haven't used it yet so
>I don't know for sure.

I have observed that you need to turn the Debug option off for the unit that
actually contains the WDEF code.  This was true of LSP 1.11 and I'm pretty
sure it 's also true for LSP 2.0.                   
______________________________________________________________________
Have a day. :^|
Murat N. Konar mnkonar@ely.UUCP
Honeywell Systems & Research Center, Camden, MN

newman@ut-emx.UUCP (Dave Newman) (03/08/89)

A Question about the list manager and modal dialogs.

I am trying to put a scrolling list into a modal dialog;
the problem is that my repeat loop goes 10 or 12 times
and then a system error of some kind occurrs.  MacsBug
says that the program counter is 0 at this point.

My repeat loop looks like this:

repeat
    modalDialog(@listFilter,itemHit);
until itemHit = OK;

The filter proc isn't doing anything because this happens
when I just start the dialog and wait, and it ignores all
but mouseDown and keyDown events.

Alternately, I seem to get an ADDR ERR 00000001.  Does
this mean that I am trying to address something at byte 1?
I'm not sure how many times the repeat loop goes in this
case.

I'm using Turbo Pascal on an SE.  (I know, I should switch
to another language, but ... )

Thanks for any assistance you can give me!

>>Dave
newman@emx.cc.utexas.edu

P.S. Can someone suggest a) a better debugger for use
with Turbo Pascal, and b) why the {D+} compiler directive
doesn't seem to make a damn bit of difference.

tim@hoptoad.uucp (Tim Maroney) (03/09/89)

In article <11032@ut-emx.UUCP> newman@ut-emx.UUCP (David Newman) writes:
>I am trying to put a scrolling list into a modal dialog;
>the problem is that my repeat loop goes 10 or 12 times
>and then a system error of some kind occurrs.  MacsBug
>says that the program counter is 0 at this point.
>
>My repeat loop looks like this:
>
>repeat
>    modalDialog(@listFilter,itemHit);
>until itemHit = OK;
>
>The filter proc isn't doing anything because this happens
>when I just start the dialog and wait, and it ignores all
>but mouseDown and keyDown events.

This code is obviously fine, so it must be something in your listFilter
procedure or in the dialog initialization code.  One thing that springs
to mind is that it's safest to do all list operations (especially LNew)
with the current port set to the owner window of the list.  Maybe if
you post the dialog initialization code and the filter procedure someone
would be able to help you.  I have used lists in modal dialogs many times
and I haven't encountered this problem.

>Alternately, I seem to get an ADDR ERR 00000001.  Does
>this mean that I am trying to address something at byte 1?
>I'm not sure how many times the repeat loop goes in this
>case.

It means you are (or the system is) trying to treat 1 as a word or longword
pointer, violating the 68K alignment requirements.  It wouldn't be surprising
if this were related to your jump to zero problems.  One thing you can do
when you jump to zero is look at the stack to see where you've just come
from in your (or the system's) code.  When you get an address error, look
at the current PC to see where you were trying to use the bad address.
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"Satanic is merely the name they give to the behavior of those who would
 disrupt the orderly way in which men want to live."
    -- Gabrielle, THE VAMPIRE LESTAT, Anne Rice

newman@ut-emx.UUCP (Dave Newman) (03/10/89)

Tim Maroney suggested that I post my list initialization code
and my filter proc to see if they were the problem.  Here they
are.  Tim, I'll try your suggestion tonight.

-------



procedure createList(var theWindow: grafPtr;
                         itemRect: rect;
                         numItems: integer;
                         myStringList: stringListHandle;
                     var itemList : listHandle);
{ code modified from ListTest by RDClark }

const
				notDrawn    = FALSE; 
				noGrow      = FALSE;
				noHScroll   = FALSE;
				vScroll     = TRUE;

var
				dataBounds  : Rect;
				cellSize    : Point;
    firstRow,
    count       : INTEGER;
				name        : Str255;
				theCell     : Cell;
    tempStringList : stringListHandle;
    
begin
   TextFace([]);
   TextSize(12);
   TextFont(0);
   tempStringList := myStringList;

			SetRect(dataBounds, 0, 0, 1, 0);             (* Specify initial 1x0 list*)
			SetPt(cellSize, 0, 0);                       (* calculate the cell size *)

   (* Create an empty item list, 0 rows by 1 column *)
			itemRect.right := itemRect.right - 16;         (* Allow for scroll bars *)
   ItemList := LNew(itemRect,dataBounds,cellSize,0,theWindow,notDrawn,
                    noGrow,noHScroll,vScroll);
   ItemList^^.selFlags := lDoHAutoscroll + lOnlyOne; (* use default options *)
   itemRect.right := itemRect.right + 16;

   (* Fill in the Item list. *)
			firstRow := LAddRow(numItems,0,ItemList);  (* Insert rows *)
			FOR count := 1 TO numItems DO
				begin
					name :=  tempStringList^^.stringData;         (* get item Name *)
     tempStringList := tempStringList^^.next;
					SetPt(theCell, 0, count - 1);              (* select the proper cell *)
					LSetCell(POINTER(ORD(@name)+1),length(name),theCell,itemList); (* fill it *)
				end;
   LDoDraw(true,itemList)
end; (* CreateList *)





    function listFilter(    theDialog : DialogPtr;
                        var theEvent : EventRecord;
                        var item : integer): boolean;
    { modified code from Modal.pas by Scott Knaster; distributed with Turbo }

       const
         crCode = 13; 
         enterCode = 3;
         
       var
          thetype : integer;
          finalTicks : longInt;
          theOkHdl : handle;

       begin
       
          listFilter := false;
          case theEvent.what of
             mouseDown : 
                 begin
                    globalToLocal(theEvent.where);
                    if PtInRect(theEvent.where,textRect) 
                        then selectedItem := doMouseClick(theEvent,theDialog,
                                                          textRect,itemList);
                    localToGlobal(theEvent.where)
                 end;
             keyDown, autoKey :
                 if (theEvent.message mod 256) in [crCode, enterCode]
                     then  {user pressed Return or Enter}
                      begin
                         GetDItem(theDialog,OK,theType,theOkHdl,textRect);
                         HiliteControl(ControlHandle(theOkHdl),OK);
                         Delay(3,finalTicks);
                         listFilter := true;
                         item := OK    {simulate user hitting OK}
                      end
            otherwise {do nothing}
          
          end  {case theEvent.what}
       end; {function listFilter} 

tim@hoptoad.uucp (Tim Maroney) (03/11/89)

In article <11103@ut-emx.UUCP> newman@emx.UUCP (David Newman) writes:
>Tim Maroney suggested that I post my list initialization code
>and my filter proc to see if they were the problem.  Here they
>are.  Tim, I'll try your suggestion tonight.

I think I've found the problem.  I have never been able to get the List
Manager to work with a rectangle of (0, 0, 1, 0) even though it's
recommended in the documentation.  There always needs to be at least one
cell.  I have tried over and over to get it to work with no cells at
the beginning, but it always crashes.  This would seem to be your problem:

>SetRect(dataBounds, 0, 0, 1, 0);             (* Specify initial 1x0 list*)
>
>   (* Create an empty item list, 0 rows by 1 column *)
>   ItemList := LNew(itemRect,dataBounds,cellSize,0,theWindow,notDrawn,
>                    noGrow,noHScroll,vScroll);

Try it with a "SetRect(dataBounds, 0, 0, 1, 1);" and see if it works.
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"Jesus died for somebody's sins, but not mine." -- Patti Smith

newman@ut-emx.UUCP (Dave Newman) (03/11/89)

Well, I tried your initial suggestion regarding the grafPort,
and that wasn't the problem.  However, I went and got Think Pascal
(I had been using Turbo Pascal), and converted my code to run there.
The conversion was not too troublesome, and the superior debugging
environment and error messages enabled me to get things working.

According to LightSpeed, you cant reference a non-global procedure
with the @operator.  That was the main change that I needed to make
to get things running in LightSpeed.  I plan to take it back to Turbo
just for ducks to see if code that works in LightSpeed will still fail
in Turbo.

And, I didn't see the second suggestion (making a 1x1 list rather than 1x0)
until tonight, so that wasn't the problem.  Though if the current
code still does not work in Turbo, I'll give that a try.

Thanks for your assistance.

I hope that this conversation has been of use to someone else as well.

>>Dave

han@Apple.COM (Byron Han, wyl E. coyote ) (03/12/89)

In article <6730@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
>I think I've found the problem.  I have never been able to get the List
>Manager to work with a rectangle of (0, 0, 1, 0) even though it's
>recommended in the documentation.  
> ...
>Try it with a "SetRect(dataBounds, 0, 0, 1, 1);" and see if it works.

Stating that you must create a list via LNew with a nonzero number of
cells is incorrect.  I do it all the time with both standard and custom
LDEF's.
+-----------------------------------------------------------------------------+
| Disclaimer: Apple has no connection with my postings.                       |
+-----------------------------------------------------------------------------+ 
Byron Han, Communications Architect      Cereal, anyone?  :-)  A1!
Apple Computer, Inc.                     -------------------------------------
20525 Mariani Ave, MS27Y                 Internet: han@apple.COM
Cupertino, CA 95014                      UUCP:{sun,voder,nsc,decwrl}!apple!han
--------------------------------------   GENIE: BYRONHAN
ATTnet: 408-974-6450   Applelink: HAN1   CompuServe: 72167,1664
------------------------------------------------------------------------------

tim@hoptoad.uucp (Tim Maroney) (03/13/89)

In article <27153@apple.Apple.COM> han@Apple.COM (Byron Han, wyl E. coyote ) writes:
>In article <6730@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
>>I think I've found the problem.  I have never been able to get the List
>>Manager to work with a rectangle of (0, 0, 1, 0) even though it's
>>recommended in the documentation.  
>> ...
>>Try it with a "SetRect(dataBounds, 0, 0, 1, 1);" and see if it works.
>
>Stating that you must create a list via LNew with a nonzero number of
>cells is incorrect.  I do it all the time with both standard and custom
>LDEF's.

Well, Byron, I've tried to do it time and again, as well as to remove
cells in such a way that none are left in the list.  I get crashes when
I create it with (0, 0, 1, 0), and display anomalies when I remove the
last cell of a list that was created originally with (0, 0, 1, 1).  The
crashes and anomalies go away when I make sure there is always one
cell.  I've done this with both standard LDEF 0 and my own LDEFs, which
I've been writing for years now.
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"Please help support the moratorium on meaningless quotes in .signatures."
  -- Doug Asherman on rec.music.cd

oster@dewey.soe.berkeley.edu (David Phillip Oster) (03/13/89)

In article <6756@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
_>>In article <27153@apple.Apple.COM> han@Apple.COM (Byron Han) writes:
_>>>In article <6730@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
_>>>>I think I've found the problem.  I have never been able to get the List
_>>>>Manager to work with a rectangle of (0, 0, 1, 0) even though it's
_>>>>recommended in the documentation.  
_>>>> ...
_>>>>Try it with a "SetRect(dataBounds, 0, 0, 1, 1);" and see if it works.
_>>>
_>>>Stating that you must create a list via LNew with a nonzero number of
_>>>cells is incorrect.  I do it all the time with both standard and custom
_>>>LDEF's.
_>>
_>>Well, Byron, I've tried to do it time and again, as well as to remove
_>>cells in such a way that none are left in the list.  I get crashes when
_>>I create it with (0, 0, 1, 0), and display anomalies when I remove the
_>>last cell of a list that was created originally with (0, 0, 1, 1).  The
_>>crashes and anomalies go away when I make sure there is always one cell.

I don't understand what your problem is. I've been doing it Byron's way
for years, and he is absolutely right. It works just fine.

amanda@lts.UUCP (Amanda Walker) (03/14/89)

tim@hoptoad.UUCP (Tim Maroney) writes:
    In article <27153@apple.Apple.COM> han@Apple.COM
	(Byron Han, wyl E. coyote ) writes:
    >Stating that you must create a list via LNew with a nonzero number of
    >cells is incorrect.  I do it all the time with both standard and custom
    >LDEF's.
    
    Well, Byron, I've tried to do it time and again, as well as to remove
    cells in such a way that none are left in the list.  I get crashes when
    I create it with (0, 0, 1, 0), and display anomalies when I remove the
    last cell of a list that was created originally with (0, 0, 1, 1).  The
    crashes and anomalies go away when I make sure there is always one
    cell.  I've done this with both standard LDEF 0 and my own LDEFs, which
    I've been writing for years now.

Well, Tim, it must be you :-).  Like Byron, I've never had a problem, either
with the standard LDEF or with my own.  Here is a real live code fragment
(MPW C 3.0) from the program I am running on my Mac at this very moment:

    SetRect(&dataBounds,0,0,1,0);
    cSize.h = tempRect.right - tempRect.left;
    cSize.v = 16;
    localfiles = lnew(&tempRect,&dataBounds,&cSize,128,userftpdlog,1,0,0,1);
    LDoDraw(1, localfiles);

Perhaps if you could post a small piece of code that would duplicate the
crash, it might shed some light on the difficulty you're having...

-- 
Amanda Walker, InterCon Systems Corporation
amanda@lts.UUCP / ...!uunet!lts!amanda / 703.435.8170
--
C combines the flexibility of assembler with the power of assembler.

snow@dinl.uucp (john snow) (03/15/89)

	With the current interest in List Manager problems I thought I
would check my system out to see how it worked.  Well, it doesn't.  Based
on some previously posted code, I tried the following:

init_process();		/* do all the initialization */
make_window();
	
SetRect (&Bounds, 0, 0, 1, 0);	/* Specify initial 1x0 list*/
SetPt (&cSize, 0, 0);		/* calculate the cell cSize */
View.right -= 16;		/* Allow for scroll bars */
hList = LNew (&View, &Bounds, &cSize, 0, myWindow, FALSE, FALSE, FALSE, TRUE);
View.right += 16;
(**hList).selFlags = lDoHAutoscroll + lOnlyOne;
LAddRow(10,0,hList);		/* Insert rows */

for (x = 0; x < 10; x++)	{
	SetPt (&Where, 0, x);              /* select the cell */
	LSetCell (Msgs[x], strlen(Msgs[x]), &Where, hList);
}
LDoDraw (TRUE, hList);
	
Nothing crashes, and I do get the scroll bar, but nothing else is displayed.
If I go back with LGetCell after LSetCell, it says there is nothing there.
Msgs is an array of strings, and it doesn't matter what size the initial
list is set for.  Whats going on here???

	John Snow

han@Apple.COM (Byron Han, wyl E. coyote ) (03/16/89)

In article <855@dinl.mmc.UUCP> snow@dinl.uucp (john snow) writes:
>
>	With the current interest in List Manager problems I thought I
>would check my system out to see how it worked.  Well, it doesn't.  Based
>on some previously posted code, I tried the following:
>	
>SetRect (&Bounds, 0, 0, 1, 0);	/* Specify initial 1x0 list*/
>SetPt (&cSize, 0, 0);		/* calculate the cell cSize */
>View.right -= 16;		/* Allow for scroll bars */

What is View initialized to?  right now view consists of
(garbage, garbage, garbage, garbage-16)  Or am I just confused?

>hList = LNew (&View, &Bounds, &cSize, 0, myWindow, FALSE, FALSE, FALSE, TRUE);

Which compiler are you using?  MPW C 3.0 wants the point for cSize to be passed
as is, rather than via &cSize.

>View.right += 16;
>(**hList).selFlags = lDoHAutoscroll + lOnlyOne;
>LAddRow(10,0,hList);		/* Insert rows */

You might want to check the returned value from LAddRow.

>
>for (x = 0; x < 10; x++)	{
>	SetPt (&Where, 0, x);              /* select the cell */
>	LSetCell (Msgs[x], strlen(Msgs[x]), &Where, hList);

Once again, some compilers (MPW C 3.0 for instance) want Where passed
in without the &.

>}
>LDoDraw (TRUE, hList);

You should have done a LDoDraw(FALSE, hList) prior to LAddRow if you are
trying to avoid flicker when adding rows.

You also need to explicitly generate an update event for the list area to force
a redraw.

>Nothing crashes, and I do get the scroll bar, 

This is because controls when created are drawn immediately (unless they are
invisible of course)

>but nothing else is displayed.
>If I go back with LGetCell after LSetCell, it says there is nothing there.
>Msgs is an array of strings, and it doesn't matter what size the initial
>list is set for.  Whats going on here???

+-----------------------------------------------------------------------------+
| Disclaimer: Apple has no connection with my postings.                       |
+-----------------------------------------------------------------------------+ 
Byron Han, Communications Architect      Cereal, anyone?  :-)  A1!
Apple Computer, Inc.                     -------------------------------------
20525 Mariani Ave, MS27Y                 Internet: han@apple.COM
Cupertino, CA 95014                      UUCP:{sun,voder,nsc,decwrl}!apple!han
--------------------------------------   GENIE: BYRONHAN
ATTnet: 408-974-6450   Applelink: HAN1   CompuServe: 72167,1664
------------------------------------------------------------------------------

tim@hoptoad.uucp (Tim Maroney) (03/16/89)

In article <936@lts.UUCP> amanda@lts.UUCP (Amanda Walker) writes:
>Well, Tim, it must be you :-).  Like Byron, I've never had a problem, either
>with the standard LDEF or with my own.  Here is a real live code fragment
>(MPW C 3.0) from the program I am running on my Mac at this very moment:
>
>    SetRect(&dataBounds,0,0,1,0);
>    cSize.h = tempRect.right - tempRect.left;
>    cSize.v = 16;
>    localfiles = lnew(&tempRect,&dataBounds,&cSize,128,userftpdlog,1,0,0,1);
>    LDoDraw(1, localfiles);

This doesn't add anything to the list or try to take away anything that
was added....
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"I am convinced that cross-posting is an evil Satanic plot."
    -- Eugene Miya on soc.net-people, misc.headlines, misc.kids, misc.misc,
		      news.misc, and soc.misc