Assorted questions and comments

  1. I would like to serialize a multiline textnode as xml with multiple text nodes equal to each line in the textnode. How can I do this?
  2. I have the same print bug as others i.e. text rescales when printing textnodes
  3. I would like selections of nodes and links to be sorted left to right and top to bottom and the topmost left node be the primary object
  1. I don’t know of an easy way to do this in general. Wrapping and clipping depend a lot on the particular font and size of the GoText and the display device. We had to do something similar for SVG support and for PocketPC support, but the implementations were quite complicated and quite different from each other.
    Of course in the simplest cases, you can just look for embedded newlines, but I assume you are already doing that.
  2. For a fix, send us e-mail.
  3. That’s interesting. Did you want to make sure the objects in a GoSelection were always sorted? That would mean you would need to be constantly resorting as objects moved around or were resized.
    Better yet, why is the order important? The order is not guaranteed at this time. It does use both an ArrayList and a Hashtable, but the ArrayList and its ordering are not exposed.
    Perhaps you just need to implement a method that sorts an array of objects in the manner you like, and use that whenever you do something that requires such ordering.
  1. Is there any way to capture the lines as displayed in the TextBox editor?
  2. I will send you an email when I get back to work on Thursday
  3. I have implemented somecode to evenly space nodes horizontally or vertically (did the sort myself). Just thought it might make a good feature. NB It is annoying if Primary selection is a link when aligning nodes.
  4. Any answer to my Link label problem (mid Decembeer)?
  1. Not that I can think of at this moment.
  2. Hmm, yes, it would be better if the code that cared about the PrimarySelection not being a link automatically chose the first non-link as if it were the “primary” object. But all of that is sample code, not part of the GoDiagram library.
    You could implement a GoView.ObjectGotSelection and ObjectLostSelection event handler that would automatically make sure the GoSelection.Primary object (if any) was always a “valid” object, such as the node that is at the most top-left position.
  3. No, looking at that topic, it doesn’t appear as if we could reproduce or even understand what the problem was. But I can imagine that having the GoLabeledLink.MidLabel object positioned in the middle segment of the link would not appear about midway between the two ports. I think that’s more likely if AvoidsNode is true. You can always override GoLabeledLink.LayoutMidLabel method.