Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!rex!uflorida!gatech!udel!eplrx7!leipold From: leipold@eplrx7.uucp (Walt Leipold) Newsgroups: comp.sys.mac.programmer Subject: Aarrrgggghhhhh... Summary: List Manager vs TextEdit -- the battle of the Titans Message-ID: <1991Jan23.182229.5145@eplrx7.uucp> Date: 23 Jan 91 18:22:29 GMT Sender: usenet@ee.udel.edu Organization: DuPont Engineering Physics Lab Lines: 55 Nntp-Posting-Host: louie.udel.edu An application I'm developing needs a window with two vertically-scrolling 4-column lists of values. The user can alter values in either array of data, use a couple of check boxes to set some options, and then hit a button to process the data in the arrays. It sounds simple, but... 1) I can use the List Manager to display the arrays of text. Heck, anybody can use the List Manager to display arrays of text. But I can't find an easy way to make that text editable. I assign a TERec to the most recently selected cell's rectangle (with due attention to the cell's indent), put the cell's data in the TERec, turn off list updates, update the cell entry on every TEKey, and try to handle tabs, filter out returns, do TEIdle at the right time, handle TEActivate, TEDeactivate, TEUpdate, LUpdate, LActivate, etc -- and it's clear that I'm missing something, because it still doesn't behave properly. There has to be an easier way, but I haven't found it. Any ideas? 2) The List Manager doesn't let me have columns with differing widths. This is no problem, because I can define several one-column lists and send them LScroll messages from a common scrollbar, right? Wrong! Each individual list feels free to scroll itself during LClick() whenever the user moves the mouse out of the list's rView, and I can't find any way to turn this behavior off. My latest try at an lClikLoop was... static pascal Boolean myClick(void) { Point p; GetMouse(&p); if (PtInRect(p,&(**curList).rView)) return true; return false; } but it didn't stop the autoscrolling. I figure I can get around this by installing an lClikLoop in each list that explicitly scrolls every other list that belongs to the scrollbar, but this seems kinda clumsy, y'know? 3) I checked out ModalList.c, a Dialog/List Manager sample application from MacDTS. It turns out that they finesse the whole question, by moving the selected cell's text to a separate field for editing. (Maybe I'm not the only one who thinks this is hard :-). Does anybody have any simple and/or elegant way to get TextEdit and the List Manager working together? Please? (Oh, BTW, I'm using plain vanilla Think C. I can't use TCL or MacApp because this app must also run on Unix boxes under ROMlib, and the Unix boxes have neither MacApp, TCL, nor Think's peculiar brand of C++.) ----------------------------------------------------------------------------- "If you want to read about love and marriage, Walt Leipold you've got to buy two separate books." (leipolw%esvax@dupont.com) ----------------------------------------------------------------------------- -- The UUCP Mailer