home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
Information
/
CSMP Digest
/
volume 1
/
csmp-v1-132.txt
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1994-12-08
|
39.6 KB
|
1,091 lines
|
[
TEXT/R*ch
]
C.S.M.P. Digest Sat, 04 Jul 92 Volume 1 : Issue 132
Today's Topics:
TP4 Read and Wr-wr-wrap
PlotIconID - Why are my icons B&W?
Quadra, SFPGetFile, Bus Error = HELP!
Looking for apps that can receive data via AE!
Data fork from resource fork--How?
AESend returns OSErr -903
Special command keys
Background Printing Question?
Reading foreign disks
How to draw a SICN
button in a window
vdig component for DigiVideo (Q)
-------------------------------------------------------
From: macoll@qut.edu.au ((Ian MacColl))
Subject: TP4 Read and Wr-wr-wrap
Date: 30 May 92 15:23:33 EST
Organization: Queensland University of Technology
I tried everything I can think of but I can't get THINK Pascal 4 to:
1 Wordwrap the Text window, or
2 READ a char or integer without a CR to mark end of input
I've tried TP4 and TP4.01 on IIsi and SE machines with System 6.0.5 and
7.0.1 (with TuneUp 1.1.1) and INITS on and off.
Any WRITE or WRITELN with a parameter wider than the Text window writes the
whole parameter (which can be checked by zooming the Text window) but simply
continues it out of view under and to the right of the scroll bar. Also, a
WRITE leaves the cursor immediately to the left of the scroll bar,
effectively in the middle of the output.
More seriously, a READ statement waits for a CR before processing any input.
The problem, of course, is that this can easily leave the CR (converted to
a space) in the input stream waiting for the next unsuspecting READ/READLN.
Has anyone else found these problems? Am I imagining them? Am I missing
something? Are there controls or workarounds for these problems? Are these
'features' and not bugs?
Please reply here or by email to
Internet: macoll@qut.edu.au
Ian
Ian MacColl ---------------------------------------------- macoll@qut.edu.au
- ----------------------------------------------------------------------------
+++++++++++++++++++++++++++
From: jpugh@apple.com (Jon Pugh)
Date: 3 Jun 92 20:47:25 GMT
Organization: Apple Co.
In article <1992May30.152333.48870@qut.edu.au>, macoll@qut.edu.au ((Ian MacColl)) writes:
>
>
> I tried everything I can think of but I can't get THINK Pascal 4 to:
>
> 1 Wordwrap the Text window, or
>
> 2 READ a char or integer without a CR to mark end of input
These are standard problems with Pascal. If you want to do anything more
fancy than single line IO you have to go to the OS. In this case, that's
the toolbox and the Window Manager. You could use TextEdit if you were
inclined, but the gist is that it's a limitation of Pascal.
I had to write a lot of custom VMS IO routines to do real time games in Pascal
while I was in college. It's not fun, but it's not that hard either. The
simplest thing is to write a real Macintosh application using the THINK Class
Library. Of course, that's just one more learning curve to climb.
Jon
---------------------------
From: jpurlia@qualcomm.com (John Purlia)
Subject: PlotIconID - Why are my icons B&W?
Organization: Qualcomm Incorporated
Date: Mon, 1 Jun 1992 01:26:44 GMT
I'm trying to use System 7's handy PlotIconID function to display small
color icons in a dialog box, but the icons always appear black & white.
There are two places I'm attempting to plot the icons in the dialog:
a user item, and within an LDEF. I should also note that the dialog itself
is being tossed about via SFPGetFile and extensions I've made to standard
get file.
All my icon resources are defined, the destination Rect for each icon is
16 x 16 pixels, and I am able to draw color pictures in the dialog... but
no color icons.
Any insight ino this problem?
Thanks!!
..........................................................................
John Purlia : My brain; not my company's brain. My brain says...
jpurlia@qualcomm.com : "Just about any movie could be made better
AppleLink: AM0470 : if one of the characters were a vampire."
..........................................................................
+++++++++++++++++++++++++++
From: Matt Slot <fprefect@caen.engin.umich.edu>
Organization: CAEN Mac Support
Date: Mon, 1 Jun 1992 14:04:38 GMT
You need to create a 'dctb' resource for your Dialog. Set all
of the fields to the default (black or white, as appropriate).
When you load the dialog, it is now smart enough to make it a
Color Grafport.
If you have problems, you can mail me and I'll drop a binhex
Resedit file with the above resource. WARNING: The dialog
editor in ResEdit 2.x has been known to die horribly. You
should only create/modify copies of your resource file, and
copy them across later. (This is from experience!!!)
fprefect@caen.engin.umich.edu
Matt Slot, CAEN Mac-Support
+++++++++++++++++++++++++++
From: rsherman@mthvax.cs.miami.edu (Roby Sherman)
Date: 1 Jun 92 14:21:59 GMT
Organization: The Tao of Programming
In <1992Jun1.012644.20066@qualcomm.com> jpurlia@qualcomm.com (John Purlia) writes:
>I'm trying to use System 7's handy PlotIconID function to display small
>color icons in a dialog box, but the icons always appear black & white.
>There are two places I'm attempting to plot the icons in the dialog:
>a user item, and within an LDEF. I should also note that the dialog itself
>is being tossed about via SFPGetFile and extensions I've made to standard
>get file.
>All my icon resources are defined, the destination Rect for each icon is
>16 x 16 pixels, and I am able to draw color pictures in the dialog... but
>no color icons.
Sounds like your not calling "GetNewCDialog" but rather the old B & W
version of the call...
Don't ask *ME* why, but you can draw color pictures in grafports using
DrawPicture, but you can't plot color icons that way. You need to have a
Cgrafport setup...
--Roby
- --
rsherman@mthvax.cs.miami.edu Roby Sherman
+++++++++++++++++++++++++++
From: alexr@apple.com (Alexander M. Rosenberg)
Date: 1 Jun 92 18:22:48 GMT
Organization: Hackers Anonymous
In article <1992Jun1.012644.20066@qualcomm.com>, jpurlia@qualcomm.com (John Purlia) writes:
>
> I'm trying to use System 7's handy PlotIconID function to display small
> color icons in a dialog box, but the icons always appear black & white.
> There are two places I'm attempting to plot the icons in the dialog:
> a user item, and within an LDEF. I should also note that the dialog itself
> is being tossed about via SFPGetFile and extensions I've made to standard
> get file.
>
You use a custom DITL. You should create a 'dctb' resourcce for that DITL so
that the Dialog Manager calls made by the Standard File package result in
color grafports. I'm told that an empty 'dctb' can be made, and I would
vote that that's the way to go, otherwise, do as ResEdit does, and have a
wierd color for the Title color entry (which is unused in Standard File).
My assumption is that the Icon Utilities stuff checks the grafport. I could
be wrong. An indicator that you need a 'dctb' is if the gray text in the
buttons is dithered instead of true gray. The button controls draw in the
grafport, whereas the window frames and scroll bars are drawn in the window
manager port.
- ---------------------------------------------------------------------------
- - Alexander M. Rosenberg - INTERNET: alexr@apple.com - Yoyodyne -
- - 330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr - Propulsion -
- - Palo Alto, CA 94301 - - Systems -
- - (415) 329-8463 - Nobody is my employer so - :-) -
- - (408) 974-3110 - nobody cares what I say. - -
+++++++++++++++++++++++++++
From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
Organization: University of Illinois at Urbana
Date: Tue, 2 Jun 1992 00:44:02 GMT
>In article <1992Jun1.012644.20066@qualcomm.com>, jpurlia@qualcomm.com (John Purlia) writes:
>>
>> I'm trying to use System 7's handy PlotIconID function to display small
>> color icons in a dialog box, but the icons always appear black & white.
>> There are two places I'm attempting to plot the icons in the dialog:
>> a user item, and within an LDEF. I should also note that the dialog itself
>> is being tossed about via SFPGetFile and extensions I've made to standard
>> get file.
>>
I had the rather bizarre situation in a MacApp program that PlotIconID /
PlotIconHandle would plot a cicn, rather than the claimed ic?? family. So until
I made a cicn I had b/w icons being plotted.
- --
Have a bajillion brilliant Jobsian lithium licks. | Apple (tba)
Mark Lanett, not speaking for anybody | NCSA (mlanett@uiuc.edu)
+++++++++++++++++++++++++++
From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
Organization: University of Illinois at Urbana
Date: Wed, 3 Jun 1992 18:03:33 GMT
mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
[something about needing cicns to plot icl8s]
Never mind that post; I was clearly on drugs when I wrote the code. If you
use PlotCIconHandle (as opposed to PlotCIconID) you will naturally get cicns
plotted...
- --
Have a bajillion brilliant Jobsian lithium licks. | mlanett@apple.com - faster
Mark Lanett, not speaking for anybody | mlanett@ncsa.uiuc.edu - better
---------------------------
From: lupini@cs.sfu.ca (Peter Lupini)
Subject: Quadra, SFPGetFile, Bus Error = HELP!
Organization: Simon Fraser University
Date: Fri, 29 May 1992 19:50:27 GMT
Hi,
I have just started fooling around with macintosh programing (as opposed
to using the mac to write ANSI C code for research). Here is my problem:
I am playing with the TinyEdit application in THINK C 5.02 trying to find
out why an error is occuring. I have narrowed it down to the following
scenario.
I have declared a ChooseFile routine in the CEditApp which overrides the
one in CApplication. If I make it exactly the same, of course it works
fine. Then I use ResEdit to copy the standard dialog resource (id=-4000)
into my TinyEdit resource file, and give it an id of 128 (I have tried
many different id and get the same problem).
Now I modify the code so that it calls SFPGetFile with my new id (128).
Since the resource is exactly the same as the copied standard one (-4000)
I expect that it should all work fine, but instead I get a bus error. I
have reason to believe that this is only happening on Quadras, and it
happens with or without the cache switch on. Here is the code snippet -
can anyone help?
Thanks,
Peter
void CEditApp::ChooseFile( SFReply *macSFReply)
{
Point corner;
Boolean wasLocked;
short id;
id = 128; /* this is my copy of resource -4000 */
/* Center dialog box on the screen */
FindDlogPosition('DLOG', id, &corner);
wasLocked = Lock( TRUE);
SFPGetFile(corner, "\p", sfFileFilter, sfNumTypes, sfFileTypes,
sfGetDLOGHook, macSFReply, id, sfGetDLOGFilter);
Lock( wasLocked);
}
+++++++++++++++++++++++++++
From: jpugh@apple.com (Jon Pugh)
Date: 3 Jun 92 21:05:04 GMT
Organization: Apple Co.
In article <1992May29.195027.17930@cs.sfu.ca>, lupini@cs.sfu.ca (Peter Lupini) writes:
>
> Hi,
>
> I have just started fooling around with macintosh programing (as opposed
> to using the mac to write ANSI C code for research). Here is my problem:
>
> I am playing with the TinyEdit application in THINK C 5.02 trying to find
> out why an error is occuring. I have narrowed it down to the following
> scenario.
>
> I have declared a ChooseFile routine in the CEditApp which overrides the
> one in CApplication. If I make it exactly the same, of course it works
> fine. Then I use ResEdit to copy the standard dialog resource (id=-4000)
> into my TinyEdit resource file, and give it an id of 128 (I have tried
> many different id and get the same problem).
>
> Now I modify the code so that it calls SFPGetFile with my new id (128).
> Since the resource is exactly the same as the copied standard one (-4000)
> I expect that it should all work fine, but instead I get a bus error. I
> have reason to believe that this is only happening on Quadras, and it
> happens with or without the cache switch on. Here is the code snippet -
> can anyone help?
My first wild guess is Boomerang, or some other Standard File patcher. I had
some problems with my Quadra and Standard File for a while. I am now running
Super Boomerang 3.02 and not having any trouble.
Of course, it could be something completely different.
Jon
---------------------------
From: mspace@netcom.com (Brian Hall)
Subject: Looking for apps that can receive data via AE!
Date: Mon, 01 Jun 92 07:12:12 GMT
Organization: Netcom - Online Communication Services (408 241-9760 guest)
We are developing some powerful Apple event-based software, to be released this
summer, that will allow applications to receive data from some very interesting
sources. If you have an application that can handle incoming content-related
Apple events, please drop us a private link with a brief description, since we
want to work with you. Our product will not cost you anything, will
potentially bring an enormous amount of press, and can substantially expand the
scope of your program. Some of the areas we have in mind are calendars, PIMs,
databases, spreadsheets, email programs, mapping software, process control
applications, word processors, etc. The only requirement is that your program
be able to handle an unsolicited Apple event containing some type of data that
you understand. (If your app can also send such an Apple event, we can do some
even fancier stuff too!)
We look forward to hearing from you!
- --
\ | / | Brian Hall mspace@netcom.com
- : - | Mark/Space Softworks Applelink: markspace
/|\ | America Online: MarkSpace
|-+-| |
/-\|/-\ | People don't kill people, toasters kill people.
+++++++++++++++++++++++++++
From: jpugh@apple.com (Jon Pugh)
Date: 3 Jun 92 20:34:44 GMT
Organization: Apple Co.
In article <!p8knka.mspace@netcom.com>, mspace@netcom.com (Brian Hall) writes:
>
>
> We are developing some powerful Apple event-based software, to be released this
> summer, that will allow applications to receive data from some very interesting
> sources. If you have an application that can handle incoming content-related
> Apple events, please drop us a private link with a brief description, since we
> want to work with you. Our product will not cost you anything, will
> potentially bring an enormous amount of press, and can substantially expand the
> scope of your program. Some of the areas we have in mind are calendars, PIMs,
> databases, spreadsheets, email programs, mapping software, process control
> applications, word processors, etc. The only requirement is that your program
> be able to handle an unsolicited Apple event containing some type of data that
> you understand. (If your app can also send such an Apple event, we can do some
> even fancier stuff too!)
>
> We look forward to hearing from you!
I would also like to hear from you. I am the Apple Events Registrar. It is
my job to preach the gospel of standard Apple Events, discourage the use of
profane and blasphemous AE, keep the holy list of constants and arbitrate the
conflicts therein.
I am an advocate of the object model and will speak of it on any occasion.
My heart belongs to AppleScript and Exemplar and conforms mightily to their
ideals, but I've been known to stray by the wayside (typically after a few
beers ;).
I am very interested in your Apple Event activities. Email or call and we
can chat. I have many things to say and like to hear what you are up to. I
am confidential, discrete and partially discontiguous.
Jon Pugh
kAERegistrar
jpugh@apple.com
Applelink: JONPUGH or REGISTRY
(408) 862-7094
---------------------------
From: essam@gagme.chi.il.us (Essam Khairullah)
Subject: Data fork from resource fork--How?
Organization: Gagme Public Access UNIX, Chicago, Illinois.
Date: Sun, 31 May 1992 16:58:18 GMT
Yes, I know. This is probably the stupidest question ever asked, but I need to
know: How do I open the data fork of a file whos resource fork is already open?
Basically, I am writing an INIT that needs to read from its data fork. How can
I get to it? All of the file accessing stuff that I can find needs to have the
name and volume reference number or whatever. But if the resource fork is
already open (it has the INIT code and other resources), how can I get at the
data fork?
Thanks.....
- --
Essam Badi' Abu Khalil Khairullah
essam@gagme.chi.il.us
I don't got no fancy signature!
I'm a .signature virus. You can't resist copying me into your .signature!
+++++++++++++++++++++++++++
From: wysocki@husc.harvard.edu (Chris Wysocki)
Date: 1 Jun 92 19:21:23 GMT
Organization: Harvard University, Cambridge, MA
In article <1992May31.165818.6320@gagme.chi.il.us>, essam@gagme.chi.il.us
(Essam Khairullah) writes:
> How do I open the data fork of a file whos resource fork is already open?
>
> Basically, I am writing an INIT that needs to read from its data fork. How can
> I get to it? All of the file accessing stuff that I can find needs to have the
> name and volume reference number or whatever. But if the resource fork is
> already open (it has the INIT code and other resources), how can I get at the
> data fork?
Call PBGetFCBInfo() to get the name, vRefNum and dirID of the resource fork,
which you can then pass to one of the Open calls to open the data fork. In
C, and using FSSpecs:
FCBPBRec fcbpb;
FSSpec fss;
fcbpb.ioNamePtr = (void *) fss.name;
fcbpb.ioVRefNum = 0;
fcbpb.ioRefNum = CurResFile();
fcbpb.ioFCBIndx = 0;
if (PBGetFCBInfoSync(&fcbpb) == noErr) {
fss.vRefNum = fcbpb.ioVRefNum;
fss.parID = fcbpb.ioFCBParID;
}
Chris Wysocki
wysocki@husc.harvard.edu
+++++++++++++++++++++++++++
From: essam@gagme.chi.il.us (Essam Khairullah)
Organization: Gagme Public Access UNIX, Chicago, Illinois.
Date: Tue, 2 Jun 1992 16:24:21 GMT
Thanks to everyone who replied to my original message on this subject.
9 out of 10 programmers prefer PBGetFCBInfo over any other famous national
brand of Toolbox calls...
Well, now let me try it out and see if everyone was correct =8^}
- --
Essam Badi' Abu Khalil Khairullah
essam@gagme.chi.il.us
I don't got no fancy signature!
I'm a .signature virus. You can't resist copying me into your .signature!
---------------------------
From: tom@dtint.uucp (Thomas R. Kimpton)
Subject: AESend returns OSErr -903
Date: 2 Jun 92 16:04:31 GMT
Organization: Digital Technology, International
The problem is, I want to send an AppleEvent to another program
running on my machine, that I launched. I get the ProcessInfoRec
using the process serial number returned in the launchParamBlockRec
structure. Using the following I set up the target address,
insert some other information and send the event. AESend() returns
- -903 (noPortErr - Unable to open port or bad portRefNum). I
get the same error if I use the code inside the 'notdef'.
I've turned on "program linking" from the "Sharing Setup" control
panel, though I don't think it has any thing to do with it.
BTW, noPortErr is not mentioned as a possible result code at
the bottom of the AESend() section.
Anyone know the solution to this?
=========================== Errant code follows ==========================
#define kTargetSignature 'BOZO'
OSErr SendCreateElement(ProcessInfoRec *procRec)
{
AppleEvent myAppleEvent, reply;
OSErr err;
OSType targetSignature;
AEDesc targetAddr;
#ifdef notdef
targetSignature = kTargetSignature;
err = AECreateDesc(typeApplSignature,(Ptr)&typeStylerSignature,
sizeof(typeStylerSignature),&targetAddr);
#endif
err = AECreateDesc(typeProcessSerialNumber,(Ptr)&procRec->processNumber
,sizeof(procRec->processNumber),&targetAddr);
if(err != noErr){
printErr(0,err,"\pAEStuff.c: SendCreateElement, AECreateDesc"
,"\p");
goto out;
}
err = AECreateAppleEvent(kAECoreSuite,kAECreateElement,&targetAddr,
kAutoGenerateReturnID, kAnyTransactionID,&myAppleEvent);
[stuff deleted]
err = AESend(&myAppleEvent, &reply, kAENoReply+kAECanInteract,
kAENormalPriority,kAEDefaultTimeout, nil, nil);
if(err != noErr){
printErr(0,err,"\pAEStuff.c: SendCreateElement, AESend","\p");
goto out;
}
[stuff deleted]
}
Thanks!
- --
- ---
Tom Kimpton tom@dtint.dtint.com
Digital Technology Int. (801)226-2984
500 W. 1200 South, Orem UT, 84057 FAX (801) 226-8438
+++++++++++++++++++++++++++
From: keith@taligent.com (Keith Rollin)
Date: 2 Jun 92 19:25:10 GMT
Organization: Taligent
In article <1992Jun2.160431.15774@dtint.uucp>, tom@dtint.uucp (Thomas R.
Kimpton) writes:
>
> The problem is, I want to send an AppleEvent to another program
> running on my machine, that I launched. I get the ProcessInfoRec
> using the process serial number returned in the launchParamBlockRec
> structure. Using the following I set up the target address,
> insert some other information and send the event. AESend() returns
> -903 (noPortErr - Unable to open port or bad portRefNum). I
> get the same error if I use the code inside the 'notdef'.
> I've turned on "program linking" from the "Sharing Setup" control
> panel, though I don't think it has any thing to do with it.
>
Every time I've received this error number, it's because I was trying to send an
AppleEvent from a non-AppleEvent application. For instance, I once tried writing
an MPW tool that told the Finder to quit. Under MPW 3.2, I'd get this error, but
it would work under MPW 3.3a9. In another program I wrote, I forgot to set the
High-level Event Aware bit in the SIZE resource, and was getting that error
number until I set the bit.
- --
Keith Rollin
Phantom Programmer
Taligent, Inc.
+++++++++++++++++++++++++++
From: jackl@Apple.COM (Jack Littleton)
Date: 4 Jun 92 01:36:46 GMT
Organization: Apple Computer Inc., Cupertino, CA
In article <1992Jun2.160431.15774@dtint.uucp> tom@dtint.uucp (Thomas R. Kimpton) writes:
>The problem is, I want to send an AppleEvent to another program
>running on my machine, that I launched. I get the ProcessInfoRec
>using the process serial number returned in the launchParamBlockRec
>structure. Using the following I set up the target address,
>insert some other information and send the event. AESend() returns
>-903 (noPortErr - Unable to open port or bad portRefNum). I
Make sure that both programs have the "high level event aware" flag set in the
'SIZE' resource. I had experienced the same problems you've mentioned, when
I realized I'd never created a 'SIZE' resource for the app sending the Apple
event. After creating the resource and setting the correct flags, everything
worked fine.
Remember that both apps have to be high level event aware.
- --
Jack Littleton
Developer Tools Engineering
Apple Computer, Inc.
- -Opinions expressed here are not necessarily the views of Apple Computer, Inc.-
- -But should be.-
- --
Jack Littleton Internet: jackl@apple.com
MPW Compiler/Linker group AppleLink: JACINTOSH
Apple Computer, Inc.
---------------------------
From: Adrian C Ruigrok
Subject: Special command keys
Organization: Bell-Northern Research
Date: Tue, 2 Jun 1992 18:11:33 GMT
There are just not enough letters in the alphabet, so I would like to use
Option-Command and Shift-Command alternatives for my menus. However, I don't
know how to tie into the menu manager to
a) display it correctly
b) signal my application when the command key is hit.
The second I can deal with. But displaying the special shift and option
modifiers has me stumped. Is there a really obvious way or is it documented in
some place?
Thanks a million,
Adrian
- -----------------------------------
Adrian C Ruigrok
Bell-Northern Research
Ottawa, Canada
I can never think of anything funny to say here.....
+++++++++++++++++++++++++++
From: Ramon M. Felciano <felciano@medisg.stanford.edu>
Organization: SUMMIT (Stanford Univ. Medical Media and Information
Date: Tue, 2 Jun 92 19:15:45 GMT
Adrian --
This may or may not solve your problem, but I've got an MDEF that
supports all of the modifier-key alternatives. I also have the pascal
code to solve #2 for you.
It currently has one drawback: it uses the icon field of the MENU
resource to indicate which modifier keys to match against, so you can't
use icons in your menus.
If you're interested, send me e-mail at felciano@camis.stanford.edu
Ramon M. Felciano
Associate Director, SUMMIT
Stanford University Medical Media and Information Technologies
+++++++++++++++++++++++++++
From: alexr@apple.com (Alexander M. Rosenberg)
Date: 3 Jun 92 20:47:00 GMT
Organization: Hackers Anonymous
In article <1992Jun2.191545.18127@leland.Stanford.EDU>, felciano@medisg.stanford.edu (Ramon M. Felciano) writes:
> This may or may not solve your problem, but I've got an MDEF that
> supports all of the modifier-key alternatives. I also have the pascal
> code to solve #2 for you.
>
> It currently has one drawback: it uses the icon field of the MENU
> resource to indicate which modifier keys to match against, so you can't
> use icons in your menus.
>
I recently discovered that these special MDEFs used by many popular
applications also assume that they should use Chicago 12 for drawing.
Use TextFont(0) and TextSize(0). You'll get the correct results for any
given localized system.
Also, since this drawing occurs in the Window Manager Port, please do
save and restore all the settings in the port that you or any routine
you call might change. (Several popular applicaitons are guilty of this.
This is why the Popup CDEF would sometimes draw in Geneva 12 when asked for
Geneva 9. The Window Maanger Port had been changed to TextFont(0),
TextSize(12), which isn't correct anyway.)
- ---------------------------------------------------------------------------
- - Alexander M. Rosenberg - INTERNET: alexr@apple.com - Yoyodyne -
- - 330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr - Propulsion -
- - Palo Alto, CA 94301 - - Systems -
- - (415) 329-8463 - Nobody is my employer so - :-) -
- - (408) 974-3110 - nobody cares what I say. - -
---------------------------
From: danny@utkux1.utk.edu (Danny McCampbell)
Subject: Background Printing Question?
Organization: University of Tennessee
Date: Mon, 1 Jun 1992 18:09:01 GMT
For some reason when my program goes to print it will not recognize
that BackGround Printing is turned on.
thePrRecHandle^^.prJob.bJDocLoop is always 0 for draft printing even
though the file is saved to disk and then printed by PrintMonitor.
Is there another way to determine whether or not background printing
is turned on? Any ideas?
Danny McCampbell
PS If background printing is on, I was just wanting to let users
know the file was being saved to disk and would be printed in the
background.
+++++++++++++++++++++++++++
From: danny@utkux1.utk.edu (Danny McCampbell)
Organization: University of Tennessee
Date: Tue, 2 Jun 1992 20:43:22 GMT
I posted this once before but I am not sure it went through so I am posting
it again.
I am checking to see if thePrRecHandle^^.prJob.bJDocLoop = bSpoolLoop
so I can bring up a dialog telling the user that the file will be saved
to disk and then printed in the background.
Unfortunately the result always is 0 for draft printing although if
background printing is turned on it spools the job anyway and prints
fine.
Can anyone help me out on why this is happening. Is there something
else I need to check for to see if background printing is turned on?
Thanks in advance.
Danny McCampbell
+++++++++++++++++++++++++++
From: casseres@apple.com (David Casseres)
Date: 3 Jun 92 17:23:07 GMT
Organization: Apple Computer, Inc.
In article <1992Jun2.204322.27513@utkux1.utk.edu>, danny@utkux1.utk.edu (Danny
McCampbell) writes:
>
> I am checking to see if thePrRecHandle^^.prJob.bJDocLoop = bSpoolLoop
> so I can bring up a dialog telling the user that the file will be saved
> to disk and then printed in the background.
>
> Unfortunately the result always is 0 for draft printing although if
> background printing is turned on it spools the job anyway and prints
> fine.
It won't work, because bJDocLoop is a vestige from the days when the only kind
of printer was the ImageWriter. It only tells you whether you are supposed to
call PrPicFile, in the case where a) the printer is an ImageWriter and b) it is
using the ImageWriter-specific spooling mechanism.
The background printing mechanism introduced with MultiFinder is completely
different, and does not require you to call PrPicFile. That's why it always
tells you it's doing "draft printing."
> Can anyone help me out on why this is happening. Is there something
> else I need to check for to see if background printing is turned on?
There's nothing provided by the printing code to tell you this. You might be
able to find a hack, but it would be unsupported.
- --
David Casseres
Exclaimer: Wow!
---------------------------
From: tel@adimail.uucp (Terry Monks)
Subject: Reading foreign disks
Organization: Automata Design, Inc.
Date: Mon, 1 Jun 1992 19:00:15 GMT
I want to attempt to read 3.5 in diskettes from my Ensoniq synthesizer
in the Mac. I know that this can be done on PCs, but the address marks
and everything else on the diskettes make them look too foregn for the
Mac.
Is there information on reading non-Apple diskettes available? Surely
the same problem occurs with PC diskettes,and Sun diskettes, but both
formats have been cracked by various programmers.
I have a II fx if that makes any difference.
- --
Terry Monks Automata Design Inc (703) 742-9400
+++++++++++++++++++++++++++
From: stevec@Apple.COM (Steve Christensen)
Date: 2 Jun 92 21:47:35 GMT
Organization: Apple Computer Inc., Cupertino, CA
tel@adimail.uucp (Terry Monks) writes:
>I want to attempt to read 3.5 in diskettes from my Ensoniq synthesizer
>in the Mac. I know that this can be done on PCs, but the address marks
>and everything else on the diskettes make them look too foregn for the
>Mac.
>
>Is there information on reading non-Apple diskettes available? Surely
>the same problem occurs with PC diskettes,and Sun diskettes, but both
>formats have been cracked by various programmers.
>I have a II fx if that makes any difference.
If the physical format of the disks is the same as PC disks, then the Mac
can read the raw data from the disks, however it can't necessarily interpret
what all the data means (i.e., files, directories) unless someone has written
some software to convert the information on an Ensoniq disk into something
that the Mac recognizes...
steve
- --
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Christensen Never hit a man with glasses.
stevec@apple.com Hit him with a baseball bat.
+++++++++++++++++++++++++++
From: t.g.finstad@fys.uio.no (Terje Finstad)
Date: 3 Jun 92 10:48:53 GMT
Organization: Dept. Physics
Terry Monks <tel@adimail.uucp> (Terry Monks) writes:
> I want to attempt to read 3.5 in diskettes from my Ensoniq synthesizer
> in the Mac. I know that this can be done on PCs, but the address marks
....(deleted.
> I have a II fx if that makes any difference.
Please note that there are a least two issues
1. Getting the mac hardware to read the diskettes as well as telling you
what has been read,including separating adress marks and data.
2. If nescessary, transform what you have read ino meaningful information
the mac can use.
In the case of PC diskettes only issue 2 needs to be dealt with as a mac
with a superdrive has readily bult in routines that do everything else for you.
You simply request a certain block number to be read, and the built in driver
will do it.
In the case of Ensonique diskettes you also has to deal with issue 1.
(Ensonique diskettes have much in common to PC diskettes but uses 10 sectors
pr. track numbered in the tagmarks as Track 0 to 9, whereas MS-DOS uses
9 sectors numbered from 1 to 9)
Since you have a IIfx, you should be able to make a device driver control
call to the driver giving you the raw data. In the Tecnical Note 272 is
described the call "Diagnostic Raw Track Dump (csCode=18244)". This is
not supported on all Macs and for those not one has to find other ways to
read the raw data.
This should solve the problem for you, but not for the rest of us.
(I have found that a PC is the next best solution.
It can easily be set up to read Ensonique diskettes)
Terje
---------------------------
From: auajs@acvax.inre.asu.edu (Ling)
Subject: How to draw a SICN
Date: 1 Jun 92 20:35:14 GMT
Organization: Arizona State University
This may be a silly question but:
I am putting some buttons on my window and SICNs are about the right size.
what I need to know is how to draw them from the resource fork to the
window. The only method I see is copybits, but copy bits takes a bit map
in a different form than in the SICN resource. I know I could convert this
information, but I was looking for an easier method.
Jim
+++++++++++++++++++++++++++
From: Andrew_Gilmartin@Brown.Edu (Andrew Gilmartin)
Date: 2 Jun 92 14:30:14 GMT
Organization: Computing & Information Services, Brown University
The THINK Class Library has a number of utility routines that are of
general interest; one of which is DrawSICN(). Look in the file
TBUtilities.c for more information (I don't want to post their code).
- -- Andrew
+++++++++++++++++++++++++++
From: keith@taligent.com (Keith Rollin)
Date: 2 Jun 92 19:17:03 GMT
Organization: Taligent
In article <1JUN92133514@acvax.inre.asu.edu>, auajs@acvax.inre.asu.edu (Ling)
writes:
>
> This may be a silly question but:
> I am putting some buttons on my window and SICNs are about the right size.
> what I need to know is how to draw them from the resource fork to the
> window. The only method I see is copybits, but copy bits takes a bit map
> in a different form than in the SICN resource. I know I could convert this
> information, but I was looking for an easier method.
See Technote #252: "Plotting Small Icons" (which shows the copybits method) or
#306, which talks about 7.0's icon plotting routines.
- --
Keith Rollin
Phantom Programmer
Taligent, Inc.
---------------------------
From: jryan@adobe.com (Jim Ryan)
Subject: button in a window
Date: 19 May 92 21:12:11 GMT
Organization: Adobe Systems Incorporated
What is the best way to draw a button in a window? I'm currently
drawing it with QD, and hiliting it, unhiliting it, etc when checking
for mousedown in the button's rect. My problem currently is, how do I get
the button to unhilite when the cursor leaves the rect, but still in
a mousedown? I'd love to hear that there is a way to easily create a button
in a window like in a dialog, but I can't find any reference
to it in IM. Any suggestions?
Thanx,
jr
+++++++++++++++++++++++++++
From: zobkiw@world.std.com (Joe Zobkiw)
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 20 May 1992 12:28:45 GMT
<< What is the best way to draw a button in a window? >>
Depending on how much of a window this is, you may want to use a DLOG/DITL
and simply treat it as a normal window. This will give you automatic
button handling (ie: via IsDialogEvent(), etc.)
- --
- -- joe zobkiw Internet: zobkiw@world.std.com
- -- AOL: AFL Zobkiw
- -- mac.synthesis.MIDI.THINK C.OOP.asm CI$: 70712,515
- -- communications.networks.cool tunes...
+++++++++++++++++++++++++++
From: tom@dtint.uucp (Thomas R. Kimpton)
Organization: Digital Technology, International
Date: Fri, 29 May 92 16:52:37 GMT
In article <BoJuny.MB9@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
><< What is the best way to draw a button in a window? >>
>
>Depending on how much of a window this is, you may want to use a DLOG/DITL
>and simply treat it as a normal window. This will give you automatic
>button handling (ie: via IsDialogEvent(), etc.)
>
You can add controls to any window using NewControl/GetNewControl.
When you get mouseDowns in your window use FindControl to
determine which control, if any the mouseDown occurred in.
Read the Control Manager section in IM Vol 1 for detailed information.
- --
- ---
Tom Kimpton tom@dtint.dtint.com
Digital Technology Int. (801)226-2984
500 W. 1200 South, Orem UT, 84057 FAX (801) 226-8438
---------------------------
From: Nigel_Williams@qm.admin.utas.edu.au (Nigel Williams)
Subject: vdig component for DigiVideo (Q)
Organization: University of Tasmania, Australia
Date: Wed, 3 Jun 1992 05:25:47 GMT
I am attempting to use the DigiVideo vdig component that was on the
beta QuickTime CD. The DigiVideo card was manufactured by AAPS, later taken
up by Sequel Development.
Does anyone know if there is an updated version available (perhaps on the
release QT Development CD)?
My specific interest is to switch the vdig component into a mode where
it grabs greyscale images rather than colour (our camera is B&W).
I am expecting to do this using VDSetInputColorSpaceMode; I assume if I am using
the sequence grabber to drive the vdig I can
coerce the result of ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
to a VideoDigitizerThing (am I right in thinking they refer to the same object?).
Having posted this question directly to Sequel via AppleLink without response
(are they still in business?) and to the QuickTime discussion folders
on AppleLink also without response, perhaps the Internet community
has the answer.
Any suggestions/comments appreciated.
+++++++++++++++++++++++++++
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Date: 3 Jun 92 18:59:22 +1200
Organization: University of Waikato, Hamilton, New Zealand
In article <1992Jun3.052547.2052@newsroom.utas.edu.au>, Nigel_Williams@qm.admin.utas.edu.au (Nigel Williams) writes:
> I am attempting to use the DigiVideo vdig component that was on the
> beta QuickTime CD. The DigiVideo card was manufactured by AAPS, later taken
> up by Sequel Development.
>
> Does anyone know if there is an updated version available (perhaps on the
> release QT Development CD)?
>
> My specific interest is to switch the vdig component into a mode where
> it grabs greyscale images rather than colour (our camera is B&W).
I'm not familiar with this video card, but what happens if you call
VDSetPlayThruDestination and specify a pixmap from an eight-bit greyscale
offscreen GWorld? Would that work?
Another trick that may work with cards that don't autosense NTSC/PAL mode
(it certainly works with our Moonraker) is to call VDSetInputStandard and
specify the wrong one. That is, specify NTSC if your source is actually
PAL, or vice versa. Of course, this assumes your card is able to handle
both signals, and will sync to the actual incoming scanning frequences,
not the official ones for the standard you specify. What happens is that
it looks for the colour information in the wrong format, doesn't find it,
and give you a black-and-white signal instead.
What a pity my VideoSpigot LC is too smart to be fooled by this trick :-}...
> I am expecting to do this using VDSetInputColorSpaceMode; I assume if I am using
> the sequence grabber to drive the vdig I can
> coerce the result of ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
> to a VideoDigitizerThing (am I right in thinking they refer to the same object?).
I can't remember offhand what VDSetInputColorSpaceMode does, but, yes,
all references to "thing" in the pre-release interfaces are now "component",
so a "VideoDigitizerThing" is now a "VideoDigitizerComponent". Are your
interfaces all up-to-date?
Lawrence D'Oliveiro fone: +64-7-856-2889
Computer Services Dept fax: +64-7-838-4066
University of Waikato electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
Any opinions the author has expressed in this posting are sacred to
Epimetheus, the Greek god of hindsight.
---------------------------
End of C.S.M.P. Digest
**********************