adding custom tabs to bottom of gtDebugger

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

adding custom tabs to bottom of gtDebugger

Ben Coman
With...
    Error subclass: #OwnedLockBadRelease
        instanceVariableNames: 'lockOwner perpetrator'
        classVariableNames: ''
        package: 'Kernel-Processes'

In playground when I do...
    | error |
    (error := OwnedLockBadRelease new) signal
then in the debugger select the 'error' tempvar,
the [Raw] tab is too busy, so I'd like a custom [Error] tab
showing only my two instance variables.

I've managed to get a tab to show up by implementing...
    OwnedLockBadRelease>>gtDebuggerEvaluatorIn: composite
        super gtDebuggerEvaluatorIn: composite.
        (GTObjectVariablesBrowser new evaluatorIn: composite)
        title: 'Error Tab To Do'
but I can't find how to add variables.

Tips please?
cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: adding custom tabs to bottom of gtDebugger

Max Leske
Check out GTDebuggerVariablesBrowser. That’s the browser used in the debugger to display and inspect variables.

> On 21 Feb 2016, at 09:35, Ben Coman <[hidden email]> wrote:
>
> With...
>    Error subclass: #OwnedLockBadRelease
>        instanceVariableNames: 'lockOwner perpetrator'
>        classVariableNames: ''
>        package: 'Kernel-Processes'
>
> In playground when I do...
>    | error |
>    (error := OwnedLockBadRelease new) signal
> then in the debugger select the 'error' tempvar,
> the [Raw] tab is too busy, so I'd like a custom [Error] tab
> showing only my two instance variables.
>
> I've managed to get a tab to show up by implementing...
>    OwnedLockBadRelease>>gtDebuggerEvaluatorIn: composite
>        super gtDebuggerEvaluatorIn: composite.
>        (GTObjectVariablesBrowser new evaluatorIn: composite)
>        title: 'Error Tab To Do'
> but I can't find how to add variables.
>
> Tips please?
> cheers -ben
>


Reply | Threaded
Open this post in threaded view
|

Re: adding custom tabs to bottom of gtDebugger

Tudor Girba-2
In reply to this post by Ben Coman
The tabs from the inspector are defined through inspector extensions.

So, you should have a method annotated with gtInspectorPresentationOrder: in your OwnedLockBadRelease.

Let me know if you need more help.

Cheers,
Doru


> On Feb 21, 2016, at 9:35 AM, Ben Coman <[hidden email]> wrote:
>
> With...
>    Error subclass: #OwnedLockBadRelease
>        instanceVariableNames: 'lockOwner perpetrator'
>        classVariableNames: ''
>        package: 'Kernel-Processes'
>
> In playground when I do...
>    | error |
>    (error := OwnedLockBadRelease new) signal
> then in the debugger select the 'error' tempvar,
> the [Raw] tab is too busy, so I'd like a custom [Error] tab
> showing only my two instance variables.
>
> I've managed to get a tab to show up by implementing...
>    OwnedLockBadRelease>>gtDebuggerEvaluatorIn: composite
>        super gtDebuggerEvaluatorIn: composite.
>        (GTObjectVariablesBrowser new evaluatorIn: composite)
>        title: 'Error Tab To Do'
> but I can't find how to add variables.
>
> Tips please?
> cheers -ben
>

--
www.tudorgirba.com
www.feenk.com

"It's not how it is, it is how we see it."


Reply | Threaded
Open this post in threaded view
|

Re: adding custom tabs to bottom of gtDebugger

Ben Coman
Thanks.  Some examples I found useful were
* Date>>gtInspectorDetailsIn:
* GTInspector>>gtInspectorExtensionsIn:

cheers -ben

On Sun, Feb 21, 2016 at 4:53 PM, Tudor Girba <[hidden email]> wrote:

> The tabs from the inspector are defined through inspector extensions.
>
> So, you should have a method annotated with gtInspectorPresentationOrder: in your OwnedLockBadRelease.
>
> Let me know if you need more help.
>
> Cheers,
> Doru
>
>
>> On Feb 21, 2016, at 9:35 AM, Ben Coman <[hidden email]> wrote:
>>
>> With...
>>    Error subclass: #OwnedLockBadRelease
>>        instanceVariableNames: 'lockOwner perpetrator'
>>        classVariableNames: ''
>>        package: 'Kernel-Processes'
>>
>> In playground when I do...
>>    | error |
>>    (error := OwnedLockBadRelease new) signal
>> then in the debugger select the 'error' tempvar,
>> the [Raw] tab is too busy, so I'd like a custom [Error] tab
>> showing only my two instance variables.
>>
>> I've managed to get a tab to show up by implementing...
>>    OwnedLockBadRelease>>gtDebuggerEvaluatorIn: composite
>>        super gtDebuggerEvaluatorIn: composite.
>>        (GTObjectVariablesBrowser new evaluatorIn: composite)
>>        title: 'Error Tab To Do'
>> but I can't find how to add variables.
>>
>> Tips please?
>> cheers -ben
>>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "It's not how it is, it is how we see it."
>
>