HDTenEightyP/NetNews huggingface dataset:
From: walkerj@math.scarolina.edu (Jim Walker)
Subject: Re: popup menus in non-system font
Organization: USC  Department of Computer Science
Date: 11 Sep 92 04:14:44 GMT

In <1992Sep10.214027.7936@dcs.qmw.ac.uk> jeremyr@dcs.qmw.ac.uk (Jeremy Roussak) writes:

>I want a popup menu to appear in a non-system font and size.
>There's something about this in the Q&A stack, so I followed
>Apple's advice. My code looks like this:

>SysFontFam = (*v.options)->menuFont;
>SysFontSize = (*v.options)->menuSize;
>LastSPExtra = CurFMInput = -1;

>then PopUpMenuSelect, then reset SysFontFam and SysFontSize and
>invalidate the other two globals again.

>Now, this works a treat. Until, that is, I run an app like
>MSWord (are there any?) or even, I am told, MacWrite IIJ. Then
>(and sometimes for no apparent reason), although the font
>changes for the popup, the size doesn't: it stays at 12 point.
>Checking with MacsBug, SysFontSize is set to 9.

>The problem persists after running MSWord, even after quitting
>it. Sometimes it will then go away again, but more often it
>persists until I reboot.

Here's an answer, archived from CompuServe:

|Date:    Wed, Aug 19, 1992 11:32:27 AM
|Subject: #95335-PopUpMenuSelect + style
|From:    Spec Bowers 70731,3710
|To:      Ken Elston 71251,310
|
|
|Ken,
|
|It's a bug in several Microsoft products. You can program around it but it's a
|nuisance.
|
|The Window Manager's port is normally set to size 0, system standard.
|Microsoft comes along and sets it to size 12 and doesn't restore it.
|
|The technique described in previous messages for setting font and size for a
|popup menu, simply sets the system standard. Whenever a port is using size 0,
|it uses the standard size stored in the low memory globals. If the port is set
|to 12 or any other size, the default size is ignored.
|
|The cure is to set the window manager's port (WMGRPort) to size 0 before
|calling PopupMenuSelect. You'll have to save the current port, get the WMGR
|port, set the current port to be the WMGR port, set the size to 0, then
|restore the current port to the original. You probably should reverse the
|process after PopupMenuSelect returns. It is proper practice to restore port
|settings. On the other hand the proper setting for the WMGR port is 0.
|
|
|Spec Bowers
|Bowers Development
|(developers of AppMaker)

--

 -- Jim Walker  USC Dept. of Math.  walkerj@math.scarolina.edu
Newsgroups: comp.sys.mac.programmer
From: danny@utkux1.utk.edu (Danny W. McCampbell)
Subject: The List Manager...
Organization: University of Tennessee
Date: Fri, 4 Sep 1992 16:16:26 GMT

Does anyone have some good sample code on how to manipulate
the list manager?  IM Vol 1 is not very clear on some things.
Thanks.

Danny
danny@utkux1.utk.edu
Newsgroups: comp.sys.mac.programmer
From: flournoy@Xenon.Stanford.EDU (Raymond Suke Flournoy)
Subject: FAQ request
Originator: flournoy@Xenon.Stanford.EDU
Organization: Computer Science Department, Stanford University.
Date: Fri, 11 Sep 1992 20:25:20 GMT


  Is there a FAQ for this group?

  Thanks in advance.


--Raymond Flournoy        
======================================================================
flournoy@cs.stanford.edu         "For reasons I cannot explain
Computer Science Dept.            There's some part of me wants to see 
Stanford University, CA           Graceland"               -- P. Simon
From: jjwright@remus.rutgers.edu (   Jay)
Newsgroups: comp.sys.mac.programmer
Subject: THINK C 5:  help with stack error
Date: 11 Sep 92 16:17:42 GMT
Organization: Rutgers Univ., New Brunswick, N.J.


greetings,

how can one go about alleviating the problem of "stack collision with
heap" in think c v5?  The manual doesnt really help me too much, or i
should say that i just dont like what its telling me.  :)

anyway, i have a program file (with the main) that has an include
statement for a list of #define integers and about five struct
statements.  then i have a section defining/declaring? the subroutines
that are used in the program.
	ie.  
	int open_files();
	int goto_month();
	and so on and so on
and then i have main() and within main's brackets i define eight file
pointers, five structs and a couple of integer variables.  This cannot
take up that much space could it?  The debugger just crashes when i
use it, although once i received the error "stack collision with
heap", so i checked out the book and now im asking you.

is this post much too vague?  if any one understands what im driving
at, i would appreciate a response.
if anyone thinks im crazy but has some ideas that might be useful, i
would appreciate them too.  :)

in the mean time i will be pluggin away at it.

thanx..

jay
Xref: sparky comp.sys.mac.programmer:15106 comp.sys.mac.apps:14266
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps
Subject: Re: 2up, double-sided printing
From: thetroll@rata.vuw.ac.nz (The Troll)
Date: Tue, 8 Sep 1992 00:22:55 GMT
Organization: Computing Serv. Ctr, Victoria Uni., Wellington, New Zealand

In article <> sdorner@qualcomm.com (Steven Dorner) writes:
>What I would really like is to be able to print this document 2-up, on both
>sides of a sheet.  That way, I use 125 pieces of paper, not 500.  If I
>could simply manage to print it 2up OR double-sided, that would be less
>good but still helpful.

Okay you have several choices. If you can get access to an HP IIIsi with
duplex option you can print double sided no problem (all you need is the
HP IIIsi laswerwriter driver, which come with the printer). 

If that's not possible then you can try out the N-up laserwriter driver
that is part of the DMM LW Stuff distrubition, this is a set of patches to
the standard Apple LaserWriter driver to make it do all sorts of neat
things including n-up printing (I have an already hacked copy if you want
one). 

Places you can get this from (according to archie) are hmm, that's odd. My
archie doesn't know where it is. I'll just check sumex-aim...

Yes it's there in dir info-mac/utils the files: 

dmm-lw-56-stuff-12.hqx
dmm-lw-7-stuff-12.hqx
dmm-lw-stuff-122-updater.hqx

are what you are looking for. If you have any hassle getting the files
I'll mail them to you (via Eudora, of course!). 

If you need anymore advice about this let me know, they are also
postscript packages that claim to do n-up printing on postscript but my
experience is that they tend to fail when dealing with the type of
postscript that packages like word emit. 

regards


--
Alex Heatley                                Computing Services Centre
Domain: Alex.Heatley@vuw.ac.nz              Victoria University of Wellington
From: paul@taniwha.UUCP (Paul Campbell)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Top byte of 24-bit offscreen gworld?
Date: 8 Sep 92 07:06:08 GMT
Organization: Taniwha Systems Design

In article <28628@vedge.UUCP> brad@vedge.com (Brad Fowlow) writes:
>Can anyone say how quickly or terribly things might
>go awry if I try to keep some extra info in the top 8 bits
>of the pixel data of a 24-bit offscreen gworld?
>
>That byte is awfully tempting as a place for alpha stuff.
>And for the moment I'm not too concerned with how the code
>will react under system 12; I just don't want sneaking 
>randomness to show up next week. 
>Have I missed something in IM6 that unequivocally rules
>this out, or permits it?  Has anyone else been similiarly tempted?

Well you can go ahead and put data in the top byte BUT don't expect QuickDraw
to do anything usefull with it .... despite what IM sais a later note in
Develop said recently that you should NOT depend on CopyBits preserving
that byte - even if it dows now it might not in the future - or in all
the circumstances you can test today.

All 24-bit cards I know of that ship today do NOT preserve the top eight
bits a pixel - but then they aren't GWorlds and you can't get usefull data
on there with out CopyBits anyway

	Paul

-- 
Paul Campbell    UUCP: ..!mtxinu!taniwha!paul     AppleLink: CAMPBELL.P

       "Most American's day to day experience of 'Family Values' is found in
	brightly colored fliers from such organisations as Target and K-Mart."
From: opstad@Apple.COM (David Opstad)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Look before you Leap
Date: 7 Sep 92 20:17:35 GMT
Organization: Apple Computer Inc, Cupertino, CA

In article <lanbtrINN8tj@pollux.usc.edu> suhler@pollux.usc.edu (Paul A. Suhler) writes:
>A note for those writing programs that calculate future dates:
>unless I'm mistaken, any year which is integrally divisible by 400
>is NOT a leap year.
>
>Paul Suhler

Actually, this isn't correct. The scheme (as it currently stands) is:

years divisible by 4 are leap years, but
years divisible by 100 are not leap years, but
years divisible by 400 are leap years.

Note that 2000 *is* a leap year. 2100, however, is not, so for all you folks
planning on being around that long, you can now plan ahead. :-)

Dave Opstad
Line Layout Weenie

Newsgroups: comp.sys.mac.programmer
From: engber@ils.nwu.edu (Mike Engber)
Subject: Re: popup menus in non-system font
Summary: some source
Organization: The Institute for the Learning Sciences
Date: Fri, 11 Sep 1992 15:25:31 GMT


Yes, it seems that certain applications change the window manager's
font setting and don't restore them. Leonard Rosenthal told me
about this. The workaround he suggested was to reset them myself.
After playing around with it a while I discovered that you had
to reset them in both the window manager port AND the color window
manager port (if colorQD is avail) - or under some circumstances
(which I can't recall) there are problems.

Anyway, here is my version of PopUpMenuSelect (written in THINK C)
which let's you specify that you want the menu popped up in the
current port's font and size.

-ME

---

extern  short   SysFontFam  : 0x0BA6;
extern  short   SysFontSize : 0x0BA8;
extern  long    LastSpExtra : 0x0B4C;
extern  Ptr     CurFMInput  : 0x0988;

long PupSelect(MenuHandle theMenu,Point popPt,short popUpItem,Boolean useWFont){
        short   item;
        short   oldSysFont = SysFontFam;
        short   oldSysSize = SysFontSize;
        GrafPtr curPort;
        
        GetPort(&curPort);
        
        /* no need to muck around if the current font is already the system font */
        if(curPort->txFont==SysFontFam && curPort->txSize==SysFontSize){
            useWFont = false;
        }
        
        if(useWFont){

            {   /* this hack fixes bugs caused by programs that mess up
                    the WindowMgr port (e.g. MacWrite & Word)
                 */
                GrafPtr     wPort;
                SysEnvRec   theWorld;
                GetWMgrPort(&wPort);
                SetPort(wPort);
                TextSize(0);
                TextFont(0);
                if(SysEnvirons(1,&theWorld) == noErr && theWorld.hasColorQD){
                    CGrafPtr    wCPort;
                    GetCWMgrPort(&wCPort);
                    SetPort((GrafPtr)wCPort);
                    TextSize(0);
                    TextFont(0);
                }
                SetPort(curPort);
            }

            SysFontFam  = curPort->txFont;
            SysFontSize = curPort->txSize;
            LastSpExtra = -1L;
            CurFMInput  = (Ptr)(-1L);
            SetItemMark(theMenu,popUpItem,'%');
        }else{
            CheckItem(theMenu,popUpItem,true);
        }
        
        item = PopUpMenuSelect(theMenu,popPt.v,popPt.h,popUpItem);
        CheckItem(theMenu,popUpItem,false);

        if(useWFont){
            SysFontSize = oldSysSize;
            SysFontFam  = oldSysFont;
            LastSpExtra = -1L;
            CurFMInput  = (Ptr)-1L;
        }

    return item;
}
Newsgroups: comp.sys.mac.programmer
From: mgleason@cse.unl.edu (Mike Gleason)
Subject: Re: THINK C linker makes me sad
Organization: NCEMRSoft
Distribution: usa
Date: Wed, 9 Sep 1992 04:41:44 GMT

siegel@world.std.com (Rich Siegel) writes:

>In article <fdrny7c.howard@netcom.com> howard@netcom.com (Howard Berkey) writes:
>>So I was writing this really small, simple app. (a mac version of xclock,
>>just for fun.)  It was only 3k.  Then I added a call to sprintf().  It 
>>exploded the program to 22k.
>>
>>Please, no flames for this... I LOVE the THINK C environment, and I know
>>that the 'open letter to symmantec' thread was months ago, but I do REALLY
>>WISH that the THINK C linker (or loader) would recognize discrete blocks of 
>>code at the function (rather than file) level.  

>So use ANSI-small instead of ANSI. When you use ANSI, you drag along the
>entire console package and floating-point support for printf() and its
>relatives. Smart-linking can't prune away code in situations like this.
>If you use ANSI-small, you'll save about half that 22K.

Still, I would like to see Think C's smart-linker be even smarter and prune
at the function level rather than the file level.  It would be nice to
be able to use a standardized Utilities source file or library without
having to manually #if 0 unused functions for different projects.

On the other hand, I think it's about time that some oft-used functions
were incorporated into ROM/System file.  I nominate sprintf, sscanf,
pStrcpy, pStrcat, str{cpy, cat, cmp}, and BlockZero to become part of
the Toolbox Utilities.

--
______________________________________________________________________________
mike gleason                 mgleason@cse.unl.edu             NCEMRSoft, baby!
From: JTC4@psuvm.psu.edu
Newsgroups: comp.sys.mac.programmer
Subject: Extended PRam
Date: 9 Sep 92 14:13:29 GMT
Organization: Penn State University

Does anyone know the format of PRam beond the 20 bytes documented in IM
or where it is documented?  Information about how to access it (ReadXPRam
and WriteXPRam?) would also be appreciated.  I am trying to set the alert
sound to some default for system 7 and it seems to be kept in XPRam
somewhere.  I also need to know where system 6.0.7 kept the defalt.
Newsgroups: comp.sys.mac.programmer
From: sgrenander@NASAMAIL.JPL.NASA.GOV (Sven U. Grenander)
Subject: Re: CQuickSound - Think C TCL class for async sound
Followup-To: comp.sys.mac.programmer
Organization: Jet Propulsion Laboratory
Date: Mon, 14 Sep 1992 21:18:45 GMT

In article <1992Sep14.190410.12391@cs.uoregon.edu>,
jasper@geriatrix.cs.uoregon.edu (Jon Barber) wrote:
> 
> [Sorry for the repeat of the previous message, but I wanted
> to more fully describe what I've got.]
>  
>     CQuickSound  is a small, efficient Think C 5.0 TCL class 
> that allows both one-time and continuous-with-control playback of
> sound handles.  There are some limitations, but it works
> well for the majority of situations.  It was designed after
> reading the latest-and-greatest (august) of  d e v e l o p  magazine,
> and, well, it's real handy for Joining the Noisy Revolution.  Calls are 
> as simple as
>             gQuickSound->PlayOnce(soundHandle);
>         or
>             forever = gQuickSound->PlayForever(soundHandle);
>                 ... and later on ...
>             gQuickSound->KillForever(forever);
>   
> I'd like to get feedback about whether folks could swing paying me
> $10 - $20 dollars for copies of QuickSound.  I'm a low-payed mac contractor,
> things like QuickSound are how I'm hoping to, well, eat!  And 
> I've been interested in the idea of share-ware TCL classes, and
> thought this would be a good venture into this realm.
>  
> Take care, and don't forget to bark at the postman...
>  
> P.S.  Could any responders to my previous message please
> mail me again?  The five of you were accidentally deleted
> from my mailbox :-(
>  
> +---------------------------+--------------------------------------+
> |"jasper" Jon Barber        | Jasper Enterprises                   |
> |jasper@cs.uoregon.ed)      | Unix & Mac Consulting, Ad Excellentum|
> +---------------------------+--------------------------------------+
> |  * Currently based in Eugene, Oregon, Amerika, living the simple |
> |    life with Macs, Peacocks, and three consulting gigs.          |
> |  * Anyone interested in a Vegetarian Telecommuting Commune?      |
> |  * Anyone interested in hiring me for inexpensive, high-quality  |
> |    work in exotic locations??  India?  Costa Rica?               |
> |    Switzerland?  Nepal?  New Zealand?  Your Winnabego?           |
> +------------------------------------------------------------------+

I'd be willing to shell out $10-20 for a well written sound class. 

As for shareware TCL classes I'm really surprised that they haven't
popped up as it seems like a winning idea. I'm assuming that programmers
would be forthcoming in paying the fees to collegues who can save them some
substantial amount of time by sharing their code. 

Of course, there is the quality issue. Who would want to risk "infecting"
their code by including possibly misbehaving classes ? Guess the answer to
this problem lies in some central clearing house for class "reviews".

-Sven
From: jsp@uts.amdahl.com (James Preston)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Dumb APPL ICON Question
Date: 15 Sep 92 00:20:53 GMT
Reply-To: jsp@pls.amdahl.com
Organization: Amdahl Corporation, Sunnyvale CA

J.Cook@ENS.Prime.COM (Jim Cook) writes:

}You can have all your BNDL, SIZE, VERS, FREF, ICN#/icl8, and signature
}resources set up correctly in your resource file, BUT if you don't pull down
}"Set Project Type..." from "Project" in the menu bar in Think C to change the
}creator from "????" to your application signature, your custom icon will never
}work.  Seems that Think C will override your [correctly set up] resources...

Well, I sympathize with you, because I've done the exact same thing, and
in my case it was just that I had forgotten that I needed to set the
signature in THINK C.  

This may seem like a picky point, but I don't think it's accurate to say 
that THINK C "overrides" the resources.  The "creator" box in the "Set 
Project Type" dialog is how you tell THINK C what signature to use when
it creates your application file.  The BNDL, etc. resources that are
contained within the file (and which THINK C merely copies in from your
project's resource file) are not the same beastie as the signature on
the file itself.  Conceivably, a programmer might want them to be different.
Besides, expecting THINK C to actually read the resource file to pick up
the BNDL signature is probably asking too much of it.

--James Preston
Newsgroups: comp.sys.mac.programmer
From: ulfis@cyklop.nada.kth.se (Anders Ulfheden)
Subject: CTB Libraries 1.1 (Again!)
Organization: Royal Institute of Technology, Stockholm, Sweden
Distribution: comp
Date: Mon, 14 Sep 1992 20:50:13 GMT

I have converted the new CommToolboxExtensions.o MPW library from Apple to
Think C with oConv 1.0.6. According to the Engineering Notes many new
routines are available. So I made a small test with the following result:

Link error:
undefined: CRMReleaseRF (TestCTB.c)
undefined: CRMReserveRF (TestCTB.c)
undefined: CRMIsDriverOpen (TestCTB.c)
undefined: CMSetupXCleanup (TestCTB.c)

All other new routines link fine. What to do about this?

ulfis
--
+------------------------------------------------------------------------------
|  Anders Ulfheden
|  USENET:  ulfis@nada.kth.se		AppleLink: SW0429
|  Royal Institute of Technology
|  Stockholm, Sweden
Newsgroups: comp.sys.mac.programmer
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Re: MIDI Manager
Organization: The World Public Access UNIX, Brookline, MA
Date: Tue, 8 Sep 1992 15:12:06 GMT

I've heard of rumors ofthe MIDI Manager being folded into the Sound Manager
and QuickTime...I know QuickTime will support MIDI in the future. The 
Sound Manager also has "hints" of MIDI strewn throughout.

Your guess is as good as mine.


-- 
-------------------------------------------------------------
joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw

Newsgroups: comp.sys.mac.programmer
From: krk@itl.itd.umich.edu (Kenneth Knight)
Subject: Search procs and 8 bit graphics
Organization: Instructional Technology Laboratory, University of Michigan
Date: Fri, 11 Sep 1992 01:40:06 GMT

I asked this question a few months back and never did get an answer to it.
With the thread on doing graphics sans QuickDraw I figured I'd ask again
(though the need for an answer is no longer immediate - but still)....

I had a graphics program that was designed to allow the user to compress
various regions of a picture using various compression techniques. The 
program also had some image editing features including color-remapping, dimming
, inversion, and other stuff. I coded many of these things using QuickDraw
search procs and then would let CopyBits do all the work when it called my
installed search procs. This worked wonderfully if the graphic's worlds
were 32-bit deep (direct mapped since the PM doesn't apply to those), it
did not work on 8-bit worlds though. WIth 8-bit worlds the CopyBits would
act just as if there was no search proc installed even though there most
definitely was. Can anyone explain why the search procs worked on one type
of GWorld and not the other (all the manipulation was done off-screen. 
Anything that appeared on screen was post-image-fiddling)?

  ** Ken **
krk@itl.itd.umich.edu
From: wombat@claris.com (Scott Lindsey)
Newsgroups: comp.sys.mac.programmer
Subject: Re: CTB Libraries 1.1 (Again!)
Date: 15 Sep 92 00:50:35 GMT
Distribution: comp
Organization: Claris Corporation, Vancouver WA
Wombat: yes
Number: 21168

In article <ULFIS.92Sep14215013@cyklop.nada.kth.se>, ulfis@cyklop.nada.kth.se (Anders Ulfheden) writes:
> 
> I have converted the new CommToolboxExtensions.o MPW library from Apple to
> Think C with oConv 1.0.6. According to the Engineering Notes many new
> routines are available. So I made a small test with the following result:
> 
> Link error:
> undefined: CRMReleaseRF (TestCTB.c)
> undefined: CRMReserveRF (TestCTB.c)
> undefined: CRMIsDriverOpen (TestCTB.c)
> undefined: CMSetupXCleanup (TestCTB.c)

Looks like a bug in the release version of CTB 1.1, I'd say.  DumpObj in MPW
shows the following routines, so it's not a problem with oConv.

  262 TMGETERRORSTRING
  264 CMGETERRORSTRING
  267 CMNEWIOPB
  269 CMDISPOSEIOPB
  271 CMPBREAD
  273 CMPBWRITE
  275 CMPBIOKILL
  277 CDEFEXECUTEDEF
  278 CRMTOOLPOSTFLIGHT
  279 CRMTOOLPREFLIGHT
  280 FTGETERRORSTRING
  283 FTSEND
  285 FTRECEIVE
  287 FDEFEXECUTEFDEF
  288 CRMGETTOOLRESOURCE
  290 TDEFEXECUTEDEF
  293 CRMRELEASETOOLRESOURCE
  295 CRMPARSECAPSRESOURCE
  297 CRMGETTOOLNAMEDRESOURCE
  300 CRMGET1RESOURCE
  302 CRMGET1NAMEDRESOURCE
  303 CRMRELEASERESOURCE

--
Scott Lindsey <wombat@claris.com>
Newsgroups: comp.sys.mac.programmer