[MD1]
TweetFollow Us on Twitter

[MD1]

From: jesjones@halcyon.com (Jesse Jones)
Subject: [ANN] Raven 1.2 (Mac C++ framework)

This file contains the source for Raven 1.2 a new C++ framework for
Macintosh programming. Raven is similar to PowerPlant and MacApp but takes
full advantage of newer C++ features, has a more modular structure, and
makes extensive use of programming by contract.

Like ODF and MacApp Raven makes extensive use of multiple inheritance by
means of mixin classes. Raven also uses the standard C++ classes wherever
possible, including the string class, the standard exception classes, and
STL. Raven also makes use of template classes and RTTI.

Raven is divided into four layers: Foundation, Core, Application, and
Esoterica. Each layer is composed of a number of packages. For example the
Core layer has a Files package containing classes to manage things like
reading/writing a file, iterating over files, accessing the Desktop
Manager, and CustomGetFile and CustomPutFile.

The Foundation layer contains low level classes for things like memory
management, debugging, broadcast/listener, exceptions, string utilities,
and geometry classes.

The Core layer includes a large number of generally useful classes for
things like graphics, sound, files, menus, command objects, drag and drop,
preferences, etc.

The Application layer contains higher level classes for views, windows, and
application objects.

The Esoterica layer contains more exotic classes that most applications
won't need. It includes classes for compression (using zlib), finite
automata, regular expressions, parsing, QuickDraw 3D, 2D graphing, 3D
graphing, and mathematics.

Because the lower layers are independant of the higher layers andcoupling
between packages is minimized you can easily use parts ofRaven with other
frameworks. For example, most of the Foundation and Core layers can be used
with PowerPlant.

Raven includes a rich set of debugging tools that include several excellent
debug macros, a powerful debug menu, a framework for developing unit tests,
and a flexible replacement for the default operator new that keeps a stack
crawl for each allocated block.

In addition the member functions in Raven classes do a good job of
verifying the validity of their arguments and many of the classes include
Invariant methods to catch bugs within Raven or within ill behaved
subclasses.

Here are the changes in version 1.2:

Known Bugs:
* Stack crawl doesn't have symbol names if virtual memory is on.
* TStaticText now uses the Appearance Manager if it's installed.
Unfortunately it's ignoring the foreColor in the ControlFontStyleRec record
and appears to always use black (even though Appearance.h says that it
should work).

General Notes:
* Since CW Pro now allows you to precompile the standard C++ headers the
sample projects set PRECOMPILE_RAVEN_HEADERS to 1. However in trying this I
experienced problems stepping into template code that was precompiled...
* Raven has been updated to work with the Appearance Manager. This means
you'll have to weak link to ApperanceLib (if the Appearance Manager isn't
installed Raven will fall back to a System 7 implementation).
* There have been a lot of changes to Raven. I think all the major
changes are mentioned below, but it's possible I missed a few.

Bug Fixes and Design Changes:
* In an effort to be more compatible with STL and to reduce the
neccesity to cast when warn_implicitconv is on I've moved towards using
ulong instead of short or long in the interfaces.
* Raven no longer uses 'STR#' resources to look up strings. Instead
Raven provides LoadRavenString and LoadAppString functions that look up
hard coded strings in a table. For example, instead of something like
LoadIndString(256, 5) you would write LoadAppString("Foo"). LoadAppString
would look up "Foo" in a 'StrM' resource with id 256 and if "Foo" is in the
resource a replacement string would be returned.
* TDocument::HandleSaveAs returns false if there was an error. This way
CanClose will return false giving the user an opportunity to save to a
different drive or to not save at all.
* TWindow::Invariant no longer objects when clicking in title bar of
collapsed window.
* TToolWindow wasn't properly saving the visible flag when it was closed
(so tool windows were always visible when the app was re-launched). This
has been fixed.
* In Raven 1.1 a pane's active attribute worked like the visible
attribute: if the window was active a subpane could be active or inactive.
If the window was inactive all of its subpanes were also inactive. Since
this doesn't seem to make much sense and gave me problems I've changed the
semantics so that panes are always active if the window is active and
always inactive when the window is inactive.
* The applicable pane classes now support the Appearance Manager. This
has entailed some changes:
* Group box no longer supports colors other than gray. Secondary
group boxes are now supported.
* TDisclosureArrow no longer supports medium or large sizes.
* Renamed TCaption TStaticText. Added Enable and Disable methods.
* TScroller::OnActivating and OnDeactivating call the Inherited method.
* TScroller ctors created horz scrollbar if hasVertBar and vice versa.
* TScrollBar uses the original mouse position when deciding where in the
scroll box the user clicked. This way the code works properly on slow
machines with fast mousers.
* Fixed for loop bug in TBaseTableView::GetCellFromPt.
* TControl has members holding the help text for the checked and
disabled states. In earlier versions these were always used. Now
TControl::OnGetBalloonHelp uses TPane's help text if TControl's text is
empty.
* TAdorner uses mIndent instead of GetExtent overrides. The GetExtent
override didn't work because TPane overrode RemoveAdorner and called
GetExtent to determine how much to invalidate. Unfortunately RemoveAdorner
was called by the TAdorner dtor which meant the subclasse's GetExtent was
no longer called.
* In Raven 1.1 TTracker did not always call OnTrackContinue. Raven 1.2,
on the other hand, always calls OnTrackContinue at least once. This means
that OnTrackStart should be used only for initialization, OnTrackContinue
should perform the action, and OnTrackStop should handle cleanup.
* TRubberBandTracker no longer caches canvas (didn't work when the view
auto scrolled).
* The TMenu(short, string) ctor was designed to allow you to build menus
by hand. However versions of Raven prior to 1.2 neglected to allocate
mMenuCommands which lead to a crash in short order.
* In Raven 1.1 TFile::Close was documented to not throw an exception and
the dtor called Close. This was done to make it easier to write exception
safe code. For example:
{
TFile file(spec);
file.Open(fsWrPerm);

file.Write(buffer.GetPtr(), buffer.GetSize());
}

If the write failed the file would automatically be closed and because
Close didn't throw we wouldn't have to worry about an exception being
thrown while the stack was being unwound. However because the File Manager
buffers writes FSClose has to flush the buffer which means FSClose may very
well fail. To handle this case Close now throws an exception. The dtor now
ASSERTs that the file is closed and calls Close is it's not (if an
exception was thrown you'll get an ASSERT but the file will be properly
closed). The dtor also traps exceptions. The above code should now be
written as:

{
TFile file(spec);
file.Open(fsWrPerm);

file.Write(buffer.GetPtr(), buffer.GetSize());

file.Close();
}
* FlushVolume throws instead of ASSERTing.
* TFileSpec and TFolderSpec ctors that resolve aliases no longer throw
if the target doesn't exist.
* TFileSpec and TFolderSpec ctors that take strings no longer
automatically convert the string to a valid file name (by replacing colons
with dashes and truncating to 31 characters). Instead they ASSERT that the
string is valid and, if it's not, fix it up.
* MTimer::StartTimer resets mSnapshot (so freq msecs elapse before
OnTime is called). Added MTimer::ResumeTimer (which works like StartTimer
used to).
* MBroadcaster::Broadcast used to stuff the message into a member before
sending it. This was pretty gross, but it made it possible for the
non-template MBaseBroadcaster base class to do all the heavy lifting.
Unfortunately this caused problems when a broadcast caused a broadcast.
This code has been rewritten to be a bit cleaner and to fix this problem.
* The code in ZDisplays.cpp has been revised using the RequestVideo
sample code from Apple. New functions have been added to get and restore
the state of a device. The state includes the Display Manager cookies so it
now restores the device to the exact old state. Also SetDisplayMode now
picks the highest refresh rate.
* Fixed an ASSERT in TMemoryHeap::AddAllocator.
* TSimpleAllocator adjust heap size when allocating huge blocks.
* TRect and TLongRect Pin methods pin to botRight instead of botRight
minus one.
* TLongRect::MapTo uses longs instead of shorts.
* Fixed a bad bug in TQueue::DoExpandBuffer.
* TSetPort no longer crashes if current port is bogus.

Changes:
* HAS_EXPLICIT and HAS_MUTABLE in RavenHeader.h now default to true (for
CW Pro1).
* RavenHeader.h includes ansi_parms.h
* Added ENABLE_IMPLICIT_CONV_WARNING macro. This is off by default. If
you turn it on ZTypes.h enables the warn_implicitconv warning in the 1.9
compiler. Note that there are parts of Raven that have not been compiled
with this on.
* TApplication::OnCreateDebugCommander is called after OnInit (so the
Debug menu appears after the Windows menu).
* Add a command to the debug menu to show/hide pane invalidations.
* Made some changes to TDocApplication:
* If the option key is down the close command becomes close all and
the save command becomes save all. If the command key is down the close
command becomes junk all.
* Added support for the OS 8 'rapp' apple event.
* Renamed GetFile OnGetFile.
* Made some changes to TDocument:
* HandleSave and HandleSaveAs delete the file if there was an error
writing it out.
* SetDirty and HandleSetDirty now take a data argument (which
defaults to nil). This is broadcast along with the kChangedDocument
message.
* HandleSaveAs won't save over files whose type is not mFileType.
* Volume is flushed after saving.
* SDocumentMessage::document is now a const TDocument pointer.
* Added TDocWindow::Create.
* Made some changes to TWindow:
* mLatentTarget no longer has to be a subpane.
* Removed OnSelect. (This was never called and never made much sense).
* Implemented auto-positioning.
* Added support for opaque panes. A pane is opaque if it's visible and
has an opaque adorner (eg TEraseAdorner) or the mOpaque member is set.
TView::HandleDraw clips any opaque subpanes before drawing itself. This can
significantly reduce flashing.
* TView::OnSubPaneScrolled, OnSubPaneChangedSize, and
OnSubPaneChangedLocation now have a redraw argument.
* Added TScroller::mEraseOnUpdate.
* TStringListBox broadcasts when selection changes or user double clicks.
* Worked on TBaseTableView:
* Made GetRowHeight and GetColWidth public. Made mNumCols and mRows
protected.
* Added support for selections.
* Added ScrollIntoView.
* Replaced OnMouseDownCell with OnDoubleClickCell.
* Added TTableSelection, TRowSelection, and TCellSelection.
* Tweaked scroll bar positioning in TListBoxBase. OnMouseDown handles
click after switching target. AdjustScrollBar calls SetPageDelta.
* Changed TScrollableView overhang reconciliation to reduce flashing.
* TCheckBox and TRadioButton support mixed state.
* Added context menus to TColorSwatch.
* DoNote, DoCaution, and DoStop use StandardAlert if it's available.
(They also take a second string).
* TMenuBar uses MenuEvent instead of MenuKey (if Appearance Manager).
* TMenuBar::GetCommandFromKey and DefaultFilterProc use
IsCommandPeriod() (which works with non-US keyboards).
* Removed SCommandStatus::usesMark.
* TContextMenu uses Context Menu Manager if it's installed.
* Added TDragSession::SetClippingPrefix and SetClippingName (which are
used by the OS 8 Finder).
* Made some undo related changes:
* Removed transaction support from TUndoMgr. Added
TMultipleUndoableCommand.
* Removed Abort methods from TUndoableCommand.
* Added TUndoableCommand::IsValid. Subclasses can override this and
return false when they can no longer do anything useful (TSafePtr (see
below) can help with this).
* TUndoMgr has been updated to delete invalid commands.
* TTracker::OnTrackStop now only has a stopPt argument.
* TStdScoreDeviceFn gives modes at the current resolution a slightly
higher score (this is useful when your app doesn't care what resolution it
runs at).
* FindPreferredDevice short cuts search if current mode suffices.
* TSetPort (GrafPtr) ctor now takes an optional GDHandle.
* Added TColorTable(PaletteHandle).
* Added TPicture::Write. Added a ctor to create a picture from a TGWorld.
* Made some changes to streaming code:
* TOutHandleStream ctor allows clients to specify a reserve size.
* operator))(TInStream, double) byte swaps if neccesary.
* Added stream operators for vector, list, map, and set.
* Added streaming operators to TQueue.
* Added UFileSystem::SpecExists and IsValidName.
* UFileSystem::GetUniqueFile uses SpecExists instead of FileExists.
* TFolderSpec::GetTempFolder and GetTrashFolder allow you to optionally
specify a volume.
* Added assembly glue allowing float to string functions to work with
long doubles.
* TRegularExpression has been reimplemented using finite automata. This
makes matching much faster but constructing the TRegularExpression object
may take a bit longer.
* Renamed EqualReal Equal.
* Abs() functions use intrinsics on PPC.
* Made TVector a template class. Added operator*(T, TVector).
* TPoint and TLongPoint operator (, (=, ), and )= check v first. This
way points can be sorted so that the topLeft points are first and botRight
are last.
* Added TPoint and TLongPoint Distance friend functions.
* PRECONDITION macro casts 'this' to an MInvariant*. This allows the
PRECONDITION and POSTCONDITION macros to be used inside a mixin.
* MBaseEditableObject, MBehaviorableBase, MCommander, and MLockable use
PRECONDITION and POSTCONDITION macros.
* Added non-virtual Invariant to MCommander.
* Added an Invariant to ZHandleRef. OnLock now adds a tail to the handle.
* Added ulong versions of all the int conversion functions (in
ZIntConversions.h).
* TAppBootStrap::OnInitSioux now always puts SIOUX on the main monitor
* TSystemException and ThrowIfOSErr use OSStatus instead of OSErr. (Some
of the newer manager return OSStatus. Since this is a long there's a chance
of data loss when using OSErr).
* Added kActivatingWindow and kDeactivatingWindow to TStateBroadcaster.
* Made some changes to the Skeleton project:
* Rewrote Skeleton.r Edit menu balloon help.
* Added a 68K stub to Skeleton project. (This is a tiny 68K app that
tells the user that he need a PPC to run the app).
* Created Debug, Release, and Profile targets in the Skeleton project.
* TMemoryHeap block count functions are defined if !RELEASE (instead of
if DEBUG).
* Added TMemoryHeap::DumpCommonBlocks and DumpAllocatorCapacities. You
can use these to determine if the fixed allocators you're using are still
OK in builds (to do this build a !DEBUG and !RELEASE version of your app
and call DumpCommonBlocks and DumpAllocatorCapacities at the end of main).
* TProfiler uses bestTimeBase instead of microsecondsTimeBase. (This
will cause PPCTimeBase to be used on a PPC which yields much less of a
speed hit than microsecondsTimeBase).
* TProfiler warning for too small numFunctions and stackDepth now
reports correct required values.

Additions:
* Added SGI STL to Extras. Unlike the MSL in CW Pro1 this library is
exception safe and includes extensive debugging support. It also produces
smaller executables.
* Added ZDialogBoxes.h and cpp which contain functions that make it very
easy to handle simple Quill style input dialogs.
* Added TPatternSwatch. When this is clicked it pops up a menu that
allows the user to pick one of the standard patterns.
* Added TPopupTable. This is a TSimpleTableView that functions like a
popup menu. TPatternSwatch uses this to popup the pattern menu.
* Added TVisualSeparator. This is a simple divider line that works
correctly with the Appearance Manager.
* Added TPicturePane.
* Added TStandardGetFile, TStandardGetFileOrFolder, and
TStandardPutFile. These provide a framework for easily extending a custom
standard file dialog with filter and hook functions.
* Added an Automata folder to Esoterica. This contains deterministic and
non-deterministic finite automata classes.
* Brand new parser classes have been added to Esoterica:Parser. These
classes provide a powerful framework for implementing recursive descent
parsers. (The old TParser class has been renamed TSimpleParser and can
still be useful for simple jobs).
* Added THSVColor.
* Added a templatized 2D array called TArray. (This is a generic array,
if you're storing floats you probably want to use TMatrix).
* Added a sparse templatized 2D array called TSparseArray.
* Added TSet. This is a wrapper around STL's set class that behaves more
like a set in mathematics. For example you can get the intersection of two
sets by typing s1 & s2 and you can add a new element with s1 += elem.
* Added TSafePtr. This is a smart pointer class that gets notified when
its target is destroyed. You can check to see if the pointer is OK to use
by calling the TargetExists method.
* Added a template TComplex class. This is similar to the standard's
complex class except that it provides direct access to the real and
imaginary members.
* Added xdouble. This is the long double class from the LiDIA math package.
* Added int and double versions of Random.

-- Jesse (jesjones@halcyon.com)

 
AAPL
$519.01
Apple Inc.
+1.05
MSFT
$40.40
Microsoft Corpora
+0.65
GOOG
$556.54
Google Inc.
+20.10

MacTech Search:
Community Search:

Software Updates via MacUpdate

PDFpenPro 6.2 - Advanced PDF toolkit for...
PDFpenPro allows users to edit PDF's easily. Add text, images and signatures. Fill out PDF forms. Merge or split PDF documents. Reorder and delete pages. Even correct text and edit graphics! Create... Read more
PDFpen 6.2 - Edit and annotate PDFs with...
PDFpen allows users to easily edit PDF's. Add text, images and signatures. Fill out PDF forms. Merge or split PDF documents. Reorder and delete pages. Even correct text and edit graphics! Features... Read more
Monolingual 1.5.9 - Remove unwanted OS X...
Monolingual is a program for removing unnecesary language resources from OS X, in order to reclaim several hundred megabytes of disk space. It requires a 64-bit capable Intel-based Mac and at least... Read more
Maya 2015 - Professional 3D modeling and...
Maya is an award-winning software and powerful, integrated 3D modeling, animation, visual effects, and rendering solution. Because Maya is based on an open architecture, all your work can be scripted... Read more
Starcraft II: Wings of Liberty 1.1.1.180...
Download the patch by launching the Starcraft II game and downloading it through the Battle.net connection within the app. Starcraft II: Wings of Liberty is a strategy game played in real-time. You... Read more
Sibelius 7.5.0 - Music notation solution...
Sibelius is the world's best-selling music notation software for Mac. It is as intuitive to use as a pen, yet so powerful that it does most things in less than the blink of an eye. The demo includes... Read more
Typinator 5.9 - Speedy and reliable text...
Typinator turbo-charges your typing productivity. Type a little. Typinator does the rest. We've all faced projects that require repetitive typing tasks. With Typinator, you can store commonly used... Read more
MYStuff Pro 2.0.16 - Create inventories...
MYStuff Pro is the most flexible way to create detail-rich inventories for your home or small business. Add items to MYStuff by dragging and dropping existing information, uploading new images, or... Read more
TurboTax 2013.r17.002 - Manage your 2013...
TurboTax guides you through your tax return step by step, does all the calculations, and checks your return for errors and overlooked deductions. It lets you file your return electronically to get... Read more
TrailRunner 3.8.769 - Route planning for...
Note: While the software is classified as freeware, it is actually donationware. Please consider making a donation to help support development. TrailRunner is the perfect companion for runners,... Read more

Latest Forum Discussions

See All

Unpossible (Games)
Unpossible 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: **Important** Requires at least iPad 2, iPhone 4S, iPod Touch (5th gen), or newer. | Read more »
Hitman GO (Games)
Hitman GO 1.2 Device: iOS Universal Category: Games Price: $4.99, Version: 1.2 (iTunes) Description: Get your daily fix of Agent 47 with this elegant, strategy-based Hitman game! | Read more »
The Seventh Sign: Hodappy Bird Released...
The Seventh Sign: Hodappy Bird Released on the App Store Posted by Jeff Scott on April 16th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Rogue Heroes (Games)
Rogue Heroes 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Rogue Heroes is awesome fast-paced 2D action-platforming roguelike game with RPG elements. - explore the depth of procedurally... | Read more »
Fourcast Review
Fourcast Review By Jennifer Allen on April 16th, 2014 Our Rating: :: VIDEO POTENTIALiPhone App - Designed for the iPhone, compatible with the iPad Fourcast is a great idea for combining video clips, but it does lack a number of... | Read more »
Hearthstone: Heroes of Warcraft is Avail...
Hearthstone: Heroes of Warcraft is Available on the U.S. App Store Right Now – Gogogogo! Posted by Rob Rich on April 16th, 2014 [ permalink ] | Read more »
Grammar Pop HD Review
Grammar Pop HD Review By Jennifer Allen on April 16th, 2014 Our Rating: :: FUN LEARNINGiPad Only App - Designed for the iPad Learning the different parts of speech isn’t always fun, but Grammar Pop HD makes it much more... | Read more »
Groundskeeper2 Review
Groundskeeper2 Review By Nadia Oxford on April 16th, 2014 Our Rating: :: SLICE THOSE ALIEN SLIMEUniversal App - Designed for iPhone and iPad Putting aside some minor control issues, Groundskeeper2 is a fun and furious action/... | Read more »
Pinnacle Studio for iPhone (Photography...
Pinnacle Studio for iPhone 5.0 Device: iOS iPhone Category: Photography Price: $9.99, Version: 5.0 (iTunes) Description: | Read more »
Season 3 of Zombies, Run! Starts Right N...
Season 3 of Zombies, Run! | Read more »

Price Scanner via MacPrices.net

Microsoft Blinks – Drops Microsoft Office 365...
Microsoft has dropped the annual subscription fee for Microsoft Office 365 Personal – which is needed in order to create and edit documents in Microsoft Office for iPad. However, Apple’s iOS and OS X... Read more
New AVG Vault Apps for iOS and Android Help K...
AVG Technologies N.V. an online security company for 177 million active users, has announced the launch of its latest mobile application, AVG Vault. The free app introduces an innovative user... Read more
Free Local Carrot iPhone App Helps Find Fresh...
I love fresh vegetables. I’m not a vegan, although I was for several years in the 1980s, but fresh vegetables and other whole foods are still my dietary mainstays as a matter of taste rather than... Read more
Apple refurbished iPad Airs available startin...
Apple is now offering Certified Refurbished iPad Airs for up to $140 off MSRP. Apple’s one-year warranty is included with each model, and shipping is free. The following Airs are available today: -... Read more
21-inch 2.7GHz iMac on sale for $1179, save $...
B&H Photo has the 21″ 2.7GHz iMac on sale for $1179 including free shipping plus NY sales tax only. Their price is $120 off MSRP. Add an iMac to your shopping cart, and B&H will offer an... Read more
Download our app, iTracx, for iOS and Android
MacPrices is proud to offer readers a free iOS app (iPhones, iPads, & iPod touch) and Android app (Google Play and Amazon App Store) called iTracx, which allows you to glance at today’s lowest... Read more
Education discounts shave up to $300 off the...
Purchase a new Mac at The Apple Store for Education and take up to $300 off MSRP. All teachers, students, and staff of any educational institution qualify for the discount. Shipping is free, and all... Read more
Save $50 on Mac mini Server
B&H Photo has the 2012 Mac mini Server on sale for $949 including free shipping plus NY sales tax only. Their price is $50 off MSRP. Read more
PhatWare’s “Ultimate Writing App For iOS” Ren...
PhatWare Corp. has announced it has renamed its new WritePro word processing app for iPhone and iPad: WritePad Pro. The decision to change the app’s name to leverages the strong brand awareness and... Read more
Full Resolution Photo Editor Tint Mint 1.0 Re...
California based independent developer, Jeffrey Sun, creator of the iOS app Modern Editor, has released Tint Mint, a new photography app for editing enthusiasts. The app costs a dollar, and it packs... Read more

Jobs Board

*Apple* Retail - Manager - Holyoke - Apple I...
Job Summary Keeping an Apple Store thriving requires a diverse set of leadership skills, and as a Manager, you’re a master of them all. In the store’s fast-paced, Read more
*Apple* Retail - Manager - Apple (United Sta...
Job SummaryKeeping an Apple Store thriving requires a diverse set of leadership skills, and as a Manager, you're a master of them all. In the store's fast-paced, dynamic Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**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* Retail - Market Leader - Cincinnati...
…challenges of developing individuals, building teams, and affecting growth across Apple Stores. You demonstrate successful leadership ability - focusing on excellence Read more
*Apple* Retail - Manager - SoHo - Apple (Uni...
Job SummaryKeeping an Apple Store thriving requires a diverse set of leadership skills, and as a Manager, you're a master of them all. In the store's fast-paced, dynamic Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.