Raw Dog XML Viewer Released on the Mac App Store

Raw Dog XML Viewer Mac App icon.
         

We have released Raw Dog XML Viewer on the Mac App Store, a new tool for app developers. Check out the description below to learn more!

App Description

Viewing XML in a text editor is a painfully slow process, especially if the XML file isn’t formatted. Stop wasting precious time! View XML files quickly and efficiently with Raw Dog XML Viewer! Easily drill through the XML tree using the outline view in the sidebar.

Features:

-View XML files.

-Quickly navigate through the XML tree by using the outline view in the sidebar.

-Hover your mouse over XML elements in the sidebar to see a tool tip showing the element’s attributes.

-Selecting XML text in the document will automatically select the proper node in the sidebar.

-View XML files that are on the web (for example: you can view the raw XML of an online RSS feed).

-Easily view XML files in a human readable format. Simply click the Pretty Print toolbar item to format unreadable XML.

-Change the font size in the toolbar.

-Choose between four different syntax highlighting styles in Settings.

Screenshots:

Raw Dog XML Viewer Welcome Window Screenshot. Raw Dog XML Viewer drilling through the XML tree. Raw Dog XML Viewer change syntax highlighting style Raw Dog XML Viewer Mac App screenshot in full screen mode.

File Cabinet Pro Version 1.5.2 Update Released!

File Cabinet Pro Old Mac app icon 305 x 305 pixels.

Download on the App Tyrant Store button.

What’s New?

-In Icon View, you can now Command+Click on files to extend the selection.

-If you are viewing a file in a mounted volume and you attempt to move the file to the trash, you will now be asked if you want to immediately delete the file as you would if you attempted to do the same operation in Finder.

-If a Mac application is in File Cabinet Pro and you double click on it, it will now launch the application.

You Can Now Set a Custom Local Directory in File Cabinet Pro Version 1.5

File Cabinet Pro Old Mac app icon 305 x 305 pixels.

What’s New?

In response to customer feedback, we have now added a feature that allows you to change the default local directory File Cabinet Pro displays to any local folder of your choosing. Simply open the Settings window and select the “Folder Path” toolbar item. From there, you can change the local directory File Cabinet Pro displays.

File Cabinet Pro Mac App Screenshot showing screenshot of custom file path settings window.

Quick Tutorial: How to Crop an Image with File Cabinet Pro

File Cabinet Pro is the file manager for the OS X menu bar. You can open, move, rename, tag, trash, copy and paste files, all from the menu bar.

File Cabinet Pro also comes with a built in Image Editor (you can turn this feature off in Settings and open your images in another application if you want).

In this little video, I show you how you can crop an image with File Cabinet Pro. Simply make a selection with the crop tool and then double click inside the selection box.



Visual Attributed String Version 1.5 Released: iCloud and Quicklook Support Added

Visual Attributed String Mac app icon.

           

Visual Attributed String version 1.5 has been pushed to the Mac App Store. In this update, two new features have been added to the application:

1) iCloud Support. Visual Attributed String now has a container in your iCloud Drive folder (you can of course, disable this feature if you don’t want to use it).

Visual Attributed String documents in Finder window.

2) Quicklook. Visual Attributed String documents now work with Quicklook. Instead of seeing the same document icon, you can get a visual representation of your document in Finder.

Visual Attributed String documents in Finder window.

How to Disable NSScrollView Scrolling

Unlike UIScrollView on iOS, NSScrollView on Mac does not have a handy scrollEnabled property you can use to temporarily disable scrolling.

If you Google around, you can find several posts on websites like stackoverflow that ask questions like How can I disable the vertical scrolling of a NSScrollView? Some have suggested setting the hasVerticalScroller property to NO as the answer. However, the hasVerticalScroller property only effects the visibility of the scroller, a value of NO does not actually prevent scrolling.

There are also ways to constrain scrolling from an NSView subclass, as described in Apple’s documentation here. Constraining scrolling from a view subclass can be useful, but what if you want to just temporarily disable scrolling?

The easiest way to disable scrolling is to subclass NSScrollView and add a BOOL property with a name like scrollingEnabled. Then you can simply override the designated initializers (initWithFrame: and initWithCoder:) and set the ivar of the property to YES as the default value:

-(instancetype)initWithFrame:(NSRect)frameRect 
{ 
   self = [super initWithFrame:frameRect]; 
   if (self) 
   { 
       [self setUpOnInit]; 
   } 
   return self; 
}
 
- (instancetype)initWithCoder:(NSCoder *)coder 
{ 
    self = [super initWithCoder:coder]; 
    if (self) 
    { 
         [self setUpOnInit]; 
    } 
    return self; 
}
 
-(void)setUpOnInit
{
   // Set all default values. 
   _scrollingEnabled = YES; 
}

Now you can override the scrollWheel: method and check the property:

-(void)scrollWheel:(NSEvent *)theEvent 
{ 
    if (self.scrollingEnabled) {  
      [super scrollWheel:theEvent];  
     } 
    else {  
       // scrolling is disabled. 
    } 
}

This technique will work in most cases, but it isn’t enough to completely disable scrolling. If there is a view inside of a scroll view that implements autoscrolling behavior (if the view is a dragging destination) the scrollWheel: override won’t block scrolling during an attempted drag and drop operation. To disable scrolling in all cases, you should also subclass NSClipView and block scrolling by overriding the -constrainBoundsRect: method like this:

-(NSRect)constrainBoundsRect:(NSRect)proposedBounds
{
    MyScrollViewSubclass *mainScrollView = (MyScrollViewSubclass*)self.superview;
 
    if (mainScrollView.scrollingEnabled)
    {
        return [super constrainBoundsRect:proposedBounds];
    }
    else
    {
        // Disabled
        return self.documentVisibleRect;
    }
}

After you do that, scrolling should be disabled whenever you set the scrollingEnabled property to NO. But there may be cases where the scroll bar remains visible even when you have scrolling disabled (depending on what type of mouse is being used). To deal with this you should also make sure you set the hasVerticalScroller property to NO when you disable scrolling. If desired, you can implement the setter of the scrollingEnabled property and set hasVerticalScroller at the same time.

Tutorial: How to Redeem a Promo Code for a Free Download on the Mac App Store

Update on April 17th, 2023: The Mac App Store has been redesigned since this tutorial was written. You can read an updated version of this tutorial for macOS Ventura here.

Sometimes, Mac developers are kind enough to give promo codes out so people can download a copy of their paid applications for free. A promo code is simply a combination of characters you can use on the Mac App Store to get the app for free, but how do you use them? It’s easy. First, open up the Mac App Store application. After the window has finished loading, you will see to your right a link that says Redeem. Click it.

Screenshot of the Mac App Store  window, annotated  with an arrow pointing to the 'redeem link'.

After you click the link a sheet will pop up asking you to log in with your Apple ID to redeem your code, so go ahead and log in!

Mac App Store screenshot of login sheet.

After you log in, you will be brought to a screen with a title that says “Redeem Code”. At the bottom, you will see a text field where you can enter your redeem code. Enter it and the application will start downloading! That’s it!

Mac App Store screenshot of the "Redeem Code"  window.

How to Deprecate your Own API in Objective-C

To mark some of your own API as deprecated in Objective-C, you simply can add the following attribute to your method declaration (as seen in the snippet below):

-(void)myOldMethod __attribute((deprecated("Use the myNewMethod instead.")));

Now when you call myOldMethod in your code, the compiler will warn you that: “myOldMethod is deprecated. Use the myNewMethod instead”. You can also add the deprecated attribute to property declarations.

But what if you wanted to be more specific? For instance, if there is a better way to handle something in the iOS 8 SDK, you can mark an old method as deprecated only for projects that have iOS 8.0 or later as the deployment target.

-(void)myOldMethod NS_DEPRECATED_IOS(3_0, 8_0,"Use myNewMethod instead.");

Using the code snippet above, if you call myOldMethod the compiler will only warn you that the method is deprecated if your project’s deployment target is set to iOS 8 or later.

Deprecating your own methods can come in handy especially if you have written your own framework that is used across multiple projects. You may choose to deprecate some of your own API rather than removing the methods entirely until you get around to modifying your existing projects to use your new API.