Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-12

Some questions about the development on GNU/Linux

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ugaciaka

Hi, I have a some questions about the development on Linux:

1. in a while loop I added application.processmanages to prevent the form locks but does not seem to be very successful
2. I tried to use screen.cursor: = crHourGlass, but the cursor not changes appearance
3. I saw that the ShowMessage lazarus takes the default gtk2 icons theme from the user chooses for his DE (I use xfce but it is the same for gnome). How can I do the same in bitbtn? That is, choose an icon that will be different for the theme chosen by the user?
4. I'm using a while loop in process to send commands to the shell but if I wanted to break the cycle by pressing a stop button as I do? I have to put some property perte active = false somewhere in the loop?

tnx

Reply by email

Juha Manninen
to ugaciaka
1. in a while loop I added application.processmanages to prevent the form locks but does not seem to be very successful 2. I tried to use screen.cursor: = crHourGlass, but the cursor not changes appearance

Application.ProcessMessages and Screen.Cursor: = crHourGlass work also with Linux.

I guess you have a CPU-intensive task running. Cursor may change with a short delay and you may not see it if the task was short.

ProcessMessages updates the visual controls but it really doesn't make the GUI more responsive. If the task is long and you want the GUI respond while it is running, you should use a thread (see TThread).

Regards,
Juha

Reply by email

ugaciaka
to Juha Manninen
Show quoted text 5 lines
Application.ProcessMessages and Screen.Cursor: = crHourGlass work also with Linux. I guess you have a CPU-intensive task running. Cursor may change with a short delay and you may not see it if the task was short.

I don't see cursor change and the time is almost a minute in to my while loop....

Reply by email

Juha Manninen
to ugaciaka

ugaciaka kirjoitti sunnuntai 19 joulukuu 2010 15:31:10:

I don't see cursor change and the time is almost a minute in to my while loop....

Tell more about your system.
Lazarus version?
Linux distro and its version?
Something special with your aplication? Etc...

I am developing on Linux and Screen.Cursor: = crHourGlass works fine.

Juha

Reply by email

Maxim Ganetsky
to ugaciaka: I don't see cursor change and the time is almost a minute in to my while loop....

19.12.2010 16:31, ugaciaka ?????:

Show quoted text 8 lines
> Application.ProcessMessages and Screen.Cursor: = crHourGlass > work also with Linux. > > I guess you have a CPU-intensive task running. Cursor may change with a short > delay and you may not see it if the task was short. I don't see cursor change and the time is almost a minute in to my while loop....

Create a bug report and attach to it a small test application, so this issue can be reproduced by developers.

Best regards, Maxim Ganetsky mailto:

Reply by email

Mark Morgan Lloyd
to Juha Manninen: ugaciaka kirjoitti sunnuntai 19 joulukuu 2010 15:31:10: Tell more about your system.…
Juha Manninen wrote 10 lines
ugaciaka kirjoitti sunnuntai 19 joulukuu 2010 15:31:10: > I don't see cursor change and the time is almost a minute in to my > while loop.... Tell more about your system. Lazarus version? Linux distro and its version? Something special with your aplication? Etc... I am developing on Linux and Screen.Cursor: = crHourGlass works fine.

Try changing the cursor property of the form, not of the screen.

Might depend on widget set, and could be deranged by any theme override.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

ugaciaka
to ugaciaka: I don't see cursor change and the time is almost a minute in to my while loop....

2010/12/19 ugaciaka :

Show quoted text 9 lines
> Application.ProcessMessages and Screen.Cursor: = crHourGlass > work also with Linux. > > I guess you have a CPU-intensive task running. Cursor may change with a short > delay and you may not see it if the task was short. I don't see cursor change and the time is almost a minute in to my while loop....

I write Screen.Cursor: = crHourGlass in different place and now work.

Now, I have problem with Application.ProcessMessages, if I change window ( any application like Firefox e.g.) my application in Lazarus is freeze and I could't see anything (button, grid etc), I see only the form.

Reply by email

Juha Manninen
to ugaciaka

ugaciaka kirjoitti keskiviikko 22 joulukuu 2010 20:59:17:

Now, I have problem with Application.ProcessMessages, if I change window ( any application like Firefox e.g.) my application in Lazarus is freeze and I could't see anything (button, grid etc), I see only the form.

Use a thread.

Juha

Reply by email