Thanks for advices, i added them to my work notes. Working with Spec i found another problem: I create a window with simple layout: menu + custom morph. I want my morph to do some interactive work for me - it must display data and handle mouse down\move\wheel.
The problem is: when i start the morph alone - it works. When i start my custom morph inside the spec layout, it doesn't handle mouse events or sometimes handles them randomly. custom morph is a subclass of Morph, initialize widgets and defaultSpec are very simple: initializeWidgets menu := self instantiate: MenuModel. self setupMenu. <- I added menu items here. menu applyTo: self. locationField := LocationFieldMorph new asSpecAdapter. defaultSpec <spec: #default> ^ SpecLayout composed newColumn: [ :col | col newRow: [ :row | row add: #menu ] height: 32; newRow: [ :row | row add: #locationField ] ] yourself all stuff in LocationFieldMorph (my custom morph) is done as described in "Pharo By Example" and works fine when not arranged in Spec layout. What is wrong? Few other questions: - how to switch focus between controls in Spec layout programmatically? (for example, i need one of the controls to become in focus) - how to determine whether a control is in focus or not? (i want to know if my custom morph widget is in focus and draw a sign to show that fact to user) On Thu, 3 Nov 2016 08:46:29 -0700 (PDT) "Ben Coman [via Smalltalk]" <ml-node+s1294792n4921354...@n4.nabble.com> wrote: > > > On Thu, Nov 3, 2016 at 10:05 PM, Dimitris Chloupis > <kilon.al...@gmail.com> wrote: > > " > > 3. How to drag-n-drop from the host operation system into pharo application > > and vice versa? I need to drag-n-drop a list of files from\to file browser." > > I don't know the answer to what you ask, but the experiment code I > attached to [1] may also be of interest. > Its a couple of years old but I don't think much has changed in that > area for a while. > If you drop the attachment into your Monticello package-cache you can > load it from there. > > [1] http://forum.world.st/example-custom-mouse-events-td4773821.html > > cheers -ben > > > Drag and Drop can be a tricky one because its a Morphic and will require > > some experience with Morphic. Morph which is basically the base class of > > all gui element 3 relevant methods. > > > > a) dropFiles: > > b) handleDropFiles: > > c) wantsDropFiles: > > > > > > _______________________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://forum.world.st/Pharo-desktop-UI-tp4921212p4921354.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-tp4921212p4921724.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.