HDTenEightyP/NetNews huggingface dataset:
From: George.Economou@p4.f120.n129.z1.FIDONET.ORG (George Economou)
Newsgroups: comp.sys.mac.programmer
Subject: animating palettes
Date: Fri, 28 Aug 92 21:45:20 EST
Organization: FidoNet node 1:129/120.4 - Mac For The Mind, Pittsburgh PA

I am trying to animate a palette but a few colors refuse to animate.  How can
I make it so that all colors animate?
--  
George Economou via cmhGate - Net 226 fido<=>uucp gateway Col, OH
UUCP: ...!n8emr!bluemoon!cmhgate!129!120.4!George.Economou
INET: George.Economou@p4.f120.n129.z1.FIDONET.ORG
From: paul@svl.cdc.com (Paul Kohlmiller)
Newsgroups: comp.sys.mac.programmer
Subject: Re: vrefNum from Path Name
Date: 3 Sep 92 05:25:25 GMT
Distribution: usa

lari@strauss.cs.unc.edu (Humayun Lari) writes:

>In article <Btwwt5.7Bv@taligent.com> keith@taligent.com (Keith Rollin) writes:
 [says to always use FSMakeFSSpec and not create a FSSpec on your own.]
>What about when the file/directory you're referring to does not exist?
>If I remember correctly, FSMakeFSSpec checks to make sure that it does, so
>it would return an error code when you're trying to create an FSSpec prior to
>performing a Save As... Or am I wrong about this? Keith?
My reading of IM6 seems to say that you will get an error but the
FSSpec is still good. Haven't tried it.
Other Opinions welcome.
Thanks for the pointer to IM6.
Paul K.

--
     // Paul H. Kohlmiller             //  "Cybers, Macs and Mips"    //
     // Control Data Systems, Inc.    // Internet: paul@svl.cdc.com  //
     // Acronym under construction.  // America Online: Paul CDC    //
     // All comments are strictly my own. I won't lie but my       //
     // perception of reality is at best a personal hunch.        //
Newsgroups: comp.sys.mac.programmer
From: ww2@horse.ssc.gov (Wes Price)
Subject: Desktops on multiple disks...
Keywords: desktop icons
Organization: Superconducting Super Collider Laboratory
X-Newsreader: Tin 1.1 PL5
Date: Fri, 28 Aug 1992 08:57:39 GMT

I've just started using an application which extracts the icons it displays
from the Desktop on whatever disk it happens to be launched from; 
unfortunately, for applications not "registered" in that Desktop file,
all it can give me is the generic application icon.  Aside from the brute
force copy-everything-onto-every-disk method, is there some way to combine
the desktop files off of several disks into one massive Desktop file?

Oh, BTW -- I'm running system 7.0.1 (and A/UX 3.0, for that matter).

Any help would be appreciated,

ww2
--
Wes W. Price II            "...in a few minutes, I would be free, or dead;
SSC Laboratory, Dallas TX         or, Rudolpho Laspari of Palermo, Sicily..."
ww2@horse.ssc.gov           Clark Kellogg [Matthew Broderick], "The Freshman"
From: Paul.L.Merchant.Jr.@dartmouth.edu (Paul L Merchant Jr.)
Newsgroups: comp.sys.mac.programmer
Subject: Re: little sys 7 pop up problem (popupMenuCDEFProc)
Date: 1 Sep 92 18:57:48 GMT
Organization: Dartmouth College, Hanover, NH
X-Posted-From: InterNews1.0a2@newshost.dartmouth.edu

In article <zocca-250892113905@jozef.amc.uva.nl>
zocca@amc.uva.nl (Vincent Zocca) writes:

> tracked properly by TrackControl. That is, the control is inverted to show
> itUs being tracked but the menu doesnUt actually pop up.


I had this problem when I first used popup menus:  Make sure you're
setting the actionProc field of the control to -1.  This will cause the
default action procedure to be used and will make TrackControl work
properly.

-- Paul Merchant
DCIS
From: Dale_Semchishen@mindlink.bc.ca (Dale Semchishen)
Newsgroups: comp.sys.mac.programmer
Subject: Re: tcp-ip library nonblocking I/O (Berkeley compatible)?
Date: 1 Sep 92 03:06:59 GMT
Organization: MIND LINK! - British Columbia, Canada
Distribution: world

> Daniel R. Kegel writes:
> 
> Questions:
> 1) Can select() or poll() be used with tcp/ip sockets to detect which of a
>     set of sockets is ready for I/O?
> 
> 2) Can one use non-blocking I/O on a socket?    If so, how?

On Unix systems you can use select() to detect I/O on a socket.

To poll for I/O (ie) no timeout

        timeout.tv_sec = 0;
        timeout.tv_usec = 0;
        err = select( max_fd, &read_set, &write_set, &excp_set, &timeout);

To wait for I/O with a 1.5 second timeout

        timeout.tv_sec = 1;
        timeout.tv_usec = 500000;
        err = select( max_fd, &read_set, &write_set, &excp_set, &timeout);

To wait forever until I/O arives

        err = select( max_fd, &read_set, &write_set, &excp_set, NULL );

Once select returns you then determine which socket has I/O on
it by using the FD_ISSET() macro

You will have to do some investigation to determine if the
full functionality of select() has been implemented on the Mac

--
Dale Semchishen              | Internet: Dale_Semchishen@mindlink.bc.ca
Personal Designs Inc.        | tel: (604) 590-0056
                             | Vancouver, BC, Canada
From: dpb@sdchemw2.ucsd.edu (Doug P. Book)
Newsgroups: comp.sys.mac.programmer
Subject: MPW C++ Bundle For Sale
Date: 3 Sep 1992 21:46:05 GMT
Organization: UC San Diego Chemistry
Distribution: world
Reply-To: dpb@sdchemw2.ucsd.edu (Doug P. Book)
NNTP-Posting-Host: sdchemw2.ucsd.edu
Keywords: mpw, c++, c


	I'm selling a CD-ROM issue of MPW C Bundle v. 3.2 and floppy issue of
MPW C++ v 3.1.  This includes MPW shell, MPW C, MPW C++, MPW Assembler, SADE,
Macsbug, ResEdit, etc.  Everything is included: CD-ROM, disks, manuals, etc.
	The currently shipping versions of this product is the MPW
C/C++ Bundle 3.2.3, which costs $575.00 plus tax.  It would cost you $100.00
to update to this version from the version I'm selling.
	Keeping that $100.00 upgrade fee in mind, make me an offer on
the package I'm selling.  I'm not sure how much these things go for
used, but I'd expect to get at least $250.00, making the complete
upgraded cost for the buyer $350.00.
	So, the best offer at $250.00 or greater with buyer paying
shipping will get it!  I'm selling it because I never use it.
	Please send offers and questions to my mail address: dbook@ucsd.edu.
	

Thanks,

Doug Book
From: sichase@csa1.lbl.gov (SCOTT I CHASE)
Newsgroups: comp.sys.mac.programmer
Subject: malloc in Think C
Date: 30 Aug 92 20:52:35 GMT
Organization: Lawrence Berkeley Laboratory - Berkeley, CA, USA
Distribution: na
Reply-To: sichase@csa1.lbl.gov
NNTP-Posting-Host: 128.3.254.196
News-Software: VAX/VMS VNEWS 1.3-4   

Sorry to ask such a newbie question.  I'm sure that this has been discussed
many times.  But I never paid close attention until it came up for me yesterday.
Due to a "data segment too big" message when trying to use the debugger,
I had to dynamically allocate a 10K array, like this:

char *array;
array = malloc(10000*sizeof(char));

My question is:  Do I have to worry about memory moving around?  Will
array continue to point to the correct data regardless of what toolbox 
routines I use which scramble memory?  Do I have to do this with a handle
instead or does Think's implementation of malloc lock the memory for me? 

-Scott 
--------------------
Scott I. Chase			"The question seems to be of such a character
SICHASE@CSA2.LBL.GOV		that if I should come to life after my death
				and some mathematician were to tell me that it
				had been definitely settled, I think I would
				immediately drop dead again."      - Vandiver
From: LAFARCIOLA@ICHCMNS.CMNS.MNEGRI.IT (max)
Newsgroups: comp.sys.mac.programmer
Subject: About QuickBasic/Think C....
Date: 3 Sep 92 11:28:00 GMT

Hello!
I started to program with Macintosh since a few time and now I've written an 
application (with THINK C 5.0) which creates a menu and a window which has a 
grid of rows x columns cells to input numbers.I'd like to use it writing a MBPC 
in order to use it as a library for my Quick Basic program.
But...after I make my application as a PCR (pure-code-resource) library:
/**** MAIN PROGRAM *******/
/*** compiled as a MBPC
     name: MyGrid   id:60   ***/
		
#include "BasicLSC.h"
#include <SetUpA4.h>
main()
{
	Handle h;
	
	SAVEREGS();   // save A4 and A5 registers
	RememberA0(); // to access  resource 
	SetUpA4();    // globals
	// Locking code resource
	asm {
		_RecoverHandle  // a0 already points 
		move.l a0, h    // to resource
	}
	HLock( h );
		// initialization
	ToolBoxInit();
	MenuBarInit();	
	r=10;c=5;
	SetUpDragRect();
	SetUpSizeRect();

	CreateWindow( r, c ); // window with a grid of rows x columns cells	
	MainLoop();      // management of events for window created
	HUnlock( h );
	RESTREGS();   // restore A4 and A5 registers
	UnloadA4Seg( 0L );	// to unload multi-segment resource
}
when I run (under MultiFinder) my QuickBasic program:

REM MacAllfit 1.0
...
...
LIBRARY "MyGrid"
CALL MyGrid
LIBRARY CLOSE
...
processing of numbers inputted into grid
...
...
END

a) sometimes refreh drawing is not performed thus some piece of window is not 	
   drawn
b) after quitting and returning to my QBasic program it bombs or turns up to  
   the FINDER with an unexpected error. 
Anyone may help me?
Thanks in advance,
	Massimo La Farciola
	
	-Excuse for my poor english-

E-Mail: lafarciola@ichcmns.cmns.mnegri.it
Organization: "Mario Negri Sud" Institute
Newsgroups: comp.sys.mac.programmer
From: mikew@kpc.com (Mike Wexler)
Subject: Writing an XCMD in Think C
Keywords: Think C, Hypercard, XCMD, audio
Reply-To: mikew@kpc.com
Organization: Kubota Pacific Computers Inc.
Date: Wed, 26 Aug 1992 22:08:10 GMT

I would like to write a Hypercard stack that incorporates recording
and playback of sounds on my Mac LC. I have some old Hypercard manuals
that describe Hypercard 1.2. I glanced through a Hypercard 2.0 manual 
and couldn't find any built in capability of Hypercard for this.
So my first thought was to add and XCMD to Hypercard using Think C.
When I went to my Think C manual to find out how to do this, it referred
me to an appendix to one of the Inside Mac books.
To make a long story short, I would like to build this simple application
without buying the whole Inside Mac set (about to be obsoleted anyway),
plus the Hypercard Developers set (the Hypercard that came with the
LC can be put into scripting mode trivially). Does anyone have any
could example source code for a Hypercard XCMD?
Any suggestions on the minimal expenditures to get enough information
to write this application.
BTW, I'm just writing a toy application for my kids at the moment and
trying to learn a bit about programming a Mac at the same time.
It sure is a lot different than programming a Unix box.
--
Mike Wexler (mikew@kpc.com)
Newsgroups: comp.sys.mac.programmer
From: Jim_Holt@aprdlgtr.sps.mot.com (Jim Holt)
Subject: Re: Sound Loop in a with a Modal Dialog?
Followup-To: comp.sys.mac.programmer
Organization: Motorola
Date: Thu, 3 Sep 1992 19:21:14 GMT

In article <1992Sep3.145524.8874@utkux1.utk.edu>, danny@utkux1.utk.edu
(Danny W. McCampbell) wrote:
> 
> Hi.  I want to play a sound continuously while a modal dialog is 
> present on the screen.  I have successfully go the loop to work
> without the modal dialog statement but the loop is only executed
> twice when I call modal dialog.  Here is  some sample code:
> 
> dialogtrue := true;
> while dialogtrue do
> begin
>   FlushSndChannel(mySndChan);
>   if SoundisStopped(mySndChan) then
>   begin
>     PlaytheSound(mySndChan);
>   end;
>   ModalDialog(nil, itemHit);			{Call Modal Dialog until the user clicks in the dialog}
>   if itemHit = 1 then
>     dialogtrue := false;
> end;
> StoptheSound(mySndChan);
> DisposDialog(AboutDialog);				{Dispose of the Dialog}
> 
> The sound plays only twice then stops playing.  Any ideas how I can
> do this successfully?  Thanks in advance.

The problem is that when you call ModalDialog, you don't get control back
until the user does something (mouse click, etc).  What you have to do is
simulate a modal dialog by setting up an event loop.  Here is a 
C example of how I have done this in the past ...

/*------------------*/

DialogPtr		dPtr,dummy;
GrafPtr			old_port;
Boolean			done = FALSE;
short			which;

	GetPort(&old_port);
	PositionDialog('DLOG',SOME_DLOG);
	dPtr = GetNewDialog(SOME_DLOG, NULL, (WindowPtr)-1L);
	if(dPtr == NULL)
	{
		/* handle the error, we didn't get our dialog rsrc ... */
		return;
	}
	DrawDialog(dPtr);
	SetPort(dPtr);
	while (!done)
	{
		while ((!GetOSEvent(everyEvent, &localEvent)) && (!done))
		{
      /* do whatever it is you need to do to keep your snd playing */
		}
		if (IsDialogEvent(&localEvent))
		{
			if (DialogSelect(&localEvent,&dummy,&which))
			{
				GlobalToLocal(&localEvent.where);
				switch (which)
				{
					case OK_ITEM:
						done = TRUE;
      /* handle the OK button */
						break;				
					case CANCEL_ITEM:
						done = TRUE;
      /* handle the CANCEL button */
						break;
     default : break;
			}
		}
	}
	DisposDialog(dPtr);
	
	SetPort(old_port);


Hope this helps ...
-jh
+-------------------------------------------------------------------------+
|   I used to have a catchy signature, but I forgot what it was ...       |
|                                                                         |
|   Jim Holt                                                              |
|   Motorola, Inc    Jim_Holt@aprdlgtr.sps.mot.com                        |
+-------------------------------------------------------------------------+
From: bpb9204@tamsun.tamu.edu (Brent)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Is there a PD console package for Mac?
Keywords: mac, console, pd
Date: 1 Sep 92 18:14:39 GMT
Article-I.D.: tamsun.1992Sep1.181439.21825
Organization: Texas A&M Univ., Inc.

vladimir@intrepid.intrepid.com (Vladimir Vukicevic) writes:
|Does anyone know of a PD 'console' package, like THINK provides? I have THINK C,
|but I am really looking for the source of one, because I would like to add
|more features (I am writing a CLI). If there isn't one, does anyone know
|of a way to do I/O on the mac (with, for example, printf() & fgets()...)?
|I was thinkning of creating a window, and then using TextEdit, but I can't
|figure out a way to make the prompt non-overwriteable, and how to get a specific
|part of the text. Any ideas? Suggestions? Comments?


Vladimir,

Good news!  I've done this exact thing and I posted info about it many months
ago but got no response (nobody needed it then, I guess).  What I have done
is to create a "shell" window that has a simple TextEdit area.  The
area has a typical prompt printed that the user cannot change.  The user
is allowed to type, edit, copy, paste, etc into this area and then when
the user hits the <Enter> key, the program sucks the new text out that the
user entered.  Processing is not done for the <Return> key;  therefore, the
entered text may have line breaks in it.

The prompt text string is stored in a resource and can be changed.

There is also a basic routine to Print() strings to the window (what you
put in the string to print is up to you -- use NumToStr(), sprintf(), 
whatever).

I'll gladly make the source available to anybody interested.

-Brent
Newsgroups: comp.sys.mac.programmer
From: zimerman@phoenix.Princeton.EDU (Jacob Ben-david Zimmerman)
Subject: How do I get ref. info for the active SysFolder for a prefs file?
Originator: news@nimaster
Organization: Princeton University
Date: Mon, 31 Aug 1992 20:57:40 GMT

After looking in the FAQ, I find I still need to post this.  I am a
novice using C on the Mac, and I am trying to use the File Manager for
the first time.  I need to do ops on a preferences file in the system
folder for my app.  My question, after going through IM I-V and the FAQ,
is how do I figure out the reference info (ie volRefNum, dirRefNum or
whatever) for the currently active System Folder so I can figure out if
my app already has a prefs file and where to write to it?  The only
thing I can find in IM is a global called bootDrive, but I don't know if
that's what I need.  In any case, any help would be much appreciated!
Thanks for your patience. :-) 

-JBZimmerman!

-- 
___________           |-Is that Scotch over there?  Hold everything.
     ||               |                -Sean Connery, The Russia House
||   ||acob Zimmerman!+> <zimerman@phoenix.Princeton.EDU> INTERNET 
 \===/                |  <zimerman@PUCC>                  BITNET
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MacsBug symbols from assembler code?
Date: 24 Aug 92 19:22:58 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <1992Aug21.030941.6506@bilby.cs.uwa.edu.au>, quinn@cs.uwa.edu.au
(Quinn) wrote:
> 
> In article <1992Aug20.155733.6869@daimi.aau.dk> Peter Andersen,
> datpete@daimi.aau.dk writes:
> >Am I missing something?
> 
> Hmm.  I had great fun getting MacsBug symbols working consistently
> in my latest Asm project.  Try using the following macro (with
> apologies to those people whose systems don't expand tabs
> properly)...
> 
> ----------------------------------------------
> 	macro
> 	MacsBug	&Name,&rts:int
> 	lclc	&oldstr
> 	gbla	&debug
> 
> 	if &debug then
> 	
> 	if &rts then 
> 	rts				; force rts in specific cases
> 	endif
> 	
> 	dc.b	&len(&name)+$80		; length of string + $80 marks symbol
> &oldstr	setc	&setting('string')
> 	string	AsIs
> 	dc.b	'&upcase(&Name)'	; define the string AsIs
> 	string	&oldstr
> 	align				; pad to word boundary
> 	dc.w	0			; no literals
> 	
> 	endif
> 	
> 	endm
> ----------------------------------------------

Here's the macro I currently use.

 

   macro
    symbol      &routineName=&SysMod,&size=0
    lclc        &name, &oldString

    IF &TYPE('DEBUG') <> 'UNDEFINED' THEN
        rts
        if &routineName[1:1] = '''' then
            &name: setc &eval(&routineName)
        else
            &name: setc &routineName
        endif

        &oldString: setc &setting('string')
        string asis
        if &len(&name) < 32 then
            dc.b &len(&name)+$80,'&name'
        else
            dc.b $80,&len(&name),'&name'
        endif
        string &oldString
        align
        dc.w &size
    endif

    endm


Just becareful where you add this.

It needs the RTS because sometimes you write Asm routines without a
Link/Unlink.  The usage should be like this.

SomeRoutine   proc
              ...
              ...
              ...
              symbol "SomeRoutine"
              endp


-----------------------------------------------------------------------
Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
                             |          Sound Manager Expert
Apple Computer, Inc.         | RAll opinions expressed are mine, and do
20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
Cupertino, CA 95014          |       employer, Apple Computer Inc.S
Newsgroups: comp.sys.mac.programmer
From: zben@ni.umd.edu (Charles B. Cranston)
Subject: Re: Event Loop
Followup-To: comp.sys.mac.programmer
Organization: UM Home for the Terminally Analytical
Date: Thu, 3 Sep 1992 18:54:19 GMT

In article <1992Sep3.174732.9231@cs.wisc.edu>,
andrewt@scrooge.cs.wisc.edu (Andrew Thomas-cramer) wrote:
 
> isEvent is always 0, fortunately -- but it is not FALSE. GetNextEvent
> returns zero (noErr) unless an error occurs. You're confusing noErr
> with FALSE, both of which are equal to zero.

Sigh - wrong.  More dangerous misinformation.  It only took me 45
seconds to pull my Inside Mac off the shelf and find GetNextEvent.
You'd think someone would do that before sending a netnews message
to tens of thousands of people on thousands of computers...

Ahem:

"Before reporting an event to your application, GetNextEvent first
 calls the Desk Manager function SystemEvent to see whether the system
 wants to intercept and respond to the event.  If so, or if the event
 being reported is a null event, GetNextEvent returns a function result
 of FALSE; a function result of TRUE means that your application should
 handle the event itself."

Now, the Desk Manager clause is not as important as it once was.
Since DAs are run in their own layers in system 7 and in a unified
DA layer in system 6 with multifinder, the only time this can make
a difference is on system 6 without multifinder, or system 6 with
multifinder and a DA loaded into the application's heap using the
option key while opening the DA.

Modulo this, the result from GetNextEvent is FALSE if a null event
is being reported and TRUE if a real event is being returned.  It
is NOT an error code...

And this is what I put in my private email to the original poster.

zben@ni.umd.edu     -KA3ZDF
From: davidp@calvin.usc.edu (David Peterson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Notification Manager...
Date: 30 Aug 1992 13:37:42 -0700
Organization: University of Southern California, Los Angeles, CA
Distribution: world
Reply-To: davidp@usc.edu
NNTP-Posting-Host: calvin.usc.edu



Take a look at technote 306 -- it explains icon family and routines
to use them.

-dave.
Newsgroups: comp.sys.mac.programmer
From: sold@kit.uni-kl.de (Christoph Sold)
Subject: Re: MacApp 3.0 upgrade
Organization: Universitaet Kaiserslautern
Date: Sat, 29 Aug 1992 15:56:35 GMT

In article <1992Aug28.060133.6127@edsi.plexus.COM> trimper@edsi.plexus.COM (Greg Trimper) writes:
>Subject: Re: MacApp 3.0 upgrade
>From: trimper@edsi.plexus.COM (Greg Trimper)
>Date: 28 Aug 92 06:01:33 GMT
>simoneau@jupiter.regis.uqam.ca (Martin Simoneau) writes:
>
>>I received the latest APDA Catalog, and I would like to
>>upgrade to MacApp 3.0 from 2.0.1 (I'm not a ETO Member).
>>In the requirement it's mentioned  that I need 16 mega.
>>of RAM!! (page 43).
>>I hope this is an error, does anybody know?
>
>
>"Note: We reccomend you use a minumum 16Mb Macintosh System for
>developing MacApp applications..."
>
>Recommend.  Meaning I am either buying 4 4Mb SIMMS next week, or
>am about to explore virtual memory as a day to day affair.
>
>zGreg Trimper   trimper@edsi.plexus.com  

BUY MEMORY!
Build time on my IIcx, 8 MB, -noSym: 3 minutes (without -autobuild!)
switching virtual memory on, the -sym build time is 18 minutes :-(
MacApp 3.0.1 final -autobuild -sym -names -debug is > 2 hours!
I ran for memory, you will run, too.
-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
sold@kit.uni-kl.de                  W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
Newsgroups: comp.sys.mac.programmer
From: Sarek@world.std.com (Garrett Fitzgerald)
Subject: Learning TCL
Organization: The World Public Access UNIX, Brookline, MA
Date: Sun, 30 Aug 1992 18:13:56 GMT

I've tried a couple of times to start learning TCL, but I can't quite
get the hang of it. I've done OOP, and am doing the program I wanted
to use TCL for with the Think object extensions. Is there a book (or
file) somewhere that can get me over the initial hump? Thanks.
--------------------
"The Castle ARGHHHHHHHHHHHHHHHHHH!!!!"

Sarek of Vulcan
a.k.a. Garrett Fitzgerald `:-)
Official Diver of the RFA, 'Chelle's TwinSib, and Donna's OneTrueLove

Sarek@world.std.com

Newsgroups: comp.sys.mac.programmer