[Pharo-dev] [update 3.0] #30448

Benjamin Benjamin.VanRyseghem.Pharo at gmail.com
Mon Oct 7 05:42:30 EDT 2013


I am trying your code right now, and everything I get so far is an empty Periscope window.

What should I do ? :)

Ben

On Oct 5, 2013, at 10:12 PM, Pavel Krivanek <pavel.krivanek at gmail.com> wrote:

> Hi Ben,
> 
> Gofer new
>    smalltalkhubUser: 'PavelKrivanek' project: 'Periscope';
>    package: 'Periscope';
>    load.
> 
> Nautilus pluginClasses add: {(Smalltalk at: #NautilusPeriscopePlugin). #none} .
> 
> Very useful code: ;-)
> 
> Periscope reset
> 
> It still without experiments with own Morphic bindings, that will be
> the next step :-) Feel free to commit any changes.
> 
> Chees,
> -- Pavel
> 
> 2013/10/5 Benjamin <Benjamin.VanRyseghem.Pharo at gmail.com>:
>> Can you point me where to load your code and how to end up in a situation
>> where I can play with the spec ? :P
>> 
>> Ben
>> 
>> On Oct 4, 2013, at 11:11 PM, Pavel Krivanek <pavel.krivanek at gmail.com>
>> wrote:
>> 
>> Damn, the last row of the last plugins fills all the window...
>> 
>> -- Pavel
>> 
>> 2013/10/4 Pavel Krivanek <pavel.krivanek at gmail.com>:
>> 
>> Thanks, this seems to work:
>> 
>> defaultSpec
>> 
>> |  layout |
>> layout := SpecLayout composed.
>> self pluginClasses do: [ :c |
>>       layout add: {#model.  #class. #pluginOf:. c. #defaultSpec} ].
>> 
>> ^ layout.
>> 
>> 
>> plugin code on the instance side looks like this:
>> 
>> defaultSpec
>> 
>> ^ SpecLayout composed
>>               newRow:[: r |
>>                       r add:  #finderButtonModel;
>>                         add:  #browserButtonModel]
>> height: 25.
>> 
>> 
>> -- Pavel
>> 
>> 2013/10/4 Benjamin <Benjamin.VanRyseghem.Pharo at gmail.com>:
>> 
>> Since you are doing some really edge use of Spec,
>> it's not covered by Spec easily.
>> 
>> But if on you model you have a method returning your pluginClasses, you
>> could do maybe:
>> 
>> | layout |
>> layout := SpecLayout composed.
>> self pluginClasses do: [ :c |
>>       layout add: {#model. pluginOf:. c} ]
>> 
>> I am not sure it works, but it worth a try :P
>> 
>> Ben
>> 
>> On Oct 4, 2013, at 9:28 PM, Pavel Krivanek <pavel.krivanek at gmail.com> wrote:
>> 
>> This was the original code for the spec that embeds plugins. As you
>> can see, it had to use ugly addMorph:. I do not think that I need to
>> do something special. Has the current Spec a better way how to do
>> that?
>> 
>> defaultSpec
>> 
>>  | spec |
>>  spec := OrderedCollection with: #ContainerModel.
>>  spec addAll: {#changeTableLayout.
>>      #listDirection:. #topToBottom.
>>      #hResizing:. #spaceFill.
>>      #vResizing:. #spaceFill.}.
>>  self pluginClasses do:  [:c |
>>      spec add: #addMorph:.
>>      spec add: {(self pluginOf: c) defaultSpec}].
>>  ^ spec asArray.
>> 
>> 2013/10/4 Pavel Krivanek <pavel.krivanek at gmail.com>:
>> 
>> In other words... I have a model that has some plugins. I need to
>> generate a spec that embeds specs generated for each plugin. Models
>> for this embedded specs must be the plugins, not the original model.
>> 
>> -- Pavel
>> 
>> 2013/10/4 Pavel Krivanek <pavel.krivanek at gmail.com>:
>> 
>> well, and the version with "SpecLayout composed" when I do not need
>> direct fractions?
>> 
>> ^ SpecLayout composed
>>              newRow:[: r |
>>                      r add: #finderButtonModel]
>>              height: 25
>> 
>> How to send #finderButtonModel to different object than SpecInterpreter
>> model?
>> 
>> -- Pavel
>> 
>> 2013/10/4 Benjamin <Benjamin.VanRyseghem.Pharo at gmail.com>:
>> 
>> ^{ #ContainerModel.
>> 
>>     #vShrinkWrap.
>> 
>>     #add:. {{self. #finderButtonModel}.
>> 
>>         #layout:. #(FrameLayout
>> 
>>             rightFraction: 0.125)}.
>> 
>>     #add:. {{self. #browserButtonModel}.
>> 
>>         #layout:. #(FrameLayout
>> 
>>             leftFraction: 0.125
>>             rightFraction: 0.25)}}
>> 
>> This should work, but looks strange though :P
>> 
>> Ben
>> 
>> On Oct 4, 2013, at 8:13 PM, Pavel Krivanek <pavel.krivanek at gmail.com> wrote:
>> 
>> Ben,
>> 
>> how now should look code like this:
>> 
>> defaultSpec
>> 
>> ^{ #ComposableSpec.
>>     #vResizing:. #shrinkWrap.
>>     #add:. {{self. #finderButtonModel}.
>>         #layout:. #(FrameLayout
>>             rightFraction: 0.125)}.
>>     #add:. {{self. #browserButtonModel}.
>>         #layout:. #(FrameLayout
>>             leftFraction: 0.125
>>             rightFraction: 0.25)}}
>> 
>> -- Pavel
>> 
>> 2013/10/4 Benjamin <Benjamin.VanRyseghem.Pharo at gmail.com>:
>> 
>> For Spec users:
>> 
>> The change is mostly backward compatible :)
>> 2 things really changed:
>> - direct access to a model's widget is not returning what it used to return.
>> This is done on purpose since
>> it's very often a bad idea to directly access the widget.
>> - some behaviour on trees are now only available after the tree build. This
>> is because some properties
>> have been moved on the adapter directly, which is reachable only after the
>> model build.
>> You can use `whenBuiltDo:` to add post-build actions.
>> 
>> Enjoy this new Spec :P
>> 
>> Ben
>> 
>> On Oct 4, 2013, at 2:31 PM, Marcus Denker <marcus.denker at inria.fr> wrote:
>> 
>> 30448
>> -----
>> 
>> 11740 Remove Morphic dependency from Spec
>> https://pharo.fogbugz.com/f/cases/11740
>> 
>> A Huge change from Ben...
>> 
>> Diff information:
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Tools-MarcusDenker.1292.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Tabs-MarcusDenker.33.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Widgets-MarcusDenker.265.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Tools-MarcusDenker.150.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Tests-MarcusDenker.35.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-MorphicAdapters-MarcusDenker.9.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-PolyWidgets-MarcusDenker.7.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Layout-MarcusDenker.58.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Inspector-MarcusDenker.102.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Examples-MarcusDenker.48.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Debugger-MarcusDenker.163.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Core-MarcusDenker.175.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Builder-MarcusDenker.43.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Bindings-MarcusDenker.35.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/NautilusRefactoring-MarcusDenker.126.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Spec-Adapters-MarcusDenker.3.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Manifest-CriticBrowser-MarcusDenker.124.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/Keymapping-Tools-Spec-MarcusDenker.19.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/KeyChain-MarcusDenker.58.diff
>> http://smalltalkhub.com/mc/Pharo/Pharo30/main/HudsonBuildTools20-MarcusDenker.45.diff
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131007/d48fc0b9/attachment-0002.html>


More information about the Pharo-dev mailing list