Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Nov 2015
    Posts
    122

    Default Need help in vtl

    Hi sir,

    Can we use class and enum concept in vtl also. Please guide me how can i use these two concepts in vtl programming.

    Thanks in advance.

  2. #2
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    409

    Default

    Quote Originally Posted by BGT View Post
    Hi sir,

    Can we use class and enum concept in vtl also. Please guide me how can i use these two concepts in vtl programming.

    Thanks in advance.
    To use the class concept you can create your class outside the VTL and release it as dll , then use a CreateObject method such as the following code
    Code:
    dim obj
    set obj = createobject("dll.Yourclass")
    And the Best way to use the Enum is by using constants , look to the following sample
    Code:
    Const dt_Nothing = Something
    Const dt_Boolean = Something
    Const dt_Decimal = Something
    Const dt_Double = Something
    Const dt_Integer = Something
    Const dt_string = Something
    Const dt_Array = Something
    Const dt_NetJSON = Something

  3. #3
    Senior Member
    Join Date
    Nov 2015
    Posts
    122

    Default Help

    Hi sir,

    I will try class concept. Thanks for your quick reply. But i have one issue. If we want to give dropdown options to user in a input box (when we take input from user at the time of attach the script) e.g symbol names in a dropdown. Then without enum how can we give it. Please guide me.

    Thanks in advance.











    Quote Originally Posted by Rawan-HS View Post
    To use the class concept you can create your class outside the VTL and release it as dll , then use a CreateObject method such as the following code
    Code:
    dim obj
    set obj = createobject("dll.Yourclass")
    And the Best way to use the Enum is by using constants , look to the following sample
    Code:
    Const dt_Nothing = Something
    Const dt_Boolean = Something
    Const dt_Decimal = Something
    Const dt_Double = Something
    Const dt_Integer = Something
    Const dt_string = Something
    Const dt_Array = Something
    Const dt_NetJSON = Something

  4. #4
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    409

    Default

    Quote Originally Posted by BGT View Post
    Hi sir,

    I will try class concept. Thanks for your quick reply. But i have one issue. If we want to give dropdown options to user in a input box (when we take input from user at the time of attach the script) e.g symbol names in a dropdown. Then without enum how can we give it. Please guide me.

    Thanks in advance.

    can you give me more clarification for what exactly do you want to do ??

  5. #5
    Senior Member
    Join Date
    Nov 2015
    Posts
    122

    Default Need help enum

    Quote Originally Posted by Rawan-HS View Post
    can you give me more clarification for what exactly do you want to do ??
    Hi,

    i want to use enum data type.
    e.g.
    Enum Symbols
    usd = 1 'USD
    eur = 2 'EUR
    jpy = 3 'JPY
    gbp = 4 'GBP
    cad = 5 'CAD
    chf = 6 'CHF
    aud = 7 'AUD
    nzd = 8 'NZD
    End Enum

    i want to add this datatype in vtl.
    so that if i want to do options to user in input box.
    e.g.


    How can i do this. Can you please guide me.

    Thanks in advance

  6. #6
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    409

    Default

    Quote Originally Posted by BGT View Post
    Hi,

    i want to use enum data type.
    e.g.
    Enum Symbols
    usd = 1 'USD
    eur = 2 'EUR
    jpy = 3 'JPY
    gbp = 4 'GBP
    cad = 5 'CAD
    chf = 6 'CHF
    aud = 7 'AUD
    nzd = 8 'NZD
    End Enum

    i want to add this datatype in vtl.
    so that if i want to do options to user in input box.
    e.g.


    How can i do this. Can you please guide me.

    Thanks in advance


    For now you can't define the Enum datatype and as a workaround define each one to be a variable that can user set its value

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •