Announcement

Collapse
No announcement yet.

Add a graphical code in a form.

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

  • John Kevin
    commented on 's reply
    Hello Toragan,

    Ok, thanks for letting me know.

    Best Regards,
    Kevin

  • Toragan
    commented on 's reply
    Hi Kevin,

    I spent a day to try different things but I can't find the problem reason.
    I finally going to do the last solution, to print directly on the screen without using string widget.

    Best regards
    Toragan

  • John Kevin
    replied
    Hi Toragan,

    Sorry for the late reply. I cannot exactly pinpoint the issue, but I think there may be some conflict with the use of the 'string' widget and the sliding list code.

    it's the reason why I choosed to use string widget. But I also use string widget to print error message in different form.
    Similar to what you want to achieve, you can save the selected item in a variable and print them directly on the display.
    If you want to change the font, you can load it from your memory card

    Code:
    hFont1 :=file_LoadImageControl("Arial16.dat", "Arial16.gci", 1);
    Code:
    txt_FontID(hFont1);
    print("\n Sample Text...\n");
    Best Regards,
    Kevin

    Attached Files

    Leave a comment:


  • Toragan
    replied
    Hi,

    I imagine you haven't found the reason of the problem.
    I tried to find something and I thought, maybe the problem come from an conflict between variable or function (example: global variable use for basic string and also use in sliding list) or something like that. The sliding list get something from basic string.
    I'll take a look on this way.

    Best regards,
    Toragan

    Leave a comment:


  • Toragan
    commented on 's reply
    The final goal is to print the select name in one of this 4 Forms (Form8, Form9, Form2, Form10), it's the reason why I choosed to use string widget.
    But I also use string widget to print error message in different form.
    So If you find an issue at this problem, this will avoid me from doing this in code.

    Thanks for your time spend in this problem.

  • John Kevin
    commented on 's reply
    I will conduct further testing regarding this.

  • Toragan
    replied
    Hi,

    You told me "string" in Form8, when I ran the project the problem was still be there.
    I finally deleted "string" widget in the Form8, Form10 and Form9 and now it seems to work.

    But do you know why string widget create conflict with the sliding list ?

    Edit: After some tests I found the problem comes from the "string" widget in general. But why does it create a conflict with the sliding list ?
    Last edited by Toragan; 16th May 2019, 08:28 PM.

    Leave a comment:


  • John Kevin
    replied
    Hello,

    I tried to delete the "string" widget on Form8 but I have no change.
    Did you reload the graphics file?

    Can you try again this attached file and let me know. Thanks

    Best Regards,
    Kevin
    Attached Files

    Leave a comment:


  • Toragan
    replied
    Hello,

    The attached file is exactly what you had run on your screen ?
    I tried to delete the "string" widget on Form8 but I have no change.

    Leave a comment:


  • John Kevin
    replied
    Hello,

    I think I have found what is causing the issue. Upon deleting the 'string' widget on Form8, the sliding list works just fine.

    I have attached a modified version of your project for you to test.
    I do not have any data inputs, so I commented the initialization for the Modbus to run the whole project.

    Also, I added some lines of code on Form14 so you can test the program continuously.

    Best Regards,
    Kevin
    Attached Files

    Leave a comment:


  • Toragan
    replied
    Hi,

    Thanks you.
    I'm also trying to find something, I'll tell you if I have interesting things.

    EDIT: I tried with a smaller project, I created 4 forms and put the sliding list in the form3. It works very well ...
    I have tried many things to fix that but nothing works, I am really stuck in this problem.
    Ps: It works when it's load on the first form, but if you press the screen outside the sliding list, the programme reboot and it's broken again.
    Best regards,
    Toragan
    Last edited by Toragan; 16th May 2019, 12:41 AM.

    Leave a comment:


  • John Kevin
    replied
    Hello,

    I have tried to run your program and it really gets stuck on the sliding list. As of now, I am finding what is
    causing the issue. I will get back to you as soon as I have found something relevant.

    I noticed that when you run the program through setting the initial form to either '7' or '14' the sliding list works fine.

    Best regards,
    Kevin

    Leave a comment:


  • Toragan
    replied
    Hi Kevin,

    No problems !

    It's working better, however when I sliding the listbox all words are duplicated like the listbox isn't never refresh.
    I think about a loop ... It's working very well when I trying on the Form0, but when I'm writing if (CurrentForm == 14) it's happen that.
    If I fix it I'll edit the post.

    Ps: The problem of the crash of 4DWorkshop still doesn't seem fixed.
    I tried to fix by different ways without success.


    Best Regards
    Thomas
    Last edited by Toragan; 15th May 2019, 05:51 PM.

    Leave a comment:


  • John Kevin
    replied
    Hello Toragan,

    Sorry for the delayed response.

    Upon looking at your project, I have noticed that you already have a magic code for Constant/Global/Data (MagicCode1).
    You do not need to create another magic code for this, you can resolve the issue if you copy and paste your 'MagicCode3' in your 'MagicCode1'.
    Let me know if that helps.

    Best Regards,
    Kevin

    Leave a comment:


  • Toragan
    replied
    This is my project.

    The MagicCode3.inc is not implement in the 4DGenieS file, but finally my question is, why ?
    Why he's not implement by himself into 4DGenieS file ?

    When I'm trying to write #inherit "MagicCode3.inc" in the 4DGenieS file, he's automatically delete after compilation.
    Last edited by Toragan; 10th May 2019, 10:45 PM.

    Leave a comment:

Working...
X