Property problem with "intdata-generic" shapes



Hi all,

I am implementing my first dia sheet. Almost everything is going fine
however I have the following interesting problem (I think ;-)

Here is the context: I choose to implement several shapes
using the same object class and use the "intdata" feature to
specify which one in the XML sheets. I noticed this information is
available in the "CreateFunc" through the "user_data" argument
With this design I can dynamically convert shapes of the same
"family" one into another using a "type" property (coding the intdata).

Here is the problem:
-- if I code this "type" in the property offsets, I will only instantiate
correctly for intdata=0. It seems thaht the SetPropsFunc function
is called at some point with some default arguments and overwrites
the type information set in the "createFunc" function. So to get the
right shape, one has to use the property editor.
-- if I don't, then I can correctly instantiate but I am unable
to convert between shapes after creation using the property editor

The step class in the GRAFCET sheet has the same problem.
Maybe the behavior was fine but broke at some point due to some
code restructuration

Has anyone already faced this problem or has some hints for a
clean fix or a temporary workaround ?

thanks
Christophe P.

--------------------------------------------------
   Ponsard Christophe  --   CETIC/FAUST
Aéropole, rue Clément Ader 8, B-6041 Gosselies
tel: ++32/71/91 98 26   web: http://www.cetic.be
email: christophe ponsard cetic be --------------------------------------------------






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]