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

[SOLVED]How to create a customized Id control?

Integrated Application Platform › Forums › General › [SOLVED]How to create a customized Id control?

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

    I have a table called Item (No., Name,Price, etc…). And I have many other tables where item No. is linked. At the moment, I create Id control for each of the places where item no. is needed. e.g.

    Control: (Id "item"
    field: item_No
    columns: #(item_No,
    item_Name,
    item_Price)
    width: 20,
    style: 0x0008)

    this works, but the problem is I have to repeatedly create the same piece of code everywhere.
    My question is, can i wrap this up as a customized control, and assign the new control wherever the item no. is linked?

    September 2, 2014 at 3:31 am #1092
    jaska_lee
    Participant

    ok i got it,

    IdControl
    {
    New()
    {
    super(query: "item",
    field: 'item_No'
    columns: #(item_No,
    item_Name,
    item_Price)
    )
    }
    }
    September 2, 2014 at 2:24 pm #1093
    amckinlay
    Keymaster

    That is correct.

    Another option is to use Field_ definitions (which can use inheritance) For example:

    Field_item

    Field_date
    {
    Prompt: 'Item'
    Control: (Id ...)
    }

    And then use ‘item’ in your screens.

    September 3, 2014 at 2:39 pm #1094
    jaska_lee
    Participant

    hi andrew, thanks for the tip indeed!

  • 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