Shop OBEX P1 Docs P2 Docs Learn Events
problem calling an object to start — Parallax Forums

problem calling an object to start

mikeamikea Posts: 283
edited 2015-02-22 12:57 in Propeller 1
Hi, I'm trying to call an object in the obj block called.so: "scale output". I have it saved in the same library as all object codes. I've tried copying other code and the manual example to launch it such as so.init and so.Start, but the compiler is asking for a subroutine name. I'm not sure what I'm missing. Thanks


OBJ
'ir : "IrDetector"
'pst : "Parallax Serial Terminal"
 so : "scale output"
PUB TestIr | dist
' Starts Parallax Serial Terminal; waits 1 s for you to click Enable button.
so.Start

Comments

  • kwinnkwinn Posts: 8,697
    edited 2015-02-22 06:55
    The "scale output" object needs to have a subroutine called "Start" for the compiler to produce a call to that subroutine when it encounters "so.Start".
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-02-22 12:57
    Some objects don't require either a Start or an Init method. You can only call methods contained in the object.
Sign In or Register to comment.