Editing methods in the inspector

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

Editing methods in the inspector

abergel
Hi!

If I inspect a compile method, I have a tab showing the source code. But I cannot modify the source code of it (well, it does not compile).
Is there a way to edit compile method within the GTInspector?
Maybe using Ring?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Editing methods in the inspector

Tudor Girba-2
Inspect a RGMethodDefinition. CompiledMethod is immutable and that is why you cannot change it in the inspector.

Doru

--
www.tudorgirba.com

"Every thing has its own flow"

> On 03 Oct 2015, at 01:52, Alexandre Bergel <[hidden email]> wrote:
>
> Hi!
>
> If I inspect a compile method, I have a tab showing the source code. But I cannot modify the source code of it (well, it does not compile).
> Is there a way to edit compile method within the GTInspector?
> Maybe using Ring?
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Editing methods in the inspector

abergel
Ah yes! Excellent! It works.
Is there a way I can get notified when the user recompile an inspected method ?

I was hoping to have an announcer defined on RGMethodDefinition? Any idea?

Cheers,
Alexandre


> On Oct 4, 2015, at 10:21 AM, Tudor Girba <[hidden email]> wrote:
>
> Inspect a RGMethodDefinition. CompiledMethod is immutable and that is why you cannot change it in the inspector.
>
> Doru
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>> On 03 Oct 2015, at 01:52, Alexandre Bergel <[hidden email]> wrote:
>>
>> Hi!
>>
>> If I inspect a compile method, I have a tab showing the source code. But I cannot modify the source code of it (well, it does not compile).
>> Is there a way to edit compile method within the GTInspector?
>> Maybe using Ring?
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Editing methods in the inspector

Alejandro Infante
Hi Alex,
There is an announcement sent when modifying a method. If you want to try it just execute the following in a Playground:
———
o := Object new.
SystemAnnouncer uniqueInstance weak
        when: MethodModified send: #halt to: o.
———
If you modify a method after that the debugger will pop up. Closing the playground removes the callback.

Also the announcement has an instance variable with the method, to get the announcer as an argument just look at the comments of Announcer>>#when:send:to:

Cheers,
Alejandro

> On Oct 4, 2015, at 2:33 PM, Alexandre Bergel <[hidden email]> wrote:
>
> Ah yes! Excellent! It works.
> Is there a way I can get notified when the user recompile an inspected method ?
>
> I was hoping to have an announcer defined on RGMethodDefinition? Any idea?
>
> Cheers,
> Alexandre
>
>
>> On Oct 4, 2015, at 10:21 AM, Tudor Girba <[hidden email]> wrote:
>>
>> Inspect a RGMethodDefinition. CompiledMethod is immutable and that is why you cannot change it in the inspector.
>>
>> Doru
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>>
>>> On 03 Oct 2015, at 01:52, Alexandre Bergel <[hidden email]> wrote:
>>>
>>> Hi!
>>>
>>> If I inspect a compile method, I have a tab showing the source code. But I cannot modify the source code of it (well, it does not compile).
>>> Is there a way to edit compile method within the GTInspector?
>>> Maybe using Ring?
>>>
>>> Cheers,
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Editing methods in the inspector

abergel
Excellent!

Thanks!
Alexandre

> On Oct 5, 2015, at 1:52 AM, Alejandro Infante <[hidden email]> wrote:
>
> Hi Alex,
> There is an announcement sent when modifying a method. If you want to try it just execute the following in a Playground:
> ———
> o := Object new.
> SystemAnnouncer uniqueInstance weak
> when: MethodModified send: #halt to: o.
> ———
> If you modify a method after that the debugger will pop up. Closing the playground removes the callback.
>
> Also the announcement has an instance variable with the method, to get the announcer as an argument just look at the comments of Announcer>>#when:send:to:
>
> Cheers,
> Alejandro
>> On Oct 4, 2015, at 2:33 PM, Alexandre Bergel <[hidden email]> wrote:
>>
>> Ah yes! Excellent! It works.
>> Is there a way I can get notified when the user recompile an inspected method ?
>>
>> I was hoping to have an announcer defined on RGMethodDefinition? Any idea?
>>
>> Cheers,
>> Alexandre
>>
>>
>>> On Oct 4, 2015, at 10:21 AM, Tudor Girba <[hidden email]> wrote:
>>>
>>> Inspect a RGMethodDefinition. CompiledMethod is immutable and that is why you cannot change it in the inspector.
>>>
>>> Doru
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Every thing has its own flow"
>>>
>>>> On 03 Oct 2015, at 01:52, Alexandre Bergel <[hidden email]> wrote:
>>>>
>>>> Hi!
>>>>
>>>> If I inspect a compile method, I have a tab showing the source code. But I cannot modify the source code of it (well, it does not compile).
>>>> Is there a way to edit compile method within the GTInspector?
>>>> Maybe using Ring?
>>>>
>>>> Cheers,
>>>> Alexandre
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Editing methods in the inspector

abergel
In reply to this post by Alejandro Infante
Brillant! Just work!

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Oct 5, 2015, at 1:52 AM, Alejandro Infante <[hidden email]> wrote:

Hi Alex,
There is an announcement sent when modifying a method. If you want to try it just execute the following in a Playground:
———
o := Object new.
SystemAnnouncer uniqueInstance weak
when: MethodModified send: #halt to: o.
———
If you modify a method after that the debugger will pop up. Closing the playground removes the callback.

Also the announcement has an instance variable with the method, to get the announcer as an argument just look at the comments of Announcer>>#when:send:to:

Cheers,
Alejandro
On Oct 4, 2015, at 2:33 PM, Alexandre Bergel <[hidden email]> wrote:

Ah yes! Excellent! It works.
Is there a way I can get notified when the user recompile an inspected method ?

I was hoping to have an announcer defined on RGMethodDefinition? Any idea?

Cheers,
Alexandre


On Oct 4, 2015, at 10:21 AM, Tudor Girba <[hidden email]> wrote:

Inspect a RGMethodDefinition. CompiledMethod is immutable and that is why you cannot change it in the inspector.

Doru

--
www.tudorgirba.com

"Every thing has its own flow"

On 03 Oct 2015, at 01:52, Alexandre Bergel <[hidden email]> wrote:

Hi!

If I inspect a compile method, I have a tab showing the source code. But I cannot modify the source code of it (well, it does not compile).
Is there a way to edit compile method within the GTInspector?
Maybe using Ring?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev