Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

Key Control: not handling numbers

Integrated Application Platform › Forums › General › Key Control: not handling numbers

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 2 months ago by ajith.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 5, 2014 at 10:42 am #799
    ajith
    Participant

    Hi,
    It appears that KeyControl doesn’t handle fields with numbers
    When used inside an Access, if Keycontrol has to lookup a field that contains numbers, then it always reports Invalid: keycontrol field name. You need to convert it to string if you need to use KeyControl with errors.

    Not sure if this is a conscious design or bug.

    ajith

    December 5, 2014 at 6:19 pm #1119
    j_ferguson
    Moderator

    Looking at the code for the control, it appears it is trying to handle data types other than string. I will have a closer look and let you know what I find.

    December 5, 2014 at 7:34 pm #1120
    j_ferguson
    Moderator

    I have done some more testing and confirmed that some of our applications actually do use KeyControl with number fields and it is working.

    One thing to check is that you have the proper datadict class attached to your field and inherit from an appropriate base class that will do the proper encode for the data type you are using. For example, the field that I tested with defined the Control member as a KeyControl, and inherited from Field_number, which will ensure the values get encoded as numbers. When I switched the datadict class to inherit from Field_string, I saw behavior similar to what you described.

    December 8, 2014 at 10:55 am #1121
    ajith
    Participant

    Hi,

    Your explanation is correct. The data dictionary mismatch was probably the problem. The table that the KeyControl used did not have any data dictionary defined. It was an imported table just for the list. I had assumed that every field would be treated as string. However this particular field contained only numbers and so Suneido treated it as numbers (I checked for the type of data it was Number). However, the field for which KeyControl was defined as its control, was defined as string. So, the mismatch.

    Thanks,
    ajith

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language