HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.mac.programmer
From: tmorrow@oracle.com (Thomas Morrow)
Subject: recording not stopping in SoundManager
Organization: Oracle Corporation, Belmont, CA
Distribution: comp
Date: Tue, 5 Jan 1993 05:08:05 GMT
X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.


I am having a rather weird problem-- I call SPBRecord with an
completion routine defined, and the completion routine gets called
only sometimes.  Other times the thing keeps recording past my buffer.
Anybody know what could be the matter (I am pretty sure that I am
setting the bufferLength correctly).

Thanks!

Tom			tmorrow@us.oracle.com
--

---------------------------------------------------------------------------
Tom Morrow       3OP4     voice:415-506-2202    Office: 427
tmorrow@us.oracle.com       fax:415-506-7292    Application Object Library
---------------------------------------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: jess@gn.ecn.purdue.edu (Jess M Holle)
Subject: Known problems with MPW's SIOW library???
Organization: Purdue University Engineering Computer Network
Date: Wed, 6 Jan 93 06:52:58 GMT

Are there big, known problems with MPW's SIOW library?  I know
I asked this a year or two ago (shortly after the SIOW library
came out.  I just seem to have inexplicable problems when I use
it, though I am not discounting my own errors.

I am currently working on getting a UNIX port working under
MPW.  It is already working perfectly under Think C.  It now
compiles fine under MPW (after some minor changes).  When I
actually run the application, however, the file I/O routines do not
seem to operate correctly.  I have played with various compiler,
linker, and lib settings and got the program to work correctly once.
This makes me all the more suspicious.  Unfortunately, I forgot the
settings.


Jess Holle
Newsgroups: comp.sys.mac.programmer
From: 880840m@axe.acadiau.ca (MICHAEL ALEXANDER MCKAY)
Subject: sound input
Organization: Acadia University
Date: Mon, 11 Jan 1993 19:44:14 GMT


I want to use the Sound Input Manager, but my ancient (Borland) Pascal 
compiler doesn't know about it, and I lack IMv6.

I need the declaration for SndRecord, in this format...
FUNCTION Fix2SmallFract(f:fixed):SmallFract; INLINE $3F3C,$0001,A82E;

... and the value of siBestQuality.
From: iscjcw@uccvma.ucop.edu (Jerry Wilcox)
Newsgroups: comp.sys.mac.programmer
Subject: Re: TopSoft contacts
Followup-To: comp.sys.mac.programmer
Date: 4 Jan 1993 22:58:39 GMT
Organization: University of California, Office of the President
Distribution: world
NNTP-Posting-Host: ajax.ucop.edu

> In article <29869@castle.ed.ac.uk> ngse18@castle.ed.ac.uk (J R Evans) writes:
> >jimlynch@netcom.com (Jim Lynch) writes:
> >
> >>Meetings, oh yes, meeting of TopSoft
> >>6:00 PM PST wraps around to 10am Thursday in Perth
> >
> >And wraps to 0300 CET (0200 UT), if I've got my time zones right.  Pity, 
> >but it rather looks as if only the most dedicated Jolt drinkers are
> >likely to join from Europe!

The exclusion of European contacts has been noted and a couple of possible
solutions are under discussion.

One idea is to have two meetings, several hours apart, so that all could
participate in one or the other of them. This is obviously not ideal, but
is better than nothing.

The meeting "minutes" (a loosely-edited transcript of the chat session) are
available on the ftp site and you can also arrange to have them mailed to
you if you so desire. Drop a note to ts-info@syrinx.kgs.ukans.edu if you
are interested in either option.

-----------
Jerry Wilcox - iscjcw@uccvma.ucop.edu
All opinions expressed are MINE -- I'd have a different job if the
University wanted me to speak for it.
From: jpugh@apple.com (Jon Pugh)
Newsgroups: comp.sys.mac.programmer
Subject: Re: hypercard & heirarchical menus
Date: 8 Jan 93 08:18:05 GMT
Followup-To: comp.sys.mac.programmer
Distribution: na
Organization: Apple Computer, Inc.

In article <1993Jan6.122157.1901@jarvis.csri.toronto.edu>,
tracyn@dgp.toronto.edu (Tracy Narine) wrote:
> 
> I need heirarchical menus in a hypercard stack.  Is there an XCMD
> available for supporting this?

I have a popup menu XFCN on ftp.apple.com in /pub/pugh/hyperstuff and I use
a Rinaldi Menu XCMD for heirarchical menus in the menubar.  It should be on
Sumex in the Rinaldi stack.

Jon
From: housen@plato.ds.boeing.com (Kevin housen/.na)
Newsgroups: comp.sys.mac.programmer
Subject: C array question
Date: 11 Jan 93 23:48:01 GMT
Distribution: usa
Organization: Boeing Defense & Space Group

I am making a jump from Pascal to C and have a simple question
regarding creation of a 2D array at runtime.  I want to create
an array of floats r rows by c columns.  A (non-Mac) friend
suggests

        float **m        /* this will be the 2D array */
        int r, c, count

        m = (float **) malloc (r*sizeof(float *));
        for (count=0, count < r, count++)
            m[count] = (float *) malloc (c * sizeof(float) );

1.  If, instead of malloc, I want to use the Mac memory manager
   routines, does it matter if I use NewPtr or NewHandle (assuming
   I lock handles at the appropriate times)?  Does malloc just
   call NewPtr?

2.  Can this be generalized to a 3D array?

BTW, I am using THINK C 5.x

Thanks heaps -

Kevin Housen
housen@plato.ds.boeing.com
From: flc3527@zeus.tamu.edu (CAMPBELL, FRED LELAND)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think-C-Printer
Followup-To: comp.sys.mac.programmer
Date: 12 Jan 1993 15:51 CST
Organization: Texas A&M University, Academic Computing Services
Distribution: world
NNTP-Posting-Host: zeus.tamu.edu
News-Software: VAX/VMS VNEWS 1.41    

In article <babb-120193123621@larc.sdsu.edu>, babb@sciences.sdsu.edu (J. Babb) writes...
>Hi Y'all (gearing up for the next 4 years :-)  ),
>Using Fetch (Automatic, Text, and Binary modes) I downloaded
>think-c-printer-11.hqx from sumex.  Then using BinHex 5.0 (with & without
>Text Filter) and the BinHex embedded in MacMH, I unbinhexed it, got a
>think-c-printer-11.sit GENERIC icon document (No C-Clamp icon !!)
>And Stuffit gags on it. Well, actually it doesn't even see it.
>What's up?
>Jeff.

You probably have a StuffIt Deluxe archive. You'll find the file type is 'SIT!'
and the creator is 'SITD'. You need to download StuffIt Expander, a free
utility from Aladdin. StuffIt Expander debinhexes, uncompresses all flavors of
StuffIt archives (Classic, Lite, Deluxe), and uncompresses Compact Pro archives.
You can find StuffIt Expander in the /util directory (I think) at sumex.
Trey.
Newsgroups: comp.sys.mac.programmer
From: ericsc@microsoft.com (Eric Schlegel)
Subject: Re: Distinguishing FrontClicks?
Date: 04 Jan 93 16:08:43 GMT
Organization: Microsoft Corporation

In article <absurd-030193142840@seuss.apple.com> absurd@apple.apple.com
(Tim Dierks, software saboteur) writes:
>In article <BzpzH1.8tD@unx.sas.com>, Michael Hecht
><Michael_Hecht@mac.sas.com> wrote:
>> 
>> I turned on the getFrontClicks bit in my SIZE resource, because it makes
>> sense for my application. However, I don't want *all* parts of the window
>> to respond to layer-changing clicks. How can I distinguish a click that
>> changes my layer from other clicks?
>
>A technique that's worked for me is to compare the 'when' fields of the
>click and the resume event; if the mouseDown has a time before the
>resume event, then it's probably this click that caused you to be switched.

Wow, I know something that Tim doesn't... :) I've never actually used this,
but according to IM 6, pg. 5-16, the activeFlag bit in the modifiers field
of a mouseDown event will be set if the mouseDown caused your layer to become
frontmost. Also see pg. 2-20 in IM:Mac Toolbox Essentials. Note that this is
a System 7-specific feature - it won't work for MultiFinder under System 6.

-eric
-----
My opinions, not Microsoft's.
From: grobbins@Apple.COM (Grobbins)
Newsgroups: comp.sys.mac.programmer
Subject: Re: SFGetFile's directory after an Open Event
Date: 5 Jan 93 06:49:40 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <1993Jan4.205533.25405@kth.se> d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
>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.

Changing low-memory globals is not a particularly dangerous habit for
system software, so that's not the reason the system isn't setting the
Standard File directory.  I'm not certain if the Blue Meanies made a
calculated decision in System 7 on setting up Standard File or not, but
the way the current system leaves Standard File pointing to useless
places is clearly unpleasant.

>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.

But what about when the user makes a change to the open document
and then chooses Save As...?  Standard File continues to point to
somewhere irrelevant (for most Apple event-aware apps, anyway.)

Back when I was doing work for DTS, I revised the Standard File Tips
Tech Note and included a recommendation that apps change the Std File
globals (SFSaveDisk and CurDirStore) when they received an 'odoc' from
the Finder.  However, I could not build a consensus on when the app
should and should not change the Std File directory (since scripting
systems may also send 'odoc's) so I never released the revised version
of the Tech Note.

No one objected to developers storing values in those low-memory globals.
Yeah, it's best to avoid doing such things, but those are well documented
globals, there is no alternative method at present, and if you isolate
access to such globals in your code, any future updates will be
relatively painless.

Except for those people who absolutely must control every aspect of
their users' environment, my current recommendation is to leave
Standard File alone.  At least this way, when the system software
folks get around to making Standard File point somewhere meaningful,
your code won't be interfering.

Grobbins                grobbins@apple.com

Usual disclaimers apply.
From: werner@dewey.soe.berkeley.edu (John Werner)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Detecting mouseDown in a region?
Date: 5 Jan 1993 19:12:50 GMT
Organization: School of Education, U.C. Berkeley
NNTP-Posting-Host: dewey.soe.berkeley.edu

In article <1993Jan5.171920.29754@fsl.noaa.gov> Art Urban writes:
>
>I have many (let's say 1000) predefined regions in a window (CPane). When
>the user clicks in the window, one of the regions will have neccessarilly
>been hit, since they are all adjacent to one another. I need to determine
>which region was the recipient of the mouseDown.

First a couple of questions: Are that many regions really necessary?
Could you use rectangles or some other simple geometric object?  Could
you use fewer?

If you really need that many regions, you could try sorting them
somehow, so you don't have to search *all* of them.  If they're small
and/or regularly sized, you could keep a list of them sorted by X or Y
coordinate (or both) and do a sort of a binary search to find the one
that was clicked in.

-- 
John Werner                        werner@soe.berkeley.edu
UC Berkeley School of Education
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: THINK C Primer Code Problem...
Date: 4 Jan 93 16:14:55 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1993Jan4.153017.1397@utkux1.utk.edu> danny@martha.utcc.utk.edu (Danny William McCampbell) writes:

>sure I typed it in just like the book.  When I try to run it gives me
>a Link Error::Undefined Button.  I have never seen this error before.

Are you sure about the spelling? C is case sensitive.
However, see below:

>Could someone give me some insight on this.  I ran precompile on it
>and it says that blackColor is undefined in the statement

>gFillColor = blackColor 

>blackColor occording to IM Vol. 1 is a global all ready defined in the
>ROMS.  What is happening here?  I have MacTraps in the project just to

The ROM can hardly define symbols for your compiler...

And _Button is an inline pascal call that actually is not in
MacTraps; it's just inline code.

ALl this makes me believe you're not including MacIncludes,
or you accidentally damaged or misplaced it.

Oh, and a word of asvice to everyone:

1) Open up the file "Mac #Includes.c"
2) Edit the #define of SIMPLIFY_PROTOTYPES so that
   it says:

#define SIMPLIFY_PROTOTYPES 0

3) Feel free to add any headers you usually use (like, AppleEvents,
Folders, GestaltEqu, ...) in the #if 0 sections by changing them to
#if 1

4) Precompile

5) Save the results as MacHeaders, replacing the existing MacHeaders.

The change in 2) above will prevent MILLIONS of bufs you may do, by
making the header fascist about pointer argument types. You should
also use Require Prototypes in the Project Options.

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  "You NEVER hide the menu bar. You might go about and change the color
  of it to the background color, but you never HIDE the menu bar."
                      -- Tog
From: aksguest@engrhub.ucsb.edu (Leonard Cuff)
Newsgroups: comp.sys.mac.programmer
Subject: Porting Visual Basic to QuickBasic
Date: 6 Jan 93 07:46:44 GMT
Organization: University of California, Santa Barbara

Someone I know has a newly written program that was authored for
Windows in Visual Basic.  They have now decided they would like
to port it to the Macintosh, and are considering QuickBasic as
the language to use on the Macintosh.  Has anyone done porting
between these two environments and care to comment generally on
their experience.  The program itself is oriented towards graphics
(there is no keyboard interaction except to enter data) so my thinking
is that aside from having to shift to the toolbox (minor :-) there
may be no major work. ??  (I.E. Visual basic and QuickBasic, both being
Microsoft products share a fairly large common subset of features ??

Please reply by email, I'll summarize on request.  (I can never keep
up with this group, though I do try).
Newsgroups: comp.sys.mac.programmer
Subject: GNU and MPW Shell?
From: seth@physc1.byu.edu
Date: 8 Jan 93 00:05:11 -0700
Distribution: world
Organization: Brigham Young University

Hi again. All I know about MPW is that it is expensive, and that you get it
from APDA, and that it consists of a shell and several compilers. I have seen
mention made of several GNU things, or gcc, or whatever, which are supposedly
free, and which use the MPW shell. At least, as far as I have deciphered from
other posts.
Big Question: Is there a way to get the MPW shell and these gnu things, or
whatever is available like compilers, emacs, etc, all for free? I would be
interested in seeing just what it is and playing with it a bit. Is it possible
to use this stuff (legally) without having to buy anything? I am not interested
in the standard MPW stuff, as I am happy with THINK and THINK's MUCH lower cost
but I am curious about this gnu stuff et al.
Thanks in advance,
Seth Leigh
BYU Physics Dept.
From: ksand@apple.com (Kent Sandvik )
Newsgroups: comp.sys.mac.programmer
Subject: Re: MPW Q: Any way to beep at end of build?
Date: 7 Jan 93 06:50:48 GMT
Followup-To: comp.sys.mac.programmer
Organization: (Evil Eye Creature from Mars, Inc.)

In article <1993Jan6.185854.6977@gn.ecn.purdue.edu>, jess@gn.ecn.purdue.edu
(Jess M Holle) wrote:
> 
> Is there any way to make the Build... menu item beep when it is
> done?  I hacked a beep into the BuildProgram script, but it only
> works if the build completes successfully.  I'd like a way to get
> a beep when the Build stops, regardless of the outcome.  (Yes, this
> is so that I can read news, etc, during compiles).

If I remember correctly Harry Chestley posted a bunch of scripts 
for such work, was it on Developer CD, or somewhere else?

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
Predictions: Soon moving to Newton DTS, bye bye.
From: rrichter@link.ph.gmr.com (Roy Richter PH/32)
Newsgroups: comp.sys.mac.programmer
Subject: Re: TCL: Bizzare Behavior Time
Date: 12 Jan 93 14:05:30 GMT
Organization: GM Research

In article <1993Jan11.220137.26434@kth.se>, d88-jwa@byse.nada.kth.se (Jon Wtte) writes:
|> The call to new is risky unless you have locked the
|> object doing the call; try an intermediate temp variable:
|> 
|> CFoo :: DoFoo ( )
|> {
|> 	CBar * aBar = new CBar ;
|> 
|> 	theBar = aBar ;
|> }

Do I have to be this nutso careful when dealing with TCL Objects?
And, does coding it like this protect me -- that is, is "theBar"
have a correct reference after the call to "new".  If so, when does that
refence get corrected?  If

	theBar = new CBar;

is potentially bad, maybe that should be somewhere in the docs.
--
Roy Richter                  Internet: rrichter@ph.gmr.com
Physics Dept, GM Research    UUCP:     rphroy!rrichter
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.comm
From: brobert@oups.dgrc.doc.ca (Bill Robertson)
Subject: Mac RPC calls
Reply-To: brobert@oups.dgrc.doc.ca
Organization: Communications Research Center, Ottawa, Canada
Date: Mon, 4 Jan 93 16:23:40 GMT

Sorry to post this twice but I screwded up the subject line on the last post.

We're going to develop a small windows/Motif/Mac(hopefully) application using
a GUI builder but to port to the Mac we need RPC.  Is this available?

All leads appreciated, will summarize.



---
Bill Robertson CRC/DRL Box 11490 Station H, Ottawa, ON CANADA K2H 8S2
Voice:(613)998-2819 Fax:990-7987 bill.robertson@crc.doc.ca 

Newsgroups: comp.sys.mac.programmer
From: amun@quads.uchicago.edu (james frederick amundson)
Subject: MPW
Reply-To: amun@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Tue, 12 Jan 1993 17:52:33 GMT

I have a problem. I don't want MPW. I have Think C and Alpha, which do 
everything I would want to do with MPW -- *except* run MPW tools. There 
are several ports of GNU utilities available only as MPW tools. I would 
love to be able to use these. I would also like to use DirectTeX, which 
exists only as a set of MPW tools.

Here are my questions:

1. What would be the cheapest way for a student like myself to obtain 
just the MPW Shell? I would be satisfied if I could just send Apple 
Events to the MPW Shell from Alpha to use the various tools. (I should 
point out that I've only used old versions of the MPW Shell. Does the 
current version support Apple Events?)

2. Would it be feasible to write a program which runs MPW tools? I would 
think that there would be a wide audience for such a program. What 
exactly does the MPW shell provide for tools? Input/output and 
environment variables? Where is this documented?

Thanks for any help.

Newsgroups: comp.sys.mac.programmer
From: kat6@quads.uchicago.edu (David Mamet)
Subject: Communications Programming on the Mac
Reply-To: kat6@midway.uchicago.edu
Organization: University of Chicago
Distribution: usa
Date: Tue, 12 Jan 1993 04:27:00 GMT

I have been trying to write a simple file transfer program to transfer text
files over a modem. I started using the Communications Toolbox, but quickly
found out that it was a lot of trouble to use, so I switched to using the
serial commands. This has been more successful, but I'm still having some
trouble getting a file to transfer. I've looked for books on the subject,
but haven't found any. Does anyone know of any books that would help, or,
preferrably, does anyone have any sample source code for transferring a text
file on a mac through a modem? Thanks a lot.


Boris Katok
kat6@quads.uchicago.edu


-- 
Boris Katok
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: How to get color I want when drawing directly to screen
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Fri, 8 Jan 1993 23:46:56 GMT

In <1993Jan8.145036.21943@rtsg.mot.com> wolfmc@rtsg.mot.com (Michael Wolf) writes:

>I am attempting to develop an arcade type game.  So I take over the whole
>screen.  I have my images in an offscreen port.

Beware multi-screen setups.

>When I draw directly from the offscreen port to the devices screen
>(ie:  directly copying data from oofscreen port to devices pixmap) the colors
>are not what I had wanted.  A copybits from the offscreen port to my front
>most window gives me my image with correct colors.

You are suffering from a color table problem. Setting a pallette
for your window is not enough, unless that pallette has pmExplicit
(and maybe pmAnimated) for EACH AND EVERY ENTRY. That's probably
what you want. Then you'll be able to say "color 218 means soft
Red, and ..."

Oh, and make sure you're hiding the menu bar, but have a way of
getting back at it (like, when pausing the game)

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

   Nothing crashes like a Macintosh.
                     -- Guy Kawasaki
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: ASCII Text to/from Postscript Printers
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Sat, 9 Jan 1993 22:33:57 GMT

In <kfHZ0Q_SMUI3FQ2W1r@transarc.com> Barry_Wolman@transarc.com writes:

>I'd appreciate any tips you can provide on writing ASCII text to and
>reading ASCII text from Postscript printers.  Sample code is
>particularly welcome.

All you have to do is send the text as a PostScript Escape
picComment. I think it's in one of the tech notes, and it's
totally the right and supported way of doing it, as long
as you don't mind non-PostScript printers ignore it.

Cheers,

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

   NCC-1701
From: jimc@tau-ceti.isc-br.com (Jim Cathey)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why does BinHex exist?
Date: 8 Jan 93 03:15:22 GMT
Organization: ISC - Bunker Ramo, Spokane, WA

In article <1993Jan7.210159.26183@netcom.com> howard@netcom.com (Howard Berkey) writes:
>A.  Makes the files larger than a binary format
>B.  Is annoying to have to convert
>C.  Doesn't seem to do anything

D.  Predates MacBinary by quite a bit (circa 1984).
E.  Uses a universal character set/format that will make it past/through
    most mailers and EBCDIC storage sites.
F.  Folds the three parts of a Mac file into a single stream for
    transfer elsewhere.
G.  Tradition!

-- 
+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC-Bunker Ramo
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!isc-br!jimc (jimc@isc-br.isc-br.com)
! II      CCCCCC !  (509) 927-5757
+----------------+
			One Design to rule them all; one Design to find them.
			One Design to bring them all and in the darkness bind
			them.  In the land of Mediocrity where the PC's lie.
Newsgroups: comp.sys.mac.programmer