Announcement

Collapse
No announcement yet.

Starting out with ViSi - need help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Starting out with ViSi - need help

    Hi there

    I am starting out with ViSi and I have a Gen4-uLCD-70DCT-CLB that I am using for development.

    At the moment, I am a bit lost and somewhat frustrated with not finding proper documentation about the widgets and how to use them. I am speaking of really in-depth documented details about these widgets, i.e. their parameters and how to modify them.

    For example, I have been working through AN-00082 and AN-00083 to get a grip on how the gauges work. I have noticed the following:
    • There seems to be an "i" prefix before the widget name when using functions like img_SetWord() and img_Show(). Why is this the case and what does the convention mean?
    • In AN-00083, when the Spectrum component is used, it has a double-"i" prefix (i.e. "iiSpectrum1" instead of "iSpectrum1") when using functions img_SetWord() and img_Show(). If I use only one "i" prefix for the Spectrum widget, the behaviour of the widget is totally different that expected.
    I have a long list of similar questions, but these will suffice for now to indicate what kind of challenges I am currently experiencing with ViSi. If anyone could shed some light on how these conventions work, and just some general good info on how to use the widgets, I would greatly appreciate it.

    Many thanks and kind regards

  • #2
    Hello,

    Welcome to the forum.

    If you put the cursor on any of those function and press F1, the Diablo16 Internal Functions Reference Manual should pop up and take you to that exact function:
    Click image for larger version  Name:	index.PNG Views:	0 Size:	14.5 KB ID:	71775
    Hope this helps. Let us know if you have further query.

    Kind regards,
    Sherwin

    Comment


    • #3
      Thank you for your answer Sherwin.

      Unfortunately this doesn't answer my questions. I have actually downloaded the Diablo16 Internal Functions Reference Manual and had a thorough look at it, and I couldn't find the exact info that I was looking for to answer the questions that I had. My questions were specifically regarding the convention of the prefix "i" when calling the Internal Functions for widgets.

      However, I managed to figure this out in the meantime - I had to look at the include files for the Diablo16 for ViSi at the installation directory of Workshop ({LocalDrive}\Program Files (x86)\4D Labs\4D Workshop 4 IDE\ViSi\DIABLO). These files contain the "function prototypes" for the Diablo16 Internal Functions when using ViSi and gave the answer to my questions.

      In my question I was specifically asking about the "ii" prefix for the Spectrum widget versus the "i" prefix. The Spectrum.INC file contains the following lines:

      Code:
      // >?%Name?< 1.0 generated >?DateTime?<
      img_Show(hndl,i>?%Name?<) ; // show initial spectrum
      img_SetWord(hndl, ii>?%Name?<, IMAGE_XPOS, >?LeftBarStart?< + bar * >?BarTotWidth?<) ; // where bar is 0 to >?Bars?<
      img_SetWord(hndl, ii>?%Name?<, IMAGE_INDEX, frame) ; // where frame is 0 to >?Frames?< (for a displayed >?%Minvalue?< to >?%Maxvalue?<)
      img_Show(hndl,ii>?%Name?<) ;
      This is where I figured out why the double "i" prefix was used. The comments and descriptive names in this file were also very helpful.

      It took me quite a while to figure this out, and it would've been very handy if these kind of things were documented somewhere for quick and easy reference (unless I am completely missing it). To be honest, this had a negative influence on me towards the learning curve for the product for which I had (and still have) great expectations, but I am willing to push through and figure it all out.

      Thank you and kind regards
      Jaco

      Comment


      • sherwin4D
        sherwin4D commented
        Editing a comment
        That's great to hear. Glad you found the answer you're looking for on your own.

        Kind regards,
        Sherwin
    Working...
    X