HDTenEightyP/NetNews huggingface dataset:
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: How do I centre the NuLookup dialog?
Date: 9 Apr 92 16:55:45 +1200
Organization: University of Waikato, Hamilton, New Zealand

I'm writing an XFCN for HyperCard that calls the NuLookup routine in the
Comms Toolbox Utilities. This brings up a dialog box that lets the user
choose a named object on the network, and returns the name and the
corresponding AppleTalk address to the calling code.

This works fine, except for something of a cosmetic problem: I want
to centre the NuLookup dialog nicely on the screen, but I can't figure
out a clean way of doing this.

One common approach, with things like the disk-initialization dialog,
is to read the window bounding box from the DLOG resource, and calculate
a position from that. However, my Comms Toolbox documentation doesn't
mention a DLOG ID for the NuLookup dialog. I know I could look for it in my
system file with ResEdit, but as long as it's not officially documented,
there's a chance it could change in future.

I tried implementing a hookProc which centred the window on a hookPreflight
call. Unfortunately, the window is moved to the caller-specified position
*after* this call, nullifying anything I try to do with MoveWindow!

Anybody have any suggestions? The manual I'm using is the one that was
released when version 1.0 of the Comms Toolbox came out. I understand the
current manual is called "Inside the Macintosh Communications Toolbox". Can
anybody tell me if the new manual very different?

Thanks if you can help.

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
From: scott@mcl.mcl.ucsb.edu (Scott Bronson)
Newsgroups: comp.sys.mac.programmer
Subject: Floating Windows in ResEdit -- Help!
Summary: How do you implement a floating window in ResEdit?
Keywords: ResEdit RSSC
Date: 6 Apr 92 05:25:54 GMT

Has anyone out there gotten a floating window to work in a ResEdit
extension (RSSC)?  I followed all the sample code in ResEdit Complete
by Peter Alley and Carolyn Strange, but I get random and sporadic
crashes.  I would try to describe them here, but I can't see that
anyone would find that information useful.  In a nutshell: the floating
window has a 50% chance of appearing.  If it does appear, the system
takes events in the floating window fine, but crashes on MouseDown
events in the main window, and always crashes on close.  If the floating
window doesn't come up, any the system works OK until I go to close, then
crash.  Sometimes it crashes when I click in the content region of
my editor window.

When I say random crash, I mean *random*.  I don't think the same thing
has happened more than twice so far!  All different--all exciting. :-(

Has anyone at all got any sample code that successfully implements
any type of floating window for any resource editor in any language
and any development system at all?  At this point, I'll take whatever
I can get!

Thanks for any help at all.

	- Scott
Newsgroups: comp.sys.mac.programmer
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Re: Anybody interested in a Clock program?
Organization: Instructional Technology Laboratory, University of Michigan
Date: Fri, 10 Apr 92 13:14:43 GMT

In article <34081@unix.SRI.COM> mxmora@unix.SRI.COM (Matt Mora) writes:
>
>In my constant vigil to replace all the Inits and cdevs I use
>with small applications since I use system seven, I wrote a program to replace
>SuperClock.
>
>It's working now but I have a few questions about its Apple Thought Police
>legalness. It does not patch any traps and it draws in the menubar. What
>it does is copies and offscreen image into the menubar area (wmgrport).
>Is this going to break? Is this very compatable?

I don't expect that it will break, providing you are setting and restoring
the ports properly, but since the system owns the window manager port, keep
in mind that you are a guest there. This means that if your clock display
gets clobbered there isn't much you can do to complain to the system about
its cruel and heartless behavior. Since more and more things use the menu
bar to put little icons or indicators, all I can suggest is that you check
for the existence of things like Balloon Help, a keyboard menu, and an
applications menu, and move your display accordingly. You might start bumping
into the rightmost menu of some apps on 9" displays, though...
I can think of instances where you will also probably flicker, depending
on how your app is determining when to draw.
>
>Also I have another question. How do you make a background only application?
>This app would be perfect for a BO app. I tried setting the bit in the
>size resource but after launching the program the finder would crash
>when I try to select another application from the app menu.
>So what do you have to do to make a background only app?

If your application is background only it shouldn't have a user interface.
In this case you wouldn't initialize any of the managers that provide the
user interface. However since your application *does* have a user interface,
albeit a pretty small one, it needs the managers to be initialized (or at
least a portion of them). You might be able to get away with not initializing/
using the menu manager and thus having no menubar, but I'd have to 
experiment.
 >
>If you would like to try out this clock program, let me know and I will send
>you a copy.

 Yes! With source code? :>
>Matt
>


-- 
Paul Potts - potts@itl.itd.umich.edu
Un damne' descendant sans lampe,/ Au bord d'un gouffre dont l'odeur
Trahit l'humide profondeur,/ D'e'ternels escaliers sans rampe... 
   -Baudelaire on DOS/Windows programming   
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.hardware,comp.sys.mac.misc,nz.comp,aus.mac
From: news@massey.ac.nz (USENET News System)
Subject: Reading binary input
Followup-To: comp.sys.mac.programmer
Reply-To: P.Etheridge@massey.ac.nz
Organization: SMIS, Massey University, NZ
Date: Thu, 9 Apr 92 23:25:41 GMT

This is a posting on behalf of a student without News access.  He wants source
code (any language) which takes a stream of binary input from a synchronous A/D
converter plugged into a serial port of a IIci, and read it into a file. 
Someone has already suggested using the Sound Manager library, any comments on
this, or other suggestions?

Phil Etheridge              Internet: P.Etheridge@massey.ac.nz
Macintosh Consultant        Phone:    +64+6-356 9099 ext 8689
SMIS, Massey University     Fax:      +64+6-350 5611
Palmerston North, NZ        40*23'S, 175*37'E ;  GMT+12
From: scott@mcl.mcl.ucsb.edu (Scott Bronson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Two basic questions from an advanced programmer
Date: 14 Apr 92 18:40:12 GMT

I got a few good answers for this post, so I'll summarize here:
(I omitted names because no one expressly gave me permission to use
 their quote here -- thanks to all of them, though).

Yes, your app does need to check for and respond to DiskInserted
events, calling DIBadMount when needed.  I have some sample code
that you can simply paste into your event loop to add this capability
for all you who haven't yet.  It's actually really easy -- only about
four lines or so.  You can also find sample code (and a lot of it!)
in the book _Programming for System 7_ (part of the Macintosh Inside
Out series published by Addison-Weseley), a book that I read and
use a lot (and have no afilliation with).

And, as I feared, there are many ways to go about tracking the mouse.
The easiest way is simply to call SystemTask inside your loop, but
that's not the best way.  The way that makes the most sense to me
is to simply keep running through your main event loop, tracking
the mouseDown across calls to WNE.  I haven't tried this yet, and it
sounds like it just adds more to an already overloaded main event
loop.  It also sounds like it could make tracking the mouse button
sluggish if there's a lot going on in the background and perhaps from
a UI standpoint that's not good.  I'd rather have my computer appear
sluggish than abort a transfer in the background for lack of processor
time, though!

	- Scott
From: shite@sinkhole.unf.edu (Stephen Hite)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Zortech C++ Summary
Date: 15 Apr 92 20:46:58 GMT
Article-I.D.: sinkhole.1992Apr15.204658.19883
Organization: University of North Florida, Jacksonville

In article <22809@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
>
>This is just speculation, but why would a company kill a compiler that 
>supposedly will work under both environments, something which is a rare
>thing today? It sounds market-wise silly to kill one of the selling options.
>Remember the tick box wars against Borland and Microsoft...
>
>Cheers,
>Kent Sandvik
>Dynamic Language Revivalist

  Well, Kent,  I think it comes down to logistics and time.  The 
logistics problem is that Walter Bright lives in Seattle, WA and Symantec
is doing their development in Mass.  It's kinda tough to get inside his
head over the phone and you know he's not in Mass enough to be very useful
to others on the project.  The time problem is they've got to get more
eyes looking at the compiler and linker code to where they don't have to
rely on Walter as much.  On the positive side, once they regroup (i.e. Mac 
product supports MacApp 3.0), Symantec could be in a good market 
position (although certainly not a dominant one in the short term).  

  Symantec's largest failing is that they should have seen the C++ move 
coming years ago and done something in-house about it.  As they've just 
learned, buying other company's products can come with just as many 
problems and expenses as "inventing it here." 


Steve Hite
shite@sinkhole.unf.edu
Newsgroups: comp.sys.mac.programmer
Subject: Does anyone know about "Time-Saver Engines"?
From: pietro@deis35.cineca.it (Pietro Caselli)
Date: Fri, 10 Apr 92 11:57:22 GMT
Organization: Department of Mathematics, University of Bologna, Italy

I hope that the Mac programmer community could help me. I do not usually
read this newsgroup, so this may have come out agin in the past. Please
forgive me it this is so, and answer me nonetheless.

I have found in an old copy of the Mac Development Tool & Languages
Guidebook (Fall 1989) an advertisement page about some source code called
"Time-Saver Engines", containing a full-featured WP, an object oriented draw
editor and a finder-like interface, from a SW firm called "DataPak Software"

I tried to phone them, but the firm has moved and a different firm answered.
I don't have a newer copy of the Guidebook, so I cannot check whether the
advertisement page still exists.

All I have is their address,
DataPak Software, Inc.
14011 Ventura Boulevard #507
Sherman Oaks, CA 91423
Tel. 818 - 905-6419

Does anyone know whether this firm still exists and sells this software? If
it does, what is their address, telephone, fax or E-mail? If it does not, do
you know whether it is possible to directly contact the authors or have in
any other way a personal agreement for obtaining that code?

I have used a friend account as there are some problem with my access to 
the news, and I don't usually read this newsgroup, so please e-mail me 
directly at
fabio@cirfid.unibo.it.

Thank you very much.

Fabio Vitali

--
Fabio Vitali                  There's a clear morale to this tale, now that
Dept of Computer Science     I think about it: when you're dead you're dead.
Univ. of Bologna  ITALY             And yet another morale occurs to me now:
e-mail: fabio@dm.unibo.it         make love when you can. It's good for you.
                                                              Kurt Vonnegut
-- 
Pietro Caselli				|
Internet: pietro@deis35.cineca.it	|    IF YOU MEET THE BUDDHA
	  zaphod@petruz.sublink.org	|     ON THE ROAD,KILL HIM.
Newsgroups: comp.sys.mac.programmer
From: brian@galileo.jsc.nasa.gov (Brian Donnell)
Subject: Re: Trouble initializing structures in THINK C 5.0.2
Organization: NASA/JSC
Date: Mon, 6 Apr 1992 20:56:41 GMT

In article <1992Apr6.100118.25393@bronze.ucs.indiana.edu>, Steve Creps <creps@silver.ucs.indiana.edu> writes:
> In article <frain.701924552@depot.cis.ksu.edu> frain@cis.ksu.edu (Jerry Frain) writes:
> >	struct foo {
> >		char *a;
> >		char *b;
> >	};
> >	struct foo bar[2] = {{"1", "2"}, {"3", "4"}};
> 
>    In Example 2, however, you are declaring the fields of foo as _pointers_,
> so all that gets allocated are places to hold addresses of places to hold
> characters.  Note that "char *a" doesn't tell how big the string is.
> Declaring it "char a[2]" would work, because that would actually allocate
> two characters for the given string (including the zero terminator).
> 

No.  You are incorrect.  The above example is legitimate C.  As to why it
does not work for the original poster in Think C, I don't know; it works
for me.

The string literals are allocated in the static data space by the compiler,
and the fields of the structure are assigned the addresses of those
literal strings.

Brian Donnell
NASA/JSC


Newsgroups: comp.sys.mac.programmer
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Re: Using "OpenStdCompression" with MPW QuickTime headers in THINK C
Organization: Symantec Corp.
Date: Thu, 16 Apr 1992 14:14:50 GMT

In article <1992Apr14.181300.19306@terminator.cc.umich.edu> potts@itl.itd.umich.edu (Paul Potts) writes:

   I got an answer about using "OpenStdCompression" in THINK C. The
   solution is to put the call, and the prototype in the header file,
   into all capitals: OPENSTDCOMPRESSION.

A better solution is to create a vocabulary file. This is just a file
with a list of names of the symbols defined in the .o file. You can
edit this file to change the all uppercase names to match the names in
the header files. See the User Manual, p. 275, for more info.

   The OConv utility seems to create a project that can't be opened by
   THINK C.  Does anyone know why this is? I get a "ZREF error" -
   "Please remove objects" when I try to open the resulting project
   file.

This is strange. I've converted the libraries before and haven't seen
this problem; make sure that you're using C 5.0.2. You don't need to
open up the projects anyway -- you should just use them as libraries,
as you'd use the MacTraps project.

	-phil
--
   Phil Shapiro                                   Software Engineer
   Language Products Group                     Symantec Corporation
		   Internet: phils@cs.brandeis.edu
From: glenn@gla-aux.uucp (Glenn Austin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Memory Manager Problems & System 7.0.1?
Date: Tue, 7 Apr 92 14:03:39 PST
Organization: The Pit Lane
Reply-To: glenn%gla-aux.uucp@skinner.cs.uoregon.edu
X-Mailer: uAccess - Macintosh Release: 1.5v4


In article <neilg.702502872@sfu.ca> (comp.sys.mac.programmer), neilg@fraser.sfu.ca (Neil K. Guy) writes:
>  (apologies if this is an FAQ)
> 
>  Does anyone know if Apple has fixed the memory manager bug that affects
> machines from the IIci on up? I have an INIT that supposedly fixes the
> problem, but I was wondering if it's necessary with 7.0.1 or with the
> new System 7 tuneups... thanks in advance!

If you are talking about MM Init, I have one piece of advice for you:

  DON'T USE IT!!!

It was originally designed for use with 6.0.5 on the IIci, but was extremely
buggy, and was never supposed to have been released outside of Apple --
but someone let it out.

System 7.0 and later (and possibly 6.0.7/.8, but I haven't checked it out)
have fixes in place for the memory manager bug.

===============================================================================
| Glenn L. Austin                | "Turn too soon, run out of room.           |
| Macintosh Wizard and           |    Turn too late, much better fate."       |
| Auto Racing Driver             |   -- Jim Russell Racing School Instructors |
| Usenet:  glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu    |
===============================================================================
From: wstomv@wsinfo01.win.tue.nl (Tom Verhoeff)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Floating Windows in ResEdit -- Help!
Keywords: ResEdit RSSC
Date: 6 Apr 92 14:24:36 GMT
Reply-To: wstomv@win.tue.nl
Organization: Eindhoven Univ. of Technology, The Netherlands

In article <scott.702537954@mcl> scott@mcl.mcl.ucsb.edu (Scott Bronson) writes:
>Has anyone out there gotten a floating window to work in a ResEdit
>extension (RSSC)?

Can someone please explain what FLOATING WINDOWS are?  I tried to find
out through Inside Macintosh X-Ref, but without success.  They are,
for instance, also mentioned in Inside Macintosh volume VI (top of p. 5-8):

	[When receiving a suspend event,] [y]our application should
	also hide any floating windows, selections, and so on.

Tom
-- 
INTERNET: wstomv@win.tue.nl  /    Eindhoven University of Technology
VOICE: +31 40 47 41 25      /    Dept of Mathematics & Computing Science
FAX: +31 40 43 66 85       /    PO Box 513, NL-5600 MB Eindhoven, Netherlands
From: nagle@netcom.com (John Nagle)
Newsgroups: comp.sys.mac.programmer
Subject: Specifying -model for MPW C++
Summary: MPW C++ 3.2 won't accept "-model"
Keywords: model MPW C++
Date: 14 Apr 92 17:13:27 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest)


     The MPW C and C++ compilers don't seem to be updated together as of
MPW 3.2.  C will accept "-model farData" and "-bigseg", but C++ doesn't
understand these yet.  "-m" seems to allow big objects, but linker
warnings about segments > 32K still appear.  What's the right way to
use large objects in MPW C++?

					John Nagle
From: ksand@apple.com (Kent Sandvik)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think Class Library discussion list
Date: 14 Apr 92 19:20:41 GMT
Organization: MacDTS Mongols

In article <v31tc=r@rpi.edu>, orlint@vccsouth20.its.rpi.edu (Timothy Troy
Orling) writes:
> 
> In article <1330008@hpgrla.gr.hp.com> jbm@hpgrla.gr.hp.com (Jim Moy) writes:
> >>Is there a discussion list dedicated to the Think Class Library? If not I...
> >>mind maintaining a mailing list and an archive here at Brown University.
> >
> 
> For that matter, how about about comp.sys.mac.programmer.TCL ?
> Besides, there are too many articles posted here already!

..or comp.sys.mac.programmer.OOP which would contain most of the
object oriented frameworks and languages. We had this discussion before,
is it time to split the mac programming group to sub-groups or not?

Cheers,
Kent
Newsgroups: comp.sys.mac.programmer
From: dougm@cns.caltech.edu (Doug McNought)
Subject: Re: question: THINK C "real window" console available?
Organization: California Institute of Technology
Date: Fri, 10 Apr 1992 03:27:22 GMT


In article <1992Apr9.134115.1716@nic.csu.net> eburk@russian.sfsu.edu (Eli K. Burk) writes:

   I am learning C and have decided to learn C first -then- experiment
   with the toolbox. However THINK C's console.h does not include a 
   "real" mac window - has anyone written one. The best case would one in  
   which I could just comment out console.h an have the code be ansi
   compliant.

   If one doesn't exist perhaps someone could make one available for ftp.

What do you mean, "real"?? I am befogged. Please be more specific.

-doug
--
<><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
<> Doug McNaught                          dougm@descartes.caltech.edu <>
<>  Help!!! I'm addicted to *Spaceward Ho!* Is there a support group? <>
<><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
From: bluecow@unix.cis.pitt.edu (Tobish E Smith)
Newsgroups: comp.sys.mac.programmer
Subject: Doing playthru on a Quadra
Date: 10 Apr 92 21:15:57 GMT
Organization: University of Pittsburgh

I'm trying to get continuous sound play-thru on my Quadra (a la the Audio
dialog box in Hypercard 2.1).  Having purused IM VI, it _seems_ that this
should be possible with just two calls:

err = SPBOpenDevice(NIL, siWritePermission, &myRefNum);
SPBSetDeviceInfo(myRefNum, siPlayThruOnOff, daPtr);

(where the value in daPtr is something between 1 and 7)

I know there's a little PD program available (actually, it may be shareware...)
called PlayThru which is supposed to do just this, but it doesn't work on
my Quadra (even though the play-thru in Hypercard works fine), so I'm
suspecting that perhaps the Q requires some extra code or something.  Can
anyone shed some light on this please?

Thanks,
Tob

bluecow@unix.cis.pitt.edu
From: zee@fwi.uva.nl (Daniel M. van der Zee (I89))
Newsgroups: comp.sys.mac.programmer
Subject: Re: How do I find out if Multi-finder is running??
Date: 16 Apr 92 14:48:58 GMT
Organization: FWI, University of Amsterdam

Maybe we should create a group 
     comp.sys.mac.programmer.find.out.if.multifinder.is.running

Daniel van der Zee
zee@fwi.uva.nl
From: nerm@apple.com (Dean Yu)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Patching traps at INIT time under sys. 7
Date: 10 Apr 92 17:17:02 GMT
Organization: Apple Computer, Inc.

In article <1992Apr4.223527.3101@aplcen.apl.jhu.edu>, haceaton@aplcomm.jhuapl.edu (haceaton@aplcomm.jhuapl.edu) writes:
> 
> I am trying to patch the trap _initwindows in an INIT.  It seems to work
> fine under system 6.0.x, but I have determined that when the finder loads
> under system 7 it seems to do a wholesale replacement of many trap addresses
> without linking to the existing patch code (i.e. those put in before the
> finder loaded)!  I haven't found anything in I.M VI that warns me about this
> either.  It seems like I must be missing something very fundamental here
> since all the other INITs that I have seem to be able to use _settrapaddress
> to successfully patch traps made after the finder loads.
> 
> Does anyone know what I'm doing wrong??  Please respond via E-mail
> to haceaton@aplcomm.jhuapl.edu
> 

  You're not doing anything wrong.  The Process Manager completely replaces
_InitWindows with its own version when it starts up.  And you're right.  It
doesn't call through to the old one.

  -- Dean Yu
     Blue Meanie, Negative Ethnic Role Model, Window Cleaner,
      Skanky Hack Consultant, etc.
     Apple Computer, Inc.
Newsgroups: comp.sys.mac.programmer
From: cabruen@athena.mit.edu (Charles Alan Bruen)
Subject: Need coordinates of earth
Organization: Massachusetts Institute of Technology
Distribution: usa
Date: Fri, 10 Apr 1992 00:07:54 GMT

Hello:

	Does anyone have a set of points that describe the earth
surface. Such as the lat and long coords of the continents. In my
program I would like to display a map of the earth that can be resized,
and the only way I can think of doing that is to have the coordinates of
the continest. I would really appreciate it if I could get a copy of the
coords or if somebody knows where I can look for them.

Thanks in advance.


Charles Bruen
cabruen@athena.mit.edu

Newsgroups: comp.sys.mac.programmer