Skip to content

Commit

Permalink
more work on the Xcode4 templates and reverted a wrong edit
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5284 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
mattetti committed Mar 21, 2011
1 parent 036016b commit 884806c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Expand Up @@ -181,12 +181,10 @@ end
# Returns the persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. (The directory for the store is created, if necessary.)
#
def persistentStoreCoordinator
if !@persistentStoreCoordinator.nil?
return @persistentStoreCoordinator
end
return @persistentStoreCoordinator unless @persistentStoreCoordinator.nil?
mom = self.managedObjectModel
if !mom.nil?
if mom.nil?
puts "#{self.class} No model to generate a store from"
return nil
end
Expand All @@ -205,8 +203,7 @@ def persistentStoreCoordinator
if ok == false
NSApplication.sharedApplication.presentError(error[0])
end
else
if properties[NSURLIsDirectoryKey] != true
elsif properties[NSURLIsDirectoryKey] != true
# Customize and localize this error.
failure_description = "Expected a folder to store application data, found a file (#{directory.path})."
Expand All @@ -233,9 +230,7 @@ end
# bound to the persistent store coordinator for the application.)
#
def managedObjectContext
if !@managedObjectContext.nil?
return @managedObjectContext
end
return @managedObjectContext unless @managedObjectContext.nil?
coordinator = self.persistentStoreCoordinator
Expand Down Expand Up @@ -280,9 +275,7 @@ end
def applicationShouldTerminate(sender)
# Save changes in the application's managed object context before the application terminates.
if @managedObjectContext.nil?
return NSTerminateNow
end
return NSTerminateNow if @managedObjectContext.nil?
unless self.managedObjectContext.commitEditing
puts "%@ unable to commit editing to terminate" % self.class
Expand Down
Expand Up @@ -74,7 +74,7 @@
<key>___VARIABLE_documentClassName:identifier___.rb:implementation</key>
<dict>
<key>Beginning</key>
<string>class ___VARIABLE_documentClassName:identifier___</string>
<string>class ___VARIABLE_documentClassName:identifier___ &lt; NSDocument</string>
<key>End</key>
<string>end
Expand Down

0 comments on commit 884806c

Please sign in to comment.