1. Arcady Abramov
  2. Beta Testing
  3. Friday, 24 January 2020 07:22 AM UTC

Hello, team

Where I can find help on DwMeta usage? How do I access fields and computes values?

Thank you

Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 17:31 PM UTC
  2. Beta Testing
  3. # 1

Appeon simply renamed property Object => DwMeta to avoid name class with System.Object.

Docs are still work in progress since we are still in beta phase. However, possible to use F12-Go to Definition to inspect APIs. I first downloaded the updated example:

SnapDevelop > Start Page > Sample Projects > .NET DataStore Example 
(or: directly GitHub project)

I downloaded, unzipped, and open the sample solution. When I double-click my VS 2019 opens but same procedure applies in SnapDevelop.

  1. Solution Explorer > Services > Impl > open PersonService.cs
  2. Start of function SavePerson (starts line 34)
    public int SavePerson(IDataStore person, IDataStore addresses, 
        IDataStore phones, IDataStore customers)
    {
        // INSERT next 2 lines
        phones.Object
        phones.DwMeta
    
  3. Check definitions using F12
    • Select Object + F12 => Object implements IDwMeta
    • Select DwMeta + F12 => DwMeta implements IDwMeta

    • Optional: Select IDwMeta and F12 to inspect details

  4. CONCLUSION: DwMeta simply renames Object to avoid name class with System.Object.

 

Comment
  1. Logan Liu @Appeon
  2. Saturday, 25 January 2020 05:35 AM UTC
Hi Mike, I want to add a reason to use DwMeta:

When using PowerBuilder.Data (released with SnapDevelop 2019), we can access all DataWindow object properties parsed from .srd files through IDataStore.Object, including UI-related properties, such as x, y, etc. Similar to DataWindow object properties in PB.

Since DWNet.Data version 2.0.0-beta2, only data-related properties can be accessed through IDataStore.DwMeta (default values ​​are from models generated from DataWindow object by DataWindow Converter).

Regards, Logan
  1. Helpful
  1. Michael Kramer
  2. Saturday, 25 January 2020 17:59 PM UTC
Hi Logan, Thanks for clarifying. I focused on initial question of why .DwMeta instead of .Object. They both implement IDwMeta so they both "suffer" same restrictions if you need access to info not provided by IDwMeta.
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 13:45 PM UTC
  2. Beta Testing
  3. # 2

DwMeta? Sorry, not sure what you are referring to. XML Metadata? Or something completely different?

You just lost me. Probably my fault. Could you elaborate? An example?

TIA /Michael

Comment
  1. Arcady Abramov
  2. Friday, 24 January 2020 16:30 PM UTC


In R2 object property of .NET Datastore is replaced with DwMeta property. Yet, I cannot find any help info on this issue
  1. Helpful
  1. Michael Kramer
  2. Friday, 24 January 2020 16:57 PM UTC
Got it! See next reply (in a couple of minutes)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.