maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Entering text into Tk widget (https://talk.maemo.org/showthread.php?t=84307)

lucm 2012-05-16 22:28

Entering text into Tk widget
 
I am new around here, bought my N900 recently.

I just installed tk8.5 and began to work on an application. It is written in Tcl/Tk, of course. So far I just created a window, a frame and a text widget. Quick and dirty. It works right off the bat, of course, because that's what Tcl/Tk does.

However, when I type text into the text widget, capital letters don't work. They are typed as small letters. Numbers and symbols don't work either, the small letter on their corresponding key is entered instead.

Despite my little time with N900, I already installed a ton of apps to test and get an overall feel of the toy, and I noticed that same problem of entering text in a few other apps, too.

So, what is the trick with the N900?

electroaudio 2012-05-17 11:09

Re: Entering text into Tk widget
 
Quote:

Originally Posted by lucm (Post 1207569)
However, when I type text into the text widget, capital letters don't work. They are typed as small letters. Numbers and symbols don't work either, the small letter on their corresponding key is entered instead.

Despite my little time with N900, I already installed a ton of apps to test and get an overall feel of the toy, and I noticed that same problem of entering text in a few other apps, too.

So, what is the trick with the N900?

I have never seen that problem you describe except for if the keyboard is setup for automatic capital letter as the first letter, then the first letter will be small when shift is pressed.

Sometimes certain inputwidget only accept certain types of input, for example numbers, but those situations are logical in the context and clearly programmed to be so by purpose.

However, some programs also dont "remeber" the shiftkeys if you press and release it before the key you want, so you have to hold down the shiftkey of choice while you type in these programs.

lucm 2012-05-17 14:05

Re: Entering text into Tk widget
 
For example, I have an application here called QTMAIL. It is available in one of the repositories, I can't remember which one. If you want to try it out, install it and try to add a mail account. Don't bother entering any real information, just test the input. See how impossible it is to enter any capital letters, numbers or symbols into any field whatsoever. The at symbol @, for example, cannot be entered.

The only way I found around it was to type everything into some text pad then copy paste the info. Huge pain, as you can imagine.

Another one: an application called Communi. It's an IRC client. As soon as it runs, I am prompted to enter my nickname. Again, only small letters work.

Found another one: KhtEditor. It's a text editor that... won't let me type anything but small letters.

In comparison, Leafpad (also a text editor) works fine.

Anyway, that's the problem I have with my Tcl/Tk application, and I don't know why. Tcl/Tk is remarkably cross-platform, but I've never had this problem with my apps. I am having this problem with one or another app on the N900, though, so it must be something tricky about the device/Maemo.

electroaudio 2012-05-17 19:59

Re: Entering text into Tk widget
 
KhtEditor works flawlessly for me, and i have never seen the problem you describe.
So there must be something strange with either your language (I use swedish) or some librarys or maybe some keyboards that you have installed.

Also, i couldnt find Tcl/Tk either? where is it?

lucm 2012-05-17 20:11

Re: Entering text into Tk widget
 
That's really strange. I can absolutely confirm the problem in all the apps I described and a few more if I look for them.

Tk is HERE.

In case you're not familiar with Tcl/Tk, Tcl only does command-line work, while Tk does everything that Tcl does including command line + it makes GUIs, so Tcl is understandably left out. I mean, I don't think there is a "just Tcl" package.

electroaudio 2012-05-17 20:35

Re: Entering text into Tk widget
 
I will try to install tk ;)
But what i suspect is that you either has a conflict somewhere or have got a faulty library from somewhere.

Have you tried to do a update or something like that?

Tk is dependant on these packages:
libc6 (>= 2.5.0-1), libfontconfig1 (>= 2.6.0), libfreetype6 (>= 2.3.9), libx11-6, libxft2 (>> 2.1.1), libxrender1, tcl8.5 (>= 8.5.0)

And my n900 says that it is an incompatible package and refuse to install it.. ?

lucm 2012-05-17 22:14

Re: Entering text into Tk widget
 
It installs fine on mine.

Note that I got the wrong version the first time so it wouldn't install. I got the i386 version and the N900 can only run ARM, of course. Pay attention, there is an arm version, too. Maybe you're not as dumb as I am, but who knows. Better check that.

Then it installs fine, but whenever I uninstall anything, and I mean ANYTHING, it gets uninstalled too. Then I reinstall it once again. I just keep the .deb in my MyDocs directory for that... :-\

electroaudio 2012-05-18 04:39

Re: Entering text into Tk widget
 
Quote:

Originally Posted by lucm (Post 1208191)
It installs fine on mine.

Note that I got the wrong version the first time so it wouldn't install. I got the i386 version and the N900 can only run ARM, of course. Pay attention, there is an arm version, too. Maybe you're not as dumb as I am, but who knows. Better check that.

Noo, the 386 version is for the scratchbox developer-enviroment ;)

Quote:

Then it installs fine, but whenever I uninstall anything, and I mean ANYTHING, it gets uninstalled too. Then I reinstall it once again. I just keep the .deb in my MyDocs directory for that... :-\
That sounds very weird, i have never heard of anything like that either...
However i did notice that the package was very old, maybe it isnt 100% compatible with the latest systemuppgrades?
-does textentry behave the same when Tk/tcl is uninstalled?
I know that some functions has dissapeared from GTK and such stuff during this timeframe.

lucm 2012-05-18 20:56

Re: Entering text into Tk widget
 
I just tried it on another N900. It is running a slightly older firmware. I think it's PR1.2, mine has PR1.3 + CSSU. The other N900 has the same problems.

Would you be willing to run some code on yours?

http://pastebin.com/ke06n2Nc

Put that in a file called test.tcl in your N900 and run it:

$ wish8.5 ./test.tcl

Then please tell me if you can type any capital letters, numbers, symbols or even enter a new line. Please note that the letter 'x' closes the app.

Please let me know.

electroaudio 2012-05-20 15:37

Re: Entering text into Tk widget
 
I cant install Tcl/Tk but i dont think that i would get the fault you get either, so...

What language are you using? (it must be a bug related to either the keyboard or the entryfields)
Are you using hardware or the onscreen keyboard?
(I never use the onscreen keyboard)
Have you tried to change language to some other country and seen if the fault is still there?

lucm 2012-05-20 16:31

Re: Entering text into Tk widget
 
My language is English, US.
Keyboard layout is English, Nederlands
Hardware keyboard only.

I made an interesting discovery by accident.

In applications that work right, I usually want, for example a capital P, so I press Shift then p. If I want 0, I press Blue Shift + p or press and hold p, I also get 0.

In applications that don't work right, I press Shift then p, it doesn't work, I get small p. I want 0, so I press Blue Shift + p. It doesn't work, I get small p again. I press and hold p, it doesn't work, I get pppppppp instead of 0.

However, in applications that don't work right, I just found out I can get a capital P by pressing Shift + p at the same time. If I want 0, I have to press Blue Shift + p at the same time.

That helps, but it's still bad. Some keys (a, z) are too close to Shift, pressing them at the same time is extremely inconvenient.

Besides, I can't find a way to enter a new line in my Tk app. I press Enter and nothing happens. Sigh... :(

electroaudio 2012-05-20 18:09

Re: Entering text into Tk widget
 
Yes, that problem are i familliar with and i also mentioned it in my first message.
-Gnumeric is the only program for me: which dont remember the shiftkeys, and it is only the first key it forgets, the rest is remembered as they should.

But, in gnumeric then the enter-key do work, but gnumeric is designed to let it have a different function than a normal newline. so it must be read differently and therefore i cant tell if it is the same problem there.

However i have read somewhere that certain programs requires shift+enter to work as enter.

.....

I changed forth and back between different langages and keyboards and it didnt make any difference in gnumeric :/

lucm 2012-05-20 19:44

Re: Entering text into Tk widget
 
I have tried Shift+Enter and Ctrl+Enter. No go... :(

electroaudio 2012-05-21 19:30

Re: Entering text into Tk widget
 
I just checked the sourcecode for tcl/tk but i am not knowledgeable enough to find the line where it gets into trouble.
sorry.


All times are GMT. The time now is 12:54.

vBulletin® Version 3.8.8