HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.mac.programmer
Subject: AEInteractWithUser help needed !!!
From: jordi@sc2a.unige.ch
Date: 27 Jul 92 11:03:15 +0200
Organization: University of Geneva, Switzerland

Hello netters,

I have a beginner's problem using the AEInteractWithUser function (in C)...

As I would like to bring a dialog window to the front of the screen,
wherever my process is running in background or in foreground, I use the 
following code:

   Error = AESetInteractionAllowed( kAEInteractWithAll ) ;
   ...
   Error = AEInteractWithUser( kAEDefaultTimeout, NIL_POINTER, HandleEvent ) ;
   if ( Error == noErr )
      {
         ...
         code for dialog window display
         ...
      }
   Play_Beep() ;


(Error is of type OSErr.)

The AEInteractWithUser function returns 'noErr' and the code block included 
between the {} "must" be executed. My 'Play_Beep' procedure is executed.

The problem is that the whole process (the dialog window) does not come to
the foreground when expected (what AEInteractWithUser is supposed to do: 
bringing it to the front, interact, and goind back again).

It comes to the foreground only if I click on one of its windows, THEN it
executes the code included between the { }. It sounds like the code is queued
somewhere, skiped, and only executed when the process comes to the front...

I think I have to enable the kAEAlwaysInteract flag in order to let AESend
use it. But how is it possible to set this flag as an option for 
AEInteractWithUser ? (Page 6-52 of Inside Mac Volume VI) 
AESend is used by AEInteractWithUser.
What is exactly the problem ? (I use Think C 5.0.2)

Does anybody here have a short and easy to use example routine to show me
how to deal with such AE functions ?

I thank you for your help !!!

Sincerely,

Steve Jordi

+-----------------------------+-----------------------------------+
| Steve JORDI                 | Fax        : + 41 22 320-5732     |
| Dpt of Geophysics           |                                   |
| University of Geneva        | Internet   : jordi@sc2a.unige.ch  |
| 13, Rue des Maraichers      | Bitnet     : jordi@cgeuge52       |
| 1211 Geneva 4               | Compuserve : 70143,3056           |
| Switzerland                 |              (once a week)        |
+-----------------------------+-----------------------------------+
|       D o n ' t   W o r r y ,   B e   A p p l e   ! ! !         |
+-----------------------------------------------------------------+
From: berg@rrdtc.donnelley.com (Erik Berg)
Subject: What to wait for in WaitNextEvent after a SubLaunch
Organization: R. R. Donnelley & Sons Technical Center, Lisle, Ill.
Distribution: na
Date: Tue, 21 Jul 1992 15:15:40 GMT

	I new to the world of Mac programming and I am having difficultly finding
out this solution.   The problem is that I do not know what event to wait for
in WaitNextEvent() after sub-Launching another application.  I want the 
sub-launched application to return and then continue with the program that 
launched it.  Currently the program sub-launches the desired application and
then just keeps on running.  Note my program needs to sub-launch the same 
application numerous times.  The program works fine with the debugger if I 
step over each line of code, but in real life it just blows though the loop 
in which the sub-launching takes place.

	I am using Think C v4.05 with System 6.0.5 with a Finder of 6.1.5.  I have
read Tech Note #205, and my Finder does not seem to have the 
acceptChildDiedEvents flag in it.  I do not want the beta version of Finder 
since I will be distributing this to many users.  Also, I must write this
specifically for system 6, a system 7 version will be developed separately.

						Thanks

Erik Berg			berg@donnelley.com
Newsgroups: comp.sys.mac.programmer
Subject: Arrow keys & modifiers (was: Think C is (notso) Great)
From: hammett@sbsu1.aukuni.ac.nz (Tim Hammett)
Date: Wed, 22 Jul 1992 22:13:36 GMT
 <de19-220792055815@mac41-pg2.umd.edu> <1992Jul22.141021.20135@hobbes.kzoo.edu>
Organization: University of Auckland, New Zealand.

k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
>I'd like ThC to join with the rest of the Mac world, in which
>cmd-arrowkey means "go this way for one word/paragraph/page" and
>option-arrowkey means "go this way to the end of the line/document."
>ThC has this backwards.  (And BBEdit has it backwards vertically but not
>horizontally.  Turns my brain to scrambled cheese.)

I don't use Think C (I use MPW), but it sounds from your description
like Think C has it right.

Inside Mac says:
------
"Holding down the Command key while pressing an arrow key should move the
insertion point to the appropriate edge of the window. If the insertion point
is already at the edge of the window, the document should be scrolled one
windowful in the appropriate direction and the insertion point should move
to the same edge of the new windowful. Command-Up Arrow moves to the top of
the window, Command-Down Arrow to the bottom, Command-Left-Arrow to the left
edge, and Command-Right Arrow to the right edge.

"The Option key is reserved as a "semantic modifier" key. The application
determines what the semantic units are. For example, in a word processor,
where the basic semantic unit is the character and the next larger unit
is the word, Option-Left Arrow and Option-Right Arrow might move the
insertion point to the beginning and end, respectively, of a word.
(Movement of the insertion point by word boundaries should use the
same definition of "word" that the application uses for double
clicking.) The next larger semantic unit could be defined as the
sentence, in which case Option-Left-Arrow and Option-Right-Arrow
would move the insertion point to the beginning or end of a sentence.
In a programming language editor, where the basic semantic unit is
the token and the next larger one might be the line, Option-Left-Arrow
and Option-Right-Arrow might move the insertion point left and right
to the beginning and end of the line, respectively."
------

MPW does the following:

Command-Leftarrow               MoveStartOfLine
Command-Rightarrow              MoveEndOfLine
Command-Downarrow               MovePageDown
Command-Uparrow                 MovePageUp
Option-Leftarrow                MoveWordLeft
Option-Rightarrow               MoveWordRight
Option-Downarrow                MoveLineDown
Option-Uparrow                  MoveLineUP

which (to me) seems to be a fair interpretation of Inside Mac. I think
(based on <1 day of use) that WriteNow 3 follows the same conventions.
MS Word (as usual) does its own thing.

Of course, under MPW, the key bindings can be reconfigured to whatever you
like (plug, plug). :-)

--
Tim Hammett, Botany Dept, Auckland University, New Zealand.
t.hammett@aukuni.ac.nz   Phone: +64-9-373-7599 x8365    FAX: +64-9-373-7416
Newsgroups: comp.sys.mac.programmer
From: mccorry@belfst.enet.dec.com (Kieran G Mc Corry)
Subject: Folder Dir
Reply-To: mccorry@belfst.enet.dec.com
Organization: Digital Equipment Co. Ltd.
Date: Thu, 30 Jul 1992 10:31:28 GMT




Hi All,

I'm sure some of you will be able to srot this out pretty quickly.

I am using PathWorks for Macintosh to create files on a VAXshare volume by an application program on the VAX.

I then want to read my files by a Think 'C' program on the Macintosh. My problem is this. When I try to open the files I get a FILE NOT FOUND  error since the Mac doesn't know about the files yet. But if I first use the Finder on the ma c to look at the folder, subsequent attempts to read the file will work since the server then knows about the file.

My workaround to this is to first do a directory search of the folder from the 'C' code on the Macintosh. However, I have looked through my Inside Macintosh volumes but I just can't seem to find out how to do a directory search. Am I missing something silly?

Please, can you tell me how to do this from a piece of 'C' code. I really don't know the Macintosh filesystem internals too well so please don't assume too much in your reply.  Thanks in advance.

An emailed response would be nice!

Regards
Kieran.

+---------------------------------+-------------------------------------------+
| Kieran G Mc Corry,              | mccorry@belfst.enet.dec.com               |
| Digital Equipment Co. Ltd.      | mccorry@bvo.mts.dec.com                   |
|                                 | ...!decwrl!belfst.enet.dec.com!mccorry    |
|                                 | TEL: + 44 232 381381 ext. 266             |
+---------------------------------+-------------------------------------------+
|I speak for myself here, so none |"I can resist everything except temptation"|
|of this rubbish belongs to DEC ! |                         - Oscar Wilde     |
+---------------------------------+-------------------------------------------+






Newsgroups: comp.sys.mac.programmer
From: Bruce.Hoult@bbs.actrix.gen.nz
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Organization: Actrix Information Exchange
Date: Tue, 28 Jul 1992 04:38:51 GMT

In article <1992Jul27.151815.2971@newstand.syr.edu> greeny@top.cis.syr.edu (J. S. Greenfield) writes:
> I want to be able to comment out blocks of code, while debugging, and then
> uncomment the block afterwards, without having to deal with TP's silly
> single-line comment restriction.

Are you aware that you can use {$IFC false} and {$ENDC} to effectively
comment out blocks of code?  They also nest properly.

-- 
Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
"Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
From: fsmah1@acad3.alaska.edu (Mike Hageland)
Newsgroups: comp.sys.mac.programmer
Subject: Radio buttons
Date: 27 Jul 92 03:51:45 GMT
Organization: University of Alaska Fairbanks

I have a very simple little problem with what seems to be a complicated
solution.  Look at this diagram and pretend the X represents where I
want a radio button.

  X  Title | Title X
  X  Title | Title X
  X  Title | Title X

Personally I think this looks kinda neat.  I would like to do something
like this.  Now this is no problem, I can simply draw the titles in and 
then place in the radio buttons.  However, then you can't simply click 
onto the title like you can with most radio buttons.  It seems that the
radio button will only put the title to the right of the radio button.  

The way I can think of to do this is to create another simple button over the
titles on the right side and deal with changing the radio buttons around
when it is pressed. 

Can anybody think of a cleaner way to do this?  Is there a hiden way to
make a radio button have a title on the left?
From: howard@locus.com (Howard Moskovitz)
Newsgroups: comp.sys.mac.programmer
Subject: Where Can I Get Usenet Guide
Date: 24 Jul 92 16:39:30 GMT
Reply-To: howard@locus.com (Howard Moskovitz)
Distribution: usa
Organization: Locus Computing

I have seen mention of the Usenet Mac Programmer's Guide in
this newsgroup. Could someone tell me where I can get a copy?
Is it hardcopy or online somewhere? If hardcopy, how much is it?

Thanks in advance,
Howard



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ||    ||\    /||             Howard Moskovitz              +
+ ||    ||\\  //||  \---\      Locus Computing Corporation   +
+ ||<<>>|| \\// ||  /---/      Inglewood, CA 903010   U.S.A  +
+ ||    ||  \/  ||                                           +
+ ||    ||      ||             howard@locus.com              +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Newsgroups: comp.sys.mac.programmer
From: robichau@lambda.msfc.nasa.gov (Paul Robichaux)
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Reply-To: robichau@lambda.msfc.nasa.gov
Organization: New Technology, Inc.
Date: Wed, 29 Jul 1992 13:55:11 GMT

In <eqHNoB4w165w@bluemoon.rn.com> zaphod@bluemoon.rn.com (Peter Bierman) writes:
>Amen to that! Restarting the Mac just because a file is stuck open is a 
>Bass Ackwards way of solving a simple problem.

Try using FileKit (available at sumex) or a similar tool that lets you
manually close (or open :) any file on your disk. It's a buttsaver fer
shure.

-- 
Paul Robichaux, KD4JZG          | I shouldn't bitch / I shouldn't cry
robichau@lambda.msfc.nasa.gov   | I'd start a revolution but I don't have time.


Xref: sparky comp.sys.mac.programmer:13146 comp.sys.mac.misc:13978
Organization: Bar-Ilan University Computing Center, Israel
Date: Wed, 29 Jul 1992 11:19:33 IST
From: <R70007@BARILVM.BITNET>
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.misc
Subject:    MS Windows ==> Mac. How ?

Hello ,

 Can someone please tell me what proven ways can handle a quick
   and robust transfer of software now running as a Windows app
   to Mac environment.

                Many thanks,      Ilan
From: sholden@cod.nosc.mil (Steve Holden)
Newsgroups: comp.sys.mac.programmer
Subject: Alias Problems (Repost)
Date: 21 Jul 92 14:15:17 GMT
Followup-To: comp.sys.mac.programmer
Organization: NRaD

Hello! 

And sorry for the repost, but I have finally accepted the fact 
that I deleted all of the replies to the following problem, that 
included a good deal of code from some very helpful people.  
If you you could be so kind as resending your replies I would be 
very grateful.

Orginal Post:

>We have a lot of information that we are managing through
>heirachrical folders and aliases.  This folder structure can
>be tens of folders deep and MBs of files.  We use aliases to
>tie information together.  Unfortunately, once this large folder
>is created and moved to a different machine (on a removable), 
>all the aliases are useless.  
>
>From what I've been looking at with all the alias documentation,
>is that there is no easy way to go in and edit the alias information
>to change Zone, Machine, and Hard Drive.  But I may be missing
>something. Has anyone tried this?  Any success?

Also (for clarity):

 -  The machines are not tied together by a network.  We have
    a site that makes the folder, puts it on a removeable, and
    ships it out to the necessary sites.

 -  The solution we are looking at is an application that is
    run the first time the disk is mounted and fixes all of the
    the aliases in the folder. The aliases may or may not have
    a file on the disk (based on the security level of the user).

Thanks!

Steve

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-      Steven D. Holden +++ SAIC -> NRaD -> Project ICER      -=-
=-=       Mac Consultant / 4D Developer / Occasional Hack       =-=   
-=-   Email: sholden@cod.nosc.mil  +++  Phone: (619) 553-6750   -=-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=- Motto: "Have Mac, will travel." -=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=- ** Opinions expressed are my own and do not necessarily  ** -=-
=-= **    reflect those of my employer or the government.    ** =-=
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Newsgroups: comp.sys.mac.programmer
From: fasciano@cs.uchicago.edu
Subject: ThinkC socket connections??
Organization: University of Chicago  AI Lab
Distribution: na
Date: Tue, 28 Jul 1992 00:44:49 GMT

Hello collective intelligences:

I am trying to get two processes on different machines to communicate
through the internet.  On the one side I have a AllegroCL process running 
on a remote SPARC, and I want to establish a socket connection with my
ThinkC process running on my Mac.

I am pretty new to the details of Mac programming and have been swimming
through VolumeVI for too long, and I want to know if anyone can suggest or 
supply the C code and/or libraries that will enable me to communicate with
the remote process.


Thanks

Mark Fasciano

Newsgroups: comp.sys.mac.programmer
From: felciano@summit.stanford.edu (Ramon M. Felciano)
Subject: Q: Checking for modif keys on app startup
Organization: DSO, Stanford University
Date: Tue, 28 Jul 92 16:21:38 GMT
Xdisclaimer: No attempt was made to authenticate the sender's name.


Hi!

I'm writing a 7.0 drag-and-drop application, and would like a "power
user" mode that does some automatic stuff if the user drops files on
the application while holding a particular key down (most likely
command or control). While I know how to check the modifier flags in an
event record, I'm not quite sure how to forcibly read the keyboard. Any
suggestions?

Thanks!

Ramon M. Felciano
Associate Director, SUMMIT
Stanford University Medical Media and Information Technologies
From: athos@apple.com (Rick Eames)
Newsgroups: comp.sys.mac.programmer
Subject: Glue Routines
Date: 17 Jul 92 17:44:32 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

Does anyone have a list of routines in THINK C that can be used in either
System 6 or System 7?  

I'm sick of having to convert between FSSpec's and PBBlocks and would love
to just use the damned things.

Thanks!

--
Rick Eames
athos@apple.com
My opinions are my own, thank you very much!
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: GDevices:  screenActive flag?
Organization: Kalamazoo College
Date: Thu, 23 Jul 1992 19:02:00 GMT

Joe.Francis@dartmouth.edu (Joe Francis) writes:
>
>What meaning does the screenActive flag have in GDevice record?  If I
>wish to build a table of information about the available screens, and
>use this info to decide where to display a graphic, should I be testing
>this flag?

Yes, you should be.  I don't know what it _means_ exactly, but you
shouldn't mess with inactive screens.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 I'm having a lot of trouble seeing how a request that you "shut up" can be
 interpreted as "looking to other people for validation."      - Tim Pierce
Newsgroups: comp.sys.mac.programmer
From: robichau@lambda.msfc.nasa.gov (Paul Robichaux)
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Reply-To: robichau@lambda.msfc.nasa.gov
Organization: New Technology, Inc.
Date: Thu, 23 Jul 1992 18:11:58 GMT

In <62669@cup.portal.com> MacUserLabs@cup.portal.com (Stephan - Somogyi) writes:

>Why? Last time I looked, TP's code generation was quite good. TP's linker is
>also granular at the function-level, unlike TC's, which is file-granular.

Good != perfect. The overall quality of TP is high enough that none of my
wishes are major (i.e. I didn't have to ask for an excellent debugger, or
a function-level-smart linker.)

-Paul (different address, same guy)
-- 
Paul Robichaux, KD4JZG          | I shouldn't bitch / I shouldn't cry
robichau@lambda.msfc.nasa.gov   | I'd start a revolution but I don't have time.
Newsgroups: comp.sys.mac.programmer

I'm having some problems with Syquest drives when they are formatted
with the Micronet formatter (most recent version).  Maybe somebody
out there knows how to handle this.

When the computer boots up, the Syquest drive has a certain drive
number (say, 5) associated with it. My program remembers this number.
Later, my program dismounts the Syquest disk and waits for the user
to put another disk in.  That's simple enough -- it just waits until
there's a disk in drive 5. That's simple enough, and it works for
all kinds of drives -- except for Syquests formatted with the
Micronet formatter.

When a second Micronet-formatted Syquest disk is inserted into the
drive, the drive is mounted on the desktop *with a different drive
number*.  So, my program waits forever for another disk to be
inserted in drive 5.  Meanwhile, the user has already inserted another
disk into the drive.  It appeared on the Mac as a different drive --
say, drive number 12 -- so my software doesn't find it.

Now, I could easily walk the drive queue and find another drive that
is controlled by the same driver.  Alas, that doesn't work if the
user has a dual Syquest drive, because then I would find 2 drives
that are controlled by the same driver and I wouldn't know which
one is which.

Does anybody know how to handle this situation?  I'm having trouble
finding a contact at Micronet (any Micronet employees out there?), and
I need some help really fast.

My thanks to all, and if there is sufficient interest I'll post the
answer to the net.

Dan Pleasant
From: erh0362@tesla.njit.edu (Elliotte Rusty Harold)
Newsgroups: comp.sys.mac.programmer
Subject: Parameter Types for GetIndString, ParamText, NewString, et al.
Date: 25 Jul 92 05:26:22 GMT
Organization: New Jersey Institute of Technology


	Can anyone spot the problem in the following code? It typically crashes 
at either the GetIndString, the ParamText, or the StopAlert call.  I suspect 
I'm not passing the proper type of argument to one of the toolbox calls (e.g. 
sending a Str255 where I should be passing a StringPtr or vice versa) but I've 
tried this with many different combinations of variable 
type without success.  The various 
sample source I've looked at has been inconsistent on the type of argument 
passed to these toolbox calls, i.e. some pass strings and some pass StringPtr's.
Do I need to allocate space for errorString (a Str255) or is it automatically 
allocated since errorString is really an array of 256 chars?  If I 
do need to allocate space, how?  Can I dispense with the StringHandle 
errorStringH  entirely and just use errorString and &errorString as necessary? 
All suggestions appreciated.  Problem function follows.


/* returns FAILURE if there is a problem, SUCCESS otherwise */
Boolean IOCheck(OSErr errornumber) {

	Str255	 errorString;
	StringHandle errorStringH;	

	if (errornumber != noErr) {

		errorStringH = NewString(&errorString);
		HLock(errorStringH);
		GetIndString(**errorStringH, IO_ERROR_STRINGS, 
			-1 * errornumber - ZEROTH_IO_ERROR );
		if ( errorString == NIL_POINTER) {
		  ParamText( HOPELESSLY_FATAL_ERROR, NIL_STRING, 
			NIL_STRING,NIL_STRING);	
		} /* end if */
		else {
		  ParamText( *errorStringH, NIL_STRING, NIL_STRING,NIL_STRING) ;
		}
		HUnlock(errorStringH);
		DisposHandle(errorStringH);
		StopAlert(ERROR_ALERT_ID, NIL_POINTER);
	
		return FAILURE;
	} /* end if */
	
	else
		return SUCCESS;
	

} /* end IOCheck */

Elliotte Rusty Harold		Department of Applied Mathematics
elharo@m.njit.edu		New Jersey Institute of Technology
erh0362@tesla.njit.edu		Newark, NJ 07103
From: dave@prc.unisys.com (David Lee Matuszek)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Simple Problem
Date: 31 Jul 92 15:24:04 GMT
Organization: Paoli Research Center - Paoli, PA

In article <1897@sheoak.bcae.oz.au> i925936@redgum.bcae.oz.au (-The Shadow-) writes:
>Here is a simple problem which I can't find the solution to. I have only
>just started with programming the mac toolbox so I don't know *too* much
>yet. The problem is that the program I am writing will not detect a
>mousedown event. Below is a listing of the program condensed to
>determine a mousedown event. 

Please post any replies to this.

I've entered the "Events" program from Mark & Reed, Macintosh Pascal
Programming Primer, and observed that it, too, does not receive any
mousedown events.  I've never worried about it particularly, but I am
curious.

-- 
 -    -    -    -    -    -    -    -    -    -    -    -    -    -   -    -
I stand by all the misstatements that I've made.
					-- Vice President Dan Quayle
Newsgroups: comp.sys.mac.programmer
From: jon@afs.com (Jonathan Hendry)
Subject: Think C developer machine
Distribution: USA
Date: Wed, 22 Jul 1992 14:50:12 GMT


I have an 8/40 SE/30. What should I add to it in order to make it a good  
Think C development machine?

Thanks...

--
Jonathan Hendry  Anderson Financial Systems
jon@afs.com  (Nextmail Welcome!) or hendryjw@duvm.ocs.drexel.edu