TweetFollow Us on Twitter

Jun 00 Tips

Volume Number: 16 (2000)
Issue Number: 6
Column Tag: Tips and Tidbits

Tips and Tidbits

by Jeff Clites <online@mactech.com>

File Types and StandardGetFile

In Dan Parks Sydow's article, "Opening a File", in the April 2000 issue of MacTech, he mentions that, "The [StandardGetFilePreview] dialog box can readily display all types of files, or just files of up to four different types", and that if you want to specify a list of more than four types, you must use a file filter function. Actually, this isn't true.

The definition of SFTypeList as an array of 4 OSTypes is simply a quirk of the original Mac OS interfaces (perhaps a desire to use a Pascal "var" parameter and avoid the use of the "@" (address-of) operator, for some reason). The underlying Standard File routines never had any such restriction. For instance, my original 1985 edition of Inside Mac Vol. I says on page I-524, "Assembly-language note: If you need to specify more than four types, pass a pointer to an array with the desired number of entries."

And indeed, Apple has finally removed this strange quirk from its recent interface definitions. The declarations of StandardGetFile, StandardGetFilePreview and so on now use the type ConstSFTypeListPtr for the list of types, and StandardFile.h even includes the comment that "For Pascal, this will require client code to use the @ operator, but make it easier to specify long lists." This is from the version 3.2 Universal Interfaces, dated August 1998.

Lawrence D'Oliveiro
<ldo@geek-central.gen.nz>

An annoying number of installers unnecessarily insist on quitting every running application before performing the installation. Specific offenders that I have encountered recently are the monthly virus definitions for Norton AntiVirus 6.0, and the updaters for CodeWarrior Pro 5.x. In neither case is this step necessary: one is only replacing some virus definition files, while the other is only upgrading an application.

Both these updaters use MindVision's Installer VISE (reviewed in the April issue), and it turns out it is easy to short-circuit its attempt to quit all applications. To do this, make sure you have MacsBug installed. Launch the offending installer. At some point early on, it will present you with a dialog saying it must quit all running applications, with "Cancel" and "Continue" buttons. Don't click on a button yet. Instead, position the mouse over an unused part of the menu bar, hold the mouse button down, and with your other hand hit the interrupt sequence to get into MacsBug.

In MacsBug, check that the current application is indeed the installer (its name should appear on the left, under the heading "CurApName"), which should be in the middle of processing a call to MenuSelect. You can let go of the mouse button now. Type the following command:

    atba GetNextProcess "; t; sw sp #-600; g"

This will intercept all attempts by the updater to get a list of running processes, and immediately short-circuit them with a procNotFound error--effectively pretending that there are no running processes!

(Note that Installer VISE is 68K code, so this procedure is valid for Power Macs.)

Having set the above breakpoint, resume execution with command-G. Now you can click the "Continue" button to continue the update. You should see the MacsBug screen flash up momentarily 3 more times, corresponding to the 3 separate places where GetNextProcess is called. Then the installation will proceed, without any applications being forced to quit!

Once the progress bar for the installation appears, it should be possible to break back into MacsBug and type

    atc

to clear the A-trap breakpoint, and then resume. Otherwise, having an A-trap breakpoint set slows down all system calls somewhat. Or, if you're ultra-cautious, you can wait until the installation has finished before doing this.

Warning: both the vendors providing the updaters and MindVision will almos certainly frown on the above procedure. It could very well cause a crash and loss of data for somebody in some situation I haven't considered. USE AT YOUR OWN RISK.

But then, if they were a little more considerate in configuring their updaters, this hack wouldn't be necessary...

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Apple Digital Camera RAW Compatibility 6...
Apple Digital Camera RAW Compatibility update adds RAW image compatibility to Aperture 3 and iPhoto '11. For more information on supported RAW formats, see this page. Version 6.03: This update adds... Read more
OmniGraffle Pro 6.1.4 - Create diagrams,...
OmniGraffle Pro helps you draw beautiful diagrams, family trees, flow charts, org charts, layouts, and (mathematically speaking) any other directed or non-directed graphs. We've had people use... Read more
OmniGraffle 6.1.4 - Create diagrams, flo...
OmniGraffle helps you draw beautiful diagrams, family trees, flow charts, org charts, layouts, and (mathematically speaking) any other directed or non-directed graphs. We've had people use Graffle to... Read more
MegaSeg 5.9.5 - Professional MP3 DJ appl...
MegaSeg is a complete solution for pro audio/video DJ mixing, radio automation, and music scheduling with rock-solid performance and an easy-to-use design. Mix with visual waveforms and Magic... Read more
MarsEdit 3.6.8 - Quick and convenient bl...
MarsEdit is a blog editor for OS X that makes editing your blog like writing email, with spell-checking, drafts, multiple windows, and even AppleScript support. It works with with most blog services... Read more
BBEdit 11.0.3 - Powerful text and HTML e...
BBEdit is the leading professional HTML and text editor for the Mac. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product provides a... Read more
Microsoft Office Preview 15.8 - Popular...
Welcome to the new and modern Microsoft Office for Mac. You will receive regular updates automatically until the official release in the second half of 2015. With the redesigned Ribbon and your... Read more
Yosemite Cache Cleaner 9.0.5 - Clear cac...
Yosemite Cache Cleaner is an award-winning general purpose tool for OS X. YCC makes system maintenance simple with an easy point-and-click interface to many OS X functions. Novice and expert users... Read more
ExpanDrive 4.3.2 - Access cloud storage...
ExpanDrive builds cloud storage in every application, acts just like a USB drive plugged into your Mac. With ExpanDrive, you can securely access any remote file server directly from the Finder or... Read more
RapidWeaver 6.0.8 - Create template-base...
RapidWeaver is a next-generation Web design application to help you easily create professional-looking Web sites in minutes. No knowledge of complex code is required, RapidWeaver will take care of... Read more

Huge New Content Update to RuPaul’s Drag...
Huge New Content Update to RuPaul’s Drag Race: Dragopolis 2.0! Posted by Jessica Fisher on March 6th, 2015 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Take a First Look at NaturalMotion’s Daw...
NaturalMotion has released a preview of their upcoming title, Dawn of Titans. Dawn of Titans immerses you in a world of fantasy as you build your kingdom, raise an army, and capture territories. The focus on this epic action strategy game was the... | Read more »
GDC 2015 – Warfriends is Something Famil...
GDC 2015 – Warfriends is Something Familiar That’s Also a Little Different Posted by Rob Rich on March 6th, 2015 [ permalink ] About Fun‘s upcoming Warfriends is quite the interesting hybrid. | Read more »
GDC 2015 – This is Why Everybody’s Talki...
GDC 2015 – This is Why Everybody’s Talking About Downwell Posted by Rob Rich on March 6th, 2015 [ permalink ] So Downwell. Holy crap. | Read more »
It’s Guild vs. Guild in Summoners War’s...
It’s Guild vs. Guild in Summoners War’s Newest Update! Posted by Jessica Fisher on March 6th, 2015 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
GDC 2015 – Toast USA’s Line-Up is Lookin...
GDC 2015 – Toast USA’s Line-Up is Looking Pretty Darn Cool Posted by Rob Rich on March 6th, 2015 [ permalink ] Guardian Stone Guardian Stone has been in the works for quite some time, but it’s finally getting close to a release. | Read more »
Heavenstrike Rivals: Beginners’s Tips, T...
Dig this: Would you like to know what we thought of this steampunk strategy game? Check out our Heavenstrike Rivals review! The Basics | Read more »
Bored? MyLeisure FreeTime Maximizer Will...
Bored? MyLeisure FreeTime Maximizer Will Take Care of That! Posted by Jessica Fisher on March 5th, 2015 [ permalink ] iPhone App - Designed for the iPhone, compatible with the iPad | Read more »
New Publisher Allstar Games Heads West w...
Allstar Games has announced its first mobile title designed for western audiences, Allstar Heroes. The game will be a massive online battle arena (MOBA) that offers dozens of heroes for you to collect and pit against your opponents. As each hero has... | Read more »
RAD Boarding Review
RAD Boarding Review By Jennifer Allen on March 5th, 2015 Our Rating: :: NEARLY RADUniversal App - Designed for iPhone and iPad RAD Boarding isn’t quite one of the greats, but it has potential.   | Read more »

Price Scanner via MacPrices.net

iOS 8.2 Coming Monday; Official Changelog An...
BGR’s Jonathan Geller reports that Apple will release an iOS 8.2 Final on Monday, presumably in conjunction with its scheduled “Spring Forward” special event. Geller also reports that he’s been... Read more
iBusiness Technologies Announces iReplenish t...
iBusiness Technologies, partnered nationally with Apple to provide businesses with iPad-based MobiliForms, has announced that for every system purchased it will plant 50 trees through The Nature... Read more
EnerPlex Surfr Battery & Solar Case for i...
Ascent Solar Technologies, Inc. a developer of state-of-the-art, flexible thin-film photovoltaic modules, integrated into the company’s EnerPlex series of consumer products, has announced immediate... Read more
16GB iPad mini 3 on sale for $349, save $50
 Walmart has the 16GB iPad mini 3 WiFi on sale on their online store for $349.99 including free shipping or free local store pickup. Their price is $50 off MSRP, and it’s the lowest price available... Read more
Save up to 15% with Apple refurbished Time Ca...
The Apple Store has certified refurbished Time Capsules available for up to $60 off MSRP. Apple’s one-year warranty is included with each Time Capsule, and shipping is free: - 2TB Time Capsule: $255... Read more
Save up to $105 on AppleCare Protection Plans
B&H Photo has 3-Year AppleCare Warranties on sale for up to $105 off MSRP including free shipping plus NY sales tax only: - Mac Laptops 15″ and Above: $244 $105 off MSRP - Mac Laptops 13″ and... Read more
Apple restocks refurbished 15-inch Retina Mac...
The Apple Store has restocked Apple Certified Refurbished 2014 15″ Retina MacBook Pros, available for up to $400 off the cost of new models. An Apple one-year warranty is included with each model,... Read more
Roundup of MacBook Air sale prices, models up...
B&H Photo has MacBook Airs on sale for up to $100 off MSRP. Shipping is free, and B&H charges NY sales tax only: - 11″ 128GB MacBook Air: $799 100 off MSRP - 11″ 256GB MacBook Air: $999 $100... Read more
New Firstrade Mobile App Enables On-The-Go Tr...
Firstrade Securities Inc. has announced its new mobile app, which gives investors immediate access to the company’s trading platform on all mobile devices. The app was developed in-house and was... Read more
Sonnet Introduces USB 3.0 + eSATA Thunderbolt...
Sonnet has announced the launch of its new USB 3.0 + eSATA Thunderbolt Adapter for easy connectivity to USB 3.0 devices and eSATA storage, and USB 3.0 + Gigabit Ethernet Thunderbolt Adapter for easy... Read more

Jobs Board

*Apple* Solutions Consultant- Retail Sales -...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
*Apple* Solutions Consultant - Retail Sales...
**Job Summary** As an Apple Solutions Consultant (ASC) you are the link between our customers and our products. Your role is to drive the Apple business in a retail Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Solutions Consultant - Retail Sales...
**Job Summary** As an Apple Solutions Consultant (ASC) you are the link between our customers and our products. Your role is to drive the Apple business in a retail Read more
Position Opening at *Apple* - Apple (United...
…Summary** As a Specialist, you help create the energy and excitement around Apple products, providing the right solutions and getting products into customers' hands. You Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.