Hi,
I am "upgrading" my apps from 7.9.1 to 8.0. 1/ The first missing interface was : VisualLauncherToolDock As I read : "...Note that this is an experimental facility and its implementation may change in future releases, especially with migration to the new UI framework (Pollock)." - I remove it from the code an continue to load my parcels. 2/ ProgressionView beTwoDimensional As the progress bar is "mono-dimensional" in the system, I understand that there is no implementation of a two dimensional progression view. - I remove all the corresponding messages. 3/ In the Browser, or text editors, the possibility of "Select all" just by clicking before the beginning or after the end of the text disappears. Why ? I was used to since 1980. 4/ Slider I don't receive any more notifications from any Sliders in my interfaces. For example (extracted from the specs) : #(#{UI.SliderSpec} #layout: #(#{Graphics.LayoutSizedOrigin} 420 0 56 0 190 19 ) #name: #Slider5 #model: #nombreDeTours #callbacksSpec: #(#{UI.UIEventCallbackSubSpec} #valueChangeSelector: #nombreDeToursChanged ) #helpText: #(#{Kernel.UserMessage} #key: #nombreDeToursAide #defaultString: 'Nombre de tours' #catalogID: #dialogs ) #orientation: #horizontal #start: 1 #stop: 1000 #step: 1 ) The message #nombreDeToursChanged is never sent. The value of the model is changed, but the notification of change is not fired. If I create a SpinButton on the same model, and add the notification to the SpinButton, my application receive the message when the spinbutton is changed, but not when the slider is changed. 5/ SpinButton I had to edit all the interfaces containing SpinButton and change the Position to "Make origin + Width and Height, instead of "Make Bounded" in order to get the SpinButtons working. In the "Bounded" mode, the up and down arrows won't be clickable. 6/ Test size I had to edit all the interfaces containing text : in the new interface, the text takes more space. 7/ Globally, all the graphical interface seems to be slower than in the previous version. I have not precise benchmark, but in the 8.0, I can see the redraw of windows... The most important point is 4/ Slider; I think it is a bug. Is there a solution to continue to receive notification of change from Sliders ? Thanks, V. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I try to follow the building of the interface, and I verify that a MessageChannel is well created from the specs, with the Application as receiver. In UILookPolicy #slider: spec into: builder, the line : self setDispatcherOf: component fromSpec: spec builder: builder. Builds the dispatcher, and set it in the controller... But no message is sent when the slider is moved, as the value of the model is changed effectively. I join the code of a test application. The application works in 7.9.1, but not in 8.0 2015-03-06 15:05 GMT+01:00 Vincent Lesbros <[hidden email]>:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc VLTestApplication.st (5K) Download Attachment |
In reply to this post by Vincent Lesbros-2
Ah yes Sliders ..
1) I think there is a known issue with them related with not responding from the specs. You can them make respond by initializing something like. self nombreDeTours onChangeSend: #nombreDeToursChanged 2) If that is not enough which is my case, I do want my views to be updated when moving the slider, however I don’t want to trigger a database transaction neither a write command to my undo achieve. If that sounds familiar you can do so by adding the following method to SliderView. handleAction: anActionHandler event: anEvent "Handle a UI event, command or custom event." anEvent class = RedButtonPressedEvent ifTrue: ["Transcript show: 'start'." self announce: SliderPressed]. anEvent class = MouseMovedEvent ifTrue: [anEvent anyButtonPressed ifTrue: ["Transcript show: 'moving'. " self announce: SliderMoving]]. anEvent class = RedButtonReleasedEvent ifTrue: ["Transcript show: 'stop'; cr." self announce: SliderReleased]. anActionHandler cull: anEvent cull: self This method will allow you to capture three additional events: SliderPressed, SliderMoving and SliderReleased. Which you have to declare as Subclasses from Announcement. In order to capture the events you have to register them with your Widget somewhere in a postBuildBlock or postBuild: method of your model like: self sliderWidgetRed ifNotNil: [:aSlider | aSlider when: SliderPressed send: #validateColorBefore: to: self. aSlider when: SliderMoving send: #anticipateColorValueChange to: self. aSlider when: SliderReleased send: #changeRedColorValue to: self]. 3) If you are like me and you can either not wait till they fixed this down under and not support the looks of the current windows Slider you can the following Cairo hack to draw an OS X alike Widget like I use here: https://www.dropbox.com/s/qv8ik4bmkbdzup5/SlidersWindows.PNG?dl=0 With the following override. sliderDrawOnGC: gc usingArtist: artist | view bounds img myPosition diam aRect aRectA aRectB | view := artist view. bounds := view alignmentBounds. img := self asset: #SliderThumb colored: self highlightColor quadrant: 0. gc paint: self highlightColor. view axis isHorizontal ifTrue: [| position tracktop | tracktop := bounds top + img height half - 1. diam := 8. bounds left + (view unmappedValue * (bounds width - img width)). myPosition := bounds left + 2.5 + (view unmappedValue * (bounds width - diam - 6)). [gc newCairoContextWhile: [:cr | ]] on: External.LibraryNotLoadedError do: [:exception | ^self]. gc displayRectangle: (bounds left @ tracktop corner: bounds right @ (tracktop + 2)). gc newCairoContextWhile: [:cr | cr lineWidth: 0.5. cr sourceFromColor: ColorValue red. aRect := Rectangle origin: bounds left @ tracktop corner: bounds right @ (tracktop + 3). aRectA := Rectangle origin: bounds left @ tracktop - 1 corner: (myPosition + 3) @ (tracktop + 2). aRectB := Rectangle origin: (myPosition + 3) @ tracktop - 1 corner: bounds right @ (tracktop + 2). cr sourceFromColor: (ColorValue red: 59 green: 155 blue: 246 range: 255). cr rectangle: aRectA fillet: 2. cr fill. cr sourceFromColor: (ColorValue brightness255: 178). cr rectangle: aRectB fillet: 2. cr fill. cr sourceFromColor: (ColorValue brightness255: 168) alpha: 0.3. cr circleCenter: (myPosition + (diam / 2)) @ tracktop + 0.5 radius: 6.5. cr fill. cr sourceFromColor: (ColorValue brightness255: 168). cr circleCenter: (myPosition + (diam / 2)) @ tracktop + 0.5 radius: 6. cr fill. cr sourceFromColor: ColorValue white. cr circleCenter: (myPosition + (diam / 2)) @ tracktop + 0.5 radius: 5.5. cr fill]. "view hasFocus ifTrue: [(self asset: #SliderThumb_Focus colored: self focusRingColor quadrant: 0) displayOn: gc at: position @ bounds top - 3]" ] ifFalse: [| position trackleft | position := bounds top + (view unmappedValue * (bounds height - img height)). trackleft := bounds left + img width half - 1. gc displayRectangle: (trackleft @ bounds top corner: (trackleft + 2) @ bounds bottom). img displayOn: gc at: bounds left @ position. view hasFocus ifTrue: [(self asset: #SliderThumb_Focus colored: self focusRingColor quadrant: 0) displayOn: gc at: bounds left @ position - 3]] Hope this helps. Regards, @+Maarten,
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |