On Thu, Oct 11, 2012 at 11:11 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
On Oct 11, 2012, at 11:04 PM, Pavel Krivanek wrote:
Unfortunately it is not only about a layer between Morphic and Spec. Whole Spec design is greatly conforming to Morphic. Check out Spec definitions, they look almost like transcription of Morphic calls
MethodToolbar class >> defaultSpec <spec> ^ { #Panel. #changeTableLayout. #listDirection:. #rightToLeft. #addMorph:. {#model. #browseModel.}. #addMorph:. {#model. #sendersModel.}. #addMorph:. {#model. #implementorsModel.}. #addMorph:. {#model. #versionModel. }. #addMorph:. {#model. #dropListModel.}. #hResizing:. #spaceFill. #vResizing:. #shrinkWrap. }
This is because this method is out dated, it shold be now
^ SpecLayout composed newRow:[: r | r add: #browseModel; add: #sendersModel; add: #implementorsModel; add: #versionsModel; add: #dropListModel ] height: 25
Well, at least from the perspective of UI independence it looks much better. -- Pavel
Of course these methods are implemented only in Morphic classes. Whole layout management is directly taken from Morphic. And the Spec definitions are unclear and hard to read. They are composed almost solely from symbols so it is hard to work with and analyze them with our development tools. We have such beautiful metalanguage where to create DSL is so easy...
In comparison with OmniBrowser the Spec is big step back. Sorry, I do not want to be ugly but I started this impression when I was working on Periscope and since that time it is deeper and deeper.
Cheers, -- Pavel
On Thu, Oct 11, 2012 at 10:21 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 11 October 2012 20:52, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
This method is actually the only one from ComposableModel with direct Morphic binding :)
I am still trying to move that away, but I needed the rebuild to work
i think you can introduce own protocol (and put it as extension to morphic, if you want to) so, instead of saying
widget removeAllMorphs
you will use own extension method ,like:
widget specRemoveAllChilds
etc (spec here is namespacing prefix for a method, to indicate that it belongs to spec package and to indicate that it is a contract implied between spec and widget)
Ben
On Oct 11, 2012, at 8:49 PM, Pavel Krivanek wrote:
Hi Ben,
I really would like to write Spec binding for Phobos (Esteban will want to do it for Mars etc.). But, how to say that, Spec was not written with UI Independence in mind :-) Very basic example of that fact:
ComposableModel>>buildWithSpec: aSpec "Build the widget using the spec name provided as argument" | widget |
(self spec notNil and: [ self needRebuild not ]) ifTrue: [ | old | self needRebuild: true. old := self widget. old removeAllMorphs. self ensureExtentFor: old. widget := SpecInterpreter buildMorphFor: self withSpec: aSpec. widget submorphs do:[ :e | old addMorphBack: e ]. self spec instance: old. ^ old ] ifFalse: [ widget := SpecInterpreter buildMorphFor: self withSpec: aSpec. ].
self ensureExtentFor: widget.
^ widget
Can you please do at least basic steps in the architecture of Spec to make it more independent on Morphic?
Cheers, -- Pavel
On Wed, Oct 10, 2012 at 12:10 AM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
It was part of my battle plan to rule the world ;)
We wanted with Nico to part it to Amber to get the Javascript part for free, then generate some XUL :)
Anyway, really cool job, and impressive as well :)
Ben
On Oct 9, 2012, at 11:07 PM, Stéphane Ducasse wrote:
It looks really nice. I imagine that Spec could generate XUL too.
Stef On Oct 9, 2012, at 9:48 PM, Pavel Krivanek wrote:
Hi all,
I would like to introduce you Phobos - the XULRunner based Smalltalk framework for development of native GUI with standard look&feel for Linux, Mac OS X and Windows.
It is based on Zinc, WebSockets and Seaside continuations. For more information including more screenshots see the project page:
http://code.google.com/p/phobos-framework/
You should pay attentions to FAQ too: http://code.google.com/p/phobos-framework/wiki/FAQ
Phobos has Seaside-like components and rendering style, can combine XUL with HTML or SVG, supports printing etc.
Cheers, -- Pavel <01.png>
-- Best regards, Igor Stasenko.