Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from Abizern/master

Warning fixes, and README
  • Loading branch information...
commit 5f74a89f119e33bc0bb5bfdae7d6ddceac524749 2 parents 0b59b50 + 604a145
@mikeabdullah mikeabdullah authored
Showing with 16 additions and 5 deletions.
  1. +4 −4 KSWebLocation.m
  2. +12 −1 README.mdown
View
8 KSWebLocation.m
@@ -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];
@@ -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];
@@ -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
{
@@ -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
View
13 README.mdown
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.