Shop OBEX P1 Docs P2 Docs Learn Events
Visual Spin Beta1a release — Parallax Forums

Visual Spin Beta1a release

Tony B.Tony B. Posts: 356
edited 2011-06-01 14:40 in Propeller 1
Rayman,
I have enjoyed working with Visual Spin. :lol: I feel I am gaining a good understanding of how you have structured the Visual Spin and the Spin Code it generates. I have some questions.
1. The minimum size of controls are limited because you are using the Propeller font with a screen resolution of 1024 x 768 thus giving 128 columns and 64 rows correct?

2. Are the top, left and other properties based on the above numbers or is there another correlation?

3. Would it be possible to get the Visual Spin Code for the Delay Generator? I am trying to learn how you are using the button object as a button/input box. I assume you are writing the value to the “caption byte” and redrawing the screen, but was wondering about putting in a number larger than the original “caption” text/string thus writing over object data for other objects in memory. Is this correct? Then if I need the value in other places in my code I can read the “caption” byte of the object and use it, correct?

4. Do you plan on making an input box object?

5. Is there a color chart or information somewhere on the colors and their associated values for forms and objects?

Thanks for a great beginning piece of software and your time helping me. I’m already planning a project I would like to take to UPEC. When done I want to write it up and maybe win project of the week. Well I guy has to dream doesn’t he?

Thanks,
Tony

Comments

  • RaymanRayman Posts: 14,876
    edited 2011-05-22 17:50
    Tony,

    Thanks for trying Visual Spin! Glad it at least was a little useful for you so far...

    I just got back to Northern Virginia from UPEW, so I'm a little beat right now... I'll try to answer your questions tomorrow...

    Ray
  • Tony B.Tony B. Posts: 356
    edited 2011-05-22 18:29
    No problem! I didn't know if you were traveling today or staying in CA one more day. I enjoyed your presentation.

    Tony
  • RaymanRayman Posts: 14,876
    edited 2011-05-23 08:57
    Tony, Ok here's some answers :)

    1. If you do "build app" and then "View Code" you'll see in the con section that the screen is defined as 64 columns by 48 rows.
    This is because the screen is 1024x768 and the display is based on 16x16 pixel tiles from either ROM font or graphic tiles.
    2. Top and left for form components are relative to the top-left corner of the form. The form also has top and left properties but those are relative to the top-left corner of the screen.
    3. Sorry, the delay generator app was made long before Visual Spin. It uses the same GUI, but there is no Visual Spin project for it. But, it would be good to make that into an example project. I should do that one day...
    4. Input text boxes are a great idea, I don't know when I'll ever have time to do more code work though... You can create your own custom components though.
    5. In the ribbon bar, look for "Colors" under the Application tab. That lets you see and select between all the possible colors.

    Hope that helps,
    Ray
  • Tony B.Tony B. Posts: 356
    edited 2011-05-23 09:41
    Thanks for your reply!

    I missed the colors under application tab.

    I am very interested in writing my own objects, but how would I integrate them into Visual Spin?

    Or did you mean create objects in Spin code and add them to the spin code generated by Visual Spin?

    I would like to work with them in Visual Spin for placement and consistent and organized Spin Code.
    Tony
  • RaymanRayman Posts: 14,876
    edited 2011-05-23 09:57
    I though there was already a "custom" form object type, but I see now that I haven't coded that yet...

    That is something I'd like to include, so I'll try to find time to add that in the near future...
  • Tony B.Tony B. Posts: 356
    edited 2011-05-23 10:14
    Thank You! That would be a great addition.
  • Tony B.Tony B. Posts: 356
    edited 2011-06-01 14:24
    Ray,
    I've been working through the "Standard Visual Spin" code learning the flow and how it works so I could maybe code other controls like an input box. In my work through I have a question concerning a line in the method PRI DrawForm.

    PRI DrawForm|pObject, i,k 'draw current form
    'hide mouse
    drawmouse(false)
    'draw form
    DrawWindow
    'show mouse
    drawmouse(true)
    repeat i from 1 to fObjects
    pObject:= @@(word[fPointer+9+i*2])
    drawObject(pObject)

    In this line, pObject:= @@(word[fPointer+9+i*2]), I believe I understand everything up to the point of multipling the fPointer value by 2. I know you are trying to "point" to the first object in the DAT block but the math doesn't seem to get me there yet, I know it works. So, your insight would be most appreciated.

    Thanks,
    Tony
  • RaymanRayman Posts: 14,876
    edited 2011-06-01 14:40
    Tony,

    Ok, the *2 is just because we are repeating though a list of pointers (addresses) that are words (2 bytes).

    I.e., the Form object contains a list of pointers to all the objects that the form contains. These pointers are words, 2 bytes wide, but the interation is in single steps, so I need to multiply by 2...

    BTW: The @@ is some special SPIN magic you need to do with lists of addresses in order to get the address right at run time...
Sign In or Register to comment.