Maybe you can give some brief explanaition how to create Spec-compatible custom 
UI control? (Like TextModel or ButtonModel, etc.) How to create model class, 
corresponding adapter and how to process common and custom UI events 
(mouse\keyboard\focus ordering\changing).
I think such guide should also be included in Spec booklet.

On Sun, 6 Nov 2016 10:01:39 -0800 (PST)
"jfabry [via Smalltalk]" <ml-node+s1294792n4921932...@n4.nabble.com> wrote:

> 
> 
> Hello Vikenti,
> 
> I think that you are using the SpecAdapter for morphs in ways it has never 
> been tried or used. So the problems you are having reveal bugs in the 
> SpecAdapter. Please file a bug report, and feel free to contribute a fix as 
> well of course ;-) (more about bugreports here: http://pharo.org/contribute )
> 
> --
> Does this mail seem too brief? Sorry for that, I don’t mean to be rude! 
> Please see http://emailcharter.org <http://emailcharter.org/> .
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
> Chile
> 
> > On 05 Nov 2016, at 21:37, vikenti <vikenti.pota...@gmail.com> wrote:
> > 
> > 
> > New problem with Spec. 
> > 
> > Layout consists of menu and custom control (subclass of Morph created by 
> > asSpecAdapter): 
> > initializeWidgets 
> >         menu := self instantiate: MenuModel.        
> >         self setupMenu. 
> >         menu applyTo: self. 
> >         locationField := LocationFieldMorph new asSpecAdapter. 
> > 
> > defaultSpec 
> >         <spec: #default> 
> >         ^ SpecLayout composed 
> >                 newColumn: 
> >                         [ :col | 
> >                         col 
> >                                 add: #menu height: self toolbarHeight;      
> >                                 add: #locationField 
> >                         ] yourself 
> > 
> > My custom control doesn't automatically resize to fill the area reserved to 
> > it by layout spec. 
> > I've tried different existed controls instead of mine but didn't find any 
> > solution. Some controls resized (TextModal) some didn't (Morph, 
> > BorderedMorph, EllipseMorph). 
> > 
> > I did a dirty hack: in onDraw: of my custom control i set bounds: to 
> > aCanvas clipRect and it works fine. 
> > 
> > drawOn: aCanvas 
> >         self bounds: aCanvas clipRect . 
> >         .... other code .... 
> > 
> > But i think it is a wrong solution and there is somewhere a simple property 
> > to setup ( or something like it ). 
> > 
> > Any ideas? 
> 
> 
> 
> 
> 
> _______________________________________________
> If you reply to this email, your message will be added to the discussion 
> below:
> http://forum.world.st/Pharo-desktop-UI-tp4921212p4921932.html
> 
> To unsubscribe from Pharo desktop UI, visit 
> http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4921212&code=dmlrZW50aS5wb3RhcG92QGdtYWlsLmNvbXw0OTIxMjEyfDIxNDcxNTYzMTI=


-- 
С уважением,
Викентий Потапов

http://vikenti.ru
тел.: +7 (917) 880 25 07 (г. Казань)




--
View this message in context: 
http://forum.world.st/Pharo-desktop-UI-tp4921212p4921958.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply via email to