Opened 9 years ago

Closed 9 years ago

#2326 closed enhancement (fixed)

Sliderule custom scale enhancements

Reported by: tonyforster Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sliderule Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description (last modified by tonyforster)

wish list

  • enter or clicking on the sliderule applies changed data (in addition to cog)
  • custom sliderule displays formulae of last selected combination
  • editable upper and lower scales. Justification is to be able to create for example hex(log16) / hex(linear) or hex(log16) / hex(log16) pairings
  • is results just to display text at the cursor? Can it then accept string?

Attachments (2)

Screenshot of "Sliderule Activity".png (26.4 KB) - added by tonyforster 9 years ago.
type error results formula
Sliderule-17.xo (43.7 KB) - added by walter 9 years ago.
another release candidate

Download all attachments as: .zip

Change History (15)

comment:1 Changed 9 years ago by tonyforster

  • Component changed from untriaged to Sliderule
  • Owner set to walter

comment:2 Changed 9 years ago by tonyforster

  • Description modified (diff)

add to wish list

  • is results just to display text at the cursor? Can it then accept string?

comment:3 Changed 9 years ago by walter

  • enter or clicking on the sliderule applies changed data (in addition to cog)

is this really necessary?

  • custom sliderule displays formulae of last selected combination

not sure what you mean

  • editable upper and lower scales. Justification is to be able to create for example hex(log16) / hex(linear) or hex(log16) / hex(log16) pairing

This is now possible with v17 attached.

  • is results just to display text at the cursor? Can it then accept string?

yes... e.g., str(x) + 'some text" will work

comment:4 Changed 9 years ago by tonyforster

  • is this really necessary?

no, not important, just consistent with other Activities and hence discoverable

  • not sure what you mean

If you select the add/subtract sliderule, the custom editboxes still display the formulae for the C/D scales, it would be good to see the add/subtract formulae

  • now possible with v17

cool!

  • str(x) + 'some text" will work

in results function gives
Type error cannot concatenate str and float

comment:5 Changed 9 years ago by walter

  • is this really necessary?

no, not important, just consistent with other Activities and hence discoverable

Can you cite some examples? I was thinking the opposite. Or maybe I don't understand what you mean...

  • not sure what you mean

If you select the add/subtract sliderule, the custom editboxes still display the formulae for the C/D scales, it would be good to see the add/subtract formulae

Great idea. But I suppose I shouldn't overwrite a formula that had been previously entered.

  • now possible with v17

cool!

  • str(x) + 'some text" will work

in results function gives
Type error cannot concatenate str and float

Hmmm. I tried str(x) + 'x' and got no error. the str(x) should be converting the float to string.

Changed 9 years ago by tonyforster

type error results formula

comment:6 Changed 9 years ago by tonyforster

  • cite some examples?

Write:
Zoom nn% enter
Zoom nn% and move cursor from edit box
Read:
Page number nn enter

  • shouldn't overwrite a formula?

Doesnt worry me

  • str(x) + 'x'

uploaded screenshot

comment:7 Changed 9 years ago by walter

The formulas now reflect the current sliders (for most sliders... haven't coded them all yet).

re str(x) + 'x', I had only tried it in the label field, not the results field. Will investigate.

comment:8 Changed 9 years ago by walter

  • cite some examples?

Write:
Zoom nn% enter
Zoom nn% and move cursor from edit box
Read:
Page number nn enter

These are combo boxes like the slide and stator selectors, not entry fields. I'll have to think about how to do this some other way.

comment:9 Changed 9 years ago by tonyforster

Typo in C/D results function
pow(x,10) pow(10,x)

Dont worry too much about the combo boxes

comment:10 Changed 9 years ago by walter

Thanks for identifying the typo.

Re inputing strings into the results field, I am afraid it won't work since I need to scale the results, which is a float operation, before displaying them. I suppose I could introduce a display-results field that lets you format the results label just like you presently format the slide label... just worried about fitting it into the toolbar.

comment:11 Changed 9 years ago by tonyforster

Don't worry about strings in the results field, its not important, only requested if it was easy, if the field was used as a string

comment:12 Changed 9 years ago by walter

The attached version will enable the use of more fanciful input into the domain and step fields. It also has a separate entry field to specify the format of the results.

so, for example, the step can be defined as 1/2. or pi/2 (but not 1/2, which Python will truncate to 0)

in the results field, you can use formatting such as str(x) + 'x'

Changed 9 years ago by walter

another release candidate

comment:13 Changed 9 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed

See http://wiki.sugarlabs.org/go/File:Sliderulecustom.png as an example of a hex vs binary custom slide rule.

Note: See TracTickets for help on using tickets.