Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,108
    • Issues 2,108
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #32793
Closed
Open
Issue created Dec 07, 2017 by FPC Admin account@fpc_adminOwner

Strange behaviour of TSpinEdit when Value = MaxInt and then increment

Original Reporter info from Mantis: Bart @flyingsheep
  • Reporter name: Bart Broersma

Description:

If a TSpinEdit is not limited (e.i. MaxValue=MinValue) and you set Value to MaxInt and then you click the increment spinner the text in the control changes from 2147483647 to 2147483648, but when querying Value, it will report -2147483648.
This process continues when you further increment the SpinEdit.

SpinEdit1: Text = 2147483648, Value = -2147483648
SpinEdit1: Text = 2147483649, Value = -2147483647
SpinEdit1: Text = 2147483650, Value = -2147483646
SpinEdit1: Text = 2147483651, Value = -2147483645
SpinEdit1: Text = 2147483652, Value = -2147483644

Steps to reproduce:

Build and run attached demo.
Click Button1
Click the up spinner of the SpinEdit, click the speedbutton with caption '?'
Repeat this.

(Never mind the other controls on the demo, I was testing T(Float)SpinEditEx when I encountered this.)

Additional information:

The internal value of a TSpinEdit is of type Double.
This is the root cause of the discrepancy between text and value.

Mantis conversion info:

  • Mantis ID: 32793
  • OS: Win10-64
  • Build: r56186
  • Platform: i386
  • Version: 1.9 (SVN)
  • Fixed in version: 2.0.6
  • Fixed in revision: r61945 (#96eee65d)
  • Target version: 2.0.6
Assignee
Assign to
Time tracking