TweetFollow Us on Twitter

Feb 89 Mousehole
Volume Number:5
Issue Number:2
Column Tag:Mousehole report

Mousehole Report

By Rusty Hodge & Larry Nedry, Mousehole BBS

From: thecloud (Ken Mcleod, La Habra, CA)

Subject: ScrollRect()

I’d like to be able to use ScrollRect to cause one bitmap to scroll down *into* a window, as the contents of that window are simultaneously scrolling down out of the visRgn. Trouble is, the update region gets filled with the port’s bkPat (white) by ScrollRect, and this results in a “flash of white” before I can get the area redrawn. Can anyone point out a strategy for accomplishing this “smoothly”? I’m currently doing something like this:

for (i=1; i <= appropriate_multiple_of_inc; i++) {
ScrollRect(&theRect, 0, inc, myRgnHandle);
ScrollRect(&anotherRect, 0, inc, myRgnHandle);   
Draw_Stuff_In_anotherRect()  }

but I’m sure I just need someone to kick me in the right direction!

From: rdclark (Richard Clark, Tustin, CA)

Subject: A kick in the right direction

Look at the articles by Scott Boyd (“The MacHax Group”) in the past 2 years of MacTutor -- they show how to do some pretty weird stuff with off-screen bitmaps and the like, including a trick to get rid of the “flash of white” when moving/updating a window.

From: lsr (Larry Rosenstein, Cupertino, CA)

Subject: Re: ScrollRect()

The best thing to do is to create an offscreen bitmap and use CopyBits to draw the bitmap on the screen in its proper position. If I understand your application correctly, you want to smoothly change from one image to the other. In that case, you would need to have the combined image offscreen, and use a series of CopyBits calls to draw the appropriate rectangle on the screen. (You would start out by copying the entire first image, then most of the first and part of the second, etc.)

CopyBits works the fastest when Quickdraw doesn’t have to shift every scan line. If you can control the position of the window on the screen, then you should make sure that its global screen position is a multiple of 16 (or 32 on a Mac II).

There probably is a way to prevent ScrollRect from erasing things, but the resulting effect wouldn’t be acceptable either. You would notice the delay between the ScrollRect and the redraw.

From: thecloud (Ken Mcleod, La Habra, CA)

Subject: Re: ScrollRect()

It always comes down to CopyBits in the end! Thanks...

From: robert (Rob Anthony, Chicago, IL)

Subject: MacIntalk

Check out APDA (Apple Programmers and Developers Assoc., in Renton, WA). They had -- in their ‘Curiosity Shoppe’ section -- the MacinTalk Development Package v. 1.31. It has docs and tools for using MacinTalk (they say). I don’t have it, so I can’t give any personal experience, but the APDA folks should be able to answer your questions. Need to be an APDA member to order; about $20 a year for that, but well worth it for the Mac programmer.

From: rhyman (Richard A. Hyman, Morrison, CO)

Subject: Desktop File

Prior to release 5 of the system software, the invisible Desktop file contained a resource called FOBJ that contained info on the open directories, view-by type information, and so on. The Finder used this info when starting up after quitting an application or during the boot-up. The FOBJ resource no longer exists with the newer system releases except for 400k MFS volumes. Does anyone know how this information is stored under system releases 5 & 6??

From: lsr (Larry Rosenstein, Cupertino, CA)

Subject: Re: Dialog Hook Procedure Problem

The problem is that you are using a local procedure, and the ROM is expecting a procedure at the top level. This is true of all the ROM routines that expect a pointer to a procedure. (In Pascal, nested procedures expect to find an extra parameter on the stack, which is a pointer to the enclosing stack frame.)

From: mwatts (Michael Watts, Santa Clara, CA)

Subject: limit on scroll bar value

Hi. I am new to the mousehole and have spent an informative session catching up. There is one question which I need help on if someone would be so kind.

In the app which I am writing, I have to deal with data which contains more than 32k points. I want to scroll through this data using a scroll bar, however the max value is an integer (opps). Even if I write my own control, in IM V I-333 the upper value for the CNTL resource is 2 bytes (not enough). I have kludged a fix by breaking the stream into 32k point sections, however this adds another control to my window and complexity to the program.

Does anyone know how to get around this problem, and if so how?

From: thotpolc (Bill Evans, Irvine, CA)

Subject: Re: limit on scroll bar value

“Doctor, it hurts when I do this.”

“Don’t do that....”

Your kludge to break the stream into 32k point sections is a good start. I don’t think the designers of the Mac interface and toolbox really anticipated someone scrolling more precisely than this. Notice, however, that the scroll bar is between two arrows, each of which points away from it. You could use these to scroll more precisely. To get the flavor of this, use any word processing program to create a document with more than 64k lines. (Probably short lines will make the whole thing a little easier.) Then scroll back and forth, using all parts of the scroll bar: the thumb (which is that funny white box you can slide back and forth with your... well, with your thumb), the gray parts of the bar itself, and the arrows at each end. In a well-tempered word processor, a single click in one of these arrows should move you up or down by one line; holding down the mouse in one of these arrows should, after a short while, start scanning through the document in small increments. Go thou and do likewise.-- the Thought Police

From: rdclark (Richard Clark, Tustin, CA)

Subject: Re: limit on scroll bar value

There are a couple of ways to take care of your problem:

1) Redesign the software so that a single click on the down arrow moves you down by n points instead of 1 point (where n could be 1/4 screen or something.) Some how, I don’t think that’ll be satisfactory for you. 2) Write a custom control definition that uses something larger than an integer (an unsigned integer, maybe?), then avoid using calls like “SetCtlValue” and “GetCtlValue”. Fortunately, there’s a set of options available to you in writing a custom control definition that allow you to get away without Set/GetCtlValue. The first problem involves dragging the “thumb” portion of the scroll bar. If you look at IM I-331 and I-332, you’ll see that you can write a “drag”, “position”, and “thumb” routine that override the control manager (I suspect that the control manager uses the get/set control value calls.) These could read your “extended” position information and adjust the control accordingly. That leaves a different problem -- what happens if the user clicks in one of the arrows?? You’ll need to pass a message to your control to adjust itself by 1. The only reasonable way I can think of doing this is to make one of your control messages do double duty (you don’t want to pick a new message number since Apple might decide to use that message someday, and that could hurt.) How about calling the control definition with a second (third, fourth...) “initCntl” message and a special value in the “param” parameter?? Your definition could recognize the special value (or the fact that you’re already initialized) and adjust itself accordingly.

On second thought, why not just live with a scroll bar position which is an approximation of the real position?? After all, we won’t be seeing 33K pixel by 33K pixel screens in the near future, so all your extra effort won’t mean much on the display.

From: mwatts (Michael Watts, Santa Clara, CA)

Subject: Re: limit on scroll bar value

That is a good suggestion. I was fixating on using the scroll bar value as my numerical indicator on where I was in the data set. Your suggestion implies I have a position variable which is incremented by the scroll step parameter and then position the thumb relative to the size of the data set.--a very “thoughtful” piece of advice.

ps- I still consider this a kludge solution. there should be a way to have the value of the scroll bar be a long integer.

From: rdclark (Richard Clark, Tustin, CA)

Subject: Re: limit on scroll bar value

Actually, I like the thought police’s answer MUCH better. (But I never could resist a good challenge!)

From: thotpolc (Bill Evans, Irvine, CA)

Subject: Re: limit on scroll bar value

rdclark (Richard Clark, Tustin, CA) writes:

On third thought, if you want exactly what you want without kludges, why not throw away the whole idea of part numbers and messages doing double duty and custom control definitions, and just do the whole durn thang using normal QuickDraw calls? I did this once with buttons which I wanted to have a special shape, and it was fun! If I ever use scroll bars, I’m going to want the thumb to be not square, but long enough to show what portion of the document is on the screen. That way, for example, if almost all of the document is on the screen and you’re at the beginning of the document, you’ll see a thumb which occupies almost all of the scroll bar, with a small gray area at the bottom. And if you click in that small area, you’ll see a large thumb move a small distance (while the data on the screen is doing exactly the same thing), not a small thumb jump grotesquely from the top to the bottom of the scroll bar.

And if I ever get around to having this fun, you can bet I’ll do it all without a formally defined control definition, thank you very much.

Does any of this give you the feeling that my favorite language is assembly? -- the Thought Police

From: rdclark (Richard Clark, Tustin, CA)

Subject: Re: limit on scroll bar value

Actually, it’s giving me a feeling that you’re a GEM fanatic! (duck incoming tomatos)

From: dhands (David Hands, Salem, OR)

Subject: MPW Print Interfaces

In the interface files of MPW Pascal there are two files, PrintTraps.p and MacPrint.p, that contain roughly the same calls. What’s the difference and when should one be used over the other?

From: think (Think Technologies, Bedford, MA)

Subject: Re: MPW Print Interfaces

PrintTraps.p is the trap-based interface to the Print Manager; the traps are implemented in the Mac SE and Mac II ROMs, and in System 4.1 or later on all machines.

MacPrint.p is the glue-based interface, and will work on all Macs, on all versions of the System software.

Rich Siegel Staff Software Engineer THINK Technologies Division Symantec Corp. Mousehole: think Usenet: singer@endor.uucp

Any opinions stated here do not necessarily represent the views or policies of the Symantec Corporation.

From: think (Think Technologies, Bedford, MA)

Subject: Lightspeed Pascal 2.0 Ships!

The following is excerpted from the press release announcing the shipment of THINK’s Lightspeed Pascal and Just Enough Pascal. the official announcement was made yesterday (Monday, November 14) at COMDEX, in Las Vegas.

“Symantec Corporation today announced THINK’s Lightspeed Pascal(tm) version 2.0 and Just Enough Pascal(tm) are shipping this week.

For a limited time, beginning this week, Symantec will bundle a copy of Just Enough Pascal in specially marked boxes of THINK’s Lightspeed Pascal. the suggested list price of the bundle is $149, and the promotion will continue until January 31, 1989.

Just Enough Pascal is the first tutorial of its kind, taking an inter- active approach to teaching the fundamentals of Pascal programming on the Macintosh. Users learn by building a real Macintosh game application in THINK’s Lightspeed Pascal, with all instructions and explanations provided on-line. As the user builds the program through various stages, he sees the results of each code change graphically illustrated on the screen.

New version 2.0 of THINK’s Lightspeed Pascal now generates the fastest, most compact code of any Pascal compiler available for the Macintosh. It provides options to generate code for the 68020 and for the 68881 math coprocessor, and features full access to all of the Macintosh ROM routines.

New and enhanced features of version 2.0 include: a fast, multipass optimizing compiler which produces compact, commercial-quality code; Object Pascal support; increased editor flexibility for virtually unlimited program size; and enhanced source-level debugger; and language extensions for improved compatibility with Apple’s Macintosh Programmer’s Workshop (MPW) Pascal.

Special introductory list pricing for THINK’s Lightspeed Pascal version 2.0 is $125. The price will increase to $149, effective February 1, 1989. Just Enough Pascal’s suggested list price is $75.

Registered owners may upgrade to THINK’s Lightspeed Pascal version 2.0 for $52.50 ($49 plus $3.50 shipping and handling; CA residents must add 7% sales tax, for a total of $55.93}. To upgrade, users must send a letter, including payment (US checks only) and registration number to:

Symantec Corporation Customer Service Department 10201 Torre Avenue Cupertino, CA 95014 ATTN: THINK’s Lightspeed Pascal 2.0 Upgrade

Purchasers of version 1.11 or earlier who bought the product after July 1, 1988 are entitled to a free upgrade. A dated proof of purchase must accompany the upgrade request. Further upgrade information is available from Symantec’s Customer Service Department at (408) 252-3570.

Symantec will also extend the special $175 introductory pricing of THINK’s Lightspeed C version 3.0 through January 31, 1989. Effective February 1, 1989 the price will increase to $249.” Rich Siegel Staff Software Engineer THINK Technologies Division Symantec Corp. Mousehole: think Usenet: singer@endor.uucp . [Any opinions stated here do not necessarily represent the views or policies of the Symantec Corporation. Pricing is still being determined by Symantec at Press time. -Ed]

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Chromium 119.0.6044.0 - Fast and stable...
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. List of changes available here. Version for Apple... Read more
Spotify 1.2.21.1104 - Stream music, crea...
Spotify is a streaming music service that gives you on-demand access to millions of songs. Whether you like driving rock, silky R&B, or grandiose classical music, Spotify's massive catalogue puts... Read more
Tor Browser 12.5.5 - Anonymize Web brows...
Using Tor Browser you can protect yourself against tracking, surveillance, and censorship. Tor was originally designed, implemented, and deployed as a third-generation onion-routing project of the U.... Read more
Malwarebytes 4.21.9.5141 - Adware remova...
Malwarebytes (was AdwareMedic) helps you get your Mac experience back. Malwarebytes scans for and removes code that degrades system performance or attacks your system. Making your Mac once again your... Read more
TinkerTool 9.5 - Expanded preference set...
TinkerTool is an application that gives you access to additional preference settings Apple has built into Mac OS X. This allows to activate hidden features in the operating system and in some of the... Read more
Paragon NTFS 15.11.839 - Provides full r...
Paragon NTFS breaks down the barriers between Windows and macOS. Paragon NTFS effectively solves the communication problems between the Mac system and NTFS. Write, edit, copy, move, delete files on... Read more
Apple Safari 17 - Apple's Web brows...
Apple Safari is Apple's web browser that comes bundled with the most recent macOS. Safari is faster and more energy efficient than other browsers, so sites are more responsive and your notebook... Read more
Firefox 118.0 - Fast, safe Web browser.
Firefox offers a fast, safe Web browsing experience. Browse quickly, securely, and effortlessly. With its industry-leading features, Firefox is the choice of Web development professionals and casual... Read more
ClamXAV 3.6.1 - Virus checker based on C...
ClamXAV is a popular virus checker for OS X. Time to take control ClamXAV keeps threats at bay and puts you firmly in charge of your Mac’s security. Scan a specific file or your entire hard drive.... Read more
SuperDuper! 3.8 - Advanced disk cloning/...
SuperDuper! is an advanced, yet easy to use disk copying program. It can, of course, make a straight copy, or "clone" - useful when you want to move all your data from one machine to another, or do a... Read more

Latest Forum Discussions

See All

‘Monster Hunter Now’ October Events Incl...
Niantic and Capcom have just announced this month’s plans for the real world hunting action RPG Monster Hunter Now (Free) for iOS and Android. If you’ve not played it yet, read my launch week review of it here. | Read more »
Listener Emails and the iPhone 15! – The...
In this week’s episode of The TouchArcade Show we finally get to a backlog of emails that have been hanging out in our inbox for, oh, about a month or so. We love getting emails as they always lead to interesting discussion about a variety of topics... | Read more »
TouchArcade Game of the Week: ‘Cypher 00...
This doesn’t happen too often, but occasionally there will be an Apple Arcade game that I adore so much I just have to pick it as the Game of the Week. Well, here we are, and Cypher 007 is one of those games. The big key point here is that Cypher... | Read more »
SwitchArcade Round-Up: ‘EA Sports FC 24’...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for September 29th, 2023. In today’s article, we’ve got a ton of news to go over. Just a lot going on today, I suppose. After that, there are quite a few new releases to look at... | Read more »
‘Storyteller’ Mobile Review – Perfect fo...
I first played Daniel Benmergui’s Storyteller (Free) through its Nintendo Switch and Steam releases. Read my original review of it here. Since then, a lot of friends who played the game enjoyed it, but thought it was overpriced given the short... | Read more »
An Interview with the Legendary Yu Suzuk...
One of the cool things about my job is that every once in a while, I get to talk to the people behind the games. It’s always a pleasure. Well, today we have a really special one for you, dear friends. Mr. Yu Suzuki of Ys Net, the force behind such... | Read more »
New ‘Marvel Snap’ Update Has Balance Adj...
As we wait for the information on the new season to drop, we shall have to content ourselves with looking at the latest update to Marvel Snap (Free). It’s just a balance update, but it makes some very big changes that combined with the arrival of... | Read more »
‘Honkai Star Rail’ Version 1.4 Update Re...
At Sony’s recently-aired presentation, HoYoverse announced the Honkai Star Rail (Free) PS5 release date. Most people speculated that the next major update would arrive alongside the PS5 release. | Read more »
‘Omniheroes’ Major Update “Tide’s Cadenc...
What secrets do the depths of the sea hold? Omniheroes is revealing the mysteries of the deep with its latest “Tide’s Cadence" update, where you can look forward to scoring a free Valkyrie and limited skin among other login rewards like the 2nd... | Read more »
Recruit yourself some run-and-gun royalt...
It is always nice to see the return of a series that has lost a bit of its global staying power, and thanks to Lilith Games' latest collaboration, Warpath will be playing host the the run-and-gun legend that is Metal Slug 3. [Read more] | Read more »

Price Scanner via MacPrices.net

Clearance M1 Max Mac Studio available today a...
Apple has clearance M1 Max Mac Studios available in their Certified Refurbished store for $270 off original MSRP. Each Mac Studio comes with Apple’s one-year warranty, and shipping is free: – Mac... Read more
Apple continues to offer 24-inch iMacs for up...
Apple has a full range of 24-inch M1 iMacs available today in their Certified Refurbished store. Models are available starting at only $1099 and range up to $260 off original MSRP. Each iMac is in... Read more
Final weekend for Apple’s 2023 Back to School...
This is the final weekend for Apple’s Back to School Promotion 2023. It remains active until Monday, October 2nd. Education customers receive a free $150 Apple Gift Card with the purchase of a new... Read more
Apple drops prices on refurbished 13-inch M2...
Apple has dropped prices on standard-configuration 13″ M2 MacBook Pros, Certified Refurbished, to as low as $1099 and ranging up to $230 off MSRP. These are the cheapest 13″ M2 MacBook Pros for sale... Read more
14-inch M2 Max MacBook Pro on sale for $300 o...
B&H Photo has the Space Gray 14″ 30-Core GPU M2 Max MacBook Pro in stock and on sale today for $2799 including free 1-2 day shipping. Their price is $300 off Apple’s MSRP, and it’s the lowest... Read more
Apple is now selling Certified Refurbished M2...
Apple has added a full line of standard-configuration M2 Max and M2 Ultra Mac Studios available in their Certified Refurbished section starting at only $1699 and ranging up to $600 off MSRP. Each Mac... Read more
New sale: 13-inch M2 MacBook Airs starting at...
B&H Photo has 13″ MacBook Airs with M2 CPUs in stock today and on sale for $200 off Apple’s MSRP with prices available starting at only $899. Free 1-2 day delivery is available to most US... Read more
Apple has all 15-inch M2 MacBook Airs in stoc...
Apple has Certified Refurbished 15″ M2 MacBook Airs in stock today starting at only $1099 and ranging up to $230 off MSRP. These are the cheapest M2-powered 15″ MacBook Airs for sale today at Apple.... Read more
In stock: Clearance M1 Ultra Mac Studios for...
Apple has clearance M1 Ultra Mac Studios available in their Certified Refurbished store for $540 off original MSRP. Each Mac Studio comes with Apple’s one-year warranty, and shipping is free: – Mac... Read more
Back on sale: Apple’s M2 Mac minis for $100 o...
B&H Photo has Apple’s M2-powered Mac minis back in stock and on sale today for $100 off MSRP. Free 1-2 day shipping is available for most US addresses: – Mac mini M2/256GB SSD: $499, save $100 –... Read more

Jobs Board

Licensed Dental Hygienist - *Apple* River -...
Park Dental Apple River in Somerset, WI is seeking a compassionate, professional Dental Hygienist to join our team-oriented practice. COMPETITIVE PAY AND SIGN-ON Read more
Sublease Associate Optometrist- *Apple* Val...
Sublease Associate Optometrist- Apple Valley, CA- Target Optical Date: Sep 30, 2023 Brand: Target Optical Location: Apple Valley, CA, US, 92307 **Requisition Read more
*Apple* / Mac Administrator - JAMF - Amentum...
Amentum is seeking an ** Apple / Mac Administrator - JAMF** to provide support with the Apple Ecosystem to include hardware and software to join our team and Read more
Child Care Teacher - Glenda Drive/ *Apple* V...
Child Care Teacher - Glenda Drive/ Apple ValleyTeacher Share by Email Share on LinkedIn Share on Twitter Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.