TweetFollow Us on Twitter

OPENSTEP Porting to Rhapsody

Volume Number: 13 (1997)
Issue Number: 7
Column Tag: Rhapsody

Porting to Rhapsody PPC from OPENSTEP

by Andrew Stone, Chief Executive Haquer, Stone Design Corp.

Want your OPENSTEP application to run on more than one platform? Apple is making it easy

In late 1995, when the future for NeXT Software, Inc. seemed rather bleak, the first beta version of OPENSTEP 4.0 shipped to a few faithful developers. Faced with doing Java development in incomplete environments, I decided to yet again recommit to OPENSTEP and port our best selling drawing and design program, Create, which contains the Stone Libraries upon which our other apps are based. In an effort to save others from the pitfalls I fell into, I produced a porting guide http://www.stone.com/porting/ documenting the likely gotchas of the process of porting from NEXTSTEP to OPENSTEP.

It took me one month to port this 100,000 line code base to a state of linking and limping. After 8 months of intense debugging and working back and forth between the NT and MACH teams at NeXT and the SOLARIS OPENSTEP team at SUN Microsystems, Create 4.0 rolled into beta, and was the first app to ship for OPENSTEP in the fall of 1996. Proving the claim of true cross platform compatibility, it ran on Windows 95 and Window NT, SOLARIS, and OPENSTEP MACH for Motorola, Intel and SPARC architectures. Since the development and porting tools were just being debugged for the first time and my OPENSTEP knowledge was still nascent, the process was lengthier than a port from NEXTSTEP to OPENSTEP would be today. We shipped, and were underwhelmed by the lack of response from a beleaguered set of OPENSTEP users.

Apple acquiring NeXT on December 20th, 1996 changed all of that, proving once again that reality is far stranger than fiction. The Wheel turned full circle and the renegade ex-Mac developers were back home!

'Tis true that perseverance furthers, because 2 weeks prior to the 1997 WWDC on Cinco de Mayo, I was invited to NeXT Software's headquarters in Redwood City to build Create for the PowerPC. Unlike any previous visit to NeXT where I was watched with hawk-eye and not allowed to go anywhere unescorted, I was given full reign of the second floor of engineering, replete with my own office and access to that legendary espresso maker.

Two binaries were needed for the show: one for Rhapsody running on Intel, the other for Rhapsody running on PowerPC. The app was also built to showcase Yellow Box running on Windows with the Windows look and feel. This build compiled without warning, the app launched and hung. It turns out that I had a vestigial line of code from NEXTSTEP 1.0 circa 1989:

[menu display];

This was a workaround to get the menu to redraw after dynamically adding menu items. However, in the brave new world of Rhapsody, one cannot be sure what a menu is. Normally a menu is a subclass of NSView, which contains a display method. Under Rhapsody, Apple's drop-down menu is not a subclass of NSView, and does not recognize the display method.

The engineers at Apple/NeXT, in the midst of going through a total reorganization, had ported the kernel and compiler tools to PPC within a matter of months. They had built a cross-compiler to build PPC binaries from Intel machines, and once again, Create compiled cleanly. The PPC kernel was only a few days old, still dripping with amniotic fluid, when the first commercial app just came up and ran. As key team member Matt Watson is oft heard saying, "It just works!" Shouts of joy from the team could be heard throughout the building.

True to the promise of Rhapsody, no coding changes were required for the PPC/Yellow Box port, a few NeXT Interface Builder files (nibs) had to be adjusted to be more Mac-like -- mainly Create's main menu had to have its menu items reordered and renamed slightly to feel like a Mac. To solve this problem, a new interface loading paradigm was introduced: if a nib file has a platform suffix, that nib file is loaded instead of the one without a suffix:

NEXTSTEP look as provided by _NEXTSTEP___<NIB_FILE_NAME>-nextstep.nib

Macintosh look as provided by _Macintosh:__<NIB_FILE_NAME>-macintosh.nib

Windows look as provided by _Windows NT/95_<NIB_FILE_NAME>-windows.nib

The Mac and Windows NT/95 menus use a separation marker that you can find on the Menu palette of IB when you set the "Interface Style" in Interface Builder's Preferences (General) to "OPENSTEP for Windows." The separation marker must be disabled in the IB inspector to give it the light gray look. Menu organization and menu item naming should follow the User Interface guidelines of the target platform.

Having taken the time to learn Java and the various development environments from Sun and Symantec over the last couple of years, I can unreservedly say that Rhapsody rocks the house and Java has a lot to implement before it offers the power, elegance and integration of Rhapsody. After this delightful porting experience, I believe that Rhapsody is Write Once -- Runs Right Everywhere.


Andrew Stone, an early HyperTalk developer and co-author of "Tricks of the HyperTalk Masters" emigrated to the NeXT community in 1989, going on to write such NeXT classics as TextArt, Create, DataPhile and 3Dreality.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Fantastical 2.5.4 - Create calendar even...
Fantastical is the Mac calendar you'll actually enjoy using. Creating an event with Fantastical is quick, easy, and fun: Open Fantastical with a single click or keystroke Type in your event details... Read more
Overflow 3.0.4 - Application launcher th...
Overflow is an application designed to quickly launch applications, open documents, or access folders while reducing the number of items needed in your Dock. Anything you want can be added to the... Read more
Numi 3.19 - Menu-bar calculator supports...
Numi is a calculator that magically combines calculations with text, and allows you to freely share your computations. Numi combines text editor and calculator Support plain English. For example, '5... Read more
Things 3 3.7 - Elegant personal task man...
Things is a task management solution that helps to organize your tasks in an elegant and intuitive way. Things combines powerful features with simplicity through the use of tags and its intelligent... Read more
OmniGraffle 7.9 - Create diagrams, flow...
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
App Tamer 2.4.1 - Efficiently manage you...
App Tamer tames your processor-monopolizing apps and keeps them from chewing up excessive CPU time and battery life. Powered by a unique AutoStop feature, App Tamer stops each application when you... Read more
Overflow 3.0.3 - Application launcher th...
Overflow is an application designed to quickly launch applications, open documents, or access folders while reducing the number of items needed in your Dock. Anything you want can be added to the... Read more
Deeper 2.3.3 - Enable hidden features in...
Deeper is a personalization utility for macOS which allows you to enable and disable the hidden functions of the Finder, Dock, QuickTime, Safari, iTunes, login window, Spotlight, and many of Apple's... Read more
Maintenance 2.4.2 - System maintenance u...
Maintenance is a system maintenance and cleaning utility. It allows you to run miscellaneous tasks of system maintenance: Check the the structure of the disk Repair permissions Run periodic scripts... Read more
OnyX 3.4.9 - Maintenance and optimizatio...
OnyX is a multifunction utility that you can use to verify the startup disk and the structure of its system files, to run miscellaneous maintenance and cleaning tasks, to configure parameters in the... Read more

Latest Forum Discussions

See All

The best iPhone games like Pokemon Go
Pokemon GO is still the, if you'll excuse the pun, go-to game if you want some AR action on your phone. But it's not the only choice out there, and if you've got a hankering for something a bit different, then your eyes might already have started... | Read more »
These are the iPhone games to look forwa...
Every Friday here at 148Apps we like to do one thing. And that one thing is make sure that you've got a really good idea of what you're going to be playing come this time next week. That's right, it's time for us to round-up the best games that... | Read more »
We talked to Tony Swatton, legendary Hol...
Sometimes we like to tell you about the awesome stuff going on around mobile gaming, not just about how awesome mobile games are. And this is definitely one of those times. Because what's more awesome than real-life weapons based on things from... | Read more »
Which of these 5 games do you think shou...
You know what time it is, right? It's time for you, our esteemed and charming readership, to choose which of the five games below deserves to be crowned our game of the week. It's a pretty good week as well, so we expect that every single vote is... | Read more »
The winner of last week's game of t...
It's been another close run thing in the 148Apps game of the week award, but after checking on some possible areas of contention with the Frankfurt bureau, we can finally reveal that the winner of last week's coveted title is the impressively deep... | Read more »
The best iPhone games like Starcraft
Starcraft sits at the top of the RTS tree for a number of very good reasons. It also isn't on mobile, again, for a number of very good reasons. But that doesn't mean you can't find a way to indulge your sci-fi, competitive, massive, or engaging RTS... | Read more »
The best cyberpunk games for mobile
Cyberpunk games have come and gone through the years, but CD Projekt Red’s upcoming Cyberpunk 2077 has reignited everyone’s interest in dystopian hacker worlds lately. It also got me interested in exploring the App Store to see what the best... | Read more »
Take back a fallen kingdom in new 3D MMO...
If you’ve ever craved to be the hero of your own story within a colourful, yet endangered land in need of saving, Final Destiny could be the journey you’ve been waiting for. A new fantasy 3D MMORPG that sees you team up or fight against others, the... | Read more »
The 5 best dogs in mobile gaming
Not too long ago we talked about all of the finest kitty-cats mobile gaming had to offer, but what about the best dogs on the market? You don't have to have thumbs to be an awesome protagonist. [Read more] | Read more »
The 5 best iPhone games like The Room
The Room has had a massive impact on the world of mobile gaming. Not only is it a brilliant adventure, it also shows how the touchscreen controls on your iPhone can be turned into something far more elegant and tactile than just a bunch of buttons... | Read more »

Price Scanner via MacPrices.net

US Cellular offers new iPhone Xs and Xs Max f...
US Cellular is offering any iPhone Xs or iPhone Xs Max for $800 off for new customers. Their promotion reduces the price of Apple’s new iPhones to a low of $199 for 64GB iPhone Xs models ranging up... Read more
MacPrices Columnist Charles W. Moore Passes A...
NEWS: 09.21.18-: Charles W. Moore (1951-2018), columnist at MacPrices, passed away this past Sunday, September 16 at home in rural Nova Scotia, a province in Canada, after fighting for years with... Read more
Get a new iPhone Xs or Xs Max for $100 off Ap...
Boost Mobile is offering the new iPhone Xs and Xs Max for $100 off from September 21st to October 9th. Their discount reduces the cost of an Xs to $899 for the 64GB models and $999 for the 64GB Xs... Read more
Final weekend for Apple’s 2018 Back-to-School...
Purchase a new Mac or iPad Pro using Apple’s Education discount, and take up to $400 off MSRP. All teachers, students, and staff of any educational institution with a .edu email address qualify for... Read more
Clearance 2017 15″ 2.9GHz MacBook Pros availa...
B&H Photo has clearance 2017 15″ 2.9GHz Touch Bar MacBook Pros available for up to $800 off original MSRP. B&H charges sales tax in NY & NJ only, and shipping is free: – 15″ 2.9GHz Touch... Read more
Apple Should’ve Created A 4-inch Smartphone W...
EDITORIAL: 09.19.18- Apple created the new iPhone XR as an entry level model catered to those on a budget and to bring the high end experience of the iPhone X to the masses at a lower price but I... Read more
Apple offering Certified Refurbished 2017 13″...
Save $230-$200 on the purchase of a 2017 13″ 2.3GHz non-Touch Bar MacBook Pro with Certified Refurbished models at Apple. In many cases, Apple’s refurbished prices are the lowest available for each... Read more
Wide range of Certified Refurbished 12″ MacBo...
Apple has a wide range of Certified Refurbished 2017 12″ Retina MacBooks available for $200-$290 off the cost of new models. Apple will include a standard one-year warranty with each MacBook, and... Read more
13″ 2.3GHz non-Touch Bar MacBook Pros on sale...
B&H Photo has new 2017 13″ 2.3GHz non-Touch Bar MacBook Pros on sale for $150-$200 off MSRP. B&H charges sales tax in NY & NJ only, and shipping is free. – 13-inch 2.3GHz/128GB Space Gray... Read more
Mac mini sales continue with models available...
B&H Photo has Mac minis on sale for $100 off MSRP including free shipping plus NY & NJ sales tax only. Prices start at only $399: – 1.4GHz Mac mini: $399 $100 off MSRP – 2.6GHz Mac mini: $599... Read more

Jobs Board

Best Buy *Apple* Computing Master - Best Bu...
**644175BR** **Job Title:** Best Buy Apple Computing Master **Location Number:** 000195-Wichita Falls-Store **Job Description:** The Core Apple Computing Master Read more
*Apple* Mobile Master - Best Buy (United Sta...
**644334BR** **Job Title:** Apple Mobile Master **Location Number:** 001091-Plattsburg-Store **Job Description:** **What does a Best Buy Apple Mobile Master Read more
Best Buy *Apple* Computing Master - Best Bu...
**644399BR** **Job Title:** Best Buy Apple Computing Master **Location Number:** 000597-Erie-Store **Job Description:** **What does a Best Buy Apple Computing Read more
Geek Squad *Apple* Master Consultation Agen...
**644182BR** **Job Title:** Geek Squad Apple Master Consultation Agent **Location Number:** 000797-Soquel-Store **Job Description:** **What does a Geek Squad Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States- Apple Blossom Mall 1850 Apple Blossom Dr Job ID:1065040 Date:Today Job Description Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.