Personal tools
You are here: Home Forum Other... (new forum, problems, etc.) Problem with DataDBReader

Problem with DataDBReader

Up to Other... (new forum, problems, etc.)
  • Problem with DataDBReader

    Posted by Gommlich André at April 26. 2006
    Hello, all SALOME user

    I try to write my own component for SALOME version 2.2.8 by using python. The loading of my predefined SPML data model and the input of data goes well. Now i would like to use and manipulate these data in my component by using DataDBReader and DataDBWriter from DATA component.

    I'm able to read and write data by the following code

    writer=DATAcomp.GetDBWriter(curstudy)
    reader=DATAcomp.GetDBReader(curstudy)

    e=writer.createEntity("MyEntity";)
    writer.setField_String(e,"Name",["My New Entity"])

    print reader.getField(e,"Name";)[0].value()
    # returns My New Entity
    print reader.getEntityType(e)              
    # returns MyEntity
    print reader.getListOfFields(e)
    # returns ['Name', 'Comment', ...]

    But if i try to use the following methods of DataDBReader, i will get errors.

    l=reader.getEntity("MyEntity";)
    # returns _omnipy.invoke(self,"getEntity",...) error
    l=reader.getRepresentation_Entity([e])
    # returns _omnipy.invoke(self,"getRepresentation_Entity",...) error
    l=reader.getPotentialValues_Entity(e,"Name";)
    # returns _omnipy.invoke(self,"getPotentialValues_Entity",...) error

    I looked up the DATA component source code and i think those are likely bugs in those methods.

    Now my question. Is it a problem of me or there real bugs in DATA component?
    Especially getEntity() is very important for me.

    I will be very grateful for any help to fix the problem soon.

    Best regards!
    A. Gommlich

    P.S. Please sorry my poor English
Quick reply
URLs will be automatically hyperlinked. Basic HTML tags are OK.
Powered by Ploneboard
History
Activate by Site Administrator on Sep 02, 2009 12:02 PM
Document Actions