From: Sean P. <sp...@ad...> - 2006-01-18 23:26:58
|
On Jan 18, 2006, at 3:16 PM, Thomas Witt wrote: > Sean Parent wrote: >> On Jan 17, 2006, at 6:35 PM, Thomas Witt wrote: >>> the attached patch fixes a edit_number layout issue in the win32 >>> implementation. In more complex layouts the popup is not >>> displayed correctly because eve adjusts the poi that is used to >>> store the popup position but not the the overall widget length. I >>> am not sure whether this might actually be an eve issue, but the >>> patch makes edit_number work and brings its logic in line with >>> the Mac implementation that does not use a poi for this AFAICS. >> For leaf nodes Eve moves the widget for the first poi (and adjusts >> the width after that) - for an edit_number, the widget shouldn't >> be stretching since there is just a single poi. > > This is true for Mac afaics. The win32 implementation stores a > second horizontal poi at the popup widget position and that does > not work. I'll take a look at your example - two issues here... Windows should be consistent with Mac - (one poi is sufficient - at least until I get named poi's implemented). With two pois the behavior should be to offset to align the first poi, and stretch to align the second. I'll have to check the code... Thanks! Sean > >> Can you send an example? > > See attached sheets. The edit_numbers in the "Analysis" group > should show the problem. > > Thomas > > -- > Thomas Witt > wi...@ac... > /* > Copyright 2005 Zephyr Assoc. Inc. > */ > > > > sheet parameter > > { > constant: > most_recent_units_monthly: [ {name: "Years", bind: @last_years}, > {name: "Quarters", bind: @last_quarters}, {name: "Months", bind: > @last_months} ]; > most_recent_units_quarterly: [ {name: "Years", bind: @last_years}, > {name: "Quarters", bind: @last_quarters} ]; > > interface: > periodicity: @monthly; > > most_recent_units: most_recent_units_monthly <== (periodicity == > @monthly) ? most_recent_units_monthly : most_recent_units_quarterly; > > use_latest: @period; > > last_years : 5; > last_quarters : 5; > last_months : 12; > > recent_period_unit: 5; > > period_spec: @range; > constraint_spec: @long; > > } > > /* > Copyright 2005 Zephyr Assoc. Inc.; All Rights Reserved. > */ > > dialog(name: "Parameter", placement: place_column, grow: true) > { > row() > { > > column() > { > > group (name: "Analysis") > { > > row(child_horizontal: align_left, horizontal: align_fill) > { > popup(name: "Periodicity", bind: @periodicity, items: [ {name: > "Quarterly", value: @quarterly}, {name: "Monthly", value: > @monthly} ]); > } > > > row() > { > radio_button( name: "", bind: @period_spec, value: @range ); > popup(name: "From", items: [ {name: "01/01/1979", value: 1}, > {name: "11/30/2005", value: 2} ]); > popup(name: "To", items: [ {name: "01/01/1979", value: 1}, > {name: "11/30/2005", value: 2} ]); > } > > > row( guide_mask: [ @guide_label ] ) > { > radio_button( name: "Use latest", bind: @period_spec, value: > @latest ); > > column() > { > > edit_number( name: "edit_number", horizontal: align_left, > units: [ {name: "Years", bind: @last_years}, {name: "Quarters", > bind: @last_quarters}, {name: "Months", bind: @last_months} ] ); > > popup ( name: "ending", > bind: @use_latest, > items: [ > {name: "most recent period", value: @most_recent_period}, > {name: "most recent quarter", value: @most_recent_quarter}, > {name: "most recent calendar year", value: > @most_recent_calendar_year}, > {name: "most recent fiscal year", value: > @most_recent_fiscal_year}, > {name: "a period of time ago", value: @period}, > {name: "on a specific date", value: @specific_date} ] ); > > row() > { > overlay() > { > panel( bind: @use_latest, value: @period ) > { > edit_number(name: "Ends:", units: [ {name: "Years", bind: > @last_years}, {name: "Quarters", bind: @last_quarters}, {name: > "Months", bind: @last_months} ]); > } > > panel( bind: @use_latest, value: @specific_date ) > { > popup(name: "To", items: [ {name: "01/01/1979", value: 1}, > {name: "11/30/2005", value: 2} ]); > } > } > } > } > } > > checkbox( name: "Don't limit dates to common periods.", value: > 1 ); > > } > > > group ( name: "Computation", horizontal: align_fill, guide_mask: > [ @guide_label ] ) > { > edit_number( name: "Trailing window size (Months):" ); > popup(name: "Move computation window", items: [ {name: > "Monthly", value: @monthly}, {name: "Quarterly", value: > @quarterly}, {name: "Annually", value: @annually} ]); > popup(name: "Performance", items: [ {name: "In-Sample", value: > 1}, {name: "Out-of-sample", value: 2} ]); > edit_number( name: "Number of computation points:" ); > } > > popup(name: "Currency", items: [ {name: "US-Dollar (USD)", > value: @usd}, {name: "Euro (EUR)", value: @eur} ]); > > } > > > column() > { > group ( name: "Constraints" ) > { > radio_button( name: "Long only", bind: @constraint_spec, value: > @long ); > row() > { > radio_button( name: "Max % in short", bind: @constraint_spec, > value: @short ); > } > } > } > > } > > separator(); > > > row(child_horizontal: align_right, horizontal: align_fill) > { > > button(name: "Ok", default: true, action: @ok, horizontal: > align_right); > button(name: "Cancel", action: @cancel, horizontal: align_right); > } > > } |