Book a Demo

Author Topic: Old topic? package.Elements changed behaviour  (Read 4194 times)

fginfrance

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Old topic? package.Elements changed behaviour
« on: July 07, 2011, 03:15:27 am »
Hello,

I have a question especially for those long-time experts.
Was there an issue with the behaviour of package.Elements() method. Do I remember correctly that it changed behaviour somewhere between v. 7.x and 9.0 from returning all Elemnts of a package to only returning top-level Elements - for which you have to call element.Elements method to have the child-elements?

I have the impression to remember a post like that, but I am unable to find it in the forum (if it really exists) and we have to anticipate the effort on porting a large toolbox from EA 7.5 to 9.0 soon.
So if anybody could help or might have some tips of how to efficiently search the forum.

Thank you in advance!

Frank

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Old topic? package.Elements changed behaviour
« Reply #1 on: July 07, 2011, 04:12:33 am »
IIRC this has been changed from 7.5 to 8.0. In 7.5 ALL elements were returned (which is of course incorrect) and from 8.0 only the direct children are returned (which is what one would expect). Unfortunately one can't deal with EA's interface easily You have to query the build and react accordingly. That is why I have a wrapper around the native EA methods. The Elements method still delivers the recursively retrieved elements for me.

q.

P.S. The post you searched was probably mine. But I can't find it as well.
« Last Edit: July 07, 2011, 04:13:52 am by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Old topic? package.Elements changed behaviour
« Reply #2 on: July 07, 2011, 07:20:45 pm »
I just searched all my old posts using the top left search button.
searchstring: package.elements
forums: Automation Interface... and Bugs/Issues
period: all

That returned (after a while) all posts about that specific issue.

Geert

fginfrance

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Old topic? package.Elements changed behaviour
« Reply #3 on: July 08, 2011, 08:02:28 am »
Thank you guys!

Especially also for the hint on the "magic" search button on the LEFT, so well hidden and so much more useful than the field on the RIGHT  ;)

Regards
Frank