Book a Demo

Author Topic: Annoying API change  (Read 5731 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Annoying API change
« on: April 06, 2011, 01:31:57 am »
I was able to get around this up to now, but this is really annoying: The Elements method has changed behavior from 7.5 to (I guess it was already 8.0 but I'm testing with) 9.0. Package.Elements returned ALL elements of a package even those nested inside other elements. Definitely this behavior was wrong and needed correction. But simply changing the method's behavior is definitely the wrong way! As long as there is no way of versioning interfaces the new behavior should have been wrapped in another method named for example ElementsOnTop (or whatever). What I have to do now it to code something like
Code: [Select]
if rep.EAEdition < 4711
  use Elements the old way
else
  use Elements the new way
end
That sucks definitely.

Please, Sparxians: the next time you change an interface make it either during a beta testing phase for a new interface or introduce a new method for any changed behavior.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Annoying API change
« Reply #1 on: April 06, 2011, 01:45:34 pm »
q.

That was indeed a v8 change. It has been discussed at large on the forum back then.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Annoying API change
« Reply #2 on: April 06, 2011, 06:25:59 pm »
This discussion must have slipped my attention. However, it is annoying and does not shed a good light on the development branch at Sparx. In the end I found out a way with my own wrappers using a SQL that emulates the old behavior in all versions.

q.