Skip to content

Commit

Permalink
Merge pull request #3 from Abizern/master
Browse files Browse the repository at this point in the history
Warning fixes, and README
  • Loading branch information
mikeabdullah committed May 22, 2011
2 parents 0b59b50 + 604a145 commit 5f74a89
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 4 additions & 4 deletions KSWebLocation.m
Expand Up @@ -48,7 +48,7 @@ - (id)initWithURL:(NSURL *)URL title:(NSString *)name
{
NSParameterAssert(URL);

if (self = [super init])
if ((self = [super init]))
{
_URL = [URL copy];
_title = [name copy];
Expand Down Expand Up @@ -138,7 +138,7 @@ - (void)encodeWithCoder:(NSCoder *)encoder

- (id)initWithCoder:(NSCoder *)decoder
{
if (self = [super init])
if ((self = [super init]))
{
_URL = [[decoder decodeObjectForKey:@"URL"] retain];
_title = [[decoder decodeObjectForKey:@"name"] retain];
Expand All @@ -152,7 +152,7 @@ - (id)initWithCoder:(NSCoder *)decoder
// Pass in nil for aName if we want to use ID
+ (NSData *)readFromResourceFileAtPath:(NSString *)aPath type:(ResType) aType named:(NSString *)aName id:(NSInteger)anID
{
NSInteger fileRef = 0;
ResFileRefNum fileRef = 0;
NSData *result = nil;
@try
{
Expand All @@ -163,7 +163,7 @@ + (NSData *)readFromResourceFileAtPath:(NSString *)aPath type:(ResType) aType na
if (noErr == ResError())
{
Handle theResHandle = NULL;
NSInteger thePreviousRefNum = CurResFile(); // save current resource
ResFileRefNum thePreviousRefNum = CurResFile(); // save current resource
Str255 thePName;

UseResFile(fileRef); // set this resource to be current
Expand Down
13 changes: 12 additions & 1 deletion README.mdown
Expand Up @@ -81,4 +81,15 @@ A simple class that represents a URL, optionally with a title attached. Features
- NSCoding
- NSCopying

You can pull in the WebKit.framework-dependent KSWebLocationPasteboardAdditions too, to (unsurprisingly) gain support for reading and writing Web Locations from/to the pasteboard.
You can pull in the WebKit.framework-dependent KSWebLocationPasteboardAdditions too, to (unsurprisingly) gain support for reading and writing Web Locations from/to the pasteboard.

Development
===========

There are two branches in this repository: the *master* branch and the *tests* branch. The master branch just has the classes which can easily be used as a submodule in other repositories.

The *tests* branch has a project with a single target - a unit test bundle.

If the *tests* branch is currently checked out, changes from master can be brought over by doing a simple merge.

If the *master* branch is currently checked out, changes from *tests* can be brought over by cherry-picking the commits that change the main class files. Of course, with this method it is important to keep the changes to the main class files in their own commits that do not include changes from the test project or unit testing classes. This isn't usually a problem as long as commits are kept small and frequent.

0 comments on commit 5f74a89

Please sign in to comment.