HDTenEightyP/NetNews huggingface dataset:
From: rudolph@unixg.ubc.ca (Christopher E Rudolph)
Newsgroups: comp.sys.mac.programmer
Subject: How to fade the entire screen to black?
Date: 8 Jan 93 21:03:14 GMT
Organization: The University of British Columbia
NNTP-Posting-Host: unixg.ubc.ca
Summary: Does anyone know how to fade the entire screen to black?
Keywords: fade screen quickdraw graphics whatever


Hello,

What I want to do is fade my screen from its normal look to completely
black.  Similar to moving the dimmness control on the monitor to dark.

Does anyone know of sample code or could you hint me in the proper
direction I should take.

thanks in advance,

Chris Rudolph (ComputerScience, UBC) <rudolph@unixg.ubc.ca>
=---------------------------------------------------------=
From: rla20@duts.ccc.amdahl.com (Roger Allen)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Newbie TCL question on mouse clicks
Date: 12 Jan 93 00:34:13 GMT
Reply-To: rla20@DUTS.ccc.amdahl.com (Roger Allen)
Distribution: usa
Organization: Amdahl Corporation, Sunnyvale CA

In article <1isahqINN6ie@jumbo.read.tasc.com> dstrout@sun.rest.tasc.com writes:
>
>That works fine.  Every new doc has "Hello world" in it.  But when I move  
>those same lines to the DoClick method, (Idea being draw it only after I  
>click in the window) nothing happens.  In fact, if I put SysBeep(1) in the  
>DoClick(), It doesn't beep.  What else do I need to do?
>

I think you just need to tell that Pane to respond to mouse down events.
I think the method is called GetClicks or something like that.

Roger
--
> Roger Allen                   | Opinions expressed by me do not        <
> Amdahl Computer Development   | represent the opinions of Amdahl.      <
> rla20@cd.amdahl.com           |                                        <
From: aksguest@engrhub.ucsb.edu (Leonard Cuff)
Newsgroups: comp.sys.mac.programmer
Subject: Porting Visual Basic to QuickBasic SUMMARY
Date: 12 Jan 93 16:46:42 GMT
Organization: University of California, Santa Barbara

I received only one reply to my query about the difference between
Visual Basic and QuickBasic.  Here it is (Thanks Ralph):

The underlying language of Visual Basic is very similar to QuickBASIC,
since, as you say, they are both Microsoft products. That's where the
similarity ends, though. A Visual Basic application consists of forms
and controls, each of which may have some BASIC-like code attached to
it. A QuickBASIC program, on the other hand, is simply a textual
listing of code.

To port from Visual Basic to Macintosh QuickBASIC, you'll have to
write QB code to produce the forms (windows) and controls (buttons,
edit fields, etc) by hand. This is rather tedious compared to the
Visual BASIC approach!

An alternative may be to port from Visual Basic to HyperCard. The
underlying language of HyperCard (HyperTalk) is not quite the same
as BASIC, but is easy to learn anyway. The advantage of this approach
is that you program HyperCard in almost the same way as Visual
Basic: you interactively "draw" buttons, text fields, etc on cards,
and then attach code ("scripts") to these objects.

In fact, Visual Basic is nothing more than HyperCard using a
different underlying language and a compiled, rather than interpreted
environment. Apple came out with HyperCard 5 years ago!


(from Ralph Gonzales)
Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: Re: List Manager help wanted
Organization: Curtin University of Technology
Date: Thu, 7 Jan 1993 13:37:40 GMT

Sproul@sproul.sproul.com (Mark Sproul) writes:


>In article <1993Jan4.061905.14455@midway.uchicago.edu> (comp.sys.mac.programmer), hd12@ellis.uchicago.edu writes:
>> I like to creat a list containing file names, size, date etc. Each entry
>> should be in a single cell. After I put file name in the cell using
>> LSetCell, I have to add size, date etc. in the same cell. Although I can
>> use LAddToCell to do that but that will make the size field not aligned
>> vertically. Anyone know an elegent way to handle this? Thank you very much.

>To do what you want, first BEFORE creating the list, set the font
>for that list to Monoco.  This will set it to a mono-space font. 
>Any other monospace font will work as well.

That will work, but you can write your own LDEF to display any
information in any format you like.  An LDEF is probably the simplest
proc code you can write.  You can get some pascal sample LDEF code
with my Talk source code on
sumex-aim.stanford.edu:/info-mac/source/pascal.  There is probably some
sample code on ftp.apple.com:/dts/mac/sc somewhere.

The normal technique is to store a record/struct of the information you
want and then write an LDEF proc to display it.

Good luck,
   Peter.
-- 
_______________________________________________________________________
Peter N Lewis <peter@ncrpda.curtin.edu.au>           Ph: +61 9 368 2055
Newsgroups: comp.sys.mac.programmer
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Re: How to do multiple mod keys for menu command?
Organization: Integrated Systems Laboratory, ETH, Zurich
Date: Tue, 5 Jan 1993 17:02:28 GMT

In article <1993Jan5.102120.6400@kth.se>, d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
> Nntp-Posting-Host: dront.nada.kth.se

> In <C0DG2y.B2x@gpu.utcs.utoronto.ca> farm@gpu.utcs.utoronto.ca (B. Munroe) writes:

>>shift-command-P for another function (and have the nice little up arrow
>>appear beside the pretzel in my menu)?

>>Sorry to waste the bandwidth on such a simple question but I've up and
>>down IM to no avail.

> It's simple. Just write your own MDEF. Yes, I know, a pain,
> but that's the only way. (And you can't rely on MenuKey to
> do the right thing anymore)

There is a somewhat easier way: Get the Mercutio MDEF by Ramon Felciano,
available by ftp from sumex-aim.stanford.edu:info-mac/util/mercutio-11.hqx,
which is supposed to support that.

Matthias

-----
Matthias Neeracher                                      neeri@iis.ethz.ch
 `We say "gestalt" when things combine to act in ways we can't explain'
                             -- Marvin Minsky, _The Society Of Mind_
Newsgroups: comp.sys.mac.programmer
From: keith@taligent.com (Keith Rollin)
Subject: Re: moof?
Followup-To: comp.sys.mac.programmer
Organization: Taligent
Date: Fri, 8 Jan 1993 20:17:41 GMT

In article <1993Jan8.174640.15979@netcom.com>, bskendig@netcom.com (Brian
Kendig) wrote:
> 
> positron@quip.eecs.umich.edu (Jonathan Haas) writes:
> >d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
> >>
> >>He's dead, guys, dead. He died with a re-structuring of DTS
> >>last year. Sorry to break the news.
> >
> >They killed Clarus the Dogcow? Nooooo! :)
> 
> Bah, these rumors of Clarus's death are as silly as those rumors of
> Elvis's death.  The dogcow is still alive, and she visits me
> sometimes.  I brought her to MacWorld Expo yesterday, and she'll be
> there again with me tomorrow, so keep your eyes open.

Obviously an imposter. Clarus is male, despite the fact that cows are
female. There is anatomical proof if you bring up the Page Setup/Options
dialog and select the Flip Horizontal button. I don't know who was visiting
you (possibly his love child?)

-----
Keith Rollin
Phantom Programmer
Taligent, Inc.
From: ngse18@castle.ed.ac.uk (J R Evans)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sozobon (or other free C's): would this strategy work?
Date: 8 Jan 93 13:22:01 GMT
Distribution: comp
Organization: Edinburgh University

brad@wendel.jpl.nasa.gov (Brad Pickering) has offered a further, very
encouraging note to this thread.  I will try again to contact him by
email (Brad -- did you get the note I sent?).  Brad had previously 
remarked (<BRAD.92Dec29112739@tazboy.jpl.nasa.gov>):

> So far I have been able to run some very simple
> programs like 'echo' and 'cp'.  I still have lots of problems with
> more complicated programs like 'sh'.  I am especially having difficulty
> with the fork calls.  

which left me with the impression that his project had a long way to go.
However his comments this week (<BRAD.93Jan7094517@wendel.jpl.nasa.gov>)
suggest that he has made much better progress:

>So far I have Sozobon C running on my mac under my TOS emulator. It
>is able to produce atari programs that can run under the emulator (or
>a real atari I assume).  I haven't built any mac programs yet
>because I have to port over a few more tools from my unix environment.

Brad isn't specific, but I assume from this that his emulator is
*exactly* as he describes it -- an emulator for TOS, the component
of the Atari ROMs which support an MS-DOS-like basic I/O system, and
Eric Smith's multi-tasking modifications (Mint).  Well done, Brad!
[He doesn't say, but I assume that he has made no attempt to emulate
the ST's GUI, GEM.  That would be a very hard task.]  As he implies,
it means that a lot of tools and CLI based applications -- most of them
previously ported from Unix or DOS -- can also be easily transported.

The point of this message is to say that I had not included such a
step in my proposal, simply because it is not essential to the process
of transferring Sozobon (or whatever) to the Mac.  This does not mean
that it is anything other than a valuable development in its own right.
A TOS-like environment plus command shell provides a potential substitute
for MPW or Think C (admittedly very different from either!).  

It appears that Brad has been looking at the pros and cons of this from
much the same viewpoint as myself.  Eric Sink and Jon Witte have
already pointed out to me that Toolbox callbacks present a problem to an
unmodified compiler, and will require the programmer to provide a little
help in the interfacing, but I agree with Brad, that this is a small
price to pay for a functional small C compiler.  There is still much
work to be done in getting even a small library to support the Mac
Toolbox, but it sounds as if Brad's efforts are an excellent platform
to build from, and I will be offering to help to the extent I can.
Hopefully, at some point in this, we may be able to bring into play
the work that Eric has contributed with the Harvest C linker, and Stan
Shebs' efforts with gcc.  This is looking most hopeful.

Russ
Newsgroups: comp.sys.mac.programmer
From: mike@uunet!tellab5!odgate (Mike J. Kelly)
Subject: Wierd MPW Link error
Organization: Odesta Corporation
Distribution: comp
Date: Tue, 5 Jan 1993 21:52:27 GMT

While linking a large program divided into multiple libraries, I am
getting the following error message:

Link: Error: Computed Ref ids not in same segment.  (Error 45) feselctl_is_feselctl_vact_armed (988)
<Bad object file or compiler error.>

This program was compiling OK before I added the symbol named to one of the
libraries it is reading.  Recompiling the file containing the symbol named
and re-lib'ing the library does not solve the problem.

Does anyone know what this means and how to work around it?

Thanks.
From: d88-jwa@mavros.nada.kth.se (Jon Wtte)
Newsgroups: comp.windows.ms.programmer,comp.sys.mac.programmer
Subject: Re: MS Windows API for the MAC?
Date: 7 Jan 93 14:41:33 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1993Jan6.195836.6150@news.columbia.edu> emt1@cunixf.cc.columbia.edu (Eduardo Miguel Thieberger) writes:

>Unix.  Is there anything like this for the Apple Macintosh?  I.e., a library
>for the Mac that provides the MS Windows function calls and converts these
>into the appropriate calls for displaying on a Mac.

I have heard of none. However, there is a library that implements
a lot of the Mac's functionality for MS Windows; it was used to
port the application "Painter."

Cheers,

						/ h+
-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  "It was, in fact, cool as all get-out.  Fortunately it was a little
   too late (historically speaking) to be groovy."
                     -- Dennis Pelton
From: d88-jwa@mavros.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: different font in a listbox?
Date: 7 Jan 93 13:18:20 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

>>>Is it possible to change the font and its alignment of a listbox?
                                     ^^^^^^^^^^^^^^^^^
>> ListBoxes, but Yes. All you have to do is to write your
>> own LDEF; that's a very simple task.

>Actually, you don't even need to write your own LDEF.  I made a Help Module in
>Pascal for an accounting program I was working on.  I used STR# resources for


Yes you do. Several people have pointed out that the List Manager
uses the current font & size in the port at the time of creation,
but it does not do ALIGNMENT of cells, which was asked for.

Writing an LDEF is easy and fun.

Cheers,

						/ h+
-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  "It was, in fact, cool as all get-out.  Fortunately it was a little
   too late (historically speaking) to be groovy."
                     -- Dennis Pelton
Newsgroups: comp.sys.mac.programmer
From: freek@phil.ruu.nl (Freek Wiedijk)
Subject: Re: Why the Piracy? Here's why...
Organization: Department of Philosophy, University of Utrecht, The Netherlands
Date: Thu, 7 Jan 1993 08:54:19 GMT

kurisuto@chopin.udel.edu (Sean J. Crist) writes:
>A piece of
>software costs the same amount to develop regardless of how many people
>buy it.

A piece of software costs _less_ to develop if more people
buy it, because in that case there are more willing beta
testers for it.

Freek
--
Third theory of Phenomenal Dynamics:  The difference between
a symbol and an object is quantitative, not qualitative.
Newsgroups: comp.sys.mac.programmer
From: Michael.Kohne@launchpad.unc.edu (Michael Kohne)
Subject: Fast copies from offscreen buffer to screen.
Organization: University of North Carolina Extended Bulletin Board Service
Date: Sun, 10 Jan 1993 03:18:29 GMT

I am currently involved with a friend of mine in writing a game. The
intent is for the game to be in full-color, and so we need a fast way to 
copy large off-screen pixmaps to the screen. We've tried using copybits
(making sure to setup the offscreen ports with the same color table and
ctseed as the screen), but that has proven too slow for our uses. I've had
a go at writing my own fixed-depth copybits, but I've not yet found a way
to get it much faster than copybits is (on small images, my overhead is
so much lower that I beat copybits by a mile, but on screen-sized images
my stuff is only slightly better than copybits).

Any hints on how to do this in a faster manner would be appreciated. 

Currently we are considering a 'dirty-rectangles' system, however, it is
likely that most of the screen will change on each frame (lots of moving
objects.) I know this sort of thing IS possible, I own hellcats over the 
pacific and it looks like it's updating the whole screen each frame.

Michael Kohne
House of the Techno-Discordians, Automotive Amusements Division

--
   The opinions expressed are not necessarily those of the University of
     North Carolina at Chapel Hill, the Campus Office for Information
        Technology, or the Experimental Bulletin Board Service.
           internet:  laUNChpad.unc.edu or 152.2.22.80
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.games
From: rmh@taligent.com (Rick Holzgrafe)
Subject: Re: Code for drawing a sprite desired.
Organization: Semicolon Software
Date: Mon, 11 Jan 1993 22:40:59 GMT

In article <1993Jan10.222055.342@midway.uchicago.edu>, grass@cs.uchicago.edu
(Joshua Grass) writes:
> 
> Actually, sprite is not the correct term, (What is that from, TI 99's?) what
> the new equivalent of what you are doing is called is an icon.

No, I think he means "sprite". An image that moves or "floats" across a
background, like (say) a small picture of a spaceship flying above a landscape.
An "icon" in Mac terminology is a square bitmap (color or black and white) of a
certain size, for which the system software has optimized routines for storing,
handling, and drawing. Icons are not necessarily a good way to implement a
sprite. The recent postings about offscreen drawing techniques are the way to
go.

-- Rick Holzgrafe, a member of the Taligentsia
   Rick_Holzgrafe@taligent.com
   rmh@taligent.com

Xref: sparky comp.sys.mac.programmer:20759 comp.lang.c++:18737
From: bowman@reed.edu (BoBolicious)
Newsgroups: comp.sys.mac.programmer,comp.lang.c++
Subject: Re: MPW C++: Problems with new and delete?
Date: 6 Jan 93 03:50:34 GMT
Article-I.D.: reed.1993Jan6.035034.23163
Organization: Reed College, Portland, OR

In article <01050014.muu4n1@blanc.north.de> jochen@blanc.north.de (Jochen Meyer) writes:
>I realize that in best case it is hard to diagnose the error due to
>this description. But has anyone else encountered some similar problem
>with new and delete? What was the error in her/his case? Does anyone
>know some workaround? Or does somebody feel helpful enough to look
>through my class gr_varray (less than 100 lines, I would cheerfully
>mail you the source ;-) ).

I would *highly* recommend, for starters, that your classes inherit from
PtrObject if they're pointer-based, which it sounds like they are.
The PtrObject code, as well as a great article about pointer-based objects 
on the Mac, was in _develop_ awhile ago.  You might also try turning on heap 
scrambling in MacsBug, too; it's good for making memory problems go sour 
quickly.

Other than that, don't know what to tell you.

good luck,
bobo              In seeking the unattainable,
bowman@reed.edu            simplicity only gets in the way.
"On Monday, numbers floated everywhere, and the world was full of 
approximations."  -- Spencer Heinz, _The Oregonian_, 1/5/93
Newsgroups: comp.sys.mac.programmer
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: THINK Pascal & Completion Routines
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Sun, 10 Jan 1993 05:19:17 GMT

In article <11369@baird.cs.strath.ac.uk> cr@cs.strath.ac.uk (Chris Reid) writes:
>	I'm having problems with THINK Pascal 4 and completion
>routines. I record some sound and specify a completion routine
>that doesn't move/dispose etc. any memory. A5 is set up correctly
>as well. I run the the code: bang! As soon as the routine gets
>called my machine crashes so badly that I've got to restart. 
>I build an application, run it, and everything works just fine.
>Can I use completion routines in the THINK environment????

(he didn't provide the source. hmmm....
that means that the only answer I can give is:)

Yes!
Organization: Valencia Uiversity (Universitat de Valencia) SPAIN
Date: Fri, 8 Jan 1993 19:29:53 EST
From: Werenfried Spit <SPIT@EVALUN11.BITNET>
Newsgroups: comp.sys.mac.programmer
Subject: Atari emulation on MAC?

Has anyone heard about (or written) an AtariST emulator for the MAC?
As the ST uses a 86000 I suppose this would be feasible; but does such
a beast really exist? I'd be interested.
------------------------------------------------------------------------
Werenfried Spit                         tel: +34-6-386 4551
  Departament de Fisica Teorica         spit@vm.ci.uv.es
  Universitat de Valencia               spit@evalun11.bitnet
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Movable, modal dialog...
Date: 5 Jan 93 15:46:19 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1833@pacvax.UUCP> duga@pacersoft.com (Brady Duga) writes:

>window, I ignore it. The problem is, mouse downs not in my applications
>windows allow the user to switch to other apps, including the Finder. I
>don't want to allow this. Users should be able to move the dialog, to

So you don't want a movable modal box. The best thing with movable
modals is that you can switch applications, and if there's no REALLY
GOOD reason why I couldn't, I should be able to.

>uncover hidden regions, but I don't want them mucking about in the
>Finder. How do I stop the applications from switching, while remaining
>movable?

By calling ModalDialog. You will have to pass a filter that takes
care of MouseDowns and updates for other windows, but that's easy.
And yes, calling ModalDialog with a "plain" window as thePort is
no problem.

Cheers,

						/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  "It was, in fact, cool as all get-out.  Fortunately it was a little
   too late (historically speaking) to be groovy."
                     -- Dennis Pelton
Newsgroups: comp.sys.mac.programmer
From: pcastine@tubkom.prz.tu-berlin.de (Peter Castine)
Subject: Re: think c profiler problems
Keywords: think c profiler
Organization: TU-Berlin TUBKOM, Germany
Date: Wed, 6 Jan 1993 13:11:06 GMT

In article <jlawrie.726060821@sfu.ca> jlawrie@fraser.sfu.ca (John William Lawrie) writes:
>Is there anybody out there who can help me get the profiler in think c 5.04
>to work properly.  I am using the starter project and did the instruction
>listed in the think c user manual about how to make it work.  I turned on the
>generate profile calls option and recompiled everything.  When I tried to run I got ther message data segment to big.  The manual said to turn on the use far
>data option and try again.
>
>So I turned it on and recompiled everything and got the same message.
>
>If anybody can tell me how to get the profiler going, the help would be greatly
>appreciated.

I know this problem well.

Now that your project is using far data, the profile library needs to use
far data, too. In order for this to happen, make a copy of the profile library
(its a THINK C project), call it something like 'Profile Far Data', open
the new profile library in THINK C, turn far data on there and rebuild. Then
close the profiler project, open your project, remove the standard profiler
from your project, add the new profiler library, rebuild and run.

Works for me.

Hope this helps.
-- 
Peter Castine.                       "Errors and anachronisms ought to be
Technische Universitaet Berlin        few. If they do occur, I take full
pcastine@tubkom.prz.tu-berlin.de      responsibility like Richard Nixon."
					                    -- Gore Vidal
From: lim@toadflax.cs.ucdavis.edu (Lloyd Lim)
Newsgroups: comp.sys.mac.programmer
Subject: Re: (Q) Need bit manipulation algorithm
Summary: bit counting and gratuitous Microsoft bashing
Date: 6 Jan 93 10:19:11 GMT
Organization: Department of Computer Science, University of California, Davis

In article <1993Jan6.032113.597@planets.risc.rockwell.com> sho@risc.rockwell.com (Sho Kuwamoto) writes:
>
>Maybe not the fastest method, but a simple one:
>   1) come up with an algorithm which counts the number of
>      1's in a given bit pattern.  You'll either use a loop
>      with shifts and increments in it, or you'll use masks.
>[...]

There is a neat trick for counting the number of bits in a word that
a Microsoft geek showed me one time.  If there are k bits with 1's,
it runs in O(k) time.

I don't remember the algorithm, but it involved subtracting 1 and could
be written in one line of C.  (Yeah, I know...  You could write anything,
even Microsoft Word, in one very long line of C code.  Come to think of it,
that's probably what they did.)  The subtraction was used to create
instant masks: e.g. 0x0100 - 1 = 0x00FF.  It went from the highest 1 bit
to the lowest, magically avoiding all of the 0's.

That's all I remember.  Anyone remember this algorithm?

+++
Lloyd Lim                    Internet: lim@cs.ucdavis.edu
Lim Unlimited                America Online: LimUnltd
330 W. Iris Ave.             AppleLink: LimUnltd
Stockton, CA  95210-3738     CompuServe: 72647,660