• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Silly question on extending NSObject.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silly question on extending NSObject.


  • Subject: Re: Silly question on extending NSObject.
  • From: Alex Zavatone <email@hidden>
  • Date: Tue, 19 Feb 2019 20:23:41 -0600

> On Feb 19, 2019, at 4:15 PM, Jens Alfke <email@hidden> wrote:
>
>
>
>> On Feb 19, 2019, at 1:23 PM, Alex Zavatone <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>> In most Objective-C projects I add an autodescribe category on NSObject and
>> put the import for the category header into a .pch for the project so that
>> it will be available for every class in the project.
>> This lets me dump an object’s properties and values at Will in the debugger.
>
>
> I’m not sure what this does that the existing -description and
> -debugDescription methods don’t do?

This.

(lldb) po self.data
<DataStorage: 0x61000005af40>

(lldb) po [self.data description]
<DataStorage: 0x61000005af40>

(lldb) po [self.data autoDescribe]
[DataStorage {fullRootServicesURL: NSString = "http://localhost/";
rootServicesURL: "http://localhost/";
preferences: NSUserDefaults = <NSUserDefaults: 0x60c000059e90>
contentList: NSArray = (
        {
        fileTypeKey = ".png"
        imageKey = "Intro Page 1"
        nameKey = "No Lines, No Waiting."
    },
        {
        fileTypeKey = ".png"
        imageKey = "Intro Page 2"
        nameKey = "Am I Eligible?"
    },
        {
        fileTypeKey = ""
        imageKey = "Intro Page 3"
        nameKey = "Scan Your License."
    },
        {
        fileTypeKey = ".png"
        imageKey = "Intro Page 4"
        nameKey = "Enter Credit Card"
    },
        {
        fileTypeKey = ".png"
        imageKey = "Intro Page 5"
        nameKey = "All Done."
    },
        {
        fileTypeKey = ".png"
        imageKey = "Intro Page 6"
        nameKey = ""
    },
        {
        fileTypeKey = ".png"
        imageKey = "Intro Page 7"
        nameKey = ""
    }
)
}]
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Silly question on extending NSObject.
      • From: Rob Petrovec <email@hidden>
References: 
 >Silly question on extending NSObject. (From: Alex Zavatone <email@hidden>)
 >Re: Silly question on extending NSObject. (From: Alex Zavatone <email@hidden>)
 >Re: Silly question on extending NSObject. (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Silly question on extending NSObject.
  • Next by Date: Re: Silly question on extending NSObject.
  • Previous by thread: Re: Silly question on extending NSObject.
  • Next by thread: Re: Silly question on extending NSObject.
  • Index(es):
    • Date
    • Thread