Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numeric up down support #299

Merged
merged 10 commits into from
Sep 1, 2024
Merged

Numeric up down support #299

merged 10 commits into from
Sep 1, 2024

Conversation

tznind
Copy link
Collaborator

@tznind tznind commented Aug 25, 2024

  • Know and offer the correct T types that are known supported
  • All relevant properties designable
    • Value
    • Increment
    • Format*
  • No 'Heya' and no show Text
  • Tests

* De-scope for now

Bugs

  • Click and drag support (currently seems problematic)

Probably stems from the subviews, its similar problem to ColorPicker hsv in that you can only click and drag in 'empty space' in the View. Probably there is some solution involving using the ignoring property in TGD HitTest. We might be able to have a delegate or a global collection of these 'subviews' (basically anything that doesn't have a .Data of Design.

public static View? HitTest(this View w, MouseEvent m, out bool isBorder, out bool isLowerRight, params View[] ignoring)
  • Cannot set Value on decimal T
Failed to set Property
Object of type 'System.String' cannot be converted to type 'System.Decimal'.

   at System.RuntimeType.CheckValue(Object& value, Binder binder, CultureInf
o culture, BindingFlags invokeAttr)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object valu
e, Object[] index)
   at TerminalGuiDesigner.ToCode.Property.SetValue(Object value) in D:\Repos
\TerminalGuiDesigner\src\ToCode\Property.cs:line 124
   at TerminalGuiDesigner.Operations.SetPropertyOperation.DoImpl() in D:\Rep
os\TerminalGuiDesigner\src\Operations\SetPropertyOperation.cs:line 172
   at TerminalGuiDesigner.Operations.Operation.Do() in D:\Repos\TerminalGuiD
esigner\src\Operations\Operation.cs:line 48
   at TerminalGuiDesigner.Operations.OperationManager.Do(IOperation op) in D
:\Repos\TerminalGuiDesigner\src\Operations\OperationManager.cs:line 46
   at TerminalGuiDesigner.UI.Windows.EditDialog.SetPropertyToNewValue(Design
 design, Property p, Object oldValue) in D:\Repos\TerminalGuiDesigner\src\UI
\Windows\EditDialog.cs:line 93
   at TerminalGuiDesigner.UI.Windows.EditDialog.SetProperty(Boolean setNull)
 in D:\Repos\TerminalGuiDesigner\src\UI\Windows\EditDialog.cs:line 119

@tznind tznind marked this pull request as draft August 25, 2024 09:39
@tznind tznind marked this pull request as ready for review September 1, 2024 10:23
@tznind tznind requested a review from BDisp September 1, 2024 10:23
Copy link
Contributor

@BDisp BDisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work.

@tznind tznind merged commit cf5c192 into v2 Sep 1, 2024
1 check passed
@tznind tznind deleted the numeric-up-down-support branch September 1, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants