HDTenEightyP/NetNews huggingface dataset:
From: cunetto@sbctri.sbc.com (Philip C. Cunetto)
Subject: MenuSelect and return codes
Organization: Southwestern Bell Technology Resources, St.Louis, MO
Date: Wed, 29 Jul 92 19:49:43 GMT

All of a sudden my application began acting differently and I don't
understand what has happened.  Calls to the MenuSelect trap return
the menu ID in the high order word, and the index of the selected item
in the low order word, except that the high order bit is set (in effect,
screwing up the menu ID).  This wasn't happening before, and it showed
up all of a sudden.  It doesn't always set the high order bit,
but only when certain menus are being selected from.

My temporary work around is to check the return value, and if its negative
zero out the high order bit.  But that's going to get me in trouble eventually.

What is the system trying to tell me when is sets the high order bit
on the MenuSelect return value?

Thanks
Phil C.

Newsgroups: comp.sys.mac.programmer
From: max@eskimo.celestial.com (Max Pinton)
Subject: Re: Changing Command-Key for a menu item
Organization: -> ESKIMO NORTH (206) For-Ever <-
X-Newsreader: Tin 1.1 PL3
Date: Tue, 21 Jul 1992 07:35:41 GMT

k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
: erh0362@tesla.njit.edu (Elliotte Rusty Harold) writes:
: 
: It's incredible to me how an interface that prides itself on showing
: everything to the user can _still_, in _1992_, have toggling menu items
: that toggle the _name_.  What's wrong with a checkmark by a "Visible
: Rulers" item?  Why does the item have to bounce between "Hide Rulers"
: and "Show Rulers"?
: 
: If it _does_ something, make it a verb:  Edit Macros.
: If it _shows_ the state of something, make it a noun:  Fractional Widths.
: If it _toggles_ between two states, make it a noun with a checkmark:
: 	>check< Visible Rulers.

	Tog talks about this in _Tog on Interface_ ... Another problem with
rotating menu items is that the menu item indicates the opposite of the
current state; "Hide Rulers" is in the menu when the rulers are *not*
hidden.

	It's all pretty tacky to me.
From: erh0362@tesla.njit.edu (Elliotte Rusty Harold)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How do you acess chooser username??
Date: 25 Jul 92 14:40:08 GMT
Organization: New Jersey Institute of Technology

In article <1992Jul22.175943.14696@mtxinu.COM>, larrym@mtxinu.COM (Larry Meyer - mac weenie) writes:
> In article <1992Jul18.190914.26404@mnemosyne.cs.du.edu> tinsel@uiuc.edu writes:
>>mshields%peruvian.utah.edu@cs.utah.edu (Michael S Shields) writes:
>>
>>>How do you do this?? I can't seem to find even a mention of the chooser user-
>>>name anywhere.(IM, Think Reference, Prog. Primer).  I know it can be done.
>>
	Think C includes a function char* getlogin(void) intended to mimic the 
Unix function getlogin.  It returns exactly what you're looking for, i.e. the 
username set in the chooser desk accessory.  It's documented on p. 191 pf the 
Standard Libraries reference in the Think C 4 manuals.  You'll need to 
#include<unix.h> and either add the Unix library to your project or the 
appropriate function from unixmisc.c to your source code.  This is all under 
Think C 4.05.  Details may have changed under 5.0 but I imagine at least the 
functionality is still there.

Elliotte Rusty Harold		Department of Applied Mathematics
elharo@m.njit.edu		New Jersey Institute of Technology
erh0362@tesla.njit.edu		Newark, NJ 07103
From: kaas@cc.ruu.nl (Dick Kaas)
Newsgroups: comp.sys.mac.programmer
Subject: menubar in dialogs
Date: 28 Jul 92 13:27:28 GMT
Followup-To: comp.sys.mac.programmer
Organization: -


I'm planning to write a TCL pane for a menu-bar.

Is there a simple way to implement a menubar into dialogs  (like WP and
superboomerang) without having to write a complete menu package by
yourself?

I have looked at the low memory globals, such as MenuBarHook etc. None of
these seem useful.

Dick kaas.
From: i925936@redgum.bcae.oz.au (-The Shadow-)
Newsgroups: comp.sys.mac.programmer
Subject: Simple Problem
Date: 31 Jul 92 01:55:11 GMT
Organization: UCNV, Bendigo, Victoria, Australia
Originator: i925936@redgum.ucnv.edu.au

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. 
   In the form below, it will not quit until
doquit is true. I know that I have not set doquit to true anywhere but
as I said, the program is condensed.

Program whatever;

type eventrecord = record
       what : integer;
       message : longint;
       when : longint;
       where : point;
       modifiers : integer;
     end;


const nullevent = 0;
      mousedown = 1;
      mouseup = 2;
      mdownmask = $0002;
      mupmask = $0004;
      everyevent = $FFFF;

var theevent : eventrecord;

procedure initialise;
var themask : integer;

begin
     doquit := false;
     themask := everyevent - keyupmask - mupmask;
     seteventmask(themask);
     flushevents(everyevent, 0);
     setcursor(arrow);
end;

function getnextevent(mask : integer; var theevent : eventrecord):
boolean;
begin
end;

procedure doevent;
begin
     if getnextevent(everyevent, theevent then
       case theevent.what of
          mousedown : domousedown;
       end;
end;

procedure mainloop;
begin
     systemtask;
     doevent;
end;

begin
    initialise;
    repeat
          mainloop;
    until doquit;
end.


There are probably a heap of problems in this program but I can't work
out what they are. The mask of the event keeps returning a value of -1
too and getnextevent returns a true value.
 Is there a better way to set up the function getnextevent as well?

Anyway, somebody out there should know the answer to this. Please reply
by either email at i925936@redgum.ucnv.edu.au or by this newsgroup
because it took *ages* to write this out!
  BTW, the program is written in THINK Pascal version 4.0

Thanx, 
       Richard.
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Vertical Text drawing?
Keywords: text, vertical
Organization: Kalamazoo College
Date: Wed, 22 Jul 1992 20:24:11 GMT

steve@mind.psych.umn.edu writes:
>Does anyone know an easy way to draw text vertically?  I want all of  
>the letters rotated as well as the whole word -- like the label on a graph.

If this isn't on the FAQ, it should be.

You can't do it directly.  Draw them into an offscreen bit/pixmap,
rotate it, and CopyBits it to the screen.  QuickDraw GX, due out next
year, will offer support for drawing rotated text.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 He let the contents of the bottle do the thinking
 Can't shake the devil's hand and say you're only kidding            - TMBG
From: mar@ocf.berkeley.edu (Michael A. Ramirez)
Newsgroups: comp.sys.mac.programmer
Subject: Creating and Using folders??
Date: 27 Jul 1992 16:28:20 GMT
Organization: U.C. Berkeley Open Computing Facility
Distribution: world
NNTP-Posting-Host: earthquake.berkeley.edu

Here is an easy question for some MAC programmer. I am trying to create a
directory in my current working directory, and then set my working directory
to that directory I just created. I have tried to use PBOpenWD, but to no
avail. Here is what I have tried:

GetVol(volName,&vRefNum)
volInfo.ioVRefNum=vRefNum;
volInfo.ioNamePtr=nil;
volInfo.ioWDIndex=0;
volInfo.ioWDProcID=0;
volInfo.ioWDVRefNum=0;
PBGetWDInfo(&volInfo,FALSE);
volInfo.ioNamePtr=DIRECTORY_NAME;
PBOpenWD(&volInfo,FALSE);

Also I want to have the this also work if the directory is already present.

Any help will be appreciated.

Michael Ramirez
mar@ocf.berkeley.edu
-- 
-----------------------------------------------------------------------------
___    _   ___ ___ _  ____  ____  ____   mar@ocf.berkeley.edu
|__|  |_|  |  |  | |  |___| |___    /    When laws are outlawed then only
|  \ |   | |  |  | |  |  \  |___  /___   outlaws will obey the law- Mondo 2000
Newsgroups: comp.sys.mac.programmer
From: trinkad@jasper.cs.orst.edu (Darald)
Subject: Re: Think C 5.0 under sys7, help!!!
Organization: Oregon State University
Distribution: USA
Date: Mon, 27 Jul 1992 17:54:43 GMT

In article <1992Jul25.053648.12278@midway.uchicago.edu>, hd12@ellis.uchicago.edu (hui  dong) writes:
> 
> I am trying to use Think C 5.0 under sys7 to recompile a C code I wrote
> using 4.0 under sys6. I get lots of errors, drive me crazy! It even complains
> about GetNewCWindow(WINDOW_ID,0L,-1L), saying the last argument isn't valid.

Try GetNewCWindow(WINDOW_ID,0L,(WindowPtr) -1L)...


> Could someone tells me where can I get help? Thanks a lot!!!!!!
> 
>
From: lsr@taligent.com (Larry Rosenstein)
Newsgroups: comp.sys.mac.programmer
Subject: Re: watch cursor in MacApp
Date: 24 Jul 92 20:35:39 GMT
Followup-To: comp.sys.mac.programmer
Organization: Taligent, Inc.

In article <poon.712001956@roo>, poon@parc.xerox.com (Alex Poon) wrote:
> 
> I am programming in MacApp, and I find it annoying that whenever my code goes
> into a long-lasting loop (even only 3 seconds), the cursor turns into a
> watch cursor.  Anybody know how to keep that from happening?

There should be a call you can make to set the delay.  Look in
UBusyCursor.{p,h}.

But that it a feature of MacApp.  It tells the user that the program is not
listening for input at the current time.  If you were listening for input
(eg, command-.), then the cursor wouldn't change. 

Larry Rosenstein
Taligent, Inc.

lsr@taligent.com
From: neath@brazil.psych.purdue.edu (Ian Neath)
Newsgroups: comp.sys.mac.programmer
Subject: WindowPtrs, CWindowPtrs, and Think C:  Where are my colors?
Date: 29 Jul 92 18:04:45 GMT
Organization: Purdue University

I'm trying to use RGBForeColor and RGBBackColor on a color window
created via NewCWindow, but the colors are converted to the old
QuickDraw 8 colors (e.g., only black or white, no grey).

IM V p. 207 says NewCWindow returns a CWindowPtr but the Windows.h
that came with Think C 5.0 says it is a WindowPtr.  IM V also says
(p. 69) that if a GrafPtr (or WindowPtr) is used, it will auto-
matically use the QDColors.  So, I think I know why the QDColors
are being used, but I don't know how to fix it.  Any help greatly
appreciated.

--
    Ian Neath, PhD     | There are four kinds of people in this world:
neath@psych.purdue.edu |    cretins, fools, morons, and lunatics.
 neath@purcvvm.bitnet  |                       - Umberto Eco
From: harrison@beta.lanl.gov (David A. Harrison)
Newsgroups: comp.sys.mac.programmer
Subject: Apple Resource IDs
Date: 31 Jul 92 15:23:02 GMT
Article-I.D.: newshost.1992Jul31.152302.28824
Distribution: all
Organization: Los Alamos National Laboratory

For what resources does the 128 minimum ID correspond.  All of them? Does
the minimum apply to resources that you've created for your own use?
Any help would be appreciated.

Dave Harrison
M-4 Hydrodynamics
Los Alamos National Laboratory
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: And what about this DogCow business ? ( moof! )
Date: 28 Jul 92 21:52:32 GMT
Organization: SRI International, Menlo Park, California

In article <232HoB6w165w@bluemoon.rn.com> zaphod@bluemoon.rn.com (Peter Bierman) writes:

>Wait a sec! My 6/92 list of tech notes lists TN#31 as "Unused"!! I have 
>all the TNs printed out, and I _don't_ have a #31!!!


You're probably staring right at him. Remeber that DogCows are two dimentional
creatures and are infinitly thin. They hide by facing you edge wise. 
Maybe TN 31 is doing the same thing. :-)

I actually have a printed copy. I forgot how I got it. 

Matt



-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: wonko@titan.ucc.umass.edu (not in use)
Subject: Removing the menubar?
Organization: University of Massachusetts, Amherst
Date: Tue, 21 Jul 1992 20:14:52 GMT

I am writing a program for a client that is VERY unmac in its operation
and I need to remove the MenuBar from the screen. I am Using Lightspeed
pascal 4.0 and have looked in all the inside macss as well as my other
normal sources. 

      Jason L. Rahaim

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
No tail SORRY
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: how to put indelible serial# in resource fork of app?
Date: 29 Jul 92 04:50:19 GMT
Organization: University of Waikato, Hamilton, New Zealand

In article <62725@cup.portal.com>, MacUserLabs@cup.portal.com (Stephan - Somogyi) writes:
> I regularly put tools on a server where I can access them remotely as I
> wander around the office carrying a floppy with an alias to the server. If I
> encountered software that told me that it would not launch from a server,
> even if I was the only launcher of said app and therefore well within my
> rights as a single-user licensee, I would take a dim view of this indeed.

Here's another evil twist: a program that requires a serial number the
first time you run it after installation. Then, if you move it to a different
volume (like on a server), it asks for the serial number again!

I'm talking about Mathematica 2.0. I suspect it does something like store
a file or directory ID number in its prefs file. If this doesn't match, it
knows it's running a different copy.

> I will make sure we know to test this the next time we review certain kinds
> of software. I can think of a number of instances where I'd want single-user
> server access to some of the DTP tools we use around here. Not farfetched at
> all.

You might like to add Mathematica's copy protection to your list of things
to check.

"How do I piss the user off? Let me count the ways..."
From: rln@metasoft.UUCP (Roberta Norin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Aspiring MacWizardesses
Date: 21 Jul 92 16:10:00 GMT
Distribution: usa
Organization: Meta Software Corporation, Cambridge MA

blob@Apple.COM (Brian Bechtel) writes:

>Any ideas of things Apple could do to improve this situation?  (The
>situation being that fewer females or minorities seem to have Macintosh
>programming skills than white male nerds.)  Email or post.

>We certainly can always use more female, minority, etc. programmers at
>Apple.

>--Brian Bechtel     blob@apple.com     "A white male nerd"

I am the developer of Mum's the Word Plus, landscape and garden design
software for the Mac, which has a small but growing following.  I
publish this product through Terrace Software of which I am the
president and chief cook and bottle washer.  I have some great ideas
for enhancing this product and developing some other products but am
short on funds, business acumen, time, marketing skills, etc. Any help
that Apple or any other company or individual can offer would be
immensely appreciated.

I know, or know of, quite a few other female Mac programmers and
product developers. I think there is more a dearth of female
programmers who blow there own horn or are in positions of high
visibility, than a shortage of women with programming skills, Mac or
otherwise.

Another MacWizardess,

Roberta Norin
Newsgroups: comp.sys.mac.programmer
From: Andrew G. Shebanow <shebanow@taligent.com>
Subject: Re: Q: Checking for modif keys on app startup
Organization: Taligent, Inc.
X-Useragent: Nuntius v1.1
     <1992Jul29.144320.18410@bmers95.bnr.ca>
Date: Wed, 29 Jul 1992 19:39:30 GMT

I would recommend using EventAvail (or GetOSEvent, as Keith suggests):

      EventAvail(everyEvent,&myEvent);

if all you are checking for is the modifier keys. Testing the modifiers
field of the Event record is much easier than bit-twiddling with GetKeys.

GetKeys is your only recourse if you are doing something that requires a
lot of keyboard smarts, like a keyboard controlled game.

Have fun,

Andy
From: Chewy@cup.portal.com (Paul Frederick Snively)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Jump table entries limit in MPW
Date: Wed, 22 Jul 92 22:32:00 PDT
Organization: The Portal System (TM)

MPW 3.2 and later's compilers and linker support a new runtime model called,
appropriately enough, `32-bit everything.'  The idea is that no holds are
barred, but this involves some pretty hinky-looking patches and extensions to
the old Mac runtime model, particularly jump tables.

Since the jump table format is somewhat critical to MacApp 2.x, you need some
replacement files for portions of MacApp 2.x if you intend to use 32-bit
everything.  Those replacements files are, I believe, in an `Unsupported'
folder on the various releases of the ETO CD-ROM.  I believe that they are
also available on AppleLink.

So how do you use 32-bit everything?  You pass the -model far[Code|Data]
option to the compiler(s) and -model far to the linker.  If you use the
replacement files for MacApp 2.x, everything should be copacetic.

I don't believe that any code changes are necessary to MacApp 3.x to support
32-bit everything...

Hope this helps,
Paul Snively
Dissolute Wandering Hacker
chewy@apple.com
From: muller_d@elgc.epfl.ch (Daniel Mueller)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Does mac exec code on disk when mounting it?
Date: 24 Jul 92 05:59:11 GMT
Organization: Ecole Polytechnique Federale de Lausanne
X-UserAgent: Nuntius v1.1

In article <Brt8uA.It7@news.cso.uiuc.edu> Benjamin T Sander,
bts39313@uxa.cso.uiuc.edu writes:

>Incidentally, if you screw up the driver on your internal disk (not
>that I have ever, say, done this), you are confronted with a machine
>that crashes 5 seconds after you turn it on no matter what you do.
>All this from software!  I had to pop the case on my machine, unplug
>the drive cable from the motherboard, reboot the machine, plug the 
>cable back in while the power was up, and then reformat the drive.
>
>Ben Sander
>University of Illinois
>bts39313@uxa.cso.uiuc.edu

On startup, if you hold the keys OPTION+COMMAND+SHIFT+BACKSPACE depressed
the
internal SCSI drive, normally ID=0, is not mounted. This solution is
easier
than to pop the case on your machine. This tips works on all Mac with ADB
keyboard.

--
Daniel Mueller (muller_d@elgc.epfl.ch)
Organization: Queen's University at Kingston
Date: Friday, 24 Jul 1992 18:05:02 EDT
From: <CHARLESW@QUCDN.QueensU.CA>
Newsgroups: comp.sys.mac.programmer
Subject: Re: SPLAsh & TCL book status...

Re: TCL book

  The author is Rich Parker.  I believe that you can contact him on Compuserve
at 75300,2405 (or via the Internet at 75300.2405@compuserve.com *I think*--I
haven't used the gateway to CIS in a long time).  In May he said "I have a book
that's due to be published (hopefully by this Fall) that describes this step-
by-step process for a very non-trivial application, using AppMaker, THINK C,
and the TCL.".  He also indicated that it would be available first in C version
and a couple of months later in Pascal.

  Let us know if you get an update...

Cheers,

.../dave   Dave Charlesworth
Newsgroups: comp.sys.mac.programmer
From: zaphod@bluemoon.rn.com (Peter Bierman)
Subject: Re: Help a beginner programmer
Organization: Blue Moon BBS ((614) 868-998[024])
Date: Sat, 25 Jul 92 23:32:54 EDT

eric_gorr@coglab_psych.uoregon.edu (Eric Gorr) writes:

> I've been trying to figure this out, but my understanding of the toolbox
> routines isn't that good yet.
> 
> What I am looking for is a procedure that will accept two files names of
> files that are text only.
> 
> What the procedure needs to do is read FILE #1 and when it hits a line that
> only contains $$INSERT <path:file name> (or something of that nature) will
> then open <path:file name> and will replace $$INSERT <path:file name> with
> the lines of text in <path:file name>.  <path:file name> only contains
> text.  The result of these operation will be saved in FILE #2.  It should
> be able to handle multiple $$INSERT occurances in FILE #1.
> 
> 

This is the kind of specialized thing that you would have to write 
yourself. What you need to do is write a program that loops through 
reading in lines of file 1 and writing them to "myfile", and calling 
another loop when it reads in a certain line "insert" from file 1.


---
The opinions I express are rarely my own, becuase my own are far too 
outragous to post here.

IntNet:zaphod@bluemoon.rn.com    FutureNet: #33@#10
The Metropolis (614)-846-1911
---
Newsgroups: comp.sys.mac.programmer
From: zaphod@bluemoon.rn.com (Peter Bierman)
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Organization: Blue Moon BBS ((614) 868-998[024])
Date: Tue, 28 Jul 92 21:52:37 EDT

<CHARLESW@QUCDN.QueensU.CA> writes:

> common wish).  I'd also like to have TP close open files when the program
> is reset.  (I put in a CloseAllFiles global procedure for now, and use the
> Instant window to run it before resetting.)

Amen to that! Restarting the Mac just because a file is stuck open is a 
Bass Ackwards way of solving a simple problem.


---
The opinions I express are rarely my own, becuase my own are far too 
outragous to post here.

IntNet:zaphod@bluemoon.rn.com    FutureNet: #33@#10
The Metropolis (614)-846-1911
---
From: scott@mcl.ucsb.edu (Scott Bronson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: SetHandleSize and SetPtrSize
Date: 22 Jul 92 16:40:53 GMT

In <149qa1INN8qa@agate.berkeley.edu> ewylie@ocf.berkeley.edu (Elizabeth Wylie) writes:

>>If I reduce the size of a handle/pointer using SetHandleSize or
>>SetPtrSize, do the contents of the handle/pointer get preserved
>>up to the size of my new handle/pointer.

>Yes.

>Not a very difficult thing to verify...

>-E. Wylie


Oh?  Maybe the one time you checked the contents were intact, but
t doesn't mean that EVERY time you call Set*Size() this is the case.

Though personally I would have asked a friend or look at some source
code before filling the net with this.  At the worst case, I would
have looked back two weeks and read three separate poeple asking
this question, and it being answered the same way every time.

	- Scott

(I liked your answer better than mine.  You take the next one).
From: benescc@mentor.cc.purdue.edu (Chris Benes)
Newsgroups: comp.sys.mac.programmer
Subject: Dialog hook function problem...
Keywords: Dialog hook
Date: 30 Jul 92 17:01:54 GMT
Organization: Purdue University


I am having a bear of a time trying to get a customized
"Save as..." dialog box to work.

I receive the following error when my dialog hook function 
exits after being called by CustomPutFile :

	Unimplemented instruction at 00000100
	No procedure name

I am working in Think C 5.0.1 under System 7.0.1 on a Mac IIci 
with 5 Mb.

Here is the invocation:

	CustomPutFile(NIL, "", &reply, NEW_PROJ_DIAL_ID, myPoint,
		      DlgHookPtr, NIL, NIL, NIL, NIL);

The program is entering the dialog hook function, but when 
it exits it immediately crashes.  The dialog box is not even 
displayed.  When I use the standard hook function, everything 
is fine.

My dialog hook function consists of a switch on all the standard
"Save as..." dialog box items including a default which returns
sfHookNullEvent.

Any help would be appreciated.

- Chris
Christopher Benes
benescc@mentor.cc.purdue.edu

P.S.  Is there a good ftp site where I can get examples of Mac
      programming?