Jump to content

Marie

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Marie

  1. I knew there was interest in that question.

    Finally I've redesign everything. What I haven't told is that my tree was supposed to represent rows in a postgres table. Each row has a foreign key pointing to the same table to represent its father (except for root). At first I wanted to load the whole tree, make the change on it and applied it to the database so if you wanted to cancel something in the process, the change would not have been made in the DB. Instead I decided to use the database properties like a transaction and delete on cascade. If the user decide to cancel everything, I rollback and no changes are made in the DB and if he decide to save, the commit is made. Also easy when you want to delete a subtree, you just have to delete its root and on cascade, everything pointing to it will be deleted. No recursive functions except for loading the tree. Eventually, if i have time, I could implement the Command pattern to have a undo/redo, but at the moment it's just a nice to have.

    Now I see the use of my software conception class and that all the time spent on my class diagram is not lost. :D

  2. Hi,

    I would like to know if a class can have an array of objects from the same class. For example if I have a class Human, can it holds an array of its children (they are humans too) ?

    C++ equivalent:

    class Human{

    private :

    list<Human> children;

    }

    I've tried it and it gives me the "Private data control of this class uses an illegal value for its default data ..." error. Is there a way around that or do I have to use inheritance or the composite pattern?

    Thanks

  3. Hi all,

    I'm really really really new to LabVIEW and would like to know how to read the value of a checkbox in a xlsm file. I have no problem with opening/reading/writting in a xlsx file. Any idea what would be the best solution?

    Thanks in advance

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.