Book a Demo

Author Topic: Problem with package.Element.Notes  (Read 4165 times)

rmartinezb

  • EA User
  • **
  • Posts: 44
  • Karma: +1/-0
    • View Profile
Problem with package.Element.Notes
« on: October 20, 2016, 03:52:15 am »
Hi!, I'm trying to set the "Notes" attribute of a package, but I can't. My code is more or less the next:
Code: [Select]
                EA.Package selectedPackage = Repository.GetTreeSelectedPackage();

                EA.Package repPackage selectedPackage.Packages.AddNew(package_data[0], "");

                repPackage.Update();

                repPackage.Element.Author = package_data[1];
                repPackage.Element.Notes = package_data[2];
                repPackage.Element.Tag = package_data[3];

                repPackage.Update();

Below this, on other function I have:

Code: [Select]
         
                    textbox_name.text = package.Element.Name;
                    textbox_author.text = package.Element.Author;
                    textbox_notes.text = package.Element.Notes;
                    textbox_tag.text package.Element.Tag;

All, except Notes works, and if I edit manually the Notes field on the package properties window, the second function, the  textbox_notes.text = package.Element.Notes; also works, so I think I missed something about the repPackage.Element.Notes = package_data[2];

Can somebody help me?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Problem with package.Element.Notes
« Reply #1 on: October 20, 2016, 08:07:29 am »
Code: [Select]
                repPackage.Element.Update();

rmartinezb

  • EA User
  • **
  • Posts: 44
  • Karma: +1/-0
    • View Profile
Re: Problem with package.Element.Notes
« Reply #2 on: October 20, 2016, 06:16:59 pm »
Oh!, now it works, thaks you Simon :D
Just out of curiosity, why "Author" and "Tag" works without the "element.update" and "Notes" does not?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problem with package.Element.Notes
« Reply #3 on: October 20, 2016, 08:19:03 pm »
Does it? If so, call it EAUI.

q.