Message1069

Author mlh
Recipients
Date 2005-11-01.13:27:15
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=20535

I'm seeing some possibly related behavior in the yFiles
package (www.yworks.com/en/products_yfiles_about.htm).

Mostly, the bean accessor mechanism (x.getFoo/x.setFoo ->
x.foo) works nicely, but in some cases it does not... As an
example (the context may not be all that informative -- the
yFiles sources isn't available AFAIK), the following works...

class MyMode(ViewMode):

    def mouseClicked(self, event):
	hit = self.getHitInfo(event)
	if hit.hasHitEdges():
	    e = hit.hitEdge
	    w = self.getGraph2D().getDataProvider('weight')
	    print w.get(e)

... while the following does not:

class MyMode(ViewMode):

    def mouseClicked(self, event):
	hit = self.getHitInfo(event)
	if hit.hasHitEdges():
	    e = hit.hitEdge
	    w = self.graph2D.getDataProvider('weight')
	    print w.get(e)

The error is:

    AttributeError: 'instance' object has no attribute 'graph2D'

(Note that hit.hitEdge is derived from hit.getHitEdge() --
and this works.)

Even though this *might* not be the same bug, the
error/behavior is certainly the same. I've tried accessing
ViewMode().graph2D too (without subclassing) -- doesn't seem
to make any difference.
History
Date User Action Args
2008-02-20 17:17:26adminlinkissue1337592 messages
2008-02-20 17:17:26admincreate