[visionegg] Re: flow control problems
- From: Bertrand Guay-Paquet <bernie@xxxxxxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Sat, 12 Nov 2005 11:18:32 -0500
Hello,
Mikko Vähäsöyrinki wrote:
Now here’s my first confusion. What should I get with: x=LPTTrigPin14(),
print x? It prints the object reference and not the return values, which
I think is part of my problems. How do I get the actual return value
that I could put to a variable for later use?
When calling "LPTTrigPin14()", you create an instance of the class
LPTTrigPin14. This is your first step. You need an instance of a class
to be able to call its methods (or functions). For the sake of
completeness, this is not true for static class methods, but this is not
applicable in your case.
So what you need to do is something like this:
lptt_instance = LPTTrigPin14()
x = lptt_instance.during_go_eval()
print x
If you call "print lptt_instance", like you mentioned, the textual
representation of the class instance is printed. This means the memory
address of the class and its type.
Unfortunately, I haven't studied enough the workings of the various
controllers to help you further.
Good day,
Bertrand
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
Other related posts: