Announcement

Collapse
No announcement yet.

Problem with Visi QWERTY keyboard

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

  • EMHmark7
    replied


    The need comes from the fact that the compiler says it cannot find it.
    But anyway, I think it is complicated enough, will try my own simple keyboard first. Thanks.

    Leave a comment:


  • ESPsupport
    replied


    The xxxxConst.inc files are generated as part of the build process for the program being built, I can't imagine any need to include another program's xxxxConst.inc.

    Similarly if you are just file_Execing a function there is no need to open it's files in your main routine, see the way bigdemo calls KBFunc.

    It would seem you are confusing the whole process.

    Zip up and attach your whole project, so we can get some idea of what you are trying to do.

    Leave a comment:


  • EMHmark7
    replied


    Implementing a keyboard in my project,

    I had to find a "KeyboardConst.inc" as well as KBroutine.inc to include.
    But I had to comment // var disk, hndl ; in KeyboardConst.inc because it said already declared as global.
    Also, I had to declare and manage a 2nd handle, and had to manage 2 types of calls for imgTouched:=img_Touched(h,-1); where h can be either of those for:
    hndl := file_LoadImageControl("Remote05.dat", "Remote05.gci", 1);
    hKB := file_LoadImageControl("Keyboard.dat", "Keyboard.gci", 1);

    1) Even if the display is perfectly calibrated, clicking a key, it gets a key like 2nd or 3rd on the right and one row up.

    2) typed keys appear redraw above the keyboard.

    3) clicking in some places makes the display black and not responding anymore.

    4) Typing some keys, Make display a 2nd keyboard smaller and a bit lower in the display

    Maybe some problems come from the fact I switched the display LANDSCAPE for that menu.

    This widget semms complicated and difficult to control the processus without knowing all the ins and out.
    So unless we solve it, I will need to implement my own keyboard (like reinvent the wheel).

    Leave a comment:


  • ESPsupport
    replied


    Have a look at the 'Keyboard' VisI sample and read the comments in it, that describes a bit more about how it works and should answer most of your questions

    Also the 4DGL programmers reference, specifically str_PutByte, for how to append into a string (which is how it's done in kbfunc)

    Not sure why you are looking inside the source to understand it, Assuming you came across it in bigdemo and it how you how to use it there and/or in the comments at the top.

    Again the programmers reference describes file_Exec

    Leave a comment:


  • EMHmark7
    replied


    Is there a turorial about how using the keyboard widget for filling a string? I look at the kbcall project example provided above and I feel lost with so few comments.

    1) I do not catch how I get the value.
    2) the Kbhandler(var Key)
    args[0]:=1; //Is it a way to set a default value even if we do provide the function with a value?
    args[1]:=Key;

    3) What is the role of func kbHandler(), funcx() and kbDown and KbUp?
    4) Where is declared KbButtons?

    And what about:
    file_Exec("chfunc.4fn", args); // could use file_Run, but then all allocate memory would need to
    be recreated (eg image controls) and reinitialised (eg img_Setword)


    Sorry for sending my question before experimenting more, but need to work on that tomorrow and tomorrow will be the night for some of you!

    Thanks,

    Leave a comment:


  • ESPsupport
    replied


    I would expect all keys are doing that as the handler triggers on 'down' so the key will still be down for a moment or two after returning from the function.

    You could try calling kbUp() before refreshstate(), but I'm not sure that that will not have other consequences.

    Leave a comment:


  • markl
    replied


    Thank you for the help,

    The example you sent has help me, and for the most part it is doing what I want. There is something going on that I still am having trouble with however. When one of my functions returns, the keyboard is redrawn but the initial key that called that program is redrawn in the down state. I have tried from the main program and the called function to have the key return in the up state by using:
    img_SetWord(hndl, 2,IMAGE_INDEX, 0);
    or img_Lighten(hndl, 2) ;
    with img_Show(hndl, 2) ;
    or refreshstate(ikeyboard1, okeyboard1) ;

    but this causes the screen to be redrawn twice and the key is still drawn in the down position. What's odd is that this only happens on one of the keys. The "2" key calls a 7400 kb program that has a lot of input choices. Everything seems to work fine with it, and it returns to the Main Keyboard just like I want it to.
    Can you think of something that I am overlooking?

    Again thank you for your help,

    Mark

    Leave a comment:


  • ESPsupport
    replied


    Why didn't you post this in the original thread, very confusing to everyone.

    Anyway, there's a simple example attached.

    Attached files kbcallusdProg.zip (2.6 KB)

    Leave a comment:


  • markl
    replied


    Is there an example that you can direct me to that would show how to run a program from flash that calls other smaller programs that are located on the sd card that is initiated by pressing a key on a keyboard. I am interested in using a keyboard that utilizes your custom keyboard functions, KB Routines not a keyboard that is created as a collection of buttons.
    This may seem like a simple request, but I have had a tough time getting this to work. I can make a keyboard that will launch several smaller programs from the sd card, but I have not been able to get the program to return back to the keyboard to select another file without having the program crash due to a recursive error after several key presses. I am using the file Run command, but I have used the file Exec command also with the same result. The strange part is that when I do a mem check the stack size seems to be stable. The program terminates with a blank screen or with a stack error. I have yet to see an example of this done anywhere. I am using a ulcd28pt GFX with the most current workshop and PmmC versions.

    Thanks for any suggestions
    Attached files program_trial1.rtf (41.3 KB)

    Leave a comment:


  • RahulS
    replied


    Yes, really..

    Leave a comment:


  • ESPsupport
    replied


    Um, what I'm finding is that changes made in the keyboard editor are lost.

    This is because the changes do not seem to be detected.

    I need to change something in the object inspector to cause the changed state to be detected.

    I found that changing the name of the keyboard and then changing it back is sufficient.

    Is this what you mean?

    Leave a comment:


  • RahulS
    replied


    I have one more suggestion. In the key board editor, if i set a key color and next time when i want to do some minute change in the color, then it is very hard. why because, when i click on the color, a Color picker screen will come but its pointer will go somewhere else, other than my selected color. So each time i need to find out my already set color in the picker window and do the modifications. Please have a look on to this...

    Leave a comment:


  • RahulS
    replied


    Ok..moderator that is fine..thanks a lot for your continuous support ...i know its not a serious issue..but what i expect more is that if i press caps lock the key has to stay down so that when a second person seeing this he has to have the feeling that the caps key is pressed. Because i am design this entire GUI application for a 3rd party user. So from their point of view, if they don't feel that a key is pressed after pressing(not functional vice), then they will report it as bug. With your right guidance, i could solve my issues..thanks...

    Leave a comment:


  • ESPsupport
    replied
    I have attached a replacement KBRoutines.inc. Place it in your project folder initially, you can move it to your C:\Program Files\4D Labs\4D Workshop 3 IDE\INCLUDE folder if you are happy with it.

    In this version the 'Caps Lock' and 'Shift' keys operate like they were meant to originally

    Als note that the [ and ] keys are generated incorrectly. You will need to change the 'Key value' and 'Sh Key value; from -1 to 91 and 123 for [ and 93 and 125 for ]

    Leave a comment:


  • ESPsupport
    replied


    I see the key doesn't 'stay down' but it does work the same as most touch keyboards (they hold down the shift key when the 'LOCK' key is activated)

    Or am I missing something?

    Leave a comment:

Working...
X