HDTenEightyP/NetNews huggingface dataset:
From: Romain.Vignes@aedi.insa-lyon.fr (Romain.Vignes)
Newsgroups: comp.sys.mac.programmer
Subject: Modeless dialog event handling
Date: 14 Dec 1992 13:48:25 GMT
Organization: Departement Informatique, INSA Lyon, France.
Distribution: world
NNTP-Posting-Host: aedi.insa-lyon.fr

Hello, 
I am currently trying to implement a progress box for a CTB File Transfer tool.
I want to use a modeless dialog, but I don't know how to handle events for such
a dialog. I tried to use 'IsDialogEvent' and 'DialogSelect', but when I click
in the title bar or in the Cancel button, my mac hangs up ...

Does somebody know how to solve this problem ? Is there some example source
code anywhere ??

Thanks in advance.
--
-------------------------------------------------------------------
Romain Vignes
Computer Science Dept - INSA Lyon, FRANCE - roms@aedi.insa-lyon.fr
-------------------------------------------------------------------
From: draper@odin.mda.uth.tmc.edu (E.J. Draper)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Macs closed, what me worry?
Date: 17 Dec 1992 18:35:18 GMT
Organization: U.T.M.D. Anderson Cancer Center
X-UserAgent: Nuntius v1.1.1d14
X-XXMessage-ID: <A75623680C01019A@mdarpi1.mda.uth.tmc.edu>
X-XXDate: Thu, 17 Dec 92 18:30:32 GMT

In article <1992Dec17.105150.20684@yang.earlham.edu> ,
irac@yang.earlham.edu writes:
>Hi all, Ira here.

Ed here.


>So now I have been reading this group a little and I would like to know a
>thing.  Why are Macs considered closed systems?

BTW- Who considers the Macintosh a closed system anyway?

Or perhaps:

Who considers red M&Ms more chewy than yellow M&Ms?


      |E|J-  ED DRAPER
 rEpar|D|<-  Radiologic/Pathologic Institute
             The University of Texas M.D. Anderson Cancer Center
             draper@odin.mda.uth.tmc.edu
Newsgroups: comp.sys.mac.programmer
From: jpugh@apple.com (Jon Pugh)
Subject: Re: Scrollbars with more than 32000 lines?
Date: Sat, 19 Dec 1992 21:06:55 GMT
Organization: Apple Computer, Inc.
Followup-To: comp.sys.mac.programmer

In article <5854@krafla.rhi.hi.is>, rson@rhi.hi.is (Mimir Reynisson) wrote:
> 
> How do I map the scrollbars which are limited to
> short values only onto a long value? MPW seems to do this
> since it has no seperate scrollbar definition procedure.
> 
> Anybody know the magic formula?

This is a simple ratio.  Scale your large size into the small size.

large val      small val
---------  =   ---------
max large      max small

Or, for the algebretically impaired, scroll = large val / max large * max
small

In the case of a transition from a full longInt to a short, use HiWord to
get the top half.  If you are using the full range, this sounds like what
you
need, otherwise you'll need to do math.

Jon
Newsgroups: comp.sys.mac.programmer
From: ccetaneh@nuscc.nus.sg (Woppee)
Subject: Differences between TC 4.0 & TC 5.0
Organization: National University of Singapore
X-Newsreader: Tin 1.1 PL4
Date: Tue, 15 Dec 1992 05:55:40 GMT


I am just begin programming on the Mac. Anyway, I inheritted an upgraded
copy of Think C from my collegue(4.0.x to 5.0.2). Currently, I need to
modify some existing code done in TC 4.0 (I believe!), and there are some
compilation problems using TC 5.0. Some of the header files and libraries
could not be found. My question is what are the major differences between
Think C 4.0 and Think C 5.0? Are there any changes to the libraries and
headers that comes with TC 4.0, if so, where can I get the upgraded one?

Many thanx in advance.

Regards,
JEFF
From: d88-jwa@cyklop.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Depth and Device Manager Questions
Keywords: Maximum Depth, Device Manager, Direct Device
Date: 13 Dec 92 21:22:59 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1992Dec12.055906.19092@cc.uow.edu.au> geoff@cc.uow.edu.au (geoffrey roberts) writes:

>realise that after (and including) system 6.0.5 I can recursively call 
>the HasDepth function passing to it every possible depth.   This seems 
>a little long winded.   Is their a cleaner way?

Yes, you can call ite iteratively... :-)

Since there are only 6 different bit depths, what's unclean
about this? (10 if you count gray-scale as well)

>Secondly, if using the HasDepth function is the only possible way of 
>determining the maximum depth of a device, how can I find the maximum 
>possible depth of a device before system 6.0.5?   All we know is that 

As far as I know, you can't. Instead, check what depth the various
screens are in, and if you find none suitable, exit with an alert
saying you need XXX. Let the user change. Or just plain require 6.0.7
which is a much less buggy system.

>    In this code calls are being made to the device manager, yet Inside 
>Macintosh Vol II it states:
>"The display screen is not a device; drawing on the screen is handled 
>by quickdraw"
>Does this apply to pre-colour machines only.   ie, Can I use device 
>manager calls to communicate to the graphics card - (NOT TO THE SCREEN) 

Well, that depends on how compatible you want to be. There are,
for instance, screens that draw via SCSI - or over a network!
Those will not even have devices associated. There is also
internal video in many Macs, but it's done so that it looks
like a slot.

>Finally, would this call work on machines that use the PDS slot for 
>their graphics card?

I'm not sure ANYTHING is guaranteed; you will have to make hard
choises between compatibility and what rules you feel you have to
break. If at all possible, include a "Use Only QuickDraw" checkbox
(that's ON at first start!)

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: Michael Hecht <Michael_Hecht@mac.sas.com>
Subject: Re: Try doing this...
X-Useragent: Nuntius v1.1.1d15
Date: Fri, 11 Dec 1992 21:52:59 GMT
X-Xxdate: Fri, 11 Dec 92 21:50:02 GMT
X-Xxmessage-Id: <A74E773A6E01050A@studly.mac.sas.com>
Organization: SAS Institute Inc.

In article <1992Dec11.134857.5798@rhrk.uni-kl.de> Frank Lohse,
lohse@rhrk.uni-kl.de writes:
>[...] MenuChoice seems to cause the problem.
>If I disable MenuChoice everything works fine on my machine.

MenuChoice redefines _MenuSelect such that it doesn't preserve the
current resource file. It resets it to the top of the resource chain,
probably because it opens its resource file, then closes it.

Is this a problem? Well, yes, if your app opens another app's resource
fork and the user selects a menu item whose code is in an unloaded
segment. You might end up loading a CODE segment from the other app's
resource fork instead of your own. Just imagine the kinds of havoc that
can wreak!

I've already reported this to MenuChoice's author, so maybe a new version
will be coming out soon. I hope so, because I find it extremely useful!!

--Michael

=======================================================================
Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Detecting reboot or startup
Date: 16 Dec 92 13:28:25 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <cmcclary-151292113831@mcclary-mac.ucs.indiana.edu> cmcclary@ucs.indiana.edu (Charles McClary) writes:

>What is the best/preferred method for an application to detect if the
>system has been rebooted or restarted since it (the application) last ran.

Install a gestalt selector with your own signature as selector code.

If it's there, the application run previously during this "session."
The selector code should reside in the system heap, and could simply
return a 0 as result; you would test for presence, not return code.

Cheers,

						/ h+

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

   Nothing crashes like a Macintosh.
                     -- Guy Kawasaki
From: anadig@otago.ac.nz
Newsgroups: comp.sys.mac.programmer
Subject: Re: Uniquely identifying a Mac? How?
Date: 18 Dec 92 19:04:18 +1300
Followup-To: comp.sys.mac.programmer
Organization: University of Otago, Dunedin, New Zealand

In article <absurd-161292095851@seuss.apple.com>, absurd@apple.apple.com (Tim Dierks, software saboteur) writes:

> continued in the Mac.  The biggest single problem was serviceing
> these machines; if the PROM blew, you had to special-order a
                     ^^^^^^^^^^^^^
The PROM blew? Just blew? Did this actually happen? I'm amazed: I though PROMs
(not EPROMs, mind you) were extremely reliable, more so than most components on
a typical motherboard. Did Apple have some special problems with them?

I would have thought the Lisa problem would happen when for whatever reason it
was necessary to swap the motherboard, at which point the soldered-in PROM
would be impracticable to remove...

Michael(tm) Hamel
Analog Digital Instruments, Dunedin, New Zealand.
From: dswartz@sw.stratus.com (Dan Swartzendruber)
Newsgroups: comp.sys.mac.programmer
Subject: ResEdit and alert boxes
Date: 14 Dec 1992 19:46:23 GMT
Organization: Stratus Computer, Inc.
Distribution: world
NNTP-Posting-Host: redondo.sw.stratus.com

I'm a little confused.  What is the proper method of correctly sizing (and
shaping) an alert/dialog box containing static text when you are going to
be using one or more ^ parameters with ParamText?  If I don't make the box
big enough and provide a long name (or whatever), I don't get all of the
message.  If I make it plenty big enough, short messages look lost in the
expanse of white-space.  Are there any good ways of doing this dynamically?

-- 

#include <std_disclaimer.h>

Dan S.
From: ksand@apple.com (Kent Sandvik )
Newsgroups: comp.sys.mac.programmer
Subject: Re: Anyone else seen this MPW C bug?
Date: 17 Dec 92 07:39:19 GMT
Followup-To: comp.sys.mac.programmer
Distribution: na
Organization: (Evil Eye Creature from Mars, Inc.)

In article <1992Dec17.024634.5959@netcom.com>, ray@netcom.com (Ray Fischer)
wrote:
> 
> I just came across an incredibly blatant MPW C bug, and I'm having a
> hard time believing that it hasn't been fixed yet.  Briefly, if you
> multiply a long integer by constant 12 with the mc68020 option on, the
> MPW compiler generates the wrong code!  
> 
> This is with MPW C 3.2; if there is a newer version that fixes the problem
> that I haven't heard about, I'd really appreciate someone letting me
> know about it.
> 
> If you want to try it yourself, here's a sample program.
> Use the mc68020 option.
> 
> main() {
>   long a,b;
>   a = 3000;
>   b = a * 12;
>   return b;
> }
> 
> The compiler generates an LEA to multiply by 3 (which is good) but
> then uses an ASL.W to multiply by 4 (instead of ASL.L)!

This output is from the MPW 3.2.4 C compiler (latest ETO CD),
the -mc68020 flag enabled:

00000000: 4E56 0000      'NV..'            LINK       A6,#$0000
00000004: 48E7 0300      'H...'            MOVEM.L    D6/D7,-(A7)
00000008: 2C3C 0000 0BB8 ',<....'          MOVE.L     #$00000BB8,D6
0000000E: 2206           '".'              MOVE.L     D6,D1
00000010: 2041           ' A'              MOVEA.L    D1,A0
00000012: 41F0 8A00      'A...'            LEA        $00(A0,A0.L*2),A0
00000016: 2208           '".'              MOVE.L     A0,D1
00000018: E581           '..'              ASL.L      #$2,D1
0000001A: 2E01           '..'              MOVE.L     D1,D7
0000001C: 2007           ' .'              MOVE.L     D7,D0
0000001E: 4CEE 00C0 FFF8 'L.....'          MOVEM.L    -$0008(A6),D6/D7
00000024: 4E5E           'N^'              UNLK       A6
00000026: 4E75           'Nu'              RTS        
00000028: 846D 6169      '.mai'            OR.W       $6169(A5),D2
0000002C: 6E00 0000      'n...'            BGT        *+$0002             ;
0000002E

As you see, the compiler is now generating .L instructions.

Cheers,
Kent

-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
Newsgroups: comp.sys.mac.programmer
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Subject: Re: Launching Apps & Finder Icon
Date: Thu, 17 Dec 1992 22:02:27 GMT
Organization: MacDTS Marauders
Followup-To: comp.sys.mac.programmer

In article <lj1gs1INNc2g@earth.cs.utexas.edu>, baron@cs.utexas.edu (David
Baron) wrote:
> 
> 
> I use the routine "LaunchApplication" to start another program from our
> main application. Everything works fine except for the fact that the
> Finder does not graphically display the launched program as running, i.e.,
> its icon doesn't assume that fuzzy look. I wonder if and how this could
> be accomplished.
> 
> The OS otherwise does recognize the association between the icon and the
> process: when you double click the (non-fuzzy) icon, the running process
> is just brought to the foreground; but the icon is still not made fuzzy.
> 
> Thanks a lot. Since I don't have access to news right now through my own
> account, I'd appreciate it if you could mail a response to
>     rbrown@math.utexas.edu.
> 
>    ---  Raymond Brown

Yup.  This is a (select one):
   - Bug
   - Feature
   - Limitation
of the System 7 Finder.  The Finder only grays out icons of applications
it has launched as part of its user interface; it doesn't actually serve
as a "process status" indicator.

Tim Dierks
MacDTS, but I'm speaking for myself
From: winer@husc10.harvard.edu (Adam Winer)
Newsgroups: comp.sys.mac.programmer
Subject: Problem printing to HP
Date: 14 Dec 92 08:23:00 GMT
Article-I.D.: husc10.winer.724321380


A program I wrote has no problem printing to an Imagewriter.
When I tried printing to a HP Inkjet, it didn't work:
  1) Using the HP Serial chooser device, the HP code (not mine)
          complained that it was out of memory.
  2) Using the plain HP chooser device, it started printing out, and
          then gave me the following error (on the printout):
     "Datacomm buffer overrun - no DTR handshaking."

What could be causing this?  Help me!

Adam
-- 
Adam Winer		| The number you have reached is imaginary.
WINER@HARVARD.EDU	| Please rotate your phone 90 degrees and
                        | try again.
Organization: Valencia University (Universitat de Valencia) SPAIN
Date: Wednesday, 16 Dec 1992 12:09:33 EST
From: Werenfried Spit <SPIT@EVALUN11.BITNET>
Newsgroups: comp.sys.mac.programmer
Subject: Alpha: strange problem entering <opt><e>


Hello,

I'm using alpha (version 5.1.3) and I have a very strange problem: when I
enter <opt><e> I get the result of <opt><b>. I checked the keybindings,
there is nothing bound to <opt><e> (depending of the mode I'm in there
is something bound to <opt><b>). Other combinations using the <e> key
work normally. Anyone an idea of what could be going on ?
------------------------------------------------------------------------
Werenfried Spit                         tel: +34-6-386 4551
  Departament de Fsica Terica         spit@vm.ci.uv.es
  Universitat de Valncia               spit@evalun11.bitnet
Newsgroups: comp.sys.mac.programmer
From: hd12@ellis.uchicago.edu ()
Subject: Advice needed
Reply-To: hd12@midway.uchicago.edu
Organization: computing
Date: Sun, 13 Dec 1992 06:29:36 GMT

A software company is trying to buy an application I wrote for Macintosh.
Since I don't have this kind of experience before, I would appreciate if 
experienced people on the net can give me some good advice:

1. Usually what's the percentage the software author can get from the 
company's profit? Any estimation in terms of dollar? (assuming say, $70
each copy.)

2. If the company offer fixed percentage of their profit, how am I supposed
to make sure they will keep their promise, since I don't have access to
their balance sheet?

3. Do I need a lawyer to make it legally binding?

4. Any tips? Precautions? Suggestions?

All helps and suggestions will be very appreciated.
From: jwas_ss@uhura.cc.rochester.edu (Jason Wasson)
Newsgroups: comp.sys.mac.programmer
Subject: Mac Pascal update needed
Date: 17 Dec 92 06:20:49 GMT
Distribution: na
Organization: University of Rochester - Rochester, New York

Does anyone know of an update for Mac Pascal 3.0 to 3.0.4?  I heard rumors
that there was such a version available a while back. If you could point me
in the right direction I would be most gratefull.


						-Jason
					jwas_ss@uhura.cc.rochester.edu
-- 
Wouldn't it be fun to go across North America on a steel horse?
and to sleep under the stars each night--
to ride into the Sun each morning,
all on a whim, a desire met with the passion of life.
From: potts@oit.itd.umich.edu (Paul Potts)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How do I use the 'miscdosc' AppleEvent?
Date: 18 Dec 1992 21:28:05 GMT
Organization: Instructional Technology Laboratory, University of Michigan
NNTP-Posting-Host: helen.oit.itd.umich.edu

In article <1gtdj3INN4v3@terminator.rs.itd.umich.edu> potts@oit.itd.umich.edu (Paul Potts) writes:
>In article <1992Dec18.174212.23244@kth.se> d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
>>						/ h+
>>

>
>
>I feel I should mention that of the programmers in my office, I have a degree
>in English, one of us has a degree in Education, one a degree in Philosophy,

Sorry, should have inserted

>our manager has a degree in English, leaving two with computer science
^
AND

>degrees. And one of those just told me that he thinks having a varied
>educational background in history, literature, science, and arts is very
>helpful. (He's the only Republican in our office, by the way...)
>

Look, I'm writing like an engineer...
-- 
Politics is crime pursued by other means.              
potts@oit.itd.umich.edu      CI$ 71561,3362 (rarely)
Newsgroups: comp.sys.mac.programmer
From: reuber@world.std.com (kent b reuber)
Subject: Where to get New Inside Mac cheap?
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 17 Dec 1992 21:36:06 GMT

Can anyone recommend where to get the New Inside Macintosh books at a
reasonable (~20%) discount? Mac Zone has some bargain books, but they
don't carry the new I.M.

Thanks.

reuber@world.std.com
-- 
Kent Reuber                   | Schepens Eye Research Institute
Computer Operations Manager   | 20 Staniford St.
reuber@world.std.com          | Boston, MA 02174
reuber@cdv.eri.harvard.edu    |
From: wisdom@picasso.ocis.temple.edu (Robert Wisdom)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Beginner's Hierarchical Menu Problem
Date: 20 Dec 92 21:12:14 GMT
Organization: Temple University
X-Newsreader: TIN [version 1.1 PL8]

Richard J. Resnick (rjr@titan.ucc.umass.edu) wrote:

				...

: I am trying to make a simple FONT menu, which will be a hierarchical
: menu under a menu called SPECIAL. I built the resources correctly, and
: the FONT menu, res_id = 100, was built empty in the resource editor,
: so that I could call AddResMenu to load it up.

	My god!  I think I know the answer to this one!  I'm just
beginning to do Mac programming also but Resource ID's from 0 to 127 are
"used for other system[!] resources."  This is from page 109 of "Inside
Macintosh, Vol. I."  Try setting res_id to 128 (or more) and see if that
helps.

: Thanks in advance for any help you can give me.

: Richard Resnick

	Sure, it's fun to be able to answer at all.

			Robert
----
Sign held by an abortion protester:        | Robert Wisdom
"Abortion Kills America's Future Soldiers" | wisdom@picasso.ocis.temple.edu
You figure it out (Because I can't!).      | My opinions are !yours.
----
From: edw@distant.uucp (Ed Watkeys)
Newsgroups: comp.sys.mac.programmer
Subject: Am I correct in assuming that Discipline is worthless?
Date: Sat, 12 Dec 92 17:09:56 EST
Organization: Distant Software
Reply-To: edw@distant.uucp
X-Mailer: uAccess - Macintosh Release: 1.6v2

For the heck of it, I installed Discipline and started playing with it.
After I quit all of the other apps I was running (because Discipline would
jump into MacsBug about every other second), I let it loose on my current
project. It doesn't seem very useful. I haven't gotten lazy on this project
*yet* and I'm actually coding defensively. Of course, Discpline drops me into
MacsBugs every other second, (every time I get an event, I guess...). Am I
correct in assuming that Disclipline has little or no value?

Ed

P.S. I'm glad I learn 65c02 assembly way back then -- I can actually sort of
understand what's going on when I disassemble stuff.

--
Edwin H. Watkeys III                                   edw@distant.uucp
Distant Software                               dsinc!jabber!distant!edw
+1 215 387 7971                                     edw%distant@bts.com
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: 3D Graphics
Organization: Kalamazoo College
Date: Mon, 14 Dec 1992 21:56:48 GMT

d88-jwa@hemul.nada.kth.se (Jon Wtte) writes:
>
>No, actually, Bresenham gives you an algorithm to draw lines
>properly INCLUDING the "final" pixels.

Yeah, well, it's not like it's hard;  you just start the tally off at
half the remainder, instead of zero.  My homebrew scaling algorithm lets
you specify what fraction of the remainder you'd like to start with;
I _know_ it's no big deal!

(CopyBits, by the way, divides the error up evenly.  CopyBits a
100-pixel-wide image into a 101-pixel-wide window, and the middle
column, not the first or last, will get doubled.  Scaling uses the
same class of algorithm as line-drawing.  So why doesn't LineTo do
the Right Thing!?)

(Jon, are you sure Bresenham's got a patent?  Two recent DDJs explained
and gave code for run-slice Bresenham, which seems better than
"standard" Bresenham in every respect, and which the Toolbox, therefore,
probably uses.  No mention of patents.)
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "Apple developers will still have access to System 7.1 through the
  monthly Developer CD series, but they may use it only for testing
  and development purposes."              - AppleDirect, Nov/Dec 92
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Uniquely identifying a Mac? How?
Date: 17 Dec 92 22:42:58 GMT
Followup-To: comp.sys.mac.programmer
Organization: personal

In article <1992Dec17.105813.18407@jarvis.csri.toronto.edu>,
ematias@dgp.toronto.edu (Edgar Matias) wrote:
> 
> 
> > In article <1gm3ioINN9uh@calvin.NYU.EDU>, roy@mchip00.med.nyu.edu (Roy Smith) writes:
> > >
> > > I personally think it was a major mistake for Apple
> > > to not have put some sort of machine-readable serial number in each machine.
> > 
> > The trouble with providing a feature like that is that people will start to
> > use it.
> > 
> > Can you say "copy protection"...?
> > 
> > Lawrence D'Oliveiro                       fone: +64-7-856-2889
> 
> 
> Isn't that the idea?  If you are going to have a copy protection scheme,
> I'd think that would be the best type.  Least amount of hassle for the
> user, yet still protects the software industry's interests.  Of course,
> if you're in the habit of pirating software maybe it's not in your 
> interests...
> 
> I'm a little surprised that the software industry hasn't latched onto
> this idea and lobbied hard for it.  It seems like the ideal solution
> to software piracy.  Of course, it wouldn't stop piracy entirely but
> it would certainly put a serious dent in it.


OK, now that would either be in a custom chip or in the Roms, but in either
case it would be WELDED on to the logic board, right?

Now what happens when a logic board needs service?  Since the board now
must stay with the machine, you have just forced all apple dealers to
perform componant level diagnosis and repair, this is a dramatic change
from present policy, and on which APple is likely to regard as a giant step
backward.

Oh, and just how would one deal with a faulty Rom chip, or a ROM upgrade
(remember the SCSI problems in the first and second versions of the 128k
roms?).
--

Dana S Emery <de19@umail.umd.edu>
Newsgroups: comp.sys.mac.programmer