Re: New Shapeset -- What Will I Need To Do...?



Le Thu, Aug 29, 2002, à 12:35:45PM -0400, Tim Ellis a écrit:

Are you two (Cyrille & Lars) sure about this?

Can the One Dia Way actually implement all the functionality of, say, the
UML Class properties dialogue (add 6 attributes and 6 operations with 2
parameters each)? If you still say YES, then great! I'll get to hacking.

In theory, Yes. In practice, you will encounter bugs in SARRAY/DARRAY, 
because these have been written for reimplementing UML Class, but... I never
gotten around to actually test them seriously. BUTTON does work.

The idea I had was to have the following nested structure:
        object
                DARRAY (attributes)
                        name
                        type
                        yadda yadda
                DARRAY (operations)
                        name
                        return type
                        DARRAY (parameters)
                                name
                                type
                        BUTTON add_param
                        BUTTON remove_param             

                INT current_param [NOT SAVED, NOT VISIBLE]
                param_name [NOT SAVED]
                param_type [NOT SAVED]

param_name and param_type are images of the currently selected op.param.name
and op.param.type. You put a trigger on the parameters DARRAY to update
current_param, and copy the value of the selected parameter into param_name
and param_type. Likewise, when the parameters darray's selection change, you
swap in the param_name and current_param.

The trick is that it's nested twice, which quickly makes things a leeetle
bit complicated. Not unpossible at all though.

I definitely advise you to try your teeth on something a little easier...

(what's tricky in reimplementing "UML Class" is that you not only have to
rebuild the stuff using PropDescs, but you have to remain backwards
compatible. For a new object like your project, the backwards compatible
requirement probably doesn't apply)

        -- Cyrille

-- 
Grumpf.




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