Shop OBEX P1 Docs P2 Docs Learn Events
creating and using objects - this is the question ? — Parallax Forums

creating and using objects - this is the question ?

floodhoundfloodhound Posts: 45
edited 2007-08-21 16:43 in Propeller 1
I ·searched a few post here and still have not found a good guide that explains how to implement data from already designed objects.
·
For example if I were to use the VGA_DEMO object how could I change color and clear screen etc? More importantly how do I create an object? Just want a basic guide, not a huge get me lost book.
·
Thanks in Advance

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My web site -- > www.floodhound.com <-- take a look if you like

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-08-21 16:37
    Alas, there is no short answer to your request. I was thinking for some time to create a catalogue of popular objects and their use and parametrization... Still thinking smile.gif

    The shortest answer would be: Read through the code, sometimes there is useful documentation near the end.

    But considering your second request, this answer will not help you at the moment; however I can easily answer that second question.
    Just make a new file: The name of your new object is the very name of that file.

    Though you might not need the following information at the moment:
    It is viable to include clock settings in an "object", so you can structure it as its own test bed. When used "stand alone" it performs the first routine (you can call: "test"); when used in the context of a larger program there are only a few overhead bytes. This trick can simplify your maintenance..
  • DufferDuffer Posts: 374
    edited 2007-08-21 16:38
    Look for the "pairs".··· i.e. VGA_Text.spin and VGA_Text_Demo.spin.

    The "demo" of the pair is just examples of how to call the methods within the parent object. Usually, the object documents the syntax and purpose of each of its methods. Studying the code in the object and the demo will help you to understand the relationship between a calling program and an object and help you learn what's required to build objects. i.e. How a parameter or a parameter list·is passed from the calling program to the object, how results are returned to the calling program from the object, etc.

    Was that the question?

    Steve


    Post Edited (Duffer) : 8/21/2007 4:44:38 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-08-21 16:43
    For your general question, you should read the Objects module of the Propeller Education kit in the sticky atop this forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.