Status: New
Owner: ---- Labels: Type-Defect Priority-Medium Component-Roassal New issue 1119 by [hidden email]: progress bar when using the force based layout https://code.google.com/p/moose-technology/issues/detail?id=1119 An alternative is to have another subclass, such as RTForceBasedWithProgressBarLayout But this is not idea, because the progress bar should be by default Pharo. And on VisualWorks no. Another alternative, and the cleanest one I believe, is to have event generated to every X steps. You can have whatever you wish as a callback, moving the progress bar or not. Alexandre On Apr 8, 2015, at 9:50 AM, Tudor Girba <[hidden email]> wrote: We need a better way of modeling that :) Doru On Wed, Apr 8, 2015 at 2:44 PM, Alexandre Bergel <[hidden email]> wrote: I have cleaned a bit your code with something like: doExecute: nodeElements self start: nodeElements. self isJobInstalled ifTrue: [ self runLayoutInJob ] ifFalse: [ self runLayoutSimply ]. alpha := 0. nodes do: [ :e | translator translateTopLeftOf: e to: e position ] It is in version .816 of Roassal2. We should be able to run the layout without job. This is important for us Thanks! Alexandre > On Apr 7, 2015, at 5:04 PM, Peter Uhnák <[hidden email]> wrote: > Out of curiosity I dug a little deeper and was happy to learn about a Job > and more about Pharo internals. > In any case, try replacing RTForceBasedLayout>>doExecute: with this > ~~~~~~~~~~~~~~~~~~~~~~~~~ > doExecute: nodeElements > self start: nodeElements. > [ :job | > job > title: 'Laying out elements'; > min: 1 - alpha; > max: 1. > nbIterations = 0 > ifTrue: [ [ alpha := alpha * 0.99. alpha > 0.005 ] > whileTrue: [ self step. job currentValue: 1 - alpha ] ] > ifFalse: [ nbIterations timesRepeat: [ alpha := > alpha * 0.99. self step. job currentValue: 1 - alpha ] ] > ] asJob run. > alpha := 0. > nodes do: [ :e | translator translateTopLeftOf: e to: e position ]. > ~~~~~~~~~~~~~~~~~~~~~~~~~ > it's bit messy (and doesn't account for nbIterations), but its a proof of > concept. > I thing that it makes sense to create execution indicator without > progress (with spinner for example) > What can be done is to display alpha on progress bar. From current value > to 0.005 or whatever there is. > I was thinking more something like this > http://www.barchart.com/shared/images/progress_bar.gif or thsi > https://i.stack.imgur.com/gz9GK.gif > Peter > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Every thing has its own flow" _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |