RE: (Victor) PDF fo:basic-link problem in trunk

2003-10-13 Thread Glen Mazza
Cool/Thanks.

--- Victor Mote [EMAIL PROTECTED] wrote:
 I just committed a change that fixes this.

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


RE: (Victor) PDF fo:basic-link problem in trunk

2003-10-12 Thread Victor Mote
Glen Mazza wrote:

 --- Victor Mote [EMAIL PROTECTED] wrote:
   FO:Basic-link isn't working (anymore?) in trunk
  for
   PDF.  It is properly colored blue, but the link is
  not
   active/clickable.
 .
 
  The anymore is the key question. I don't know
  whether it worked before or
  not.
 
 
  If it is slowing you down, or if we
  are pretty sure it
  worked before this change, I'll work on it right
  away.
 
  Victor Mote
 

 Victor,

 I checked out a version of trunk the day before
 AddLMVisitor was added (cvs checkout -D 2003-08-17
 xml-fop) and fo:basic-link worked fine before then.

 I tracked down the problem: the signature of the
 createArea() method needed to be changed when you
 moved it from fo.flow.BasicLink.addLayoutManager() to
 layoutmgr.AddLMVisitor.serveBasicLink().

 (old) BasicLink.addLayoutManager():

 lm = new InlineStackingLayoutManager() {
   protected InlineParent createArea() {
 InlineParent area = super.createArea();
   setupLinkArea(parentLM, area);
   return area;
 }
   }
 }

 The old code overrides ISLM's createArea(), as
 desired.

 (new) AddLMVisitor.serveBasicLink():

 lm = new InlineStackingLayoutManager() {
   protected InlineParent createArea(BasicLink node) {
 InlineParent area = super.createArea();
 setupBasicLinkArea(node, parentLM, area);
 return area;
   }
 }

 The new code just adds an uncalled method to ISLM.
 ISLM calls its own createArea().

 Could you take a look at this--it looks like ISLM
 needs to be modified to call a createArea(BasicLink
 node)--which might imply many other types of
 createAreas() will be needed in ISLM--or somehow
 setupBasicLinkArea--the only reason why you're adding
 the BL to the signature--needs to be redesigned to
 operate BL-node-free.  There may not be an easy
 solution to this.

 Attaching a hyperlinkTest.fo file to help with
 testing.

I just committed a change that fixes this. The solution was actually pretty
simple. I just needed to change the signature back to the old one, and use
the BasicLink object in the anonymous inner class (have to make it final for
that to work).

I also checked the other anonymous inner classes that are similarly created
to see if I had done anything similar. I won't promise that they are
perfect, but it looks the others are correct WRT this issue anyway.

Sorry about the inconvenience, and thanks for all of the grunt work you did
to set this up for me.

Victor Mote



RE: (Victor) PDF fo:basic-link problem in trunk

2003-10-07 Thread Victor Mote
J.Pietschmann wrote:

 Victor Mote wrote:
  Yes, without some sort of regression testing mechanism,

 We should have that now, see
   test/java/org/apache/fop/GenericFOPTestCase.java

 I deliberatly went for a self containg test scheme, which
 means not even external XML files. Add tests at will (well,
 almost).

Cool. I knew you were working on this, didn't realize it was ready to go.
I'll take a look here in a bit.

Victor Mote



Re: (Victor) PDF fo:basic-link problem in trunk

2003-10-06 Thread J.Pietschmann
Victor Mote wrote:
Yes, without some sort of regression testing mechanism,
We should have that now, see
 test/java/org/apache/fop/GenericFOPTestCase.java
I deliberatly went for a self containg test scheme, which
means not even external XML files. Add tests at will (well,
almost).
J.Pietschmann




Re: (Victor) PDF fo:basic-link problem in trunk

2003-10-05 Thread J.Pietschmann
Glen Mazza wrote:
Looking at lines 299-302, you have a strange
createArea() function within braces--I'm unsure what
you're attempting to do there: this code (which calls
setupBasicLinkArea()) is never being activated:
lm = new InlineStackingLayoutManager() {
protected InlineParent createArea(BasicLink node)
{
InlineParent area = super.createArea();
setupBasicLinkArea(node, parentLM, area);
return area;
}
};
This is quite possibly a Java 101 question, but what
does defining a function in this manner do--does it
append a new function createArea() to the lm object?
The lm is assigned an instance of an anonymous class
derived from InlineStackingLayoutManager(), with the
createArea method added or overridden.
J.Pietschmann




RE: (Victor) PDF fo:basic-link problem in trunk

2003-10-05 Thread Victor Mote
Glen Mazza wrote:

 FO:Basic-link isn't working (anymore?) in trunk for
 PDF.  It is properly colored blue, but the link is not
 active/clickable.

The anymore is the key question. I don't know whether it worked before or
not.

 Per your email here:
 http://marc.theaimsgroup.com/?l=fop-devm=106125821432538w=2

 fo:basic-link may have been broken with the addition
 of AddLMVisitor:
 http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/
layoutmgr/AddLMVisitor.java?annotate=1.19

Yes, without some sort of regression testing mechanism, it is possible.
However ...

 I've narrowed the problem to being that
 AddLMVisitor.setupBasicLinkArea() is not being called
 from AddLMVisitor.serveBasicLink().

... compare what is going on in AddLMVisitor to the addLayoutManager()
method that was in revision 1.3 of fo/flow/BasicLink.java.

 Looking at lines 299-302, you have a strange
 createArea() function within braces--I'm unsure what
 you're attempting to do there: this code (which calls
 setupBasicLinkArea()) is never being activated:

It is not really mine -- I just placed it where it is.

 lm = new InlineStackingLayoutManager() {
 protected InlineParent createArea(BasicLink node)
 {
 InlineParent area = super.createArea();
 setupBasicLinkArea(node, parentLM, area);
 return area;
 }
 };

 This is quite possibly a Java 101 question, but what
 does defining a function in this manner do--does it
 append a new function createArea() to the lm object?

It is an anonymous inner class that I think is overriding the constructor.

 Can we just call setupBasicLinkArea() from within
 serveBasicLink() directly? But how do I get access to
 the parentLM object in order to do that?

I don't know. I recommend going back to a version of the code before the
AddLMVisitor was checked in, and seeing 1) whether it worked properly then,
and 2) what it was doing, and comparing that to what is happening now. The
AddLMVisitor was checked in on Aug 19, 2003 at 0:53:53 (I think that is
GMT). As I think about it, if the setupBasicLinkArea() method was used at
all, I probably should have gotten a compile error when I moved it to
AddLMVisitor. I'll bet that code wasn't being used at all. I'll be glad to
investigate it when I get done with the pioneer LS work (possibly in the
next few days). If it is slowing you down, or if we are pretty sure it
worked before this change, I'll work on it right away.

Victor Mote