Book a Demo

Author Topic: Diagram Object methods from API problem  (Read 9779 times)

Lukasz

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Diagram Object methods from API problem
« Reply #15 on: September 09, 2014, 10:02:20 pm »
Still nothing.
Anybody else have problems similiar to mine? It's very strange, because for the project without dialog and controls inside it, everything works fine. If I put any control inside dialog all of "children" get the same value (left and right, top and bottom)...

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram Object methods from API problem
« Reply #16 on: September 09, 2014, 10:13:45 pm »
I suggest you contact Sparx support directly.

q.

Lukasz

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Diagram Object methods from API problem
« Reply #17 on: September 12, 2014, 12:29:25 am »
I'm waiting for the support response.
I created project for test this problem. There is code: http://pastebin.com/Dugf0mdX

Can anybody test it?

EA project should contain one dialog and some win32 control inside dialog.

There is also path set for: "D:\eatest.eap".

On the console you will see the values of margins on the program start. After resizing (+ 50px) and after calling method Update().

Can you help me?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram Object methods from API problem
« Reply #18 on: September 12, 2014, 05:10:18 am »
Unfortunately I don't have any Cxx for Windoze. However, your program looks okay. Just the
Code: [Select]
         for (short iDiagram = 0; iDiagram < MyPackage.Diagrams.Count; iDiagram++)
            {
                var a = (EA.Diagram)MyPackage.Diagrams.GetAt(iDiagram);
                return (EA.Diagram)MyPackage.Diagrams.GetAt(iDiagram);
            }
could be replaced by
Code: [Select]
         if (MyPackage.Diagrams.Count > 0)
            {
                return (EA.Diagram)MyPackage.Diagrams.GetAt(0);
            }
Not really a semantic difference. I guess it's something related to your repository.

q.
« Last Edit: September 12, 2014, 05:11:01 am by qwerty »