andrew@comp.vuw.ac.nz (Andrew Vignaux) (01/19/88)
I have a few questions about the "File Manager" and "List Manager"
sections of IM4.
File Manager
IM4 says that the directory ID of the root of a volume has dirID==2 with
the name of the directory the same as the name of the volume. However,
when playing around, I found the parent dirID of the root seems to have a
dirID==1. This means I can write a "climb_directory_tree" routine like:
if (/* I am running HFS */)
dir = 0L;
while (dir != 1L) {
di.ioNamePtr = (StringPtr) name;
di.ioVRefNum = vol;
di.ioFDirIndex = -1;
di.ioDrDirID = dir;
PBGetCatInfo (&di, False);
/* do something -- like prepending the name onto a path */
dir = di.ioDrParID;
}
where "vol" can be a volume ref number or a WD num (e.g. sf_reply.vRefNum).
This means I don't need to do a separate HGetVInfo or muck around with
special cases with VRefNums.
Is the dirID==1 mentioned in IM4-"File Manager"? Can I use it safely if it
is not mentioned (I am only using it as the stopping condition)? Is there
anything wrong with using GetCatInfo() like this?
List Manager
I have had a few problems convincing the list manager to do what I want.
I would like to set up a window (with grow, zoom, go-away) which contains a
single (1 column wide) list -- I do not want a horizontal scroll bar. Is
there some marvelous combination of flags (what does hasGrow do?) that I can
pass to NewList(), to give me the vertical scroll bar with the list either
* using the horizontal scroll bar area (preferred!)
* not using the horizontal scroll bar area and NOT UPDATING IT!
Secondly, when I grow the window, the List Manager trys to scroll the list
so that no undefined cells are shown. However because the update is
redrawn inside BeginUpdate() / EndUpdate() the screen is not redrawn
correctly.
Finally, I am passing a string, which is stored in the cell's data, to
DrawString() inside my LDEF. Do I need to lock the "cells" handle or will
DrawString() invalidate its argument by moving or purging handles.
- Andrew
I've certainly never come across any irreversible mathematics involving sofas.
------------------------------------------------------------------------------
Domain address: andrew@comp.vuw.ac.nz Path address: ...!uunet!vuwcomp!andrew