Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Some help needed

gef
Discussion topic

Back to topic list

Some help needed

Reply

Author "Fam dot Schweiger" <Sonja dot Schweiger at t-online dot de>
Full name "Fam dot Schweiger" <Sonja dot Schweiger at t-online dot de>
Date 2002-09-06 09:10:00 PDT
Message Hi there,

I spent now almost two days in finding a programming error in my application. What I am trying to do is connecting two nodes not triggered by user input triggered by another action.

When running the program, there is the following message printed:

connectInternal
edge rejected

I attached the relevant part of my program below. I would really appreciate, if someone could give me a hint, what the problem might be.

Cheers
Andreas

        // This is just pseudo-code
        NetNode node = new NetNode();

        node.initialize(null);

        FigNode figNode =
            (FigNode) node.makePresentation(lay);

        model.addNode(node);

        NetEdge newEdge;
        NetPort startPort // is initialized
        FigNode destFigNode // is initialized
        NetPort destPort // is initialized
        Fig destPortFig // is initialized


        newEdge = (NetEdge) model.connect(startPort, destPort,
                               NetEdge.class);

            if (newEdge != null) {
            figNode.damage();
            destFigNode.damage();

            FigEdge fe =
                (FigEdge) ce.getLayerManager()​.getActiveLayer().pr​esentationFor(newEdg​e);

            if (fe != null) {
                fe.setSourcePortFig(​figNode.getPortFig()​);
                fe.setSourceFigNode(figNode);
                fe.setDestPortFig(destPortFig);
                fe.setDestFigNode(destFigNode);
                ce.getSelectionManag​er().select(fe);
            }
            }
Attachments

« Previous message in topic | 1 of 2 | Next message in topic »

Messages

Show all messages in topic

Some help needed "Fam dot Schweiger" <Sonja dot Schweiger at t-online dot de> "Fam dot Schweiger" <Sonja dot Schweiger at t-online dot de> 2002-09-06 09:10:00 PDT
     Re: Some help needed Martin Ginkel <ginkel at java> Martin Ginkel <ginkel at java> 2002-09-08 11:56:25 PDT
Messages per page: