Re: [Lazarus] 1 keypress gives multiple letters ONLY in program written in Lazarus in raspbian jessie Pi 2

2016-04-11 Thread Giuliano Colla

Il 10/04/2016 21:16, Michael Thompson ha scritto:

I know this issue is resolved, but I've just stumbled across this:

http://wiki.lazarus.freepascal.org/Lazarus_Faq#Typing_under_Ubuntu_in_edit_fields_generate_duplicate_letters

We'll need to change Ubuntu now to Linux in general, but before I do 
that: Giuliano: Do you know if any of the steps listed here would have 
helped?  If not, can you let me know how you disabled the Input 
Manager, and I'll update the wiki accordinly.


I took the liberty of editing the Wiki entry, using all the information 
I have.


Please feel free to adjust as you deem proper.

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] 1 keypress gives multiple letters ONLY in program written in Lazarus in raspbian jessie Pi 2

2016-04-10 Thread Giuliano Colla

Il 10/04/2016 21:16, Michael Thompson ha scritto:
Giuliano: Do you know if any of the steps listed here would have 
helped?  If not, can you let me know how you disabled the Input 
Manager, and I'll update the wiki accordinly.


I have only hearsay knowledge, from this list complaints, and from some 
search on Internet I made because of that.
I'm not using Ubuntu or any other Debian/Ubuntu derived distro, and I do 
not have a direct experience.
I'm using the Red Hat distros line (RHEL, Fedora and CentOs) and I did 
never stumble into a similar problem.
Therefore take what I say with appropriate caution (and most of all do 
not use it in tribunal .)


However the problem appears to arise from the Keyboard Input Methods 
being enabled by default, even when no actual Input Method is assigned. 
From what I gathered, this problem popped up as with Ubuntu 11, and 
should be related to Gnome Desktop.
Previous versions were immune, but I can't tell if it was because ibus 
service wasn't used, or because Keyboard Input Methods were not enabled.


However the full picture is the following:

Input Methods are those methods which allow to accommodate languages 
with ideographic symbols which cannot possibly fit in a normal sized 
keyboard, such as Chinese.


Those user need also to enter Latin alphabet characters for system 
commands, therefore a keyboard shortcut is required to toggle on and off 
the Input Method.


The standard shortcut to toggle Input Method is ctrl-space, which 
happens also to be the standard code completion shortcut of Lazarus. 
This alone can be a cause of troubles.
Moreover, if the Input Methods are enabled, but no actual Input method 
is defined, toggling may lead to weird results, such as characters being 
entered twice, characters being lost etc.


The steps to overcome the problem are:

1) If Input Methods are required (e.g. a Chinese user), one of the two 
shortcuts must be changed.


2) If no Input Methods are required, they should be disabled. No general 
rule can be given on how to do that, because each Desktop environment 
does it its way. Gnome provides in System Settings an "Input Method" 
entry. KDE provides an Icon in the systray, but only if a specific Input 
Method package has been installed, otherwise the Input Methods are disabled.


3) If no Input Methods are required and the user is unable to disable 
the Input Methods, one can simply stop the ibus service, whose only 
purpose appears to be that of supporting the Input Methds. Again, how to 
do that is strongly system dependent.


I can't say if the steps indicated in the Wiki page are useful in 
general. From what I read GTK_IM_MODULE=gtk-im-context-simple
should be a better choice than gtk-im-context-xim which enables the old 
XIM (X Input Method) framework.
But it would require some testing in Ubuntu or Ubuntu siblings, and with 
different locale.


That's all I can tell.

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Trying to work around "Illegal character in format string"

2016-04-10 Thread Giuliano Colla

Il 10/04/2016 02:00, Graeme Geldenhuys ha scritto:

:-)   I still have 0.9.30 here in one of my Windows VM's. It still works
great!  If it ain't broken, don't fix it.;-)
Me too, in one of my USB disks. I happily keep it alive to support 
released software, but AFAIR it didn't handle too well chm help, and 
version 1.0 wasn't much better.


An "Illegal character in format string" error message makes it look a 
bit broken, IMHO ;-)


Giuliano

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Trying to work around "Illegal character in format string"

2016-04-09 Thread Giuliano Colla

Il 09/04/2016 21:00, Alan Corey ha scritto:

I guess I've got to get to the bottom of why I get this “Illegal
character in format string” error under OpenBSD.  I seem to be able to
work around it in programs I might write by taking the Run → Clean up
Build Files -> Clean up and Build approach.  But I don't seem to be
able to rebuild the IDE to add help packages


If your locale is not English, it might be an error in one translation file.
You may try to switch your Lazarus to English: 
Tools->Options->Environment->Desktop and set Language to English, and 
then retry.


Otherwise consider to update your Lazarus to a more recent version, 
because your 1.0.14 is quite old.


Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] 1 keypress gives multiple letters ONLY in program written in Lazarus in raspbian jessie Pi 2

2016-04-09 Thread Giuliano Colla

Il 09/04/2016 12:41, Dennis ha scritto:
But the SD Card was corrupted so I installed the latest raspbian OS 
jessie on the same Pi 2 on a new SD Card.
I reinstalled everything (e.g. mysql etc) and my program and it runs 
fine EXCEPT that pressing a key once will gives multiple letters.
BUT this problem only occurs with my program.   All other programs 
e.g. web browser and file managers , text editor DO not have this problem.


The villain could be some "input method" active.
Juus's suggestion is quite drastic, just kill the ibus service, which 
handles input methods.
Keyboard input methods configuration (setting to "none") could do the 
trick without killing all of the ibus services.


Giuliano

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] PDF generator: please test

2016-04-09 Thread Giuliano Colla

Il 09/04/2016 16:47, Graeme Geldenhuys ha scritto:

On 2016-04-09 14:44, wkitt...@windstream.net wrote:

interesting in what determines "correct"...

Алло мир!
Привет мир!
Здравствуйте мир!


That's my point exactly. I've seen the same thing in fpGUI's translation
files. Many different terms, all apparently meaning the same thing. Some
were considered "old style language" others "modern language usage",
some based on Context.


Given the context, which is to test a PDF generator, and not to find the 
best way to greet the world in Russian :-) , I'd say that Здравствуйте 
мир! is to be preferred, because it has a higher number of characters!

Even better would be Электро́нная вычисли́тельная маши́на, meaning "Computer".

Giuliano*
*

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Digest, Vol 99, Issue 32

2016-04-09 Thread Giuliano Colla

Il 09/04/2016 16:41, Juha Manninen ha scritto:

Comments are overrated.
If you think of them as "deodorant masking fishy code" then less
comments is better.


Comments may help to clarify what is obvious to you at the moment of 
writing, but not to anybody else, and maybe even to you some time later.


You are right that usually commenting code is not very useful. Well 
written code is most of the times self documenting, even if *most of the 
times* doesn't mean *always*.
Commenting variables, on the other side, may be crucial for the 
understanding, and not always names are or can be self explanatory. The 
same holds true for procedure parameters, and function results.


I remember reading long time ago the assembler source code of an Intel 
Real-time nanokernel, where I couldn't grasp what a "crflag" variable 
was used for. It appeared to have to do with some kind of data 
protection but it was rather unclear.


Then the same nanokernel was rewritten in PLM which allows for longer 
identifiers, and "crflag" was renamed "CriticalRegionFlag": suddenly 
everything became clear. The purpose and the usage of the flag became 
obvious. If the declaration of crflag had carried a short comment 
"critical region flag", the assembler code would have been much clearer.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Digest, Vol 99, Issue 32

2016-04-09 Thread Giuliano Colla

Il 09/04/2016 16:22, Juha Manninen ha scritto:

On Sat, Apr 9, 2016 at 5:07 PM, Giuliano Colla
<giuliano.co...@fastwebnet.it> wrote:

Because without a minimal amount of documentation all this valuable work
risks to be useless, because:
- nobody except a few core developers know of its existence
- nobody except the developer itself knows how to use it

LCL is documented more or less.
I guess you mean the IDE internals are not documented. It is true,
their documentaion has low priority compared to public libs.
I also would love to see high level diagrams and other docs about the
IDE. Like always, somebody must do it.
Maybe you ... :)


My comment was about the portions of your or other's valuable work (IT 
IS VALUABLE, you can say it loudly) which aren't documented, or are 
poorly documented. (the *less* sections of the *more or less*)
And to stress to developers (myself included, I'm as documentation lazy 
as anybody else around here, maybe more..) the importance of letting 
other people understand exactly what it's been done, so that it is 
widely used, giving the only possible reward to Open Source developers: 
their work is not just an idle exercise, but it is actually used.


There is a specific moment in the development cycle when a developer can 
find the time to write some documentation: it is between the submitting 
of his patch/implementation/enhancement/whatever, and the testing from 
others. In this stage it would be unwise to change something before 
receiving some feedback, and the developer has still a fresh memory of 
what he's done. If he is encouraged to do it, chances are good that he 
will comply. And chances are also good that while browsing what he's 
just done, he will spot and fix a couple of bugs


Giuliano




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Digest, Vol 99, Issue 32

2016-04-09 Thread Giuliano Colla

Il 09/04/2016 14:03, Juha Manninen ha scritto:

Why all this valuable work from me and from other developers is ignored?


Because without a minimal amount of documentation all this valuable work 
risks to be useless, because:

- nobody except a few core developers know of its existence
- nobody except the developer itself knows how to use it

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Digest, Vol 99, Issue 32

2016-04-09 Thread Giuliano Colla

Il 08/04/2016 21:13, Juha Manninen ha scritto:

Welcome to open source.
Instead of complaining here and wasting everybody's time, you could
have improved the documentation yourself and provide a patch.


In principle you're right. However you should take into account some 
other factors.


Frequently users do complain when a problem arises which they are unable 
to solve by themselves.


Asking them to provide a patch doesn't help too much.

On the other hand there is something that could be done to improve the 
situation, and to encourage contributors to help improving the 
documentation.


There's a number of core developers, which set the rules of the game, by 
evaluating contributions, supervising them and accepting or rejecting 
depending on their view of what the product should look like.


It wouldn't be unthinkable that a contribution be evaluated also in 
terms of documentation. Appropriate comments in the source code make 
almost easy to generate a good documentation.


An answer such as: "Your patch is good, it adds a desirable 
functionality, but without proper documentation, nobody will be able to 
take advantage of it. Please add some concise comments on variable and 
procedure usage, and we will be glad to commit it." would do a lot of 
good, IMHO.


Should this become a general rule, the situation might strongly improve 
with time.


Just my 2 cents.

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] *** GMX Spamverdacht *** Re: Suggestion for TRadioGroup documentation

2016-04-08 Thread Giuliano Colla



Il 08/04/2016 18:56, Jürgen Hestermann ha scritto:
> If NASA or Airbus or Boeing engineers would use that approach, I 
guess a lot of rockets, planes and whatnot would fall on our heads.

> I am glad they do not seem to have this attitude.

I am not sure that they do not have it.
I saw a report on TV about a test flight of the A380 some years ago
where technicians were wondering, why the air craft computer was
pumping fuel from one tank to the other in a certain flight situation.
It seemed they needed a lot of time to find it out.
I would have expected that the complexity was not driven to a point
where even the engineers do not fully understand what they have built.
Could be that we just had a lot of luck.


This is more about *reading* the documentation, or maybe to 
*understanding* it, which is the subsequent step, once a decent 
documentation is available.


As the complexity increases, you cannot fit in the same page all the 
relevant information, and you must rely on reader's capability of 
understanding that what is stated at page 10 may carry implications to 
what is stated on page 900. This holds true for Airbus or Boeing, and 
for Lazarus and FPC.


I'm not an expert in avionics, but from my general knowledge even I 
could have told them the reason for pumping fuel from one tank to 
another, which is to balance the weight on the wings (fuel tanks are 
located on the wings). This function must be handled by some part of 
software related to the aircraft flight attitude most likely fully 
documented, but completely apart from the section which takes care of 
pumping fuel to motors!


A very similar case occurred with one of the first Airbus of Lufthansa. 
At landing it didn't stop at the end of the runway, and ended up in a 
cabbage field.

The subsequent investigation revealed that:

 * The Airbus had a protection preventing the reverse thrust if the
   landing gear isn't touching the ground. Reverse thrust was enabled
   only when all the wheels touch the ground.
 * Lufthansa procedure, in case of crosswind, is the sideslip landing,
   meaning the right (or left) wheels of the landing gear will touch
   ground much later.
 * As a consequence, in case of strong crosswind, reverse thrust was
   enabled too late.

It would appear that someone was unable to detect the problem generated 
by two fully documented facts, until an aircraft ended up in a cabbage 
field.


This sort of things do happen even when documentation is good, so let's 
imagine what may happen if documentation is poor or missing!


Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Instalation on win 10

2016-04-05 Thread Giuliano Colla

Il 05/04/2016 18:30, Bart ha scritto:

Just install a decent OS.
(Sorry, couldn't resist)

+1

Giuliano

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] German umlauts in component names

2016-04-05 Thread Giuliano Colla



Il 02/04/2016 10:14, Special ha scritto:
How can I use names with German Umlauts and 'ß' in the Name Field of 
TButton components? For instance, I try to set MyButton.Name to 
"Schließenbutton" and get an error message "Komponentenname 
Schließenbutton ist kein gültiger Bezeichner".


Using characters above ascii 127 in a multiplatform environment such as 
Lazarus and FPC means looking for troubles. Such is not the case for 
Delphi which is limited to the Windows platform (and manages to make a 
mess with character encoding even there, BTW).


Any simple text editor can convert your "Schließenbutton" to 
"Schliessenbutton" (and your "kein gültiger" into "kein gueltiger", if 
you like), which are perfectly readable by any German reader and do not 
cause any subsequent trouble.


As a side note, to play music you need to learn a number of Italian 
words, because of the prevalence of Italian composers and performers in 
the past centuries.
To write computer programs you need to manage some basic English for 
pretty much the same reasons.


Just my 2 cents.

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request: Disable/clear the "Recent files" and "Recent projects" lists

2016-03-29 Thread Giuliano Colla

Il 28/03/2016 20:25, Ondrej Pokorny ha scritto:

On 28.03.2016 18:14, max.lemradt2 wrote:
I'd like to be able to disable or clear the "Recent files" and 
"Recent projects" lists, e. g. for privacy reasons.


I will probably never use it but if you need it, feel free to create 
such a function and send a patch to mantis. A good place would be to 
create a button in Options -> Environment -> Files.




Please do not overload Lazarus with useless features.
Removing "Recent Files" and Recent Project" entries without actually 
removing the actual files/projects, is simply stupid. Anyone accessing 
the system can list files/directories and from the dates know exactly 
which files/projects were accessed, or modified.
If whatever paranoid need of privacy is an issue, files and projects 
should be kept in a removable support: when the support is removed the 
Recent items which become inaccessible are removed from the list, 
without the need of any extra feature.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Form Resizing

2016-03-06 Thread Giuliano Colla

Il 06/03/2016 18:27, Bo Berglund ha scritto:
[...]

I have no idea what you mean by this statement...
What is LXDE and how do I test Lazarus for LXDE?

[...]

Apart fromn that I
have no idea how to use svn, which I assume you mean I should do.



A general hint: whenever you don't know what an acronym means (such al 
LXDE = Lightweight X11 Desktop Environment, which btw is most likely the 
desktop you're using), or how to take advantage of a popular control 
version program like svn, just type its name in a Google search, and 
you'll get all the information, tutorials and discussions you might 
wish, in order to understand what is it, get acquainted with it, use it 
and be aware of its features and bugs.


Just my 2 cents,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Giuliano Colla



Il 24/02/2016 22:49, Mattias Gaertner ha scritto:

Skepticism: what software became better after acquisition by Microsoft?

This is quickly going off-topic.
If you want to answer this question please use fpc-other.

Or better alt.destroy.microsoft ;-)

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] /usr/bin/ld: cannot find -lwhatever

2016-02-21 Thread Giuliano Colla



Il 21/02/2016 18:41, David W Noon ha scritto:

You should not put .o files into library directories. You should use
the ar command to build a library and put the resulting .a file into
you library directory.

E.g.,

 ar -crs libsomething.a something.o


Thanks a lot. I wasn't aware that I must prepend *lib* to the library 
name. Just renaming my link to something.so into libsomething.so did the 
trick!


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] /usr/bin/ld: cannot find -lwhatever

2016-02-21 Thread Giuliano Colla



Il 21/02/2016 16:29, Vojtěch Čihák ha scritto:


Probably not your case but when you add manually libs to system 
(/usr/lib or /usr/local/lib), you need to run


ldconfig

as superuser in terminal so the system rescans available libraries.



I'm aware of that, and I did it, but no luck:-(

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] /usr/bin/ld: cannot find -lwhatever

2016-02-21 Thread Giuliano Colla

Hi,

I'm need to link some C modules to a Lazarus app.

I started with just a minimal console app, and one module, I've created 
with h2pas the binding module, and edited to make it compile properly, 
but when it comes to link I get the "cannot find" error.


I tried both a mymodule.o object and a mymodule.so shared object.

I tried putting the .o/.so in the source directory, in the unit 
directory, and in /usr/lib64 directory (with an ldconfig to update ld 
cache).


I tried declaring the external library just with the module name, and 
with the full path.


I tried adding the path where the .o/.so file is located in the -Fl path 
of the Compiler Options.


The result is always the same: cannot find -lwhatever, with "whatever" 
reflecting exactly my external library path/name.


I'm at loss. What I'm missing?

Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Bring on the virgins, nintendo 3ds --> lcl?

2016-02-20 Thread Giuliano Colla

Spam filter failure?


Il 20/02/2016 05:04, year0097ic ha scritto:

threshold Anix Spec in millions @ 50 3DS & 154 DS

Vie-IT Nand backup & let radio-freedom for cring, did the have any "non
smothered renascence re invent calculator" on them?
cake & file downgrade sevice downto FirmWare 4.2.0-9U. Starting @ Only
$29.95 per seat live from Las-Israil
FirmWare's 5.*.*-* add $5
FirmWare's 6.*.*-* add $10
FirmWare's 7.*.*-* add $15
FirmWare's 8.*.*-* add $20
FirmWare's 9.3.*-* add $25

Or that you have a democracy on R reach around can be provided 2 U "a
free-pascal 3DS nintendo solution"
also R staring
Personally achieved article in pascal (int64 <-> sting)
kumbaya_slumlord and an evictions latter 2 cum

Sizable financial offering and sockets gods will be favorable to and smile a
pone the pro-liter-riot's



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Bring-on-the-virgins-nintendo-3ds-lcl-tp4046615p4047309.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-16 Thread Giuliano Colla

Il 16/02/2016 17:29, Maxim Ganetsky ha scritto:

As a result people using this feature will need to remove their .lrt
files and save all affected forms again in order to generate .lrj files.
No other changes should be needed.

Any comments?


To actually provide the benefit to users, it would be nice if the 
transition process would be made automatic in Lazarus IDE.
I.e.: If in Project Options "Enable i18n" and "Create/update .po file 
when saving" are both ticked,  a "Compile" should check for the presence 
of  .lrt files and behave accordingly, i.e. remove .lrt files and 
generate again what required.


Is that possible?

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-16 Thread Giuliano Colla

Il 16/02/2016 10:04, Michael Schnell ha scritto:

a (potential) bug (in "Glib2" whatever this exactly means)


Glib2 means version 2 of GTK Glib, which is used by Qt (and by GTK) to 
implement the main event loop.

libglib-2.0.so.0

The full picture (from stack trace) is as follows:

1. The main loop of Lazarus (under Qt WS) calls AppWaitMessage in
   qtobject.inc
2. qtobject calls QCoreApplication::processEvents in qcoreapplication_c.cpp
3. qcoreapplication_c.cpp calls QEventDispatcherGlib in libQtGui.so.4
4. QEventDispatcherGlib calls g_main_context_iteration in
   libglib-2.0.s0.0 (the Glib2)
5. if g_main_context_iteration has pending messages, it calls
   g_main_context_dispatch
6. g_main_context_dispatch calls QCoreApplicationPrivate::sendPostedEvents

When the user code calls Application.ProcessMessages the same sequence 
occurs:
AppProcessMessages in QtObjects.inc is called, which then calls 
QCoreApplication::processEvents, and all the steps from 2 on are identical.


My feeling is that the bug is sort of this: if the call to 
Application.ProcessMessages causes a recursion, and a new different 
message has arrived in the meantime, g_main_context_iteration() 
understands rightly that there is a pending message to dispatch, but it 
decides wrongly to dispatch again the old one, instead of the new one.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-16 Thread Giuliano Colla

Il 16/02/2016 10:04, Michael Schnell ha scritto:
Anyway, IMHO it's not a good idea to fight a (potential) bug (in 
"Glib2" whatever this exactly means) by implementing a completely 
queer behavior in Application.ProcessMessage. 


I fully agree with you. Seeing a unexpected recursion, I had started 
believing that somehow Application.ProcessMessages could be the 
responsible. But if the problem is elsewhere, it should be fixed 
elsewhere, by someone knowing what he's doing.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-15 Thread Giuliano Colla

Il 15/02/2016 11:54, Michael Schnell ha scritto:

On 02/13/2016 12:27 PM, Giuliano Colla wrote:


At least under Qt widgetset, it may happen that calling 
Application.ProcessMessages from within a Message Handler will cause 
the same message which was being processed to be processed again, the 
handler called again and Application.ProcessMessages being called 
again, thus originating an endless loop and a consequent stack overflow.


When calling Application.ProcessMessages from within a Message Handler 
the *next* event in the event  queue should be handled. If 
*the*event*already*being*handled* pops up again, that would be a bug. 
But of course "the same" message might have pushed by some thread and 
also needs handling. Here the same handler might be called 
recursively. This of course does need additional stack space, but not 
infinitely .


I'm positively sure that the message being handled is *the same* for a 
number of reasons.
It is identified by an "errorstring" which from the stack dump is always 
the same.
It cannot be sent more than once, because where it originates it waits 
for a user error reset, before sending the next. Moreover, the error 
messages originate in a real-time part, which has a pool of just 40 
messages, therefore it can't possibly send 1722 messages.
The same code has been field tested in hundreds of application which 
have been running for many years (since 2005), with the only difference 
that the messages were handled in the OnIdle Handler, waking up the main 
thread periodically with a timer event, instead of waking up the main 
thread with a PostMessage.







The result is to make Application.ProcessMessage not 100% reentrant, 
because of a Glib2 bug.
Would you suggest not to handle "the same" event ? How should you 
detect that its the event already in the works or the next occurrence  ?




In the case I've stumbled into, when next message eventually comes 
(after 1722 iterations over the previous one) the program crashes for a  
SEGFAULT, most likely generated by a stack overflow.


Giuliano




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus on my ancient computer?

2016-02-14 Thread Giuliano Colla

Il 14/02/2016 19:04, Bart ha scritto:

In 2005 the first 64-bit Celeron D model saw light.


Yes but it was a 2.6Ghz or something.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus on my ancient computer?

2016-02-14 Thread Giuliano Colla

Il 14/02/2016 15:14, Bart ha scritto:

As for WM's: I'm used to KDE, but that might probably be a bit too
heavy fo this old beast, so I don't mind experimenting with another,
more light weight, one.
That being said, the OS should come with GTK2 (and maybe QT) libraries
in order to have a functional Lazarus.


For OS I'd encourage you to CentOs 6. It provides long term support, 
with a life span of 10 years.
IMHO CentOs 7 is too young, and has still a lot of things to be ironed 
out. It is rpm based, which might be handy if you're used to rpm as 
opposed to deb. Other distros change too frequently, and force you to 
upgrade the full system instead of just updating what needs updates.


But, whichever OS you decide to pick up, if you're used to KDE, you 
might consider TDE as WM.


It's nothing but the old faithful KDE 3.5 (which I've been happily 
running in a hardware setup similar to the one you mention) ported to 
the more recent distros, by a group of former KDE developers and 
maintainers, unhappy with the road taken by KDE 4 (and now KDE 5), 
which, with the "Plasma" and "plasmoids" things has become too heavy, 
bloated, and buggy beyond hope.


See:
https://www.trinitydesktop.org/

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus on my ancient computer?

2016-02-14 Thread Giuliano Colla

Il 14/02/2016 16:34, Giuliano Colla ha scritto:

That being said, the OS should come with GTK2 (and maybe QT) libraries
in order to have a functional Lazarus. 


Another important thing to consider is 32bit architecture support: many 
modern distros only support x86_64, to avoid the hassle of providing a 
double for everything. I'm pretty sure that Intel never made a 64 bit 
Celeron clocked at 700Mhz.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-13 Thread Giuliano Colla

Il 12/02/2016 15:35, Michael Schnell ha scritto:

On 02/12/2016 03:17 PM, Mattias Gaertner wrote:
IMHO, Michael, you should not redefine words. It confuses people. 
Reentrant means it can be called again, while it is still running. It 
does not need to be thread-safe. 


Sorry that was not me. The subject here is " thread save " ,so 
I tried to explain exactly the difference you mention.




It was possibly me causing the confusion.

I was experiencing random crashes triggered from a PostMessage executed 
in a different thread.


My first assumption was that possibly PostMessage wasn't thread safe, 
and this is the reason of the subject of my first post.


Further analysis has shown that this was not the case. It was not a 
matter of thread-safe, but a matter of recursion.


At least under Qt widgetset, it may happen that calling 
Application.ProcessMessages from within a Message Handler will cause the 
same message which was being processed to be processed again, the 
handler called again and Application.ProcessMessages being called again, 
thus originating an endless loop and a consequent stack overflow.


All of that apparently originates in the g_main_context_iteration() 
procedure of Glib2, which, in some cases, doesn't properly terminate a 
dispatch operation, and in case of recursion will execute again a 
g_main_context_dispatch() for a message already dispatched. As it is 
g_main_context_iteration() responsibility to decide which procedures to 
call and when terminate, it is its responsibility to provide appropriate 
protection from recursion.


Looking into the code of gmain.c of Glib2, and in different versions, it 
can be seen that attempts have been made to avoid the problem, but 
apparently there's still a hole left.


The result is to make Application.ProcessMessage not 100% reentrant, 
because of a Glib2 bug.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Giuliano Colla

Il 12/02/2016 02:41, Martin Frb ha scritto:
Actual hiding is more work, because it needs to shift x positions in 
some line. Probably needs big changes. Though readonly may be doable.


IMHO such a feature would be typically used to read and understand code, 
therefore read-only is not only acceptable, but desirable.


Giuliano




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-11 Thread Giuliano Colla

Il 10/02/2016 21:13, Giuliano Colla ha scritto:
I don't believe that there's an easy way to protect 
Application.ProcessMessages from recursion unless someone is willing 
to debug and patch Glib (which is used not only by Qt, but also from 
GTK, if I'm not wrong).


A snippet from gmain.c:

#if 0
  /* If recursing, finish up current dispatch, before starting over */
  if (context->pending_dispatches)
{
  if (dispatch)
g_main_dispatch (context, _time);

  UNLOCK_CONTEXT (context);
  return TRUE;
}
#endif



It would appear that they realized the dispatch recursion problems but 
where unable to find a clean solution!
This code appears both in glib-2.28.8 (the one coming with CentOs 6, 
which I've been using) and in the current version i.e. glib-2.47.5.
My feeling is that it's been left there as a reminder that the matter is 
still pending.

I'm afraid we must live with it.

Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-10 Thread Giuliano Colla

Il 10/02/2016 13:48, zeljko ha scritto:

I believe
that Application.ProcessMessages should protect itself too, avoiding to
handle more than once the same message.


But where ? In LCL or per widgetset ? 


I skimmed through the backtrace. It would appear that the recursion 
originates in g_main_context_iteration() which calls 
g_main_context_dispatch(), which will continue to dispatch the same 
message. I don't believe that there's an easy way to protect 
Application.ProcessMessages from recursion unless someone is willing to 
debug and patch Glib (which is used not only by Qt, but also from GTK, 
if I'm not wrong). Personally I  give up.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-10 Thread Giuliano Colla

Il 10/02/2016 00:18, Denis Kozlov ha scritto:
Is your LM_ERROR larger than LM_USER? 


Yes :

const
LM_ANSWER= LM_USER + 100;
LM_MESSAGE   = LM_USER + 101;
LM_ERROR = LM_USER + 102;

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-10 Thread Giuliano Colla

Il 10/02/2016 00:22, Denis Kozlov ha scritto:
You create a recursive scenario yourself by calling 
Application.ProcessMessages inside of ShowError inside of HandleError 
- which is the message handling procedure itself, which is triggered 
by Application.ProcessMessages. 


That's what I had guessed, but having it confirmed makes me feel better.

Moreover my ShowError is not protected from recursion, because 
Application.ProcessMessages is called before incrementing ErrGet. 
Therefore in case of recursion, it will attempt to process again the 
same message.


I would appear that also Application.ProcessMessages is not protected 
against recursion, which is possibly a bug.


Thanks a lot,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-10 Thread Giuliano Colla

Il 10/02/2016 08:44, zeljko ha scritto:

1.Your ErrList access does not look thread safe.


It's a poor man's thread safe queue, implemented as a ring buffer, with 
two indexes, ErrGet and ErrPut. It's fully safe, provided the buffer is 
guaranteed not to overflow, and that ErrPut is updated only after the 
buffer has been written. Only the sending thread writes the buffer and 
ErrPut, while the receiving thread only writes ErrGet, and reads just 
once ErrPut.
This mechanism has been tested by some billion messages passing in the 
years through it, by Kylix applications running 7/7 24h/24h in several 
hundreds locations.


It's not that there have been billions if errors:-) , but an identical 
setup is used to update informations at a rate of 8/10 per second. Only, 
in Kylix I couldn't use PostMessage, and it was processed in an OnIdle 
handler.



2.You are casting postMessage param as integer, IMO it's wrong,
shouldn't it be PtrInt or LPARAM ?
PostMessage(Form1.Handle,LM_ERROR, LPARAM(ErrPut),0);

PostMessage param is not actually used.

3.Application.ProcessMessages probably recurse.


This I believe to be the problem. From the observations from Denis I 
realized that my code isn't protected against recursion, but I believe 
that Application.ProcessMessages should protect itself too, avoiding to 
handle more than once the same message.


However thanks a lot,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-10 Thread Giuliano Colla

Il 10/02/2016 12:31, zeljko ha scritto:

On 02/10/2016 11:19 AM, Giuliano Colla wrote:


This I believe to be the problem. From the observations from Denis I
realized that my code isn't protected against recursion, but I believe
that Application.ProcessMessages should protect itself too, avoiding to
handle more than once the same message.


But where ? In LCL or per widgetset ?



I don't know. I did look into the code a long time ago, and I seem to 
remember that the main loop is handled differently: some widgetsets do 
rely on LCL, some on their main loop. I was hoping that someone more 
knowledgeable than me would say "oh yes, the right spot is just here!".
If such is not the case, I'll try, as soon as I have some time (which I 
don't have at the moment), to look again into the matter, and possibly 
suggest a patch.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-10 Thread Giuliano Colla

Il 10/02/2016 22:12, C Western ha scritto:
My understanding is Application.ProcessMessages has to be reentrant 
for the clipboard to work, at least under X, as clipboard content is 
retrieved by receiving messages. See 
http://bugs.freepascal.org/view.php?id=26242 for a (fixed) bug that 
showed this up. The sequence is something along the lines of (for 
example) ProcessMessages -> Handle paste button -> clipboard -> 
ProcessMessages.


Well, in general it appears to behave, otherwise a lot of code would fail.
I just stumbled in a special case, when Application.ProcessMessages is 
called from within the handler of a message posted by a PostMessage from 
a different thread. It would appear that, under some circumstances 
(because the error appears randomly), there's a bug which causes it to 
pass again the same message, thus causing and endless loop. It's the 
recursion in this specific case which appears to be buggy.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-09 Thread Giuliano Colla

Hi Lazarus guru's,

I have stumbled into a problem with a Lazarus application. At random 
times, from 5 minutes to several hours, it crashes suddenly, and silently.

The only way to get a clue has been to run it with gdb.

It turns out that the crash occurs because of a Segmentation Fault in 
QTextEngine, triggered by a PostMessage, but apparently the cause was an 
endless loop in a previous PostMessage, which was executed some 1723 
times. Attached the gdb stack trace (with 1722 identical items suppressed).


The scenario is a main thread using LCL, which is used, among other 
things not relevant here, to display information to the user, and 
another thread which communicates with a real-time process, and uses a 
PostMessage to wake up the main thread and make it show what required.


It appears that in some circumstances, the Application.ProcessMessages 
invoked in the main thread restarts the handling of the same message, 
thus creating and endless loop.


Is Application.ProcessMessages the vilain, or PostMessage or what?

Snippet of auxiliary thread code:



procedure TSendRec.DoDisplayError;
var
  Box: integer;
begin
   ErrList[ErrPut] := ErrMsg;
   inc(ErrPut);
   if ErrPut > High(ErrList) then ErrPut := 0;
   {$IFDEF USE_MESSAGES}
   PostMessage(Form1.Handle,LM_ERROR,Integer(ErrPut),0);
   {$ENDIF}
end;


Snippet of main thread code:


procedure TForm1.HandleError(var Msg: TLMessage);
var
.
begin
  inc(ErrorCnt);
  if ErrGet <> ErrPut then begin
ErrMsg := ErrList[ErrGet];
...
AnswerString := Format('UNIT %XH device %s ERROR
%XH',[ErrMsg.yunit,Localize(NamUn[ErrMsg.device]),ErrMsg.ytype]);
ShowError(Self,Answerstring,BoxError[Box],Box);
inc(ErrGet);
if ErrGet > High(ErrList) then ErrGet := 0;
end;
end;

procedure TForm1.ShowError(Sender: TObject; errorstring: string;
Berror: TBoxerror; ErrBox: Integer);
var
...
begin
. (code to fill up Panel4)
  Panel4.Show;
  Panel4.BringToFront;
  Application.ProcessMessages;
  ResetBtn.SetFocus;
end;


Thanks for any help

Giuliano


[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe7a90700 (LWP 4310)]

Program received signal SIGSEGV, Segmentation fault.
0x003d6a7dc904 in QTextEngine::itemize() const () from /usr/lib64/libQtGui.so.4
#0  0x003d6a7dc904 in QTextEngine::itemize() const () from /usr/lib64/libQtGui.so.4
#1  0x003d6a6f1fc9 in QPainter::drawText(QPointF const&, QString const&, int, int) () from /usr/lib64/libQtGui.so.4
#2  0x77d297db in drawText (handle=0x1729710, x=10, y=33, s=0x7f805578) at /usr/include/QtGui/qpainter.h:916
#3  QPainter_drawText3 (handle=0x1729710, x=10, y=33, s=0x7f805578) at src/qpainter_c.cpp:865
#4  0x00751061 in DRAWTEXT (this=0x7fffe9ca2300, X=10, Y=33, S=0x7f805578) at qt/qtobjects.pas:2832
#5  0x006d190d in EXTTEXTOUT (this=0x748d5730, DC=140737115726592, X=10, Y=20, OPTIONS=0, RECT=0x0, STR=0x7fffe9ca7990 '1 Â'#150, COUNT=4, DX=0x0) at qt/qtwinapi.inc:2291
#6  0x00595551 in EXTUTF8OUT (this=0x748d5730, DC=140737115726592, X=10, Y=20, OPTIONS=0, RECT=0x0, STR=0x7fffe9ca7990 '1 Â'#150, COUNT=4, DX=0x0) at include/intfbaselcl.inc:214
#7  0x0057e41c in EXTUTF8OUT (DC=140737115726592, X=10, Y=20, OPTIONS=0, RECT=0x0, STR=0x7fffe9ca7990 '1 Â'#150, COUNT=4, DX=0x0) at include/lclintf.inc:147
#8  0x005c2890 in TEXTOUT (this=0x7fffea0eed80, X=10, Y=20, TEXT=0x7fffe9ca7990 '1 Â'#150) at include/canvas.inc:1360
#9  0x004e6fec in POSWRT (PIMAGE=33286, SYM=144 #144, BGCOL=0, FGCOL=65280, CANVAS=0x7fffea0eed80, POS=...) at USequen.pas:547
#10 0x004e7b8b in DISPLCOD (DEVICE=FEEDER1_DEV, DISPLCORR=false, B=...) at USequen.pas:761
#11 0x004fca93 in HANDLEMESSAGE (this=0x748d7790, MSG=...) at USequen.pas:5779
#12 0x004b47a1 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#13 0x004fc128 in ?? ()
#14 0x748d7790 in ?? ()
#15 0x0003 in ?? ()
#16 0x0465 in ?? ()
#17 0x7f8062e8 in ?? ()
#18 0x748d7790 in ?? ()
#19 0x0001 in ?? ()
#20 0x7fffe009ac60 in ?? ()
#21 0x7fffe009ac60 in ?? ()
#22 0x00d645d4 in ?? ()
#23 0x00e5ad10 in ?? ()
---
The following section repeated 1723 times:
#24 0x00602c6f in WNDPROC (this=0x748d7790, THEMESSAGE=...) at include/control.inc:2112
#25 0x005f3dc4 in WNDPROC (this=0x748d7790, MESSAGE=...) at include/wincontrol.inc:5341
#26 0x004d1afe in WNDPROC (this=0x748d7790, THEMESSAGE=...) at include/customform.inc:1443
#27 0x0072918d in DELIVERMESSAGE (this=0x7fffec014630, MSG=0, AISINPUTEVENT=false) at qt/qtwidgets.pas:5549
#28 0x00726cfc in SLOTLCLMESSAGE (this=0x7fffec014630, SENDER=0xe5ad10, EVENT=0x7fffe009ac60) at qt/qtwidgets.pas:4353
#29 0x007232c8 in EVENTFILTER (this=0x7fffec014630, SENDER=0xe5ad10, EVENT=0x7fffe009ac60) at qt/qtwidgets.pas:2678
#30 0x0072d364 in EVENTFILTER 

Re: [Lazarus] Panel Top Negative Limitation

2016-02-05 Thread Giuliano Colla

Il 04/02/2016 18:51, i...@voiceliveeditor.com ha scritto:

Hi
I have a problem using a panel, that is large say 7.
If I try to bring areas of this into the view area by using 
panel.top:=-avalue, this works fine until you hit –32769; at which 
point the panel vanishes.

How can this be corrected; or is there a workaround?


What I'd do in your place would be to use a TBitmap of the required size 
and populate it with whatever image you need. You're just working in 
memory, no visual components implied, you shouldn't have any constraint 
in its size. Then you may copy to the canvas of the visual object just 
the portion you want to show.

It should work quite smoothly.

Giuliano

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Web vs desktop development

2016-01-15 Thread Giuliano Colla

Il 15/01/2016 18:29, Anthony Walter ha scritto:

On a programming web forum someone said regarding Lazarus:

On just cursory review, looks compelling. However, I get so little 
call these days for native/desktop applications. Seems everyone wants 
web now.




I agree with your points, but I'd like to add something more.

I believe that the first task of a designer is to pick up the most 
*appropriate* technology to solve the given problem, without being 
influenced by what is fashionable, "modern" or "cool".


My favourite example are the newspapers and the tomb stones.

From the beginning of civilization, important news were graved in stone 
slabs.
When paper and printing were invented, the new technology appeared much 
more appropriate, and the stone slabs were replaced by newspapers. With 
the advent of the Internet, a new technology has become available to 
spread news and information, which is faster and cheaper, provides a lot 
of extra features, and it is replacing the printed paper technology in 
many domains. The most appropriate technology prevails.


When it comes to a tombstone, it's stone age technology, but up to now 
nothing better has been found to put over a grave than a graved stone, 
so the stone age technology remains the most appropriate choice.


The same technology has been obsoleted twice for one application, but 
remains the most appropriate for another.


If an application is meant to run locally, with local data and local 
resources, making it a web application will inherit all the 
disadvantages of web, without any advantage. It would not be the 
appropriate choice.


If an application is run by a number of users scattered in different 
places and takes advantage of common information which can be held in a 
common server, then a web application is the best choice.


Intermediate cases must be carefully analysed, evaluating pros and cons, 
to pick up the most appropriate solution. A straight assumption "web is 
better" or "desktop is better" leads to poor results, if not to failures.


I'm running a consultant company, and frequently we have discussion with 
our customers trying to tell us not only what they want, but also how we 
should do it.
We always tell them that we may guarantee a good result only if we're 
free to pick up the most appropriate solution, disregarding the fashion 
of the day.
That way, in over thirty-five years of activity, we never failed a 
single project. I consider among our successes the few instances when we 
have been unable to convince our customers to accept our way, and 
therefore we decided to turn them down. They addressed elsewhere, and 
failed!


My 2 cents,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-09 Thread Giuliano Colla

Il 09/01/2016 14:09, Juha Manninen ha scritto:

What if come up with library that draws all important symbols?


Well, of course you're free to do with your time whatever you please or 
feel right about.


But please consider the following.

The Internet is crowded with drawings of all conceivable symbols. There 
are myriads of such collection:

https://en.wikipedia.org/wiki/Category:Political_symbols_by_ideology
https://www.google.it/search?q=political+symbols=lnms=isch=X=0ahUKEwjUxMe8m53KAhWCwBQKHVgNBXsQ_AUIBygB=1440=636
https://www.google.it/search?q=religious+symbols=1440=636=isch=u=univ=X=0ahUKEwjxhJOenJ3KAhUHRhQKHcQNDL4QsAQIHg

On the other hand there's only a handful of good Lazarus programmers and 
developers.


The Open Source community provides a common ground where people of 
different religions, of different political opinions, coming from 
different countries, sometimes at war the one against the other, work 
together for a common goal, and learn to respect and appreciate each 
other for what they are and what they can do, disregarding any 
religious, political or ethnic label they carry.


Just take a look to the list of the Lazarus contributors and of the 
Lazarus mailing list to understand what I mean. You'll spot there Arabs 
and Jews, Americans, Russians and Chinese, whites, blacks and yellows, 
people coming from the richest countries of the world and people coming 
from the poorest, etc. etc. (I failed to locate Native Americans and 
Inuit, but possibly only because of e-mail nicknames ambiguity)
You'll also notice that fpc and Lazarus (as most of the OS projects) try 
to support at the same time the latest technology for the lucky ones 
living in rich countries, and the older ones for those who can't afford it.


IMHO what you're currently doing, i.e. doing your best in an OS project 
is a much more substantial way to contribute to the world peace, than 
spending time in another symbol library which would just add to the many 
existing and pass completely unnoticed.


Back to the original thread subject, IMO the best course is simply to 
remove the PaintSwastika procedure, which is out of place in a small 
collection of simple graphic shapes, and only risks to give a pro-Nazi 
flavour to the collection, instead of losing time in populating the 
collection with all the other conceivable symbols, which most likely 
nobody is ever going to insert in a Lazarus program.


Just my opinion,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Do we really need a PaintSwastika procedure?

2016-01-08 Thread Giuliano Colla

Il 08/01/2016 18:47, Juha Manninen ha scritto:

No, this project must be politically NEUTRAL instead.


I perfectly agree with this statement of yours, but this is not the case.

I would never object to a collection of religious and political symbols, 
where swastika could have its place together with hammer-and sickle, 
crosses of different style, muslim crescent, star of David, etc.


But if you take a small collection where the only one politically 
relevant is the swastika, then you have a collection which is 
politically BIASED, not politically NEUTRAL.


The problem doesn't arise from the swastika being included, it arises 
from all the rest which isn't, and which makes the swastika stand out.


Most likely in an unintended way, but this is what appears to a casual 
observer, and which gave rise to this thread.


Just my 2 cents.

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Qt issue: application blocks user logout

2015-12-15 Thread Giuliano Colla

Hi, folks.

I have an application, on Linux environment, which should always be 
running, as long as an user is logged in.
Therefore it's activated in Autostart, and should only be closed when 
the user logs out.


If it is compiled using the GTK2 WS it works as expected.

if it is compiled using the Qt WS (which should be used), it doesn't 
behave properly. At user logout the application is closed, but the 
system behaves as if the application had refused to close. The same 
message is generated as when the OnCloseQuery event sets CanClose false.


I tested with a minimal application (just an empty form with a "Close" 
button) and it gives rise to the same problem.


My environment is Linux x86_68 CentOs 6. Qt 4.6.2
Tested with different Lazarus versions (1.4.0, 1.4.4, Trunk) and 
different Desktop Environments and related Window Managers (Gnome, KDE, TDE)


Is this a known issue, is there something I should do to tell the 
application to behave as is should, or should I create a bugtracker entry?


Thanks,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE - Bookmarks overview window?

2015-09-08 Thread Giuliano Colla

Il 08/09/2015 17:53, Graeme Geldenhuys ha scritto:

  Does Lazarus
IDE have a window (something similar to TODO List window) that shows all
set bookmarks (source editor bookmarks). Info like unit name, line
number etc.?
You mean View->Debug Windows->BreakPoints (default shortcut Ctrl+Alt+B) 
or something more sophisticated?


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Newbie, porting class to FPC but get procedure assignment error

2015-06-22 Thread Giuliano Colla

Il 22/06/2015 10:09, Bo Berglund ha scritto:

On Mon, 22 Jun 2015 09:16:20 +0300, patspiper patspi...@gmail.com
wrote:


On 22/06/15 02:00, Bo Berglund wrote:

I just made a first test by adding the object to my main form as a
private variable.

Which object? Better show the code.

Here is the current state of the main form where the object is
handled:

unit FormMain;

{$mode objfpc}{$H+}

interface

uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls,
   ExtCtrls,
   Sentinel;

type

   { TfrmMain }

   TfrmMain = class(TForm)
 btnFindKey: TButton;
 stxSerialNo: TStaticText;
 procedure btnFindKeyClick(Sender: TObject);
 procedure FormClose(Sender: TObject; var CloseAction:
TCloseAction);
 procedure FormCreate(Sender: TObject);
 procedure Timer1Timer(Sender: TObject);
   private
 { private declarations }
 Dongle: TSentinel; == My private object variable
   public
 { public declarations }
   end;

var
   frmMain: TfrmMain;

implementation

{$R *.lfm}

{ TfrmMain }


procedure TfrmMain.btnFindKeyClick(Sender: TObject);
var
   SerialNo: word;
begin
   //Code to check for the dongle and if found display its contents
   Dongle.InitKey; = I get the exception here
   Dongle.AppNumber := 1;
   if Dongle.CheckKey then
   begin
 SerialNo := Dongle.SerialNo;
 stxSerialNo.Caption := IntToStr(SerialNo);
   end;
end;

procedure TfrmMain.FormClose(Sender: TObject; var CloseAction:
TCloseAction);
begin
   Dongle.Free; = Destroying the object
end;

procedure TfrmMain.FormCreate(Sender: TObject);
begin
   Dongle := TSentinel.Create; = Creating the object
end;

end.
   

Project DongleTest raised exception class
'External: SIGSEGV'.

The 1st thing that comes to mind is that spromeps.obj is 32 bit and your
Lazarus/fpc and Windows are most probably 64 bit. But I am not sure how
the compiler/linker would react to that.

I think I create a 32 bit application, see below.


You had posted previously:
Input file: SPROMEPS.obj, output file: SPROMEPS.coff
Converting from OMF32 to COFF32 
Not adding or removing underscores for this filetype
Warning 1211: 270 comment records ignored

Do you have a 64 bit version of spromeps.obj?

No, this is legacy code and is only for 32 bit applications.
SafeNet has created the driver for both 32 and 64 bit Windows, but the
64 bit driver is still used for 32 bit applications (like mine). Has
always worked fine with the Delphi apps (used since end of the
1990:s).

They did not provide a SPROMEPS.obj file for 64 bit Delphi maybe
because that does not really exist yet (according to the Embarcadero
user forum the newly released 64 bit compiler is not ready for prime
time...)

Question:
Could it be that Lazarus is anyway compiling for a 64 bit application
since it is installed on a 64 bit Windows 7 laptop?
I just assumed that the main application would be 32 bit as is the
case for Delphi

But if I go into Project Options and look at Compiler Options -
Config and Target - Target-specific options there is a checkbox for
Win32 gui application (-WG) and it is checked.

So I guess I am creating a Win32 exe as intended...




Both Win32 and Win64 generate the same compiler option(-WG)

In the same configuration page you should also pick up the right Target 
CPU family: i386 as opposed to X86_64, in order to generate a 32bit 
application. This will require the proper 32 bit compiler. If it isn't 
available or properly configurated you'll get a warning, when you click 
the Test button on the page.


Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus - Disk Full error

2015-06-18 Thread Giuliano Colla

Il 18/06/2015 12:45, Graeme Geldenhuys ha scritto:

On 2015-06-18 11:35, zeljko wrote:

AFAIK, that message comes from fpc.

How can it? I get the error at a time when I'm not compiling a project.
Simply opening or navigating a project - that is all Lazarus IDE right?



To be more exact, this message comes from the fpc RTL file handling 
routines, called by the Lazarus IDE.
Basically Lazarus IDE asks to open a file for write, or attempts to 
write to an open file, the OS rises a Disk full exception and the file 
handling routines just returns the error. Or the file handling routine 
misinterprets as a Disk full another exception, such as not having the 
appropriate rights for the directory/file involved, and returns a 
misleading message :-(


Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Different packages for different usage

2015-06-18 Thread Giuliano Colla

  
  
Il 18/06/2015 23:48, aradeonas ha
  scritto:


  
  Hi,
  
   
  I made package including some units that some of them need
LCL but some of them will be need in server tools and they
should not use LCL or graphical stuff so I want to make 2
package one for client app and other one for server with some of
tools and without any dependency on graphical stuff so for
server apps I will add server package.
  
  But I have units share with these two package that used
TPicture in some parts but they can be removed with compiler
condition.
  
   
  I want to know what is the best way to declare these two
package and compiler condition so I will have two package with
shared units but for different usage case.


I'd suggest to avoid sharing units between packages. But different
units may include a .inc file which contains the shared code.

Sort of:

server.pas:
Unit server;
  {$DEFINE IS_SERVER}
  {$INCLUDE common.inc}
  .end

client.pas:
Unit client;
  {$INCLUDE common.inc}
  .end


common.inc:

Interface
  {$IFDEF IS_SERVER}
  . server uses, etc.
  {$ELSE}
  . client uses,etc
  {$ENDIF}
  common uses,etc.
  
  Implementation
  {$IFDEF IS_SERVER}
  . server stuff
  {$ELSE}
  . client stuff
  {$ENDIF}
  common stuff
  

One package uses the "server" unit, the other the "client" unit, but
all of your source is in common.inc for easier maintnance.

That way the compiler will never be confused about which units to
compile, and with which conditionals.

Maybe there's a better way, but that's what I'd do.

Giuliano
    
    -- 
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

  


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE is still building message

2015-06-13 Thread Giuliano Colla

Il 12/06/2015 09:59, Michael Van Canneyt ha scritto:
Quite often, I get the IDE is still building message, when the IDE 
is in fact, no longer building.


AFAIR I've met a similar issue, when the IDE wasn't actually building 
itself, but just compiling a package, or something.

A message mixup?

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Date value 0

2015-05-28 Thread Giuliano Colla

Il 28/05/2015 11:18, Michael Schnell ha scritto:

On 05/27/2015 08:48 PM, waldo kitty wrote:


yes... 12:00am is midnight... 00:00am is the same... so also is 00:00 
or 24:00 in 24hour time...


AFAIK it's rather set that 24:00 is 00:00 the next day, but 12:00 am 
is not 100% confident as Mark says.




I don't believe this discussion will lead anywhere. The am/pm notation 
was intended only for humans living outside the polar circles, which 
just looking out of the window, can easily tell apart midnight from 
noon. And if they must set the hour for a meeting they don't say at 12 
pm or at 0 pm or whatever, but just at noon.
Even the (underdeveloped) countries which still stick to am/pm notation, 
when must give the train timetable or the airplane schedules, use the 
24h notation.


Just my 2c

Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Date value 0

2015-05-26 Thread Giuliano Colla

Il 26/05/2015 13:30, Juha Manninen ha scritto:

Regarding issue
   http://bugs.freepascal.org/view.php?id=27735

Is there some convention how to show a date value 0?
By default it shows year 1899. The patch changed it to ?.




Delphi for value 0 shows 12/30/1899 12:00 am:
 
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System_TDateTime.html

Changing the old Delphi compatible default may force a number of users 
to modify user manuals/user instructions, messages etc. Is it really a 
wise move?


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] AlignTop/AlignBottom issue

2015-05-26 Thread Giuliano Colla

Il 25/05/2015 22:45, Maxim Ganetsky ha scritto:

Should I open an issue in the bugtracker, with the usual small example
to demonstrate the issue?


I guess it won't harm. 


Done:

http://bugs.freepascal.org/view.php?id=28183

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] AlignTop/AlignBottom issue

2015-05-26 Thread Giuliano Colla

Il 26/05/2015 14:50, Mattias Gaertner ha scritto:

It works like this:
http://wiki.lazarus.freepascal.org/Autosize_/_Layout#Order_of_controls_with_same_Align


The reason of my request is that it doesn't appear to work like this. 
Quoting the #Align paragraph:


First all controls with alTop are put to the top of the client area. 
If there are several controls with alTop the last added/moved will be 
put topmost.


Then all controls with alBottom are put to the bottom of the client 
area. Otherwise it works analog to alTop. 


This scheme provides a predictable order, although different from 
Delphi's one which places the last added/moved at the bottom for alTop. 
It makes it possible to lay out components as desired.


What happens with the sample program I've posted in the bugtracker is 
that with an order of the commands 1-2-3-4-5-6-7 (executed one by one, 
with a click event), the resulting order of the components is 
4-3-5-2-6-1-7, which appears rather crazy.


The Order of controls with same Align should apply when several 
controls are added/moved simultaneously, not when they're moved one by one.


Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] AlignTop/AlignBottom issue

2015-05-25 Thread Giuliano Colla

AlignTop and AlignBottom do not appear to behave as they should.

When you have several controls contained in another control, you would 
expect that each AlignTop or AlignBottom would stack the control in the 
first free position: with AlignBottom on top of the stack of the other 
bottom aligned components, with AlignTop at the bottom of the stack of 
the other top aligned components.


On the contrary, it happens that sometimes, in an unpredictable but 
reproducible way, the control which should go in one place goes to a 
different one, either becoming topmost or bottommost, or being inserted 
between other components.


This occurs both at design time, making it sometimes very difficult to 
lay out the components as desired, and at runtime, disrupting the 
desired order of the components.
The only workaround I've found is to set Align to alNone, and to 
painfully calculate the Top property of each component from the Top and 
Height properties of the others.


This, besides not being Delphi compatible, is quite annoying.

Should I open an issue in the bugtracker, with the usual small example 
to demonstrate the issue?


Giuliano








--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] AlignTop/AlignBottom issue

2015-05-25 Thread Giuliano Colla

Il 25/05/2015 21:33, K. P. ha scritto:
Just setting top (while control is top aligned) puts it in the proper 
sequence, i.e. at the bottom of the stack


It appears to work. I'll make some more tests.
Thanks a lot.

Giuliano




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Qt doesn't return proper DC Device Size

2015-05-18 Thread Giuliano Colla

Il 16/05/2015 17:54, Giuliano Colla ha scritto:

http://bugs.freepascal.org/view.php?id=28106


Now it works like a charm.
I've closed the issue.

Thank you Zeljko,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Qt doesn't return proper DC Device Size

2015-05-16 Thread Giuliano Colla

Il 16/05/2015 14:27, zeljko ha scritto:

On 05/16/2015 02:15 PM, Giuliano Colla wrote:


While trying to obtain programmatically the snapshot of a window, I
stumbled into a Qt bug.

It turned out that TQtDeviceContext.getDeviceSize always returns a size
of 10x10 for any widget I tried.
It returns the proper size only for the full screen (i.e. if DC=0).

For sake of completeness, GTK2 returns the proper size.

Can it be fixed?


And attach example project please.



Done:

http://bugs.freepascal.org/view.php?id=28106

Thanks,

Giuliano


--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Qt doesn't return proper DC Device Size

2015-05-16 Thread Giuliano Colla


While trying to obtain programmatically the snapshot of a window, I 
stumbled into a Qt bug.


It turned out that TQtDeviceContext.getDeviceSize always returns a size 
of 10x10 for any widget I tried.

It returns the proper size only for the full screen (i.e. if DC=0).

For sake of completeness, GTK2 returns the proper size.

Can it be fixed?

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE unable to load form due to missing property

2015-05-16 Thread Giuliano Colla

Il 15/05/2015 15:24, Tony Whyman ha scritto:
Another thought - at run time an unknown property error might be 
better reported as a warning rather than as an error. 


This would be a very welcome enhancement.

If the unknown property is actually used in code, it's flagged as an 
error at compile time, and it gets fixed before execution.
If it's not, it is most likely a cosmetic property, or an useless 
leftover from previous versions. A mild warning, or even a silent skip, 
would be much less annoying, and more appropriate.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Lazarus Qt support and Wiki

2015-05-14 Thread Giuliano Colla

Hi all.

In recent years the support for Qt Widgeset in Lazarus has dramatically 
improved, thanks to the efforts of Zeljan and others. My grateful thanks 
to all of them!


The result is that nowadays Qt WS is fully mature, suitable for 
production projects, and, at least for my applications and my taste, 
better than GTK2.


The only problem I see is that a lot of Wiki pages are outdated, and 
still report Qt as experimental and unstable. Many features are 
reported as supported only under Win or GTK WS, while they're perfectly 
supported also by Qt.


Last example, just this morning: I used for the first time a 
TPopUpNotifier component, and I consulted the Wiki page to get some 
hints. The page states that it's supported only under Win32, GTK and 
GTK2, while it works perfectly also with Qt.


I'm afraid that such a situation can discourage a number of potential 
user from using Qt, while a wider usage would generate a better and 
deeper testing, thus helping ironing out what's left to iron out.


Is it ok if, whenever I stumble into a Wiki page which is outdated with 
respect of Qt support, I do edit it to reflect the current status of things?

Any objections?

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

2015-05-14 Thread Giuliano Colla

Il 14/05/2015 16:59, Toan Pham ha scritto:

I am also affected by the keyboard issue.  This issue affects the two
version of lazarus I've tested (1.2.4  1.4.0), and both 32bit  64bit
OSes.  I did not know it was ibus until I read this mailing list.
Thank you for sharing guys.


It's a known issue of Ubuntu 14, which messed up ibus input methods.
You should locate where input methods are defined (somewhere in keyboard 
settings) and set to none, unless you need a specific one.
If you do, just hope that your input method isn't one of those which 
have been messed up, or google for an update!


Giuliano

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to display html contents?

2015-05-12 Thread Giuliano Colla

Il 11/05/2015 16:02, Michael Schnell ha scritto:

Maybe start a Browser with the file spec as parameter.


You're right, that would be the easiest path.

But I happen to need an integrated help in an industrial environment: 
just a window with the appropriate information, a large close button 
(the human interface is a touch screen), and nothing else.


However both the Qt widgets proposed by Dmitry, and the lclwebkit 
suggested by Frank appear to provide more or less what I need. Just a 
bit of extra ironing to adapt to my needs.


Giuliano.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to display html contents?

2015-05-11 Thread Giuliano Colla

Il 11/05/2015 04:50, Dmitry Boyarintsev ha scritto:

If you're planning to use Qt only, you can go as low as following:


Yes I'm on a Qt only solution. I'll try your suggestion ASAP.

Thank you very much, or better, спасибо большое,

Giuliano

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How do I change properties for GUI-components from another unit?

2015-05-11 Thread Giuliano Colla

Il 11/05/2015 23:41, Anders Eriksson ha scritto:

How do I change properties for GUI-components from another unit?

e.g. hide a button or change a label text from a different unit.


If you have in unit1 a Form1 with a Button1 component, and Form1 is 
declared in the Interface section of unit1 (i.e. it's made public), in 
unit 2 you must have a clause uses unit1 and then you can simply code

Form1.Button1.Hide
or
Form1.Button1.Caption := 'blah';

Only in case of ambiguity you must prepend also the unit name.
e.g. unit2 and unit3 both have a Panel1 component and they both have it 
declared in the Interface section. Then in unit1 you will have uses 
unit2,unit3.

And to operate on them you will code:
unit2.Panel1.hide;
unit3.Panel1.show;

If there's no ambiguity, it's unnecessary.

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to display html contents?

2015-05-10 Thread Giuliano Colla

Il 09/05/2015 20:40, Martin ha scritto:
To get an anchor link to show correctly (e.g. 
somefile.html#readthisbit), I discovered you need to do the following 
- note the magic moment is at step 3. 


Thanks a lot for the tip.
Unfortunately what I need is to provide a link to anchors on the same page.
Meaning that I should implement something of the sort you suggest within 
the ipro code, provided I find my way in the sources


You gave me a clue, I'll try to take advantage of it.

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to display html contents?

2015-05-09 Thread Giuliano Colla

Il 09/05/2015 00:02, Giuliano Colla ha scritto:

Is it a known issue or I'm doing something wrong?


By browsing the list I discovered it's a known issue:

http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Help-turbopower-ipro-anchors-td4041182.html#none

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What is main form? (Splash question)

2015-05-08 Thread Giuliano Colla

Il 08/05/2015 17:46, Vojtěch Čihák ha scritto:


It seems that after adding splash screen is FrmMain no longer 
considered as a main form.


Is it bug? Or do I something wrong?



AFAIK you can't treat the splash screen as a regular form. It must be 
handled separately.

I'd suggest you to give a look to:

http://delphi.about.com/od/formsdialogs/a/splashscreen.htm

It's for Delphi, but it appears to apply to Lazarus as well.

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What is main form? (Splash question)

2015-05-08 Thread Giuliano Colla

Il 08/05/2015 17:46, Vojtěch Čihák ha scritto:

Is it bug? Or do I something wrong?


The following code (where form2 is the splash screen) works fine under 
Lazarus



  RequireDerivedFormResource := True;
  Application.Initialize;
  Form2 := TForm2.Create(Nil);
  Form2.Show;
  Form2.Update;
  Application.ProcessMessages;
  Sleep(3000);
  Application.CreateForm(TForm1, Form1);
  Form2.Hide;
  Form2.Free;
  Application.Run;

You may use as a guideline for your purposes

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to display html contents?

2015-05-08 Thread Giuliano Colla

Il 08/05/2015 22:23, Euller Pereira ha scritto:
There's a framework called Brook and a plug-in for it called 
JTemplate, it's totally written in pascal and may be what you are 
looking for.

Here's the link: http://silvioprog.github.io/brookframework/

2015-05-08 16:55 GMT-03:00 Martin mailingli...@collins-email.co.uk 
mailto:mailingli...@collins-email.co.uk:


This tutorial below will get you up and running quickly with
turbopower ipro html component.

http://pp4s.co.uk/main/tu-form2-help-demo-laz.html

You'll be able to see how to handle images and hot clicks easily.




Many thanks to both of you. With TIPHtmlPanel (which uses turbopower 
ipro) I've been able to display my contents. The only problem I get is 
that while links to other pages do work properly, a link to a tag in the 
same page doesn't work, even if the tag is properly recognized (I get a 
hint with the tag name passing with the mouse over the link).

Is it a known issue or I'm doing something wrong?

Giuliano


--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to display html contents?

2015-05-08 Thread Giuliano Colla

Il 09/05/2015 00:02, Giuliano Colla ha scritto:

a link to a tag in the same page doesn't work,


I meant to an anchor. Sorry.

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] *.lfm files in unit output directory?

2015-05-07 Thread Giuliano Colla

Il 07/05/2015 13:47, Tony Whyman ha scritto:
I thought that it had always done this, ever since the lfm format was 
used. If you don't link the lfm files in then how do you create forms? 


If I understand properly, the problem is not of having lfm files, but 
having them copied to the unit output directory from the source 
directory where they belong to, since the beginning of times.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] How to display html contents?

2015-05-06 Thread Giuliano Colla

Hi all,

I need to display some local html files in a Lazarus application, which 
must run under Linux.


What's the best way to go?

Thanks in advance for any hint.

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] (no subject)

2015-05-06 Thread Giuliano Colla

Il 06/05/2015 23:36, Graeme Geldenhuys ha scritto:

At least Lazarus IDE is miles ahead of Delphi IDE. G*d that application
starts up slow, even on my beefy i7 3770K system.


Sorry if I'm completely OT, but did you try to TURN OFFF hyperthreading 
on your I7?
After some reading around, trying to figure out why the I7 I was 
validating for our equipments wasn't as fast as I would have expected, I 
discovered that HT, unless you have an application specially designed 
for HT (i.e. almost no application in the world), dramatically increases 
the amount of cache misses, providing as a result a performance loss 
instead of a performance gain!

I just disabled HT from BIOS, and the poor 10ms of my benchmark became 5ms!
Of course it depends on applications, but it's worth a try.
Just my 2 c

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to display html contents?

2015-05-06 Thread Giuliano Colla

Il 06/05/2015 14:48, leledumbo ha scritto:

I need to display some local html files in a Lazarus application, which

must run under Linux.

* http://wiki.lazarus.freepascal.org/THtmlPort
*
http://wiki.lazarus.freepascal.org/Webbrowser#Using_the_Turbopower_internet_pro_control



Thanks a lot,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Project Improvement Help - YANA(Yet Another Network Analyzer)

2015-04-29 Thread Giuliano Colla

Il 28/04/2015 22:38, Euller Pereira ha scritto:
But the first problem is that I can't even compile the code provided 
by the author, because it uses Kylix compatibility-only units for 
Linux, libc and kernelioctl, and it relies on a specific dll of 
Windows, IP Helper DLL. Therefore, this fact locks the software to 
Windows and Linux running on a i386 platform.


Most of the stuff which used to be in the Kylix-compatibility units is 
now available in fpc cross-platform version in units such as BaseUnix. 
Non cross-platform identifiers have been renamed to cross-platform ones 
by prepending an fp to the name. So you will not have anymore a 
select function but an fpselect function instead.
A patient search on fpc sources for the identifiers left unsatisfied if 
you remove libc and other Kylix-only dependencies, should reveal most of 
what you need.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto Update Request

2015-04-13 Thread Giuliano Colla

Il 13/04/2015 17:21, Salvatore Coppola ha scritto:
IMHO this features are only a needless complexity. Both for Lazarus 
and FPC, SVN or Git do the work in a excellent way for a good 
programmer (i suppose Lazarus and FPC users are programmers). I'm an 
hobbist programmer (very poor for the truth) but I've no problems to 
update via SVN


+1

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus famous ?

2015-04-03 Thread Giuliano Colla

  
  
Il 03/04/2015 11:23, Graeme Geldenhuys
  ha scritto:


  On 2015-04-03 07:36, Michael Van Canneyt wrote:

  

Maybe the whole team should go to the opening night ? :)

  
  

:-D Brilliant idea!





I'm afraid that, as Delphi doesn't (yet) support Brodway musicals,
and Lazarus is so careful about Delphi compatibility, we would see
only an empty, blank stage  ;-) 

Giuliano
-- 
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

  


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Statusbar Panel.Bevel has no affect

2015-04-01 Thread Giuliano Colla

Il 01/04/2015 13:01, Graeme Geldenhuys ha scritto:

I'm using LCL-GTK2 under Linux.


I've seen your desperate postings.
In my esperience, except a very few cases, as of today, Qt widgetset is 
much more mature and reliable than gtk2, and much more likely to behave 
as expected.
Always in my experience, I've found out that simply recalculating Top 
and Left in an OnResize event provides the desired result with less 
hassle than relying on the Align properties.


Just my 2 cents.

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IBUS warning

2015-03-28 Thread Giuliano Colla

  
  
Il 28/03/2015 10:29, JuuS ha scritto:


  Thanks Giuliano, I'm on Kubuntu 14.04 with, AFAIK, the default desktop.
I don't have that choice in my settings. On my system ibus is very well
hidden (i've looked in all the most likely places) which is why it is so
frustrating. I'll pull through  ;-)



Kubuntu stands for K(de)Ubuntu, meaning that your desktop is KDE.

It would appear that the iBus on Ubuntu 14.04 is rather broken:
https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1284635

Possible solutions:

1) In Ubuntu 14.04 you should have a System
  settings-language support-Keyboard input method which you
  should set to =none.


2) You should have an icon in your system tray showing
  the Ibus:



But as they followed the idiotic Micro$oft way, it may
  be hidden, and accessible via the almost invisible up arrow,
  showing the hidden items.

If not, you can set up Ibus to show the icon by invoking
  "ibus-setup" from command line, and checking the "Show on system
  tray" (or something like that) checkbox. 

Once you have the icon, you may right click on it and
  select "exit".

Or take the brute-force approach and from command line
  "killall ibus-daemon"
  
  In both cases, you'll get rid of ibus just for the current
  session.


Once you see that deactivating doesn't remove any function you need,
to deactivate it permanently.
Again two solutions:

  1) you might attempt to find out which start-up script launches
  it, and edit it.

  2) take the brute-force approach:

sudo apt-get remove ibus


Giuliano

-- 
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

  

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IBUS warning

2015-03-27 Thread Giuliano Colla
ibus is an input method. If it's enabled (i.e. if the ibus-daemon is 
running) it will intercept anything coming from the keyboard, to any 
application. It's not Lazarus calling ibus explicitly: simply attempting 
to read user keyboard input gets ibus in the way.


The annoying thing is that if the daemon is running, the default 
shortcut to activate it is ctrl-space, which is also the Lazarus 
shortcut for command completion.


On RH related distros (Fedora, CentOs, etc.) ibus is not enabled by 
default, unless you select as a system language one which requires an 
input method (such as chinese). It would appear that other distros, such 
as Ubuntu do enable it by default, which is rather stupid, because when 
unnecessary you have it in the way.


If you manage to find how the ibus-daemon is started in your environment 
(/etc/init.d or some upstart service), you may turn it off permanently. 
As an alternative you may try with ibus-setup to change its activation 
shortcut from ctrl-space to some unused key combination (sort of 
ctrl-alt-Backspace or something like that) so that it doesn't interfere 
with Lazarus shortcuts.


Giuliano



Il 21/03/2015 14:02, JuuS ha scritto:

Hi,

Recently while debugging Lazarus with root privileges I got the
following warning:

(lazarus:5521): IBUS-WARNING **: The owner of
/home/juus/.config/ibus/bus is not root!

Q1: (lazarus:5521) has what meaning? Can I use this address to find
where ibus is being called?

Q2: It appears lazarus is calling ibus explicitly?

I ask because I hate ibus. I habitually turn it off on starting my linux
machine because it messes with edits and makes typing impossible (not
just in lazarus). If I forget to do this I notice it right away, sigh,
and go turn off ibus.

Anyone else having trouble with ibus and have maybe some information
about it and/or how it relates to lazarus and/or linux system...

Thanks.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IBUS warning

2015-03-27 Thread Giuliano Colla

Il 27/03/2015 13:36, JuuS ha scritto:

Thanks Giuliano. This is what I had thought but wasn't sure.

I hesitate to remove it completely because it seems to be tied into
multiple keyboards which I do use. I will search for its initialization
and disable it because, on my system at least, it is a real pain.


If you don't actually *use* it (I mean activate it by its shortcut) to 
enter chinese ideograms or similar things which do require an input 
method, and you just want to switch from one keyboard layout to another, 
you may safely disable/remove it without any side effect.



I'm also a bit nonplussed that (K)Ubuntu put this on my system at all,
and I wonder if they are going down the (Micros*ft) road to locking down
the user.?!


Yes, it would appear that Microsoft is still a reference to system 
packagers, and unfortunately also to desktop designers. A lot of 
stupid/crazy stuff Microsoft style things are creeping into Linux 
desktops, recently...


Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IBUS warning

2015-03-27 Thread Giuliano Colla

Il 27/03/2015 20:48, JuuS ha scritto:

Thanks for that Giuliano. I've done INet searches researching this.
There are a number (read: a lot) of disgruntled people regarding ibus.
But I could never find a straight answer from researching if it was
safe to completely remove it without messing up input system. I think
this fear is a holdover from some of my MS experiences.
If you're using Kde-Plasma Desktop you should find a Settings-Input 
Method menu entry: unchecking the enable box should be enough to 
disable Ibus. At least that's what I find on my desktop.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] how can I show a hint without a mouse move?

2015-03-15 Thread Giuliano Colla

Il 15/03/2015 18:48, Mattias Gaertner ha scritto:

I don't have a no mouse system to test.
What happens when you do

procedure TForm1.Button1Click(Sender: TObject);
begin
   CursorPos:=TWinControl(Sender).ClientToScreen(Point(1,1));
   Application.ActivateHint(CursorPos, True);
end;


I don't have a no mouse system either in this moment, but it looks quite 
promising.


Without the OnClick event you suggested, the hint did disappear or not 
show it I was too quick when I was clicking the control.
With it the hint either stays there or shows. Tomorrow at work I'll test 
on the real system, but I'm confident.


Thanks a lot Mattias!

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] how can I show a hint without a mouse move?

2015-03-15 Thread Giuliano Colla

Hi Lazarus gurus,

I have an application which is bound to be used with a touch screen and 
without a mouse.

I'd need to show a hint when some components are touched (=clicked).

Is there an easy way to cause the component hint to be displayed, or the 
only way is to reimplement all the functionality of a show hint on an on 
OnClick event?


Any ideas?

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] how can I show a hint without a mouse move?

2015-03-15 Thread Giuliano Colla

Hi Lazarus gurus,

I have an application which is bound to be used with a touch screen and 
without a mouse.

I'd need to show a hint when some components are touched (=clicked).

Is there an easy way to cause the component hint to be displayed, or the 
only way is to reimplement all the functionality of a show hint on an on 
OnClick event?


Any ideas?

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] how can I show a hint without a mouse move?

2015-03-15 Thread Giuliano Colla

Il 15/03/2015 20:43, Graeme Geldenhuys ha scritto:

On 2015-03-15 17:10, Giuliano Colla wrote:

I'd need to show a hint when some components are touched (=clicked).

Why not incorporate a web design in your user interface. Many websites
have a small information icon next to components. Click those and a
hint window is show. Do the same with your app, and I would even
implement a custom hint window to make it more attractive as it is a
kiosk type app.


Thanks for the tip, but what I need is just a lightweight 
troubleshooting help, such as provided by a hint.
I'm dealing with the human interface of a family of automatic machines 
to make checkbooks.
When some problem happens, a synoptic of the machine is shown, 
displaying the current state of all the sensors of the section involved, 
with the one(s) causing the error highlighted.
Most of it is self-explanatory, and the operator doesn't usually need 
anything more, but to ease troubleshooting a supplementary information 
may be helpful, such as where the sensor is physically connected (e.g. 
Box #2, Input 15), or , depending on the display style selected, the 
more precise description of the sensor location and purpose(Blade motor 
encoder, Binder temperature, Feeder 2, etc.).


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Someone help built qt4pas.dll for win64

2015-03-14 Thread Giuliano Colla

Il 13/03/2015 18:02, zeljko ha scritto:

On 03/13/2015 01:38 PM, FreeMan wrote:

On 12.03.2015 20:57, zeljko wrote:

QMAKE_CXXFLAGS += -fpermissive should be added to the Qt4Pas.pro

zeljko

Thank you, I can compile now. And I added message in forum
How to build QT4pas5.dll win64
http://forum.lazarus.freepascal.org/index.php/topic,27706.0.html


That project for Qt64 is removed today (link you added at form), so no 
available binaries.
Also, it will be nice that you upload somewhere that libQt4Pas.dll for 
64bit so other ppl can use it.


If you don't have a place to upload it, just send it to me as an 
attachment (to my personal e-mail, because the list doesn't accept too 
large things), and I can make it available in a website I'm webmaster of.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Go back when browsing code

2015-03-10 Thread Giuliano Colla

Il 10/03/2015 10:57, aradeonas ha scritto:

Thank you Graeme,

Its not installed in 1.2.6 but It can be useful.


It is in 1.4 which is due to see the light in a short time. I warmly 
suggest to switch to 1.4, which has a significant amount of 
fixes/enhancements. 1.4 RC2 is already available at

 http://sourceforge.net/projects/lazarus/files/

Giuliano



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Startup delay of project (Qt)

2015-03-07 Thread Giuliano Colla

Il 07/03/2015 12:37, Vojtěch Čihák ha scritto:
  
Hi,
  
I have noticed that Qt projects started with F9 have a delay (about ~12 seconds) before the form appears.

Its not only with large projects, its also with small projects or even empty 
forms.
  
The delay is there even if nothing in project changes and I start it by F9 repeatedly.

When I try to execute the same project externally (from Double Commander), it 
starts in ~ 0,3 s.
  

[...]
  
I use Lazarus 1.5 r48159M FPC 3.1.1 x86_64-linux-qt, Qt 4.8.6.


In a similar setup, only with a slightly  older Qt (4.7.4), I don't 
experience the same problem. Qt startup with F9 is a bit slower than 
GTK2, but within reasonable limits (3 - 4 seconds). A Qt issue?


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Promoting Lazarus: A Case Study Video

2015-02-24 Thread Giuliano Colla

Il 14/02/2015 15:51, Anthony Walter ha scritto:
As a reminder, if you could please use the wiki to make corrections 
rather than posting additions or corrections here, my life would be 
much easier.




I didn't find any link to a wiki in getlazarus.org, so I'm forced to 
post just here.

Which Wiki did you refer to?

The video in your HTML5 page doesn't appear to be multiplatform accessible.

To play it under CentOs 6, which is quite popular in 
enterprise/corporation environment a user is forced to install 
proprietary codecs, which don't come with the distribution and may give 
rise to licensing/patent issues, and a Firefox version directly 
downloaded from mozilla website, and not subject to RedHat security 
scrutiny.


I'd suggest a look to 
http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5 , 
where you can find an example of appropriate handling of multiple video 
formats (by using multiple source .. tags).


Then there's a lot of tools for converting video formats, to provide 
viable alternatives.

Under Linux, for example, a simple old fashioned

ffmpeg -i myfile.mp4 -f ogg myfile.ogv

does the trick of converting from patented mp4 format to free ogg format.

Under Windows the Handbrake converter is free and open source: 
http://www.handbrake.fr/


Just my 2 cents,

Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 1 of 1.4

2015-02-21 Thread Giuliano Colla

Il 20/02/2015 19:18, Mattias Gaertner ha scritto:

On Fri, 20 Feb 2015 18:29:15 +0100
Giuliano Colla giuliano.co...@fastwebnet.it wrote:


Il 20/02/2015 17:30, Mattias Gaertner ha scritto:

On Fri, 20 Feb 2015 17:04:22 +0100
Giuliano Colla giuliano.co...@fastwebnet.it wrote:


Il 20/02/2015 01:32, Mattias Gaertner ha scritto:
[...]

Do you mean line 3237?

That was fixes_1_4.

   

I rather mean line 3206.

I guess this line is in 1.4RC1. Please refer to fixes_1_4.

No it was in trunk.

trunk:

3205:  if APackage.AutoUpdate=pupManually then
3206:exit(mrNo);

?


Sorry I was too hasty.

The piece of code was:

  // check the current output directory
  Result:=CheckIfCurPkgOutDirNeedsCompile(APackage,
 true,SkipDesignTimePackages,GroupCompile,
NeedBuildAllFlag,ConfigChanged,DependenciesChanged,Note);
  if Result=mrNo then begin
// the current output is valid
exit;
  end;

Which appeared to me to check only the default directory.
But I had not seen that the current output directory is properly set 
(either default or fallback) in GetOutputDirType. So forget about my 
observations.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 1 of 1.4

2015-02-20 Thread Giuliano Colla

Il 20/02/2015 01:32, Mattias Gaertner ha scritto:

On Fri, 20 Feb 2015 00:23:57 +0100
Giuliano Colla giuliano.co...@fastwebnet.it wrote:


[...]
After some further analysis, I'm becoming convinced that clean all would
be unnecessary,

There are always cases when a clean all is needed.
For example when an unit is moved to another package. The compiler
options are exactly the same, but you have to delete the old
ppu files.


Let's say, would be less necessary.

it clean auto didn't have a flaw in how package
compilation is handled in TLazPackageGraph.

In a situation where lazarus tree is not writeable, and a different user
path must be used, what happens currently is:

  1. TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile checks from lazarus
 tree if the compilation is required.
  2. If yes, it verifies if normal output dir is writeable. The check
 fails, and it uses the FallBackOutputDir with SetDirectoryOverride.
 Compilation output goes in the user path, and overwrites possible
 old ppu's and resources. That's OK.
  3. If no compilation is required, compilation is skipped, and anything
 leftover in the user path remains untouched. That's the flaw.

What exactly is flawed?



  4. When linking user path takes precedence over lazarus tree path
 (newly compiled must take precedence over old ones), and invalid
 leftovers abort the linking.

The issue can be solved by brute force, always forcing the compile when
normal output dir is not writeable, or with more elegance, by checking
also the fall back output dir before deciding if a new compilation is
required.

Do you mean line 3237?



I rather mean line 3206.
If normal output directory (i.e. the not writeable one, in our case) 
doesn't need compile, no check is made on the fall back directory.
If the fall back directory is empty (as it would be on a first time 
build) , a useless compilation is avoided, and this is Ok, but if it 
contains old ppu's  (as it may happen after an update) the old ppu's are 
left in place, and will cause linking to abort.


I'll make some tests on the transition from 1.2.6 to 1.4RC1 which shows 
the problem, to see if some smarter checks on PackageSytem can help, or 
if, after all, a clean all is the only viable solution.


Are there cases where a package units directory contains units from more 
than one package?



Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 1 of 1.4

2015-02-19 Thread Giuliano Colla

Il 19/02/2015 14:10, Mattias Gaertner ha scritto:


The Clean All is calling make clean. That only works in the
Lazarus source directory.
There is a clean up for the project and its packages, but not yet for
the IDE and its packages.
Missing feature.


Is there a reason why a procedure CleanLazarusDestDir similar to 
CleanLazarusSrcDir could not be used to perform the cleanup when 
isRedirected is true?
All that is required, in a user path, is to clean up compiler generated 
files, without all the other stuff which cleanide or cleanlaz do.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 1 of 1.4

2015-02-19 Thread Giuliano Colla

Il 19/02/2015 14:10, Mattias Gaertner ha scritto:

On Thu, 19 Feb 2015 13:44:03 +0100
Giuliano Colla giuliano.co...@fastwebnet.it wrote:


Il 19/02/2015 12:32, Juha Manninen ha scritto:

On Thu, Feb 19, 2015 at 1:10 PM, Giuliano Colla
giuliano.co...@fastwebnet.it wrote:

Whatever it was, it's got fixed in the meantime.

You installed it as root to a place where your normal user has no write access.

Then there's a bug, because the full scenario is:

The lazarus tree installed from rpm is in /usr/lib (or /usr/lib64) where
normal user has no write access.
A custom executable is on ~/.lazarus_1.4 (--pcp= etc) where normal user
has write access.
A Build Lazarus should therefore build a new custom executable in
~/.lazarus_1.4 where the normal user has write access, and actually it does.

Given this scenario, the only place where a clean all needs to work is
on the writeable local tree: if sources are located on a non writeable
path is not relevant.
Without a clean all, a number of stale ppu's where left in place in my
writeable path.
I could build only by removing by hand ppu's in my writeable path.

The appropriate check should be if the *target* path is writeable. If
it's not, then it's impossible to build. If it is, then it's possible to
clean it in any way: automatically, clean common, clean all.

The Clean All is calling make clean. That only works in the
Lazarus source directory.
There is a clean up for the project and its packages, but not yet for
the IDE and its packages.
Missing feature.


After some further analysis, I'm becoming convinced that clean all would 
be unnecessary, it clean auto didn't have a flaw in how package 
compilation is handled in TLazPackageGraph.


In a situation where lazarus tree is not writeable, and a different user 
path must be used, what happens currently is:


1. TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile checks from lazarus
   tree if the compilation is required.
2. If yes, it verifies if normal output dir is writeable. The check
   fails, and it uses the FallBackOutputDir with SetDirectoryOverride.
   Compilation output goes in the user path, and overwrites possible
   old ppu's and resources. That's OK.
3. If no compilation is required, compilation is skipped, and anything
   leftover in the user path remains untouched. That's the flaw.
4. When linking user path takes precedence over lazarus tree path
   (newly compiled must take precedence over old ones), and invalid
   leftovers abort the linking.

The issue can be solved by brute force, always forcing the compile when 
normal output dir is not writeable, or with more elegance, by checking 
also the fall back output dir before deciding if a new compilation is 
required.
The second solution would avoid unnecessary recompilations, e.g. when 
the custom version uses a different WS. In the current situation almost 
all packages appear to require compilation at every build, because 
compiler options in the lazarus tree are different from current options, 
while most of them actually do not.


If nobody detects a basic flaw in my considerations, I'd add an entry in 
the bugtracker, with target 1.6.


Now it's a bit late to start playing with TLazPackageGraph for 1.4, I 
believe.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 1 of 1.4

2015-02-19 Thread Giuliano Colla

Il 20/02/2015 00:23, Giuliano Colla ha scritto:

Il 19/02/2015 14:10, Mattias Gaertner ha scritto:

On Thu, 19 Feb 2015 13:44:03 +0100
Giuliano Collagiuliano.co...@fastwebnet.it  wrote:


Il 19/02/2015 12:32, Juha Manninen ha scritto:

On Thu, Feb 19, 2015 at 1:10 PM, Giuliano Colla
giuliano.co...@fastwebnet.it  wrote:

Whatever it was, it's got fixed in the meantime.

You installed it as root to a place where your normal user has no write access.

Then there's a bug, because the full scenario is:

The lazarus tree installed from rpm is in /usr/lib (or /usr/lib64) where
normal user has no write access.
A custom executable is on ~/.lazarus_1.4 (--pcp= etc) where normal user
has write access.
A Build Lazarus should therefore build a new custom executable in
~/.lazarus_1.4 where the normal user has write access, and actually it does.

Given this scenario, the only place where a clean all needs to work is
on the writeable local tree: if sources are located on a non writeable
path is not relevant.
Without a clean all, a number of stale ppu's where left in place in my
writeable path.
I could build only by removing by hand ppu's in my writeable path.

The appropriate check should be if the *target* path is writeable. If
it's not, then it's impossible to build. If it is, then it's possible to
clean it in any way: automatically, clean common, clean all.

The Clean All is calling make clean. That only works in the
Lazarus source directory.
There is a clean up for the project and its packages, but not yet for
the IDE and its packages.
Missing feature.


After some further analysis, I'm becoming convinced that clean all 
would be unnecessary, it clean auto didn't have a flaw in how package 
compilation is handled in TLazPackageGraph.



please read if clean auto didn't have a flaw!!
In a situation where lazarus tree is not writeable, and a different 
user path must be used, what happens currently is:


 1. TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile checks from
lazarus tree if the compilation is required.
 2. If yes, it verifies if normal output dir is writeable. The check
fails, and it uses the FallBackOutputDir with
SetDirectoryOverride. Compilation output goes in the user path,
and overwrites possible old ppu's and resources. That's OK.
 3. If no compilation is required, compilation is skipped, and
anything leftover in the user path remains untouched. That's the flaw.
 4. When linking user path takes precedence over lazarus tree path
(newly compiled must take precedence over old ones), and invalid
leftovers abort the linking.

The issue can be solved by brute force, always forcing the compile 
when normal output dir is not writeable, or with more elegance, by 
checking also the fall back output dir before deciding if a new 
compilation is required.
The second solution would avoid unnecessary recompilations, e.g. when 
the custom version uses a different WS. In the current situation 
almost all packages appear to require compilation at every build, 
because compiler options in the lazarus tree are different from 
current options, while most of them actually do not.


If nobody detects a basic flaw in my considerations, I'd add an entry 
in the bugtracker, with target 1.6.


Now it's a bit late to start playing with TLazPackageGraph for 1.4, I 
believe.


Giuliano
--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus Release Candidate 1 of 1.4

2015-02-18 Thread Giuliano Colla

Il 19/02/2015 02:13, Mattias Gaertner ha scritto:

On Thu, 19 Feb 2015 01:25:19 +0100
Giuliano Colla giuliano.co...@fastwebnet.it wrote:


Il 16/02/2015 23:38, Mattias Gaertner ha scritto:

The Lazarus team would like to announce the first release candidate for the 
upcoming Version 1.4.

We would like to invite all users to test this release candidate.

[...]

I installed RC1.4 and I stumbled into a problem. Some missing buttons in
the Configure Build Lazarus dialogue. I did something wrong, or
there's been a regression?

Here's a screenshot the dialogue of RC1.4 from svn from my last update
(rev 47621):
http://www.bononiadocta.it/Lazarus/rev47621.png

Do you mean branches/fixes_1_4 or trunk?



It's branches/fixes_1_4 of a few days ago.

Also trunk as of yesterday is ok.

I didn't test against latest branches/fixes.

Giuliano


--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Promoting Lazarus: A Case Study Video

2015-02-16 Thread Giuliano Colla

Il 16/02/2015 04:47, Den ha scritto:

It also plays for me, Ubuntu 14.10 64bit, Chrome.



Thanks to all for the feedback.
Given other's experience, I tested with Linux-FC14 and it works for me too.
It must be a CentOs 6 specific issue. Most likely a decoder is missing, 
because it isn't strictly Open Source. RH is very accurate in providing 
only purely OS software. Sometimes it's a nuisance.

I'll investigate.

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Promoting Lazarus: A Case Study Video

2015-02-14 Thread Giuliano Colla

Il 14/02/2015 11:52, Anthony Walter ha scritto:
Hello all, in our continuing effort to re-energize the Lazarus 
community, and reach out to new prospective users, I will be creating 
a series of Lazarus case study videos. This first one is posted online 
here:


http://www.getlazarus.org/videos/reports/

The aim of this initiative is to draw interest back to Free Pascal and 
Lazarus, especially in light of all the hard work you guys have done 
in preparing for Free Pascal version 3 and Lazarus version 1.4.


If anyone wants to add to the case study content, feel free to use the 
edit this page feature to make your additions. The editors at 
getlazarus.org http://getlazarus.org can quickly, and easily find 
and review your edits, so don't hesitate to contribute.


Also, if you want to forward the above case study to a work colleague 
or a technical acquaintance, please do. That's the reason its there.


Thanks everyone for your hard work, and keep an eye out for our next 
case study.




The initiative is very good, but the page contents appear to be 
Windows-only.

Play under Linux (CentOs 6) - Firefox has no effect.
As a very basic feature of Lazarus is of being multi-platform, this 
appears a bit contradictory.


Just my two cents,

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] to zeljko, about r47674

2015-02-12 Thread Giuliano Colla

Il 12/02/2015 16:40, zeljko ha scritto:

On 02/12/2015 04:08 PM, FreeMan wrote:

Is this question for me, I say yes. 'cos Main IDE has all menus.


It was general question. Is it normal under Mac such behaviour (mean 
other normal Mac applications ... if you minimize main window does 
other forms minimize too)




There's not a general answer to your question.
It's application dependent, not system dependent.
For Lazarus IDE the answer is yes, because without the main window you 
miss the menu's to operate on the remaining forms, for Gimp (for 
example) the answer is no, because the other forms provide appropriate 
menu's.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Howto close my Bugreport in Mantis??

2015-01-25 Thread Giuliano Colla

Il 25/01/2015 17:19, John Landmesser ha scritto:

sorry, i couldn't find a way to close my own Bugreport 0027202

It's no bug!!


I did it. Now the issue is closed.

Thank you

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] trunk and fpc 3.0

2015-01-12 Thread Giuliano Colla

Hi,

just to make sure that I'm using the right tools, am I correct to assume 
that Lazarus 1.4 should compile with fpc 2.6.4 while Lazarus trunk 
should now compile with fpc 3.0?


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Fwd: Re: Alternative component palette layout

2014-12-28 Thread Giuliano Colla

Sorry, I see that my answer went only to Zeljko and not to the list.

 Messaggio Inoltrato 
Oggetto:Re: [Lazarus] Alternative component palette layout
Data:   Sun, 28 Dec 2014 12:51:30 +0100
Mittente:   Giuliano Colla giuliano.co...@fastwebnet.it
A:  zeljko zel...@holobit.net



Il 28/12/2014 12:08, zeljko ha scritto:


I'm against such workarounds since it can hide bug. Is it enough to
comment code LCLQt to completely disable LCLQt ifdef ?


Yes, there's just one ifdef which surrounds a few lines, in
($lazarusdir)/ide/componentpalette.pas around line 1263. What does the
trick as far as the move tab behavior is concerned is
Pg.PageComponent.free (and nil), the rest of the code in RemoveSheet is
required only to avoid memory leak, leaving a around a dangling button.
It appears that a newly created tab is always handled properly, while an
existing one which has been already moved, sometimes is not. The
sometimes is what makes it hard to spot.


I'll try to debug and see what exactly happens, since it's impossible
to reproduce it with simple example project.



It made me crazy, because, adding or enabling debug info in qt widgets,
everything appears to be OK, i.e. up to qtpagecontrol.inc,
TQtWSCustomTabControl.MovePage, and qtwidgets.pas TQtTabWidget.insertTab
all the tabs appear to be inserted in the right place, but in some cases
one of them is not. It would appear a real Qt code bug.

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


  1   2   3   4   >