GTInspector: editable custom presentation?
Hi all, Iâm trying to make a custom GT Inspector presentation for a variable store (i.e. something like a dictionary). The code I have right now shows me the data I want: gtInspectorDetailsIn: composite <gtInspectorPresentationOrder: 0> composite table title: 'Details'; display: [ self allVariables ]; column: 'Variable' evaluated: #key; column: 'Value' evaluated: #value; send: #value But, what I would like to do is to take advantage of the edit ability of the inspector to change what is displayed in the Value column and save this directly to the store. I have the method for that (setVariable: withValue: ) but I cannot find how to tell the GTInspector to add the edit functionality and to call this method when an edit action is made. How should I do this? This is Pharo 4.0 BTW. PS: I was very impressed with the customizability of the GT inspector ⦠until I wanted to make my own presentation and I found almost no documentation on how to do it. For such a major feature I thought there would be HOWTOâs easily found online but there are none. Not in the GT toolkit page http://gt.moosetechnology.org/ and the pages it points to, nor in the various blogs that talk about the GT Inspector. I did find a starting point on how to do it, but no clear information. Did I overlook something? If so, I think it would be better that this info is more easily found. ---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Use #column:evaluated:modified: Regarding documentation, if you inspect the class GTInspector you will get a presentation showing all custom presentation from the image. Cheers, Andrei On Fri, May 1, 2015 at 11:43 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hi all,
Iâm trying to make a custom GT Inspector presentation for a variable store (i.e. something like a dictionary). The code I have right now shows me the data I want:
gtInspectorDetailsIn: composite <gtInspectorPresentationOrder: 0>
composite table title: 'Details'; display: [ self allVariables ]; column: 'Variable' evaluated: #key; column: 'Value' evaluated: #value; send: #value
But, what I would like to do is to take advantage of the edit ability of the inspector to change what is displayed in the Value column and save this directly to the store. I have the method for that (setVariable: withValue: ) but I cannot find how to tell the GTInspector to add the edit functionality and to call this method when an edit action is made. How should I do this?
This is Pharo 4.0 BTW.
PS: I was very impressed with the customizability of the GT inspector ⦠until I wanted to make my own presentation and I found almost no documentation on how to do it. For such a major feature I thought there would be HOWTOâs easily found online but there are none. Not in the GT toolkit page http://gt.moosetechnology.org/ and the pages it points to, nor in the various blogs that talk about the GT Inspector. I did find a starting point on how to do it, but no clear information. Did I overlook something? If so, I think it would be better that this info is more easily found.
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
On May 1, 2015, at 18:59, Andrei Chis <chisvasileandrei@gmail.com> wrote:
Use #column:evaluated:modified:
Cool that works, thanks a lot! BTW, in the Pharo4 image, this method is in the âas yet unclassifiedâ protocol.
Regarding documentation, if you inspect the class GTInspector you will get a presentation showing all custom presentation from the image.
I would have never thought of that ⦠So looking at the list, it seems that it is sufficient to add a pragma <gtInspectorPresentationOrder: NN>. I suggest the addition of one or two phrases talking about this pragma to http://scg.unibe.ch/research/moldableinspector <http://scg.unibe.ch/research/moldableinspector> ? ---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
On May 2, 2015 12:57 AM, "Johan Fabry" <jfabry@dcc.uchile.cl> wrote:
On May 1, 2015, at 18:59, Andrei Chis <chisvasileandrei@gmail.com> wrote:
Use #column:evaluated:modified:
Cool that works, thanks a lot!
BTW, in the Pharo4 image, this method is in the âas yet unclassifiedâ
protocol. I saw that now. Will be fixed.
Regarding documentation, if you inspect the class GTInspector you will
get a presentation showing all custom presentation from the image.
I would have never thought of that ⦠So looking at the list, it seems
that it is sufficient to add a pragma <gtInspectorPresentationOrder: NN>. I suggest the addition of one or two phrases talking about this pragma to http://scg.unibe.ch/research/moldableinspector ? I definetly need to improve that page. However, there are a lot of posts on the humaine assesment blog that Doru posted on the mail list about extending the inspector. Cheers, Andrei
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Andrei Chis wrote
if you inspect the class GTInspector you will get a presentation showing all custom presentation from the image.
Cool*! * so many amazing but seemingly undocumented features :( ----- Cheers, Sean -- View this message in context: http://forum.world.st/GTInspector-editable-custom-presentation-tp4823635p482... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Can some how this features be reachable by the Spotter? Imagine something like a StarOverflow, but browsable inside the image with the Spotter and integrating the knowledge of this mailing list... would be a dream :-) Offray El 02/05/15 a las 08:23, Sean P. DeNigris escribió:
Andrei Chis wrote
if you inspect the class GTInspector you will get a presentation showing all custom presentation from the image.
Cool*!
* so many amazing but seemingly undocumented features :(
----- Cheers, Sean -- View this message in context: http://forum.world.st/GTInspector-editable-custom-presentation-tp4823635p482... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (4)
-
Andrei Chis -
Johan Fabry -
Offray Vladimir Luna Cárdenas -
Sean P. DeNigris