Re: Stupidish question - scoping a class to the console
Re: Stupidish question - scoping a class to the console
- Subject: Re: Stupidish question - scoping a class to the console
- From: Jim Ingham <email@hidden>
- Date: Thu, 01 Sep 2016 10:27:42 -0700
I'm not sure what you are asking for. Can you give an example of what you would like to be able to type?
One caveat, the arguments to po have to form a legit ObjC++ expressions. We try very hard not to add "debugger language" features to the expression parser. As much as possible we want you to be able to cut & paste code from the the source window in current context and use it in the expression parser ('po' is just a fancy use of the expression parser.) We're not always perfect at this but where we aren't those are always bugs, not features. Anytime we make the "expr" language diverge from the source language of the current frame, we make this harder to achieve. So if you want to type something that isn't legal ObjC syntax, we're probably going to be resistant to the idea.
Jim
> On Aug 31, 2016, at 7:02 PM, Alex Zavatone <email@hidden> wrote:
>
> Just wondering if this is remotely possible.
>
> If I have a utility class that has public methods, I often end up typing po [MyUtilityClassThatDoesThingsThatAreUseFulToMe validateURLICareAbout:theURLThatWasJustSetInCodeAndIsLocalToTheCurrentMethod] in the console window.
>
> This blows.
>
> Of course, it I renamed the variable in question to myURL, that's a rational first step, but it's the fact that I have to type a class of a class that has a public method that I want to use while in the console.
>
> Now, I can name my class A, but that also blows.
>
> What would make sense would be to have an implicit or explicitly declared console scope to that this class automagically comes into scope when invoked through the console and outside of the console (or anything attempting to fake itself as the console, instantly returns when executed.
>
> Almost like a popup of a collection of classes to be declared as, "I apply to the console so you don't need to enter my class name there, the methods within me have been assumed to be in scope for the console and are assumed to apply to me."
>
> Are there any Xcode console plugins that anyone is aware of that might already do this? I can't be the first person to want to type less in the console.
>
> Does that make any sense?
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden