HDTenEightyP/NetNews huggingface dataset:
From: urban@yoda.fsl.noaa.gov (Art Urban)
Subject: Re: Newbie TCL question on mouse clicks
Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
Distribution: usa
Date: Mon, 11 Jan 1993 23:17:46 GMT

In article <1isahqINN6ie@jumbo.read.tasc.com> dstrout@sun.rest.tasc.com writes:
%
%Beginner question on mouse clicks.  I made a copy of the TCL starter app,  
%and put these lines in the Draw method in CStarterPane()
%
%TextFont(1);
%MoveTo(50,50);
%DrawString("\pHello World");
%
%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?

By default CPane's do not want clicks; I think this is your problem. If
you send the following message, I believe it will work okay. Keep in mind
that you must send this *after* the object is inititialized. It doesn't
need to be *right* after, just after:

	CStarterPane->SetWantsClicks ( TRUE );

Or, you can do this as well, but it must come after itsMainPane is
set the to the CStarterPane instance.

	itsMainPane->SetWantsClicks ( TRUE );

Hope this helps!



-- 
Art Urban 					        urban@yoda.fsl.noaa.gov
===============================================================================
 "Look, he's being attacked by creamy nugget centers."		 	 -Joel
===============================================================================
Newsgroups: comp.sys.mac.programmer
From: cantrell@lamar.ColoState.EDU (Carol Cantrell)
Subject: Heap scrambling in MacsBug?
Date: Sat, 09 Jan 1993 05:02:51 GMT
Organization: Colorado State University, Fort Collins, CO  80523

What is HEAP SCRAMBLING in MacsBug (hs command)??  What is it for?

	Paul Cantrell
	Cantrell@Lamar.ColoState.EDU

Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: Re: Why does BinHex exist? (my mistake)
Followup-To: comp.sys.mac.programmer
Organization: NCRPDA, Curtin University
Date: Wed, 13 Jan 1993 01:34:08 GMT

In article <NEERI.93Jan12113717@iis.ethz.ch>, neeri@iis.ethz.ch (Matthias
Neeracher) wrote:
> 
> In article <1993Jan8.180438.9696@netcom.com>, howard@netcom.com (Howard Berkey) writes:
> 
> > I should have made it clear that I know what binhex actually does.  
> > My mistake was in assuming that everyone would be able to 
> > have access to uuencode, which does substantially what binhex does
> > (i.e. convert a binary file to 7-bit (6 for binhex but the same
> > principle)) so it can be mailed/cross EBCDIC gateways/etc.).
> 
> BinHex preserves file types and both forks of a file, while uuencode
> doesn't. Otherwise, they are pretty similiar (And no, I don't think
> uuencode uses 7 bits, it creates files that are bigger than BinHex files).
> So even if everybody had access to uuencode, I don't see a particularly good
> reason to use it.

UUencode uses 6-bit encodings, the same size as BinHex.  UU uses a very
simple encoding scheme (the 6 bit value is added to <space> (32)) as
opposed to a table lookup for BinHex.  UU also 'wastes' an extra byte per
line (62 characters) with a line length, and BinHex has a run length
encoding field (although most encoders don't support it, so this feature
actually marginally increases the size).  Basically, a BinHex and uuencoded
file of the same original file should be roughly the same size.

As a test, a 30k text fil with no repeats in it (and no RLE ($90) codes in
it to muck BinHex around) gives:

Original 30720
BinHex 41689 (136%)
uuencode 42350 (138%)

Note1: The difference between the two is 661 bytes, the uuencoded file has
686 lines, hence 686 extra line length bytes making up the difference
between the two almost exactly.

Note2: For a binary file (eg a compressed file), the run length encoding
miight add half a percent to the BinHex length if it wasn't implemented,
and might marginally reduce the size if it was.

> My preferred solution would be to store files in MacBinary on servers, but
> make the ftp daemon translate files to BinHex if requested (Peter Lewis' ftpd
> does this, if I remember correctly).

Actually, FTPd stores the files on the Mac in native format, and
automagically converts them on request for file.bin or file.hqx into
MacBinary or BinHex.

As for unix servers, although BinHex is not as efficient as MacBinary, I
wouldn't be suprised in the least if converting all the files to MacBinary
didn't increase network traffic as all the newbies download the MacBinary
files in ascii mode a few times before figuring out about binary mode.

Personally, I like BinHex cuz it almost always works no matter what you do.
 The only time I use MacBinary is for large files and slow links when I
have to wait for the file to come thru.
   Peter.

_______________________________________________________________________
Peter N Lewis <peter@cujo.curtin.edu.au>             Ph: +61 9 368 2055
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: SFGetFile's directory after an Open Event
Date: 4 Jan 93 20:55:33 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1993Jan4.190815.5881@ccu1.aukuni.ac.nz> russells@ccu1.aukuni.ac.nz (Russell Street) writes:

>After an application receives an 'odoc' Apple Event to open a document
>should it arrange it so the next Standard File [Open] Dialog that is
>brought up by the user is the same directory that the 'odoc' document
>came from?

If Apple thought that would be the right thing to do, they would
have done it themselves. Doing so requires changing lo-mem globals;
that's a dangerous habit you should break out of.

Not to mention: if the app gets an odoc, the user most probably has
the folder open in the Finder, and going there and double-clicking
would be much easier than choosing "Open" in the File menu.

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

   Speed is arbitrary. Don't believe me? Try a PowerBook 180 running
   System 7 against a 486 laptop running Windows 3.1.
Newsgroups: comp.sys.mac.programmer
From: soc1070                         
Subject:  Algorithm charting programs
News-Software: VAX/VMS VNEWS 1.41    
Organization: University of Minnesota CIS
Date: Fri, 8 Jan 1993 15:54:00 GMT

Are there any good utilities for creating an algorithm flow chart?

I just hate doing it by hand....

------
Tim Harincar				A skunk is better company than
soc1070@vx.cis.umn.edu			someone who prides themselves on
 					being frank. -Lazerus Long	
Newsgroups: comp.sys.mac.programmer
From: kurisuto@chopin.udel.edu (Sean J. Crist)
Subject: Re: Why the Piracy? Here's why...
Organization: University of Delaware
Date: Wed, 6 Jan 1993 14:10:08 GMT

In article <72987@cup.portal.com> EcoDev@cup.portal.com (Eco - Development) writes:
>>Copying software also hurts the
>>developer, but not in the same way: a company's total R&D costs
>>for a single piece of software are the same, no matter whether you make
>>yourself one copy or ten.
>>
>  Wrong.  Every 'stolen' copy of software that gets used is 'stealing'
>  royalty payments from the developers. 

You're not listening to me.  I've made it clear several times now that I
agree with you on this point.  Developers have a right to be recompensed
when people use their products.  By saying 'wrong' to my last sentence,
you are implying that a company's R&D costs actually go up as a result of
illegitimate copies of their software, which is nonsense.  A piece of
software costs the same amount to develop regardless of how many people
buy it.

>  When you purchase software you are not purchasing the packaging,
>  (unless you are a moron),  you are purchasing the information encoded
>  on the distribution media.

Don't you believe it.  It's a well-known marketing axiom that you don't
buy the product; you buy the symbols associated with it.  (Granted,
though, this is less true for software that for more consumer-oriented
products, but the principle is still valid).  For the same cost, would you
rather buy hand-lettered disks in a sandwich baggie, or would you rather
buy a nice, professionally printed, shrink-wrapped package?  Even if the
software contained inside is the same, which one are you going to
intuitively feel to be more reliable?

>  By claiming there is a difference between the two (shoplifting and
> piracy) you give latitude for excuses.  Piracy and shoplifting are wrong
> for exactly the *SAME* reason, it's stealing, plain and simple.

Once again, I don't think you've listened to what I've said.  You might be
able to argue that they are the same, but the important point is that
pirates don't *see* them as being the same, and are thus able to justify
themselves.  You could try to convince people that piracy is wrong because
it is morally equivalent to shoplifting, but I think that people will
silently reject this equation.  My point is that it's better strategy to
attack piracy on its own ground by pointing out that developers have a
right to be paid when people use their products.

> maybe you better open
> your eyes.

> Maybe when 
> you get into the real world of software marketing you will see the light,

Saying that I had better open my eyes (as if yours were somehow more
open than mine) or that I should wait until I get into the real world (as
if your world were somehow more real than mine) adds nothing to the
discussion and merely says 'I'm right and you're wrong.'  Claiming that
your perception of reality is somehow better than mine is not going to
endear me to your point of view.

--Kurisuto

Xref: sparky comp.sys.mac.programmer:20873 comp.os.ms-windows.programmer.tools:1916 comp.os.ms-windows.programmer.misc:4677
From: petrick@dms.agames.com (Jim Petrick)
Subject: SeedCFill anyone?
Organization: Atari Games Corporation
Date: Tue, 12 Jan 1993 04:29:37 GMT

I'm trying to use SeedCFill to implement a paint-bucket fill tool for my
drawing program, but I'm using PixMaps instead of BitMaps.  The relevent code
looks something like this:

	PixMapHandle	srcMap, dstMap;
	Rect		tRect		= { 0,0, 512,640 };
	Point		start		= { 25, 25 };
	GWorldPtr	sourceWorld, 
			scratchWorld;

	// ... some code before here ...

	srcMap = GetGWorldPixMap( sourceWorld );	// 8-bit world (640x512)
	dstMap = GetGWorldPixMap( scratchWorld );	// 1-bit world (640x512)

	LockPixels( srcMap );	// Not sure if needed, but can't hurt.
	LockPixels( dstMap );
	
	//	May not be needed.
	SetGWorld( scratchWorld, GetGWorldDevice(scratchWorld) );

	SeedCFill( (BitMap *)*srcMap, (BitMap *)*dstMap, &tRect, &tRect,
		start.h, start.v, nil, 0L );

	// ... the rest of the code.


The Mac crashes in the SeedCFill routine.  Any ideas of what's wrong here?
Inside Mac wasn't the clearest on how the parameters should be used.

	-- jim

 
	
-- 
===========================================================================
Atari Games Corp.                            -- jim petrick
Milpitas, Ca                                    petrick@agcvax.agames.com
Newsgroups: comp.sys.mac.programmer
Subject: Re: Best and worst Mac values of all time
From: russells@ccu1.aukuni.ac.nz (Russell Street)
Date: Wed, 6 Jan 1993 02:48:11 GMT
 <1993Jan5.111253.3736@alijku05.edvz.uni-linz.ac.at> <1993Jan5.183318.29960@netcom.com> <1ictg6INNq06@calvin.NYU.EDU>
Organization: University of Auckland, New Zealand.

roy@mchip00.med.nyu.edu (Roy Smith) writes:

>howard@netcom.com (Howard Berkey) writes:
>	My vote for the worst Mac value was the original SE, before the FDHD
>"Superdrive", and before the big mid-production-run price break.  Compared
>to the Plus, it cost about twice as much and just didn't have enough
>increase in functionality to be worth anywhere near that.

I think a Classic would then run a close second: an "SE without" would
be a better name (second internal floppy, an adb connector, slot,
brightness control, '030 :)) The prices are not quite as bad as they
were in the SE/Plus days.

Russell
From: cr@cs.strath.ac.uk (Chris Reid)
Newsgroups: comp.sys.mac.programmer
Subject: THINK Pascal & Completion Routines
Date: 8 Jan 93 13:48:03 GMT
Organization: Univ. of Strathclyde, Glasgow, UK


Hi folks,

	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????
Setup:

Quadra 700, 7.0.1, THINK Pascal 4.0.1, 32 bit addressing on/off

Mail me and I summarise.


Thanks,

	Chris

__________________________________________________________________________
Chris Reid    <cr@cs.strath.ac.uk>
Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: Re: Think Ref 2.0
Organization: Curtin University of Technology
Date: Sun, 10 Jan 1993 13:34:59 GMT

tj@kona.cs.ucla.edu (Tom Johnson) writes:

>In article <PHILS.93Jan8083854@chaos.cs.brandeis.edu> phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:
>>
>(About Think Reference 2.0)
>>
>>The new release also supports drop-in databases, context-free
>>hyperlinks, and AppleEvents. Drop in databases will make it possible
>>for Symantec to come out with database upgrades or additions (such as
>>QuickTime), and allows users to remove databases they don't need.

Shameless plug - if you're thinking of getting Think Reference, check
out ObiWan first, its not as full blown as TR, but it has all the System
7 stuff, plus you can write your own databases as well (I have a
theasaurus database for instance).  I'll be releasing the database in
the next couple days for those of you without MPW's PInterfacesHelp file
since Apple has sorted out licensing the file to me (for free! :-).
ObiWan is free and is on sumex-aim.stanford.edu:/info-mac/cp, stay tuned
for the System 7 database real soon now. (No, it doesn't have the
QuickTime stuff either, though I have a program mostly written that
converts pascal interface files into databases, so if I get that sorted
out, producing a QuickTime database should be easy.  Quinn says he's got
a TechNote database sorted out, so I'll include that too...

Have fun all,
   Peter.
-- 
_______________________________________________________________________
Peter N Lewis <peter@ncrpda.curtin.edu.au>           Ph: +61 9 368 2055
Newsgroups: comp.sys.mac.programmer
From: soetji+@G.GP.CS.CMU.EDU (Soetjianto)
Newsgroups: comp.sys.mac.programmer
Subject: different font in a listbox?
Date: 5 Jan 93 16:48:47 GMT
Article-I.D.: cs.C0E41B.1GC.2
Organization: School of Computer Science, Carnegie Mellon
Originator: soetji@G.GP.CS.CMU.EDU

Is it possible to change the font and its alignment of a listbox?

thanks,
Soetji@g.gp.cs.cmu.edu
Newsgroups: comp.sys.mac.programmer
From: soc1070                         
Subject: Re: Best and worst Mac values of all time
News-Software: VAX/VMS VNEWS 1.41    
Organization: University of Minnesota CIS
Date: Wed, 6 Jan 1993 04:23:00 GMT

Are we talking about "general, available to all" kind of values, or the
best buy I've ever seen?

By far the best Mac product I've ever bought was when I picked up
the first 4 volumes of Inside Macintosh at a library booksale for
a quarter apiece (they _are_ just paperbacks, ya know... ;)  ). Best
buck I ever spent.
------
Tim Harincar				Millions long for immortality			
Central Minnesota 			who don't know what to do with
Association of Rocketry			themselves on a rainy Sunday 
soc1070@vx.cis.umn.edu			afternoon. -Susan Ertz
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: Alternate Screen buffer in newer macs?
Keywords: Alternate screen buffer, animation
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Wed, 6 Jan 1993 14:44:02 GMT

In <9300610.18577@mulga.cs.mu.OZ.AU> markkj@muse.cs.mu.OZ.AU (Mark Johnston) writes:

>    G'day.  I was wondering if anyone could tell me if the newer macs (ie
>anything above a Plus... :) still have the alternate screen buffer?  Looking

>hardware, and it details no changes to the Segment Loader (which, I would assume
>means that the Chain call is unaffected, hence one would imagine the alternate
>buffer does exist in these later machines).

The _Chain call is not supported since quite some time.
You have LaunchApplication under System 7 and _Launch under
System 6, but even so, the alternate screen buffer assumes
things about zones that's not true anymore.

Also, Color QuickDraw machines don't work that way AT ALL.
Some cards have extra space in memory so you can do page
flipping, but don't count on it.

Instead, do as you said and _CopyBits longword-aligned bitmaps
at the vertical refresh. Be sure to use SlotVInstall for
color quickdraw machines, and VInstall for the Plus, SE, Classic
and PowerBook 100.

Cheers,

							/ h+
-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

   Cookie Jar: Vanilla Yoghurt with Crushed Oreos.
From: Barry_Wolman@transarc.com
Newsgroups: comp.sys.mac.programmer
Subject: Customing SFGetFile Dialog from DA
Date: 9 Jan 93 04:02:23 GMT
Organization: Carnegie Mellon, Pittsburgh, PA

A desk accessory I wrote currently uses SFGetFile with the standard
dialog.  I'd like to extend the dialog by adding a text field.  The
documentationof SFGetFile in Inside Mac Vol I says I need to define a
DLOG with id -4000 in my application.  However, a resource with id
-4000 can't be owned by a DA.  It appears that one can't extend
SFGetFile dialogs used by DAs.

I could get around this problem by converting my DA to an application.
This would be fine for System 7 users, but might cause problems for
some of my users who use System 6 w/o Multifinder.

If anyone has gotten past this problem in a safe, general manner, I'd
like to hear how you did it.

Thanks,
Barry
Newsgroups: comp.sys.mac.programmer
Distribution: world
From: Chris_Griffin%Laughing_Dragon@uu0570.foggybottom.com
Organization: Foggy Bottom
Date: Sun, 10 Jan 1993 16:30:25 EST
Subject: Re: No programmer switch, so how to enter MacBugs on LCII?

or you could use the nifty PowerBreak extension..
it's shareware...
I will upload if anyone can't find it

***************************************************************************
 This message was created from a guest account on a FirstClass BBS and
        sent from from FirstClass(tm) by PostalUnion(tm) from I.E.
  The views expressed in this posting those of the individual author only.
***************************************************************************
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Newsgroups: comp.sys.mac.programmer
Subject: Re: StripAddress Question.
Date: 7 Jan 93 08:34:12 GMT
Followup-To: comp.sys.mac.programmer
Organization: MacDTS Marauders

In article <rudolph.726382887@unixg.ubc.ca>, rudolph@unixg.ubc.ca
(Christopher E Rudolph) wrote:
> 
> 
> Hello all,
> 
> I hope this isn't an FAQ, but here goes.  
> 
> I have been looming over the thrill of writing directly to the screen, and
> I find it very interesting.
> One question though:
> 
> 	Could anyone give me a bit of theory as to why the high byte of the
> 	starting address of say a color icon has to be stripped before 
> 	accessing video memory.
> 
> 	I did this when I was already in 32bit mode and all I got was garbage
> 	on the screen.  If I omit it I get what I expect.
> 
> 	I am new to this low level stuff and would really appreciate a bit of
> 	an explanation.
> 
> I hope that was clear enough.
> 
> Chris Rudolph <rudolph@unixg.ubc.ca>
> ------------------------------------

[ First, some history & backgound ]
The 680000 processor has 32-bit address registers, but only 24 pins
for the address bus, so the top 8 bits of addresses are ignored.
The original Mac OS exploited this quirk, using the top 8 bits of
block addresses to store information about those blocks (locked or
unlocked, etc.) The 24 bit address bus, and the following 24-bit
addressing limitation limits the total address space to 16 Mb in
68000 machines, which traditionally gives a limit of 8 Mb.  When
the Mac II line was introduced, more address space was needed to
provide room to interface NuBus cards.  Fortunately, all Mac IIs
have 68020 or greater processors, and so have a full 32-bit
address bus.  However, because the memory manager and a number of
3rd party application still used the top byte of addresses for
other purposes, this extended address space couldn't be put to
use until the 32-bit memory manager was made available with
System 7.

[ Second, the facts ]
Because your screen memory might be in 32-bit mode, if you're
in 24-bit mode, you need to call SwapMMUMode() to switch into
32-bit mode.  (You don't have to check your memory mode; it's
designed so you don't have to worry about it.)  Now that you're
in 32-bit mode, the top 8 bits of your icon's pointer, which
were ignored before, must be stripped or they will be interpreted
as address bits and using the address will either cause a bus
error or return garbage.

[ Third, the summary ]
You only need to mask off the top byte if you're in 24 bit mode,
you're going to try to use the pointer in 32-bit mode, and the
pointer points into the main RAM (i.e., _do not_ strip pointers
onto NuBus cards).  All you need to do is call StripAddress();
if you're in 24 bit mode, it will mask off the byte, if you're
in 32-bit mode, it will leave it alone.

Enjoy,
Tim Dierks
MacDTS, but I speak for myself and this really wacky keyboard.
Newsgroups: comp.sys.mac.programmer
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: Why does BinHex exist?
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Fri, 8 Jan 1993 02:15:06 GMT

Because there's more to the net than just macs which use binhex.

Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: Re: Setting Default Directory
Organization: Curtin University of Technology
Date: Thu, 7 Jan 1993 14:37:42 GMT

wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:

>Given the following FSSpec record:

>  vRefNum - volume reference number
>  parID   - directory ID of parent directory
>  name    - DIRECTORY name

>How can I set the default directory to FSSpec.name?  In other words, I have a 
>routine that allows a user to select folder name instead of a file name and
>I want that folder to be the default directory. I am using this routine with 
>an existing MacFortran application which expects all files used with Fortran 
>reads and writes to be in the default directory.  IM VI states that it can be 
>done, but never explains how to do it.  

Jon described how to set the default directory, but there is often a lot
of confusion between the default directory and the directory displayed
by the StandardFile package.  If you want to set the StandardFile
package's displayed directory, you do so by setting the low memory
globals:
SFSaveDisk=$214;
CurDirStore=$398;

Set SFSaveDisk to -vRefNum and CurDirStore to the dirID of the folder.
To get the dirID of the folder, use PBGetCatInfo (be careful, there are
two dirID's in the paramblock, ioDrDirID&ioDrParID, one is right, and
one is wrong :-)

Have fun,
   Peter.

-- 
_______________________________________________________________________
Peter N Lewis <peter@ncrpda.curtin.edu.au>           Ph: +61 9 368 2055
Newsgroups: comp.sys.mac.programmer,comp.sys.atari.st.tech
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: Porting GCC to the Mac (was: Re: Sozobon (or other free C's): would this strategy work?)
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Distribution: comp
Date: Sun, 10 Jan 1993 01:58:23 GMT

When it becomes ready (about a year, more or less), that part of my gcc port
which I release will encourage porting Mac-like software away from the Mac
platform and discourage native or porting toward the Mac until the authors
of GNU drop their boycott. This part of the port is likely to be completed
first.

Newsgroups: comp.sys.mac.programmer