hi Esteban I'm very sorry for the delay, and very grateful for your help. El lun, 17 jun 2024 a la(s) 2:39 a.m., Esteban Lorenzano via Pharo-users ( pharo-users@lists.pharo.org) escribió:
> you need to position points/morphs in a canvas ? > in the WorldMorph. > In that case you need a) a canvas and b) the points. > The World Morph I see it as the canvas, the points are the windows (SpPresenter's) coordinates understood by moveTo: > This cannot (and should not) be achieved with different widgets (spec) but > with just one : a morph there acts as a canvas. > Yes, I try to understand. > So, instead of going to the window of the presenter (which,, by the way, > may or may not exist) I would just add a morph, e.g. : > > (this example is just a script, in real life you would do things > differently) > > presenter := SpPresenter new. > presenter layout: (SpBoxLayout newVertical > add: (morphPresenter := presenter newMorph); > yourself). > > morph := Morph new color: Color white. > morphPresenter morph: morph. > morph color: Color white. > 1 to: 10 do: [ :index | > | pointMorph | > pointMorph := Morph new > color: Color random; > extent: 10@10; > yourself. > pointMorph position: 300 atRandom @ 200 atRandom. > morph addMorph: pointMorph ]. > > presenter open. > got thru the example which is very nice. > getting the real size of a window is not really provided by the api except > for its initial status (after that, you can suscribe to the resize event if > you want to know the new size), but you shouldn't needed that (and getting > the SpWindow which is a morph is not the way to go, since this is not > portable). > Now I understand what subscriptions are ! > Spec is a framework to make and place **widgets**, as soon as you need > something that is not a widget, you need to go to a lower level than it > (hence, rendering a morph). > Correct. Nontheles, the SpPresenter subclassed objects answer the moveTo: x@y and move the window. Is the window itself considered a widget in this context? Just asking to learn and orient myself. I could more or less do what I originally wanted. A methiod of mine goes thru all opened Survey windows, and reposition themselves in a circle. I like the result , at least as a "variant" of the default positioning, and as an excercise of querying and moving. thanks again and best regards looking forward meeting you soon in Buenos Aires or wherever. Haroldo