Re: [Lazarus] Example of full screen console program anywhere?

2016-05-06 Thread Kostas Michalopoulos
How about using the Crt unit? It implements a Turbo Pascal-compatible API
under all supported targets and should work fine with terminals.

Example: http://pastebin.com/gzhsrv6x

On Thu, Apr 28, 2016 at 9:27 PM, Bo Berglund  wrote:

> On Thu, 28 Apr 2016 15:23:01 +0200, Bo Berglund
>  wrote:
>
> I went ahead and created a new Console Application in Lazarus where I
> use the same object for controlling the GPIO pins as I did in the GUI
> program.
>
> The Console program just initializes the control object then enters
> into a repeat loop reading a key from the user and then interpreting
> the key in a case construct for valid commands.
> It exits if the q key is pressed.
>
> When I run this in Lazarus all operates according to plan but as soon
> as I try to run it outside of the GUI, for example in a terminal in
> Raspbian or in a PuTTY terminal connected by SSH to the RPi literally
> nothing works of the stuff that should happen in the repeat loop!
>
> What I get is the greeting message and then when I press the keys that
> should produce the action nothing at all happens including pressing q,
> which is the exit code out of the loop and should terminate the
> program.
>
> For some reason it was possible to close it using Ctrl-C, though.
>
> In Lazarus I use the debug window "Terminal Output" and here
> everything planned works fine!
>
> What a mystery! This is the first time I have encountered such a
> difference!
>
> After some further debugging I found that the keypresses are not even
> handled in the repeat loop. It uses this type of construct:
>
>   //Display main screen
>   Writeln('Controls are:');
>   Writeln('p = Toggle 12V SS Power ON/OFF');
>   Writeln('w = Toggle WiFi Power feed ON/OFF');
>   Writeln('l = Toggle Alarm Lamp ON/OFF');
>   Writeln('s = Start SS by sending a 1s pulse');
>   Writeln('q = Quit the program and reset the control lines');
>   Writeln('Press any key!');
>
>   //Check input and act on commands
>   repeat
> Read(cKey);
> case cKey of
>   'p': //SS Power toggle command
> ...
>   until cKey = 'q';
> end;
>
> I added debug printing to the case sections to see what was sent in
> and the answer was NOTHING!
> It seems like Read() does not return anything for a simple key press
> unlike what happens in the Lazarus debug window. So the program
> probably just hangs on the Read(cKey) command, but in Lazarus it does
> not so it is impossible to debug...
>
> Then I tested to use the Enter key and surprise! Now the relays
> operate...
>
> But this should happen exactly when the key is pressed not when Enter
> is also pressed later. I use Read() instead of Readln() just in order
> to get one single key to process...
>
> What could be done to fix this?
>
> >
> >--
> >Bo Berglund
> >Developer in Sweden
>
>
> --
> Bo Berglund
> Developer in Sweden
>
>
> --
> ___
> 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] CMS in Pascal ?

2016-03-13 Thread Kostas Michalopoulos
I don't know about CMS, but if you are only looking for a few static pages,
i wrote a small tool some time ago that generates a static site with few
generic static pages, galleries and news. It is kind of a poor man's iWeb,
except it doesn't have a WYSIWYG element at all :-P.

http://runtimelegend.com/tools/webgroan

It has a few built-in themes but making your own is trivial. There is no
binary download at the moment, but it should compile out of the box with
Lazarus.


On Sun, Mar 13, 2016 at 12:06 PM, CML Christian Hartnick 
wrote:

>
> http://wiki.freepascal.org/Lazarus_Application_Gallery#Hagen_.28crossplatform.29
>
>
> Am 12.03.2016 um 10:25 schrieb Michael Van Canneyt:
>
>>
>> Hi,
>>
>> I'm looking for a minimalist flat-file CMS. There are many floating
>> around,
>> I found a list on e.g.
>>
>> http://www.hongkiat.com/blog/flat-cms/
>>
>> Is there one written in Object Pascal ?
>>
>> Michael.
>>
>> --
>> ___
>> 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
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Is there any alternative to PPL (Parallel Programming Library) on FPC?

2016-02-25 Thread Kostas Michalopoulos
Check the MTProcs unit in the multithreadprocs package (part of Lazarus,
but you need to manually install it from the Install/Uninstall Packages
box). This wiki page describes how to use it:

http://wiki.freepascal.org/Parallel_procedures

On Thu, Feb 25, 2016 at 5:38 PM, silvioprog  wrote:

> Hello,
>
> Just a quote from Embarcadero doc
> 
> :
>
> The RTL provides the Parallel Programming Library (PPL), giving your
>> applications the ability to have tasks running in parallel taking advantage
>> of working across multiple CPU devices and computers. The PPL includes a
>> number of advanced features for running tasks, joining tasks, waiting on
>> groups of tasks, etc. to process. For all this, there is a thread pool that
>> self tunes itself automatically (based on the load on the CPU’s) so you do
>> not have to care about creating or managing threads for this purpose.
>
>
> To check it, we can take a small example (full source here
> )
> that looks for prime numbers using a classic for loop:
>
> var
>   I, Tot: Integer;
>   SW: TStopwatch;
> begin
>   Tot := 0;
>   SW := TStopwatch.Create;
>   SW.Start;
>   for I := 1 to Max do
> if IsPrime(I) then
>   Inc(Tot);
>   SW.Stop;
>   WriteLn
> (Format('Sequential For loop. Time (in milliseconds): %d - Primes
> found: %d',
> [SW.ElapsedMilliseconds, Tot]));
> end;
>
> The result:
>
> Sequential For loop. Time (in milliseconds): 764 - Primes found: 348513
>
> Now, a similar example however using PPL:
>
> var
>   Tot: Integer;
>   SW: TStopwatch;
> begin
>   try
> Tot := 0;
> SW := TStopwatch.Create;
> SW.Start;
> TParallel.For(2, 1, Max,
>   procedure(I: Int64)
>   begin
> if IsPrime(I) then
>   TInterlocked.Increment(Tot);
>   end);
> SW.Stop;
> WriteLn
>   (Format('Parallel For loop. Time (in milliseconds): %d - Primes
> found: %d',
>   [SW.ElapsedMilliseconds, Tot]));
>   except
> on E: EAggregateException do
>   ShowMessage(E.ToString);
>   end;
> end;
>
> Result:
>
> Parallel For loop. Time (in milliseconds): 315 - Primes found: 348513
>
> Awesome, I got a nice performance using PPL and it seems a nice feature,
> but where can I get anything like this for FPC?
>
> Thank you!
>
> --
> Silvio Clécio
>
> --
> ___
> 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] Lazarus Release 1.6

2016-02-22 Thread Kostas Michalopoulos
Hm, i might be missing something, but where is the option that enables the
compiler progress status?

On Thu, Feb 18, 2016 at 5:16 PM, Mattias Gaertner  wrote:

> The Lazarus team is glad to announce the release of Lazarus 1.6.
>
> This release was built with FPC 3.0.0.
> The previous release Lazarus 1.4.4 was built with FPC 2.6.4.
>
> Here is the list of changes for Lazarus and Free Pascal:
> http://wiki.lazarus.freepascal.org/Lazarus_1.6.0_release_notes
> http://wiki.lazarus.freepascal.org/User_Changes_3.0.0
>
> The release is available for download on SourceForge:
> http://sourceforge.net/projects/lazarus/files/
>
> Choose your CPU, OS, distro and then the "Lazarus 1.6" directory.
>
> Checksums for the SourceForge files:
> http://www.lazarus-ide.org/index.php?page=checksums#1_6
>
> Minimum requirements:
>
> Windows:
>   98, 2000, XP, Vista, 7, 8/8.1, 10, 32 or 64 bit.
>   Win98 and WinNT IDE needs FPC 2.6.4 and building with flag
> -dWIN9XPLATFORM.
>
> FreeBSD/Linux:
>   gtk 2.8 or qt4.5, 32 or 64bit.
>
> Mac OS X:
>   10.5 to 10.11, LCL only 32bit, non LCL apps can be 64bit.
>
> The svn tag is
> http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_6
>
> Here is the list of fixes for Lazarus 1.6:
> http://wiki.freepascal.org/Lazarus_1.6_fixes_branch
>
> For people who are blocked by SF, the Lazarus releases from SourceForge
> are mirrored at:
> ftp://freepascal.dfmk.hu/pub/lazarus/releases/
> and later at (after some time for synchronization)
> http://michael-ep3.physik.uni-halle.de/Lazarus/releases/
> and
> http://mirrors.iwi.me/lazarus/
>
> Mattias
>
> --
> ___
> 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] non Unicodode application

2016-02-12 Thread Kostas Michalopoulos
I suppose a more clear question would be...

is it possible for now and the foreseeable future to have FPC (3.0+, not
just 2.x) make the "string" type (not rawbytestring or anything else)
behave as it was behaving always since the beginning of time without any
source code changes but (say) via some compiler argument?

I suppose it is worth to have something like this avoid breaking code that
exists out there (some might consider it as already broken, but for many if
it works - especially if it worked for years - it isn't broken and IMO that
is a valid stance to take).


On Fri, Feb 12, 2016 at 3:38 PM, Juha Manninen 
wrote:

> On Fri, Feb 12, 2016 at 3:25 PM, Michael Schnell 
> wrote:
> > Any automatic type conversion would kill the application.
> > [...]
> > will this be possible with future versions of Lazarus ,as well ?
>
> I guess you mean automatic encoding conversion for strings. (?)
> The automatic conversion is NOT a feature of Lazarus. It is a feature
> of FPC 3.0+.
> If you don't want it then you can continue using FPC 2.6.4. It is a
> valid choice in some cases, thus Lazarus will support FPC 2.6.4 for
> some time to come.
>
> Juha
>
> --
> ___
> 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] New menu designer

2015-12-22 Thread Kostas Michalopoulos
Here is how it looks here: http://imgur.com/CN5dwQR (i use GTK+ 2 with a
classic windows theme).

It seems to crash very often and i cannot see any border in the popup
menus. Also i'm not sure if the right blue arrows are supposed to be there
(i get it is a "placeholder" for making submenu, but it looks odd).

TBH, IMO the whole left sidebar looks like a waste of space. The "stats"
are useless, at least to me as a user (maybe they are useful to someone
working on LCL internals) and the buttons can be done via the right click
menu. And TBH all of the commands look like they should be done via
drag-drop.

Since the menu editor is redesigned, why not do it like in Windows Forms
and NetBeans with the "inline editor" which is part of the form editor?
These editors are IMO way more user friendly than what the classic Delphi
(not sure what Delphi does today) and current Lazarus menu editor.


On Wed, Dec 23, 2015 at 1:39 AM, Juha Manninen 
wrote:

> On Wed, Dec 23, 2015 at 12:42 AM, Anthony Walter  wrote:
> > As such, in the case of editor menus, it makes total sense to keep the
> menu
> > editor on top of other IDE windows until the time when the user closes
> the
> > menu editor (clicks the X button in the menu editor title bar). Any non
> stay
> > on top form style for menu editing would driver users crazy.
>
> Correct, and this becomes more important when AnchorDocking is used.
> Some other windows, namely Actionlisteditor and Collectionitem have
> the same issue.
> Forum user Soner A. had a valid point here:
>
> http://forum.lazarus.freepascal.org/index.php/topic,30663.msg195989.html#msg195989
>
> I was already planning to check the behavior of those windows and ask
> for opinions.
>
> Ondrej, r50993  makes no difference.
> Anyway, I am planning to remove the whole "Checkmark and radioitem
> properties" dialog. Any (strong) objection?
>
> Juha
>
> --
> ___
> 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] In the event anyone want to read social reactions to FPC 3.0

2015-11-26 Thread Kostas Michalopoulos
I read all comments and didn't notice any mention of performance for Free
Pascal. All mentions i saw were for Python.

FWIW i visit Reddit all the time and this is probably by far the most
"positivity filled" release - and there was almost no mention of "ah
Pascal, this reminds me of my youth days when " which seem to be very common when Free Pascal or Lazarus are
mentioned :-P. There were a couple of those on the Hacker News thread
though :-).


On Fri, Nov 27, 2015 at 12:42 AM, Anthony Walter  wrote:

> If anyone is curious about what programming world social network reactions
> are to the Free Pascal 3.0.0, this thread on reddit /r/ programming was #1
> for a few hours Today:
>
>
> http://www.reddit.com/r/programming/comments/3ua93i/free_pascal_compiler_300_is_now_released/
>
> It would probably be a good idea to read through the comments and see if
> our community can build on some of the positive or negative remarks.
>
> I read through the comments while generally they were mostly very
> positive, a few people commented on execution speed or some lack of
> language features like advanced RTTI or anonymous methods.
>
> I think it would be productive for the Free Pascal Community to possibly
> address the positive and negative. For example with regards to execution
> speed, it could be pointed out that the FPC has excellent BASM and native
> code integration. Reusing native system libraries is very easy with FPC,
> especially given how the PME (properties, methods, events) make for
> creating superior wrapper classes.
>
> Anyhow, for the American mailing list subscribers out there, have a happy
> Thanksgiving Day and thanks go out to the Free Pascal team!
>
> --
> ___
> 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] FPC Pestering Peacock (3.0.0) release

2015-11-26 Thread Kostas Michalopoulos
Wow, that is a great release. Two major things for me:

1. I had a bug in my 3D world editor for some time now that i couldn't
spot. Turns out, i was accessing the fields of a direct getter property
(property Foo: TSomeStruct read FFoo...) that in 2.6.4 most of the time it
worked but now and then it accessed garbage. The code looked right (this
might be a negative for property syntax looking exactly like variable field
syntax...) so i never focused on that bit. But 3.0.0 refused to compile it
and once i changed it, the bug went away.

2. The editor's lightmapper seems to be between 3 to 3.5 times faster! Of
course having said that, it is really unoptimized and a lot of the slowness
in 2.6.4 seemed to be from FPC inserting tons of calls to "hidden" methods
so probably the speed up came from optimizing the usage of those (i haven't
investigated why it is faster, i just report it - besides i plan to rewrite
the lightmapper anyway since it is a prototype that outlived its purpose
for almost four years :-P but in the meanwhile the performance boost is
very welcome).

And above all (since i was very skeptic when hearing about all the changes
in 3.0.0), beyond the #1 case (which was an error anyway) i didn't had to
change anything in my codebase - it compiled right out of the box :-).

Thanks :-)


On Thu, Nov 26, 2015 at 7:48 PM, Joost van der Sluis  wrote:

> Op 26-11-15 om 12:57 schreef Bart:
>
>> On 11/25/15, Joost van der Sluis  wrote:
>>
>> We are happy to announce the release of the Free Pascal Compiler version
>>> 3.0.0 "Pestering Peacock".
>>>
>> Sources on FPC website still link to the 2.6.4 version
>> (http://www.freepascal.org/down/source/sources.var)
>>
>
> Fixed, thanks.
>
> Joost.
>
>
> --
> ___
> 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


[Lazarus] Spam in the Wiki main page

2015-09-26 Thread Kostas Michalopoulos
Hi all,

Some of the main page links (like the 30 second tutorial) seem to lead to a
spam/virus site. I do not have an account there so if anyone can, please
remove them.

http://wiki.freepascal.org/

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


Re: [Lazarus] An online package manager

2015-08-08 Thread Kostas Michalopoulos
I would make this more complicated than absolutely necessary.

lpk files have version and dependency information. AFAIK that is all you
need to get a minimum working package manager using a central repository
although i'd like to see multiple repositories that provide packages (f.e.
personally i'd prefer to host my own packages on my server).

IMO what needs to be done is quite simple:

 1. Have the downloadable packages be a zip file (tons of tools can make
them, Lazarus can read them, etc) with the package directory as it should
be after installation, with the lpk and all.
 2. Once a package is uploaded to a repository, it should extract the lpk
file so that it can show information about the package in a web view and...
 3.  Lazarus can download a list of available packages from a repository
and when requested, it will download the lpk file to show the details. Once
the user decides to download a package, the full zip is downloaded with the
dependencies (if they are not already installed) and have them extracted in
some place (user designated or just C:\lazarus\downloaded or something like
that) and the lpk files installed.
 4. Done. Restart Lazarus for the new stuff to take effect.

I know that there might be some minor issues or things people would like
(like multiple lpk files or even separate metadata file, a format with
better compression, a better gui, etc) but really those can be done later
and IMO the majority of packages will work just fine with this setup. The
other things like comments, rating, etc can also be done later.

I think that if something is going to be done, it needs to be the minimal
work that needs to get things going because otherwise, it will get stalled
(and it has been a while I hear about an online package installer :-P).


On Sun, Aug 9, 2015 at 2:11 AM, Juha Manninen juha.mannine...@gmail.com
wrote:

 On Sat, Aug 8, 2015 at 4:27 PM, Aradeonas aradeo...@operamail.com wrote:
  Is there any work on this subject until now or any one like to work on
 this
  subject? If yes I want to help.

 The fppkg is for FPC packages. It does not work with Lazarus packages.
 There is a GUI for fppkg in Lazarus named LazarusPackageManager but it
 is broken. It should be fixed or removed.

 We need a similar system for Lazarus packages and maybe other Lazarus
 resources.
 The idea is not new and there is even some skeleton code for it in
 package Aarre. Nothing functional yet unfortunately.

 Studying this issue has been on my ToDo list for long. Some open questions
 :

 1. How much synergy with fppkg should it have? Can it share code?

 2. Meta-package file format? I guess it should be a GZip package
 containing Lazarus package sources + other metadata. What other
 resources should be supported? More metadata is needed.

 3. Support for user comments and votes for the packages. The GUI in
 Lazarus must support adding and viewing them.

 4. List of servers. Initially it should be CCR but can be extended.
 The ideal situation is that all package authors provide such
 meta-packages somewhere.

 5. A website. Is it needed to find the packages and advertise them?
 This may have synergy with fppkg again.

 If you are serious about this project, you should study the issue and
 make a plan with some diagrams even.
 I believe a SVN branch in Lazarus repo can be organized if needed.
 If fppkg code must be refactored and then reused, it may be easier to
 first fork it and then later offer to FPC project as a patch.

 Regards,
 Juha

 --
 ___
 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] An online package manager

2015-08-08 Thread Kostas Michalopoulos
Of course I meant that I would *NOT* make this more complicated than
necessary...

On Sun, Aug 9, 2015 at 3:47 AM, Kostas Michalopoulos 
badsectorac...@gmail.com wrote:

 I would make this more complicated than absolutely necessary.

 lpk files have version and dependency information. AFAIK that is all you
 need to get a minimum working package manager using a central repository
 although i'd like to see multiple repositories that provide packages (f.e.
 personally i'd prefer to host my own packages on my server).

 IMO what needs to be done is quite simple:

  1. Have the downloadable packages be a zip file (tons of tools can make
 them, Lazarus can read them, etc) with the package directory as it should
 be after installation, with the lpk and all.
  2. Once a package is uploaded to a repository, it should extract the lpk
 file so that it can show information about the package in a web view and...
  3.  Lazarus can download a list of available packages from a repository
 and when requested, it will download the lpk file to show the details. Once
 the user decides to download a package, the full zip is downloaded with the
 dependencies (if they are not already installed) and have them extracted in
 some place (user designated or just C:\lazarus\downloaded or something like
 that) and the lpk files installed.
  4. Done. Restart Lazarus for the new stuff to take effect.

 I know that there might be some minor issues or things people would like
 (like multiple lpk files or even separate metadata file, a format with
 better compression, a better gui, etc) but really those can be done later
 and IMO the majority of packages will work just fine with this setup. The
 other things like comments, rating, etc can also be done later.

 I think that if something is going to be done, it needs to be the minimal
 work that needs to get things going because otherwise, it will get stalled
 (and it has been a while I hear about an online package installer :-P).


 On Sun, Aug 9, 2015 at 2:11 AM, Juha Manninen juha.mannine...@gmail.com
 wrote:

 On Sat, Aug 8, 2015 at 4:27 PM, Aradeonas aradeo...@operamail.com
 wrote:
  Is there any work on this subject until now or any one like to work on
 this
  subject? If yes I want to help.

 The fppkg is for FPC packages. It does not work with Lazarus packages.
 There is a GUI for fppkg in Lazarus named LazarusPackageManager but it
 is broken. It should be fixed or removed.

 We need a similar system for Lazarus packages and maybe other Lazarus
 resources.
 The idea is not new and there is even some skeleton code for it in
 package Aarre. Nothing functional yet unfortunately.

 Studying this issue has been on my ToDo list for long. Some open
 questions :

 1. How much synergy with fppkg should it have? Can it share code?

 2. Meta-package file format? I guess it should be a GZip package
 containing Lazarus package sources + other metadata. What other
 resources should be supported? More metadata is needed.

 3. Support for user comments and votes for the packages. The GUI in
 Lazarus must support adding and viewing them.

 4. List of servers. Initially it should be CCR but can be extended.
 The ideal situation is that all package authors provide such
 meta-packages somewhere.

 5. A website. Is it needed to find the packages and advertise them?
 This may have synergy with fppkg again.

 If you are serious about this project, you should study the issue and
 make a plan with some diagrams even.
 I believe a SVN branch in Lazarus repo can be organized if needed.
 If fppkg code must be refactored and then reused, it may be easier to
 first fork it and then later offer to FPC project as a patch.

 Regards,
 Juha

 --
 ___
 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


[Lazarus] Bug? Form (in design mode) shrinks every time i click on a component in the palette

2015-04-17 Thread Kostas Michalopoulos
So i have this weird problem under Linux with the GTK2 backend (it doesn't
happen in the Qt backend): every time i click on a component button in the
palette, the designed form shrinks a bit (about 30 pixels or so). This
happens in the stable 1.2 version, 1.4RC and trunk. Deleting ~/.lazarus etc
doesn't fix it so it isn't a settings issue.

I tried to debug it a bit by adding breakpoints in SetBounds, DoOnResize,
etc but couldn't find where the resize request comes from (OnResize stuff
comes from a WM message). What is even more weird, commenting out the
OnClick code in the component palette so that it isn't handled at all,
still causes it - i suspect some weird combination of GTK+ events might
cause it since the buttons are still pressed. Although TBH this was mostly
shooting blind trying to find some clue.

The only thing i suspect is the window manager i'm using, Window Maker,
might not support some of the more recent window hint/style/etc stuff
(although i'm using the latest version and is in active development since a
few years now). Steam also seems to have trouble with interacting with
wmaker, but that one implements its own widgets and it might be a bug they
didn't bother to fix. Every other program i've tried seems to work fine
with wmaker so i'm not sure if it is that (and besides it works fine with
the Qt backend).

Does anyone have any idea what might cause this and how to fix it (no,
replacing wmaker isn't an option :-P besides if it is a bug there i'll just
fix wmaker)?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Bug? Form (in design mode) shrinks every time i click on a component in the palette

2015-04-17 Thread Kostas Michalopoulos
Ah yeah, i forgot to mention that the shrink is vertical only.

On Fri, Apr 17, 2015 at 2:03 PM, Salvatore Coppola coppolastu...@gmail.com
wrote:

 about 30 pixel recall me scrollbar width

 2015-04-17 13:12 GMT+02:00 Kostas Michalopoulos badsectorac...@gmail.com
 :

 So i have this weird problem under Linux with the GTK2 backend (it
 doesn't happen in the Qt backend): every time i click on a component button
 in the palette, the designed form shrinks a bit (about 30 pixels or so).
 This happens in the stable 1.2 version, 1.4RC and trunk. Deleting
 ~/.lazarus etc doesn't fix it so it isn't a settings issue.

 I tried to debug it a bit by adding breakpoints in SetBounds, DoOnResize,
 etc but couldn't find where the resize request comes from (OnResize stuff
 comes from a WM message). What is even more weird, commenting out the
 OnClick code in the component palette so that it isn't handled at all,
 still causes it - i suspect some weird combination of GTK+ events might
 cause it since the buttons are still pressed. Although TBH this was mostly
 shooting blind trying to find some clue.

 The only thing i suspect is the window manager i'm using, Window Maker,
 might not support some of the more recent window hint/style/etc stuff
 (although i'm using the latest version and is in active development since a
 few years now). Steam also seems to have trouble with interacting with
 wmaker, but that one implements its own widgets and it might be a bug they
 didn't bother to fix. Every other program i've tried seems to work fine
 with wmaker so i'm not sure if it is that (and besides it works fine with
 the Qt backend).

 Does anyone have any idea what might cause this and how to fix it (no,
 replacing wmaker isn't an option :-P besides if it is a bug there i'll just
 fix wmaker)?


 --
 ___
 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


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


Re: [Lazarus] Impressive web development

2015-04-16 Thread Kostas Michalopoulos
Turbo Pascal 3 on my IBM 5150 PC can build and run programs faster than it
took this thing on an enterprise-level internet connection to build
whatever it builds and tell me that it cannot connect to the sample
application's page.

So, yeah, no i'd also prefer these things to not become commonplace.
.

On Thu, Apr 16, 2015 at 12:23 AM, brian br...@meadows.pair.com wrote:

 On Tue, 14 Apr 2015 21:32:30 +0100, you wrote:

 Hi,
 
 I just came across this on Google+ - probably the most impressive web
 app I've ever seen. It is called Codenvy and is a fully functional
 zero-configuration integrated development environment.
 
   http://ow.ly/LBJUa ?
 
 Are we going to see such a web based Lazarus IDE soon? ;-)  It should
 help stop all those FPC  Lazarus installation issue support emails. :)
 

 On behalf of those of us with the misfortune to live in areas where
 you have no alternative to capped satellite internet connections (or
 worse yet, dial-up - there are still a few such unfortunates here in
 Maine) I sincerely hope not!

 Brian.

 --
 ___
 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] Z-order not working

2015-04-01 Thread Kostas Michalopoulos
On Wed, Apr 1, 2015 at 5:19 PM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:


 Can Lazarus already handle such developer defined components? I
 remember the good old days of Delphi 7. Define a nice Form or Frame
 template. Select everything and drag it to the component palette and
 magically you have a developer defined component you can reuse.


I'm not sure about drag-drop (i only have Delphi 2 available and last time
i used any more recent Delphi was the personal edition of 6 -ithink- that i
got from a magazine CD cover years ago).

But you can create custom designable components using frames in Lazarus.
They're not as neat as a custom component made in pure code (and i honestly
haven't yet figured out if i can modify the components in a frame after
placing them or not and what happens if i modify the frame after that, so i
usually avoid touching frames after making them). I use frames all the time
(although because of the ambiguousness i mentioned i almost always
instantiate them via code instead of via the component bar).
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Default Form placement

2015-03-10 Thread Kostas Michalopoulos
Doesn't Delphi use a single window interface with embedded form nowadays?
Probably this is why it has a poDefaultPosOnly default instead of
poDesigned, which i think makes more sense for the multi window interface
of Lazarus and Delphi1-to-7.



On Mon, Mar 9, 2015 at 8:19 PM, C Western l...@c-m-w.me.uk wrote:

 On 09/03/15 19:10, C Western wrote:

 On 09/03/15 18:38, Bart wrote:

 On 3/9/15, C Western l...@c-m-w.me.uk wrote:

  I currently have Delphi 7 and XE3, and in both of these the default is
 poDefaultPosOnly,


 Just tested Delphi 7: default is poDesigned.

 Bart

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


 Slightly baffled - just double checked. My Delphi 7 definitely has a
 default of poDefaultPosOnly, and I don't think this is settable by the
 user.

 Colin

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

 Sorry - my mistake - I was testing on Delphi 2007, not Delphi 7. I had
 lost track of the version names. My original comment still stands - the
 current default is not poDesigned.


 Colin

 --
 ___
 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] Default Form placement

2015-03-09 Thread Kostas Michalopoulos
I guess old Delphi did that (well, all Delphis i have used did that but i
only used Delphis up to 7 and most of my Delphi experience is with Delphi
2).

Also TBH i prefer poDesigned myself because i dislike the windows moving
around in the run/edit cycle when i design the UI first. I always change it
later (to one of the poblahCenter) of course. Also i think i used
poDefaultPosOnly only once...

On Sat, Mar 7, 2015 at 12:12 PM, C Western l...@c-m-w.me.uk wrote:

 I have noticed that the default position for a form in the LCL is
 poDesigned, while in Delphi it is poDefaultPosOnly. PoDesigned seems an odd
 choice – it is far to easy to place a form on a large monitor while
 designing that is off screen on a small one. Is there a reason for this
 difference?

 Colin

 --
 ___
 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] How to write an eficient lexical scanner/parser?

2015-03-06 Thread Kostas Michalopoulos
This is a classic series of articles that show how to write a very simple
compiler in Turbo Pascal. The fundamentals when it comes to scanning are
the same:

http://compilers.iecc.com/crenshaw/

I've also written a BASIC implementation for Free Pascal and Lazarus. The
scanner should be straightforward to understand:

http://runtimelegend.com/rep/rbasic/artifact/2350e85c36a77e4d2d76adde23fd7d45731b5b22

The compiler code shows how it can be used:
http://runtimelegend.com/rep/rbasic/artifact/93859f52fd424edfc1e0d5dfd16a92ed8ac04855

But you may also find the formatter code simpler. Although it is a bit too
simple:
http://runtimelegend.com/rep/rbasic/artifact/f3e9fb2d1ed8e60d36b50754c2d9a7d7c109fc40

For general theory you can look on recursive descent parsers (they're the
simplest to implement and AFAIK most compilers use them, either to build
the token list or directly).


On Fri, Mar 6, 2015 at 6:55 PM, silvioprog silviop...@gmail.com wrote:

 Hello,

 I'm planning to write three parsers, and googling, I found some entries
 talking about lexical parsers.

 After that, I did a 'find in files' in FPC sources, and I found many
 parsers (eg: jsonparser (jsonscanner), JSParser (JSScanner), fpsqlparser
 (fpsqlscanner), PParser (PScanner), fpexprpars etc.) that use lexical
 scanner.

 Below, three possible string that I need to parse:

 1)

 ${someVariable} -- 4 tokens

 or

 ${a + b} -- 8 tokens - 1 expression

 or

 ${fn:lenght('abc') * 3} -- 11 tokens - 1 function - 1 expression

 2)

 c:forEach var=contact items=${contactDao.list}
 ${contato.name}, ${contato.email}
 /c:forEach

 3)

 contacts[0].name=abc
 contacts[0].email=abc@def
 contacts[1].name=def
 contacts[2].email=def@ghi

 So my parser will allow to register dynamic variables, functions (to be
 called via script) and plugins (to extend the parser).

 However, I have a question: is there any article about 'how to write
 lexical parsers' using Object Pascal?

 I need any material about this subject, and I'm very grateful for any tip.

 Thanks in advance!

 --
 Silvio Clécio
 My public projects - github.com/silvioprog

 --
 ___
 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] Multi-Device Designer

2015-02-26 Thread Kostas Michalopoulos
I cannot run the demos since Java now blocks everything that hasn't
submitted to the certificate mafia - apparently that was easier than Oracle
sandboxing their VM, but i took a look on the PDF. And sadly this isn't a
real solution.

This only solves issues like positioning, but doesn't solve issues like
having the File - Exit menu item being hidden in Mac builds, the Apple
menu (where the Quit menu item should be in Mac) being hidden in Windows
and Linux builds, using Cmd as a shortcut prefix instead of Ctrl, using
different images for Windows, Linux and OS X (since all these three OSes
have different design styles - ok Linux and Windows can share theirs, but
OS X icons tends to be larger and usually the toolbars have less buttons),
etc.

In fact personally i'd be against such quick fix solutions because
they'll provide less incentive to do the right thing later.


On Thu, Feb 26, 2015 at 11:49 AM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 On 2015-02-25 14:05, Kostas Michalopoulos wrote:
  Even if Lazarus sticks to desktop only stuff, Windows,
  Linux and OS X (...especially OS X) have different conventions when it
  comes to layout, icons, spacing, etc and at the moment the only solution
 is
  either ignore them (and have your program look awful under OS X)

 There is an alternative solution. In the fpGUI project we have ongoing
 efforts to port/implement a Object Pascal version of the java MIG Layout
 Manager. One of MIG's many features is support for OS specific
 conventions like spacing, button order etc.

   http://www.miglayout.com/

 If you can, run the Swing Demo to see what everything MIG can do. Part
 of the demo is the OS specific conventions.


 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/

 --
 ___
 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] Embedded/small database

2015-02-17 Thread Kostas Michalopoulos
Sqlite can be very fast, but it needs the proper setup for that (which may
not be relevant in all cases).

Beyond that, Sqlite has a lot of high profile users (not to make a piss
match, but i couldn't see any big users in Firebird's site and even those
didn't seem to mention if it was embedded or client/server):

https://www.sqlite.org/famous.html

There are other less known uses of course, like the Fossil VCS and AFAIK
Apple also uses it for the time capsule and FS versioning.

Honestly, i wouldn't put down Sqlite :-).

However you need to make sure that Sqlite is what you are looking for.
After all in their site they say that  SQLite is not designed to compete
with Oracle. SQLite is designed to compete with fopen(). (or AssignFile in
Lazarus' case :-P).

To put it differently, if i wanted to make an application to associate tags
and colors with images (for fast theme lookup), i'd use Sqlite. If i wanted
to make a bookstore chain application, i'd probably use PostgreSQL.

I wouldn't use Sqlite for configuration since this is what INIs are for :-P


On Tue, Feb 17, 2015 at 6:26 PM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 On 2015-02-17 14:54, leledumbo wrote:
  It has much easier setup, though. Even easier than embedded firebird.

 Firebird's setup is pretty easy. I've deployed Client/Server and
 Embedded firebird under Windows, Linux and FreeBSD. For embedded I
 simply shipped the DLL/SO files needed and it all worked like a charm.

 Something else to comment on - I have no clue about this for Sqlite.
 Firebird has loads and loads of 3rd party tools like Flamerobin etc to
 view, query and analyse your database. In recent Firebird versions you
 also have server side tracing support which is awesome for debugging SQL
 calls.

 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/

 --
 ___
 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] Embedded/small database

2015-02-16 Thread Kostas Michalopoulos
Is this something that will be networked or running locally? If it is a
local only program, i'd go with sqlite.

On Sun, Feb 15, 2015 at 7:16 PM, Graeme Geldenhuys 
mailingli...@geldenhuys.co.uk wrote:

 On 2015-02-15 16:58, zeljko wrote:
  Maybe you should look at Firebird.

 +1

 Regards,
   - Graeme -



 --
 ___
 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] CHM help age and readmechm.txt in a fresh installation

2015-01-22 Thread Kostas Michalopoulos
On Thu, Jan 22, 2015 at 10:33 AM, Marco van de Voort mar...@stack.nl
wrote:


 (no snapshot generation because the docs didn't build?)


That would be a very good incentive to fix the docs though (not to mention
that most likely the build will fail locally before someone submits a
change). Someone downloading the snapshot/source from svn will need to have
up to date docs, not whenever the last time they were generated. And it
will solve issues like how the windows installer distributes two year old
documentation.

Of course a no-help build should also be provided since you don't need to
generate the help every time you build the code, but normal builds should
also build the docs.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] CHM help age and readmechm.txt in a fresh installation

2015-01-22 Thread Kostas Michalopoulos
On Thu, Jan 22, 2015 at 12:31 PM, Marco van de Voort mar...@stack.nl
wrote:

 That assumes people do full release building locally. Usually one doesn't,
 and only builds the module to test.


Aren't full builds made before one submits something to SVN?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] CHM help age and readmechm.txt in a fresh installation

2015-01-21 Thread Kostas Michalopoulos
Which is why i'm asking, shouldn't those be generated automatically for
each build? Make it part of the build process, i mean, so there wont be a
need to do it manually, have a change to make a mistake or forget some case
(like the one with Windows - FWIW mine also mention at the bottom that they
were generated on 2 August 2012 and the files have that date) and people
who build Lazarus from source will have them out of the box and up to date.
AFAIK all the files are there anyway, what is stopping it becoming part of
the build?


On Wed, Jan 21, 2015 at 9:54 AM, Mattias Gaertner nc-gaert...@netcologne.de
 wrote:

 On Tue, 20 Jan 2015 22:37:31 +0100
 Andreas Frieß fri...@gmx.at wrote:

  On Tue, Jan 20, 2015 at 06:56:16PM +0100, Kostas Michalopoulos wrote:
   Shouldn't the CHM files be (re)generated when a full build is made?
   FPC chm's are generated on every RC and final build. Last is for 2.6.4
 and
   can be found in the doc dir of FPC, dated 2014-02-25
  
  I see. But in the actual Lazarus (Install for Windows) the chm's are
  from 24.8.2012. I think something was going wrong.

 The rpms, debs, dmg and zips have chms from September 2013.

 Mattias

 --
 ___
 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] CHM help age and readmechm.txt in a fresh installation

2015-01-20 Thread Kostas Michalopoulos
Shouldn't the CHM files be (re)generated when a full build is made?

On Tue, Jan 20, 2015 at 5:58 PM, Andreas Frieß fri...@gmx.at wrote:

 Am 20.01.2015 um 17:43 schrieb John Landmesser:

 perhaps that is the solution?

 http://sourceforge.net/projects/lazarus/files/Lazarus%20Documentation/
 Lazarus%201.2/

  Maybe, a solution, but the files inside the download have the date
 19.06.2013 11:06. This more than one and a half year old ! For the fpc it
 can be ok, but for Lazarus, i don't know.

  Am 20.01.2015 um 11:37 schrieb Andi:

 I do a complete fresh installation  of Lazarus 
 (lazarus-1.2.6-fpc-2.6.4-win32.exe)
 from 20.1.2015, on a complete fresh PC.
 I found the chm documentation in the Lazarusinstalldir/docs/chm, but the
 files in this directory are from 24.8.2012 13:21 !!

 Is this the last documentation and correct for this build ?


 Andreas

 --
 ___
 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


[Lazarus] Extending the IDE to edit icons/images from inside Lazarus

2015-01-18 Thread Kostas Michalopoulos
Hi all,

I have made the following component: http://i.imgur.com/V7PRW4o.png

It provides an image editing dialog that i want to use in a few of my
programs. However i thought to also use it with Lazarus instead of (or in
addition to ) the Load image dialog that appears when you click on a
TPicture (or similar) property like the Glyph of a TSpeedButton, the icon
of a program, the image for a menu, etc so one can create an icon right
there instead of using an external program (the component also has two
buttons to load/save images if one wants to do that).

Does anyone have any pointers towards doing that? I suspect there aren't
any hooks for that (the easiest would probably be adding a button in the
Load image dialog, but i think that is an unnecessary extra click - click
on the property, click on the button, draw stuff, instead of click on the
property, draw stuff). Where in the code should i look at?

I haven't uploaded the component anywhere yet, i want to try and do that
first so that the design package is distributed with the normal component
package :-)

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


Re: [Lazarus] New FPC 3.0 and Lazarus 1.4 Test Installer

2015-01-14 Thread Kostas Michalopoulos
Well, there is this package:

http://lazplanet.blogspot.com/2013/03/run-lazarus-in-single-window.html

There was also a fork which was mentioned a few months here that seemed to
have its own modifications for the form designer, but i cannot find it now.


On Wed, Jan 14, 2015 at 7:23 PM, Samuel Herzog sam_her...@yahoo.com wrote:

 Thank you!

 Nice installer!

 Run's fine on winxp sp3.

 Sam

   --
  *Von:* Anthony Walter sys...@gmail.com
 *An:* Lazarus mailing list lazarus@lists.lazarus.freepascal.org
 *Gesendet:* 19:19 Montag, 12.Januar 2015
 *Betreff:* [Lazarus] New FPC 3.0 and Lazarus 1.4 Test Installer

 I've created a FPC 3.0 and Lazarus 1.4 test installer for Windows. It will
 not interfer with any other installations you already may have and is
 available for download here:

 http://cache.codebot.org/lazarus/setup.exe

 I will be creating Debian/Ubuntu and OSX install scripts in a day or two.

 I've made a few minor changes.

 1) Anchored design view is installed by default.
 2) Some windows have had their tools minified and/or better aligned.
 3) Some code editor defaults have been changed.

 I'll also be hosting manual build instructions and all setup scripts on
 github after a round of testing.

 --
 ___
 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


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


Re: [Lazarus] New FPC 3.0 and Lazarus 1.4 Test Installer

2015-01-14 Thread Kostas Michalopoulos
Yeah i know about that feature of the form designer, but it doesn't work
with the object inspector (so, f.e, if i change align, glyph, style, font
or anything else that will reflect in the form designer, it wont show up).

TBH i also like how the window looks like a window since most docked form
designers either put some fake borders or they don't bother at all. The
best docked form designer i've seen is the one that Xojo (ex RealBasic)
uses, which tries to be as faithful to the native UI (under Linux it uses
the default GNOME style) and is always centered (another annoying thing
almost every single docked form designer is that if you maximize the IDE
window, the form is shown at the top left area which especially in a big
monitor like 1920x1080 or 2560x1440 can be very hard to edit).

BTW wasn't there some fork or something of Lazarus that added an embedded
form designer? Why wasn't that backported to Lazarus?

On Wed, Jan 14, 2015 at 5:29 PM, Anthony Walter sys...@gmail.com wrote:

 Kostas,

 I agree, I'd also like to a docked form designer but that is likely
 something a long way off.

 In the meantime, I'm not sure if you are aware, but a great new feature
 was added to Lazarus for docked mode recently and I urge you to try it out.
 This feature brings the form designer to the top whenever you touch a
 component on the palette. Additionally, I've pinned the visual layout tree
 above the object inspector for times when you want to set properties of
 already placed components. And finally, the quickly F12 key toggles between
 code editor and the form if you need that. I honestly hope you give the new
 feature a bit of a try before make a final judgement.

 If after trying out this new feature you still prefer the floating
 Windows, it's simple to go back to the old layout.

 Simply select Package - Install/Uninstall Packages from the main menu,
 click on AnchorDockingDsgn in the left column (the first item), click
 Uninstall Selection, and finally click Save and rebuild the IDE. The
 IDE will rebuild itself momentarily  and you will be back to the floating
 window layout.

 This is the same process, but with different package names, for adding or
 removing any IDE enhancements, as well as installing/uninstalling
 components.

 Regarding your concern of colors, you can set them to whatever you like.
 If you prefer the default Lazarus color scheme, right click in the editor
 and select Options - Colors, and switch to Default colors using the
 second button in the toolbar.

 --
 ___
 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] virus in lazarus-1.2.6-fpc-2.6.4-win32.exe?

2014-12-12 Thread Kostas Michalopoulos
I've found that virustotal quite often marks programs made with FPC as
having viruses. Usually one or two of the checkers there (and avast
sometimes is one of them). Messing with compiler flags (like how DLLs are
being used) tends to make them go away.

You can download an ISO with Windows directly from Microsoft, put it on a
VM like VirtualBox, install FPC, make a small program, upload it to
virustotal and have some of the antiviruses there tell you that there are
viruses on the program :-P


On Fri, Dec 12, 2014 at 10:08 AM, Frederic Da Vitoria davito...@gmail.com
wrote:

 2014-12-12 9:47 GMT+01:00 Dr Engelbert Buxbaum engelbert_buxb...@web.de:


 Hi,

 Avast  reports  that  several files from the win executable of Lazarus
 are  infected with win64 evo-gen. Is this a problem of Lazarus or of
 Avast?

 Sincerely

 Engelbert


 Do you mean the IDE lazarus.exe file or an executable compiled by
 Lazarus/fpc? When did the Avast message appear? When you installed
 /upgraded Lazarus or after Avast upgraded it's virus database (which
 happens quite frequently IIRC)?

 I have downloaded and installed Lazarus 1.2.6, and my AVG didn't say
 anything. Still doesn't say anything now, actually.

 You could have a mutating virus on your system which Avast could not
 detect before but has later infected your Lazarus executable, but I guess
 this is a false positive. You could check with https://www.virustotal.com/

 --
 Frederic Da Vitoria
 (davitof)

 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org

 --
 ___
 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] Only VCL-compatible components in LCL

2014-12-12 Thread Kostas Michalopoulos
I've always found CCR to be a hacky and hard to use solution, starting from
the requirement to use SVN or Git.

IMO the best solution would be to have a real package manager that can
access repositories (with a default one provided by the lazarus devs that
should replace the CCR and provide everything in it) from inside Lazarus
that can download and install packages. Opening a project file that relies
on a package should scan the repositories to see if it is available and ask
the user to download it. The user should not need to do anything more than
selecting Yes or No there and to install new packages should be done from
the Add / Remove packages window that is already there. Basically what
Netbeans and Eclipse are already doing for many years now (especially
Eclipse).

Personally i have a bunch of Lazarus projects at my site that many of my
own programs use. Right now one has to track and download each requirement
separately - look at this wiki page
http://runtimelegend.com/rep/rtworld/wiki?name=Build+and+Prepare+Runtime+World
as an example (it used to be longer before multithreadprocslaz became part
of Lazarus itself). One needs to download, build and install four separate
packages manually. I could instead provide a repository that can be added
in the package manager (and even referenced from my program's project file
to be added automatically so the user wont even have to add it manually!)
and have Lazarus download and install the required packages.

As things are right now, if something is not part of Lazarus it is a great
pain to use it exactly because of all those extra steps required. Other
languages and environments have already solved that long time ago and i
think Lazarus should also do the same. Using a library should be as pain
free as possible and ATM in Lazarus it is hard - with the exception of
Windows, it is even harder than C and C++ since in Linux all popular
distributions include thousands of ready to use libraries which are
available with a single `apt-get` (or the distro's equivalent).


On Fri, Dec 12, 2014 at 8:19 AM, Hans-Peter Diettrich drdiettri...@gmx.de
wrote:


 Am 11.12.2014 um 14:29 schrieb Dmitry Boyarintsev:

  On Thu, Dec 11, 2014 at 1:11 AM, Hans-Peter Diettrich 
 drdiettri...@gmx.de wrote:

 As I understand that: The components in the LCL should be available with
 all supported widgetsets. An implementation for only one widgetset is not
 worth of adding it to the LCL, because it would burden the LCL maintainers
 with the implementation for all other widgetsets.


  On the other hand, it pretty much blocks anyone else to add components
 to LCL.
 Because an author has to introduce a solution for all (or most?)
 widgetsets by LCL.
  With more widgetsets introduced to LCL, it might be next to impossible
 for some developers.

 Why not leave it to the LCL maintainers, which controls should be added to
 the LCL, and which not? Provide them good reasons for doing so...

 DoDi

 --
 ___
 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] MDI - working implementation !?

2014-10-25 Thread Kostas Michalopoulos
Very interesting, i was actually looking into implementing MDI (for
Windows... AFAIK the Qt backend already has MDI support).

Although from a quick look at the code, it doesn't seem to do that, does
it? It looks like it only checks the form type, but still the forms are top
level, not under an MDI client window inside the main/MDI form.

On Sat, Oct 25, 2014 at 10:25 AM, zeljko zel...@holobit.net wrote:

 On 10/24/2014 02:03 PM, Herwig Niemeyer wrote:

 On transcribing an old Delphi-Program to a Lazarus-program i was in need
 do have working MDI-functions.
 I tried to implement them in customform.inc and they work fine with my
 program and in my environment.
 There are still some problematic spots in the code and i would
 appreciate comments/solutions for them.
 regards


 Please, learn howto make patch, open an issue about it at lazarus bug
 tracker and attach patch.
 I'll commit it after review. btw. what is your environment ? widgetset ?
 OS ?

 zeljko


 --
 ___
 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] Redundant text on project buttons

2014-10-16 Thread Kostas Michalopoulos
On Wed, Oct 15, 2014 at 6:34 PM, Jürgen Hestermann 
juergen.hesterm...@gmx.de wrote:

 But IMO the majority of icons is meaningless.
 Some even look very similar although they mean
 complete different things.
 Therefore I don't like them.


I was talking about the general idea for icons. Lazarus' icons aren't the
best though. The most immediate problem - IMO - is the use of color: which
is none. Almost all icons have a blue color making it hard to distinguish
them. Also the current icons do not have clean contrast in their outlines
which makes their outline invisible. As a rule of thumb, it should be
possible to locate an icon even when you squint.

IMO the older Lazarus icons were better for that, as shown here (notice the
strong outline and color use):
http://wiki.lazarus.freepascal.org/images/e/eb/ReactOS.png

Also having icons that relate to the similar thing have similar colors
help. For example in the image above all icons that relate to forms have a
red/gray palette and all icons that relate to files have a white palette.
Saving isn't consistent though - the diskettes could have the same colors
(this dark yellowish one) but they dont. Also the folder could use a
similar color (light yellow like mos folders).

Having the same palette for all icons isn't good. See the backlash that
Visual Studio 2012 got for making everything gray initially and how they
added more color after that because of it.

Also IMO some icons in Lazarus aren't good as pictures. For example the
New form icon has controls in it - it should be empty (as it is right now
gives the impress that it will show some settings, at least from a first
look). The Tab order icon uses two arrows - this means nothing really
when it comes to ordering - in this case it is about specifying a sequence,
so something linear (like a vertical list of items) or something that shows
the nature of the ordering (like a few tiny controls with numbers) would be
better. The current icon is also the same (on what it shows) as the restart
icon. Similarly the Anchor editor icon isn't really helpful - sure, you
edit anchors, but the real purpose of the editor is to specify layout. A
3x3 grid or something like that with L/R/T/B letters could be better. Or
some controls with the guidelines drawn. In other cases the images are
inconsistent: beyond the restart vs tab order i mentioned above, the Object
inspector and Project inspector icons are essentially the same (the gray
circle in project is barely visible and i actually noticed it after looking
the two icons for some time). In this case the Object inspector is the odd
one out since it looks like the box, pyramid, sphere icon is used to mean
Project in other icons. Another case is the Jump Back and Jump
Forward buttons which use the binoculars even though they have nothing to
do with search and are instead about navigation (the binoculars are
otherwise used for searching stuff in other icons).
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Redundant text on project buttons

2014-10-16 Thread Kostas Michalopoulos
I'm not that good actually, in my own programs
http://i3.minus.com/ibuyWlnHJorkXY.png sometimes i even ignore the color
grouping part :-P (although i do try to use colors that stand out and
contrasted outlines). Also my icons are very simplistic and in some cases
they look more like game sprites than icons :-P.

On Thu, Oct 16, 2014 at 3:22 PM, Howard Page-Clark h...@talktalk.net
wrote:

 On 16/10/2014 12:54, Kostas Michalopoulos wrote:

 On Wed, Oct 15, 2014 at 6:34 PM, Jürgen Hestermann
 juergen.hesterm...@gmx.de mailto:juergen.hesterm...@gmx.de wrote:

 But IMO the majority of icons is meaningless.
 Some even look very similar although they mean
 complete different things.
 Therefore I don't like them.


 I was talking about the general idea for icons. Lazarus' icons aren't
 the best though. The most immediate problem - IMO - is the use of color:
 which is none...


 What a very constructive contribution to this discussion. Thanks.

 What Lazarus has lacked (for the most part, so far) is a contributor who
 has your eye for good GUI analysis, design and consistency, combined with
 the graphic skills needed to implement elegant icons appropriately.
 My prayer is that this conversation which included a tirade against icons
 (and poor icons are indeed rather useless space-wasters) might result in
 someone(s) with the necessary skills and motivation offering improvements
 along the lines you suggest. Good application visual design is part of what
 a RAD IDE is meant to enhance, and it would be great if the IDE itself were
 an exemplary model of such excellence in GUI design which could stand the
 test of time in the way that most things Mac have justifiably become
 classics (without needing to slavishly follow every passing design fad).

 Howard



 --
 ___
 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] Redundant text on project buttons

2014-10-15 Thread Kostas Michalopoulos
As a visual person, i prefer icons over text. But those icons have to
make sense and be clear, not randomly chosen just to put something that
looks nice there. When i am in doubt, i rely on hints.

Also text below icons waste space IMO. You only need to learn once what a
button does/means (even when the icon isn't that clear, it'll still stay
the same), not every time you use the program.

But since not everyone thinks like that, i'd take the approach mentioned
previously - make it an option.


On Wed, Oct 15, 2014 at 11:59 AM, Michael Van Canneyt 
mich...@freepascal.org wrote:



 On Wed, 15 Oct 2014, hinsta...@yandex.ru wrote:

  yesss indeed a good idea for saving even more space on Project Explorer
 window:
 Add files = green thingy
 Remove files = red thingy
 Options = grey thingy
 Help = blue thingy

 Hmm I just come up with another idea: alternatively we could remove all
 these buttons from panel and then make it a menu which would appear when
 clicking window title icon (where we currently have Lazarus face thing):


 That does not work on non-windows. You have no access to the window title
 bar.

 Michael.


 --
 ___
 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] [FEATURE REQUEST] Check syntax on the fly

2014-09-22 Thread Kostas Michalopoulos
I agree with leledumbo, i really dislike that feature in modern IDEs
which all it does is slow down the editor and make random pauses.

On Mon, Sep 22, 2014 at 5:55 PM, leledumbo leledumbo_c...@yahoo.co.id
wrote:

  But if you share your opinion or direct me in the right way, I could try
 write it by myself.

 Feel free to write one, but IMO it's not a good idea to integrate it (or
 worse: having it installed and turned on by default) with the IDE. My
 primary reason is regarding speed. Features like this could eat cpu cycle
 in
 the middle of coding, thus decreasing IDE's responsiveness. Second, calling
 the compiler is fast. Only first call will be a bit slow due to loading of
 required units to RAM. After that, it runs in milliseconds.



 --
 View this message in context:
 http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-FEATURE-REQUEST-Check-syntax-on-the-fly-tp4038627p4038629.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] white popup hint box

2014-09-15 Thread Kostas Michalopoulos
I see yellow too, but why doesn't the hint box have a border? Hint boxes on
windows have a dark 1px border.

On Mon, Sep 15, 2014 at 4:05 PM, Rik van Kekem r...@graficalc.nl wrote:

 waldo kitty wrote:

 i'm also quite confused how you saw that image with that section
 yellowed... i've looked at the same image on several machines and see
 only white on white :/

 Like Anthony already found out, even if it's white on screen it really is
 a very light shade of yellow. You can see this by adjusting the brightness
 of your screen but with a laptop that's a bit more difficult. I've seen
 multiple times, especially with laptops, that you can't see these subtle
 colors. (For me, with a desktop-screen, the difference is really visible)

 If you don't want to change your theme you can change it in the source of
 Lazarus itself. But your other programs will keep a white hint. I don't
 know how to make a clearer border but the color is here:
 Lazarus_dir\LCL\Include\hintwindow.inc

 // Color := clInfoBk;
 Color := clYellow; // - for instance

 But clInfoBk is used a lot more throughout the Lazarus IDE so it might be
 better to change your theme. Maybe somebody else could hunt down the
 border-drawing for this tooltip (which i couldn't find off hand).



 --
 ___
 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


[Lazarus] Native toolbar

2014-08-27 Thread Kostas Michalopoulos
Hi all,

Is there a way to have a native toolbar since all (or almost all, anyway)
major platform backends (Win32, GTK+, Qt for sure, Carbon maybe?) provide
one? I can try to write a control for that, but i wonder if there is
already something like it.

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


Re: [Lazarus] Funny bug

2014-04-11 Thread Kostas Michalopoulos
Better not tou


On Fri, Apr 11, 2014 at 1:19 PM, zeljko zel...@holobit.net wrote:


 Or at least recognize https: and don't touch.


Better not touch it at all. What if i use /blah for a parameter switch?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Need help about CreateWindowEx

2014-02-16 Thread Kostas Michalopoulos
It looks like the code tries to create a tooltip window. I think Lazarus
provides this functionality by itself in a cross-platform way, so you may
want to look up that and replace the functionality there. An alternative
would be to create the tooltip window yourself.

The code you show isn't just creating any window, but it creates a window
of the class Tooltips_Class32 specifically which AFAIK provides the
tooltip functionality. So what you need to replace isn't the CreateWindow
part (that would be easy), but the tooltip functionality part.



On Sun, Feb 16, 2014 at 5:07 PM, FreeMan freema...@delphiturkiye.comwrote:

 Hello,
 I'm trying port components from delphi to lazarus, cross platform and QT
 widgetset
 CreateWindowEx On this winAPI I stoped and no info much for convert to
 widgetset. Can anyone has anyidea?
 What is aqual CreateWindowEx, DestroyWindow in linux QT widgetset?
 My system is Kubuntu x64 and last svn fpc  lazarus
 Thank you

 procedure CreateToolTip;
 begin
   fhToolTip := CreateWindowEx(0, 'Tooltips_Class32', nil, TTS_ALWAYSTIP or
 TTS_BALLOON or TTS_NOPREFIX,
 Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT),Integer(CW_USEDEFAULT),
 Integer(CW_USEDEFAULT), Handle, 0, hInstance, nil);

   if fhToolTip  0 then
 SetWindowPos(fhToolTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or
 SWP_NOSIZE or SWP_NOACTIVATE);
 end;

 procedure DestroyToolTip;
 begin
   DestroyWindow(FHToolTip);
 end;

 --
 ___
 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] play video and music from the web

2014-02-13 Thread Kostas Michalopoulos
On Thu, Feb 13, 2014 at 3:28 PM, Andrew Brunner atbrun...@aurawin.comwrote:

 There are politics involved with regard to streaming support.  I feel that
 pressure should be applied to FireFox for lack of support for mpeg.
  HTML5 is supposed to pave the way to have a native solution for
 streaming - e.g. to help developers depend less on proprietary components
 like FLASH; and move into depending on the browser.


Firefox supports H.264/AAC/MP3 video/audio playback but only when it is
already installed in the OS. See
https://bugzilla.mozilla.org/show_bug.cgi?id=799318
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] play video and music from the web

2014-02-13 Thread Kostas Michalopoulos
Possibly. In my computer the above site says that MP3 is supported (only
the second and third features aren't supported).


On Thu, Feb 13, 2014 at 7:12 PM, duilio foschi duiliofos...@euplan.comwrote:

 http://areweplayingyet.org/

 this is a nice suite of audio tests for html5 browsers :)

 The last version of Mozilla Firefox (stub 27.0) does not support the
 playback of MP3 in my PC running w7.

 Can one install a MP3 video player into w7 or w8 so that MF will be
 able to use it ?

 Thank you
 Duilio



 2014-02-13 18:52 GMT+01:00 Kostas Michalopoulos badsectorac...@gmail.com
 :
  On Thu, Feb 13, 2014 at 3:28 PM, Andrew Brunner atbrun...@aurawin.com
  wrote:
 
  There are politics involved with regard to streaming support.  I feel
 that
  pressure should be applied to FireFox for lack of support for mpeg.
  HTML5
  is supposed to pave the way to have a native solution for streaming -
 e.g.
  to help developers depend less on proprietary components like FLASH; and
  move into depending on the browser.
 
 
  Firefox supports H.264/AAC/MP3 video/audio playback but only when it is
  already installed in the OS. See
  https://bugzilla.mozilla.org/show_bug.cgi?id=799318
 
 
  --
  ___
  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

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


Re: [Lazarus] BSD Magazine Pascal quote

2014-02-04 Thread Kostas Michalopoulos
If you need examples of what can be done here are some i've made:

1. http://badsector.minus.com/mMhg91zP9 (almost everything is made in
Lazarus - the maze editor specifically was made in a few hours, ignore
the iOS stuff at the bottom those weren't made in Lazarus :-P)
2. https://github.com/badsector/lilcard (a hypercard clone - shots
here http://mac.softpedia.com/progScreenshots/LILCard-Screenshot-132187.html
- i'm not sure if it is the exactly same though since i never built it
for Mac OS X and i don't remember adding a dictation option... who
makes those Softpedia builds? I had other stuff from me built for Mac
:-P)
3. http://badsector.github.io/dcpustud/screenshots.html (DCPU-16
Studio, an assembler and VM for Notch's DCPU-16, at least the first
spec since after a couple of days i lost interest... but still is the
second most visited project of mine in GitHub - and for some time the
most starred Delphi project there :-P)
4. This is Free Pascal only: http://runtimelegend.com/rep/gasmas/index
(a 2D low level game framework, it says no docs but docs are actually
here: http://badsector.github.io/gasmas/doc/index.html). I'm not sure
how useful this will be for BSD though since i only have a X11 version
locally.
5. http://badsector.github.io/webgroan/ (website editor/generator)
6. Free Pascal only again: http://runtimelegend.com/rep/ol/index
(Scriptable console outliner)
7. Windows only, but well... it was made in some minutes so i could
play Crysis 2 :-P http://runtimelegend.com/rep/fullscreenizer/index
8. Most likely the simplest tool of all:
https://github.com/badsector/table (a CSV editor)

I have a lot of other stuff, but i don't remember where :-P. Also i
use Lazarus frequently at work for quick and dirty utilities.


On Tue, Feb 4, 2014 at 12:34 PM, Michael Schnell mschn...@lumino.de wrote:
 On 02/04/2014 11:57 AM, Hans-Peter Diettrich wrote:


 I've just visited the German Wikipedia page for Pascal, and found it in
 questionable state, too.

 +1

 -Michael


 --
 ___
 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] newbie

2014-01-27 Thread Kostas Michalopoulos
Well... almost. If you go to the site with a 64bit version of Windows,
you get a 64bit version of Lazarus which produces 64bit executables
that do no run on 32bit systems. The only way to make it produce 32bit
executables on a 64bit system is to create a special 32bit windows
build profile (which you need to keep up to date) and explicitly set
the target CPU/widgetset.

IMO since most people wont care about 64bit executables, it is better
to only give that download as an alternative option in 64bit Windows
systems, not as the default (and only) option.


On Sun, Jan 26, 2014 at 10:37 AM, Richard Mace richard.m...@gmail.com wrote:
 There is indeed and very goods it is too.
 Whichever Windows version you choose, Lazarus should work well for you.

 Richard


 On 26 January 2014 08:45, Sven Barth pascaldra...@googlemail.com wrote:

 On 26.01.2014 07:19, M.Zamil wrote:

 Hello all,
 I am new to Lazarus and I am wondering if there is a Lazarus for windows.
 TIA
 Mosaed


 When you visit http://www.lazarus.freepascal.org/ with a Windows OS you
 should already see the approbiate download link in the top right. If not,
 take a look here: http://www.lazarus.freepascal.org/index.php?page=downloads

 Regards,
 Sven


 --
 ___
 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


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


Re: [Lazarus] Lazarus Second Release Candidate, 1.2RC2

2014-01-25 Thread Kostas Michalopoulos
I noticed that the behavior of separatators and dividers in TToolbar
changed so that it now draws two lines for separators while previously
it only left some space... i do not think this is a good thing -
actually i initially i thought it was a bug and tried to dig in the
code to see why it happens, which is how i saw the comment about it
actually being intentional.

IMO the two lines look bad visually (i noticed them in the SVN version
and thought they were just a temporary bug that someone certainly will
notice and fix so i didn't mentioned them here) since in many themes
the divider's style is already made of two lines forming a relief. I
think that if something has to be shown there, it should be a single
centered line with bigger padding, which is at least visually distinct
from the separator. But in addition to that, changing this behavior
loses the previous ability for adding empty space between the buttons
(it can be hacked by adding a disabled button without label or
icon... but imo it is an ugly hack), so an extra style for empty space
should be added.

Alternatively restoring the previous behavior with an option in the
TToolbar to show separators in flat styled toolbar could be added
(although i'd suggest to avoid the double separators, they really look
ugly in my opinion :-P).


On Sat, Jan 18, 2014 at 10:15 PM, William Oliveira Ferreira
bdexterholl...@gmail.com wrote:
 as I said, I'm just a user of the feature, I don't really know what
 implications can came with this change. Today, if you change debug profile
 to another that doesn't generate that file, the compiler doesn't ignore it?
 Here, I tested (Lazarus 1.0.14 r43446 FPC 2.6.2 i386-win32-win32/win64) with
 an old project that have 2 build modes and one of them doesn't generate any
 debug symbols. Lazarus has just ignored my break points. Lazarus doesn't
 removed my debug file. Could this be a hint that external debug symbols
 could be used without issues?


 2014/1/18 Reinier Olislagers reinierolislag...@gmail.com

 On 18/01/2014 14:18, William Oliveira Ferreira wrote:
  2014/1/16 Martin laza...@mfriebe.de mailto:laza...@mfriebe.de
 
  What happens, if you have an external info file, and rebuild the exe
  (but without creating new debug info)? Will the wrong info be
  applied? Or will it be ignored?
 
 
 
 
 
  well, i think this issue affects expecially the IDE users and I
  wondering that lazarus always make their way to rebuild that file

 I don't quite understand your answer.
 AFAIU, Martin is describing this scenario:
 1. You build a project with external gdb info file
 2. You change the settings (or choose a different build mode) so it does
 not generate an external gdb info file, but do not remove the existing
 gdb info file
 3. You change the code and recompile, generating a new executable (and
 now the gdb info file and executable are out of sync)

 Are you saying the gdb info file will be ignored? If so, that is good to
 know.


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




 --
 
 William de Oliveira Ferreira

 --
 ___
 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] Lazarus Second Release Candidate, 1.2RC2

2014-01-15 Thread Kostas Michalopoulos
Is it really necessary to mention exe size in the Windows installer?
It looks very weird that from everything about Lazarus this has to be
mentioned in the installer.

Maybe a tips or faq or something in a welcome screen that
answers this and other first questions (how do i enabled opengl?,
how do i use a single window?, etc) should be better? (of course
such a welcome screen needs to be coded first :-P

2014/1/14 Michael Van Canneyt mich...@freepascal.org:


 On Tue, 14 Jan 2014, Kamen Ketev wrote:


 Hi,

 Can I use Lazarus on Windows 8.1?


 Yes, I do so.

 Michael.


 --
 ___
 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] Alpha transparency on GTK2 widgetset

2014-01-05 Thread Kostas Michalopoulos
Yeah, the proper approach would be to make a Cairo-based
gtk2devicecontext implementation and it might still be a valid goal,
depending on how long the gtk3 interface will be in development (after
all it took years for the gtk2 interface to become the default in
Linux). Also i think that with gtk2 and gtk3 being incompatible, we'll
see gtk2 to remain around for a while, especially in non-GNOME-based
desktop environments (such as MATE, the GNOME2 fork, XFCE, etc).

But for the short term, this solves some common issues. Some of the
stuff mentioned in the related bugs seem to require a more solid
conversion to Cairo since currently there is a lot of information
lost with the conversions between pixmaps and pixbufs.


On Sun, Jan 5, 2014 at 3:56 PM, Marc Weustink m...@dommelstein.net wrote:
 Nice job.
 I had a different approach in mind, but that required a rewrite of
 gtk2devicecontext and a lot of cairo stuff. This effectively would be
 similar to gtk3 and take a lot of time.
 After some initial rewrites, life changed and my time became limited. At the
 same time I heard rumors about a start of a gtk3 interface. So the interest
 of changing gtk2 dropped.
 I'm glad you wrote this patch.

 Marc




 On 4-1-2014 19:22, Kostas Michalopoulos wrote:

 I've made a patch that fixes the common cases (drawing an image with
 an alpha channel with optional scaling and flipping). It can be
 downloaded here:

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

 Here is also an image showing what this fixes:

 http://i.imgur.com/FH8wbX0.png

 The test program (attached on the bug report) shows the toolbar,
 image/icon and generated bitmap with TLazIntfImage/TRawImage. The
 latter is drawn normally, stretched, flipped and both stretched and
 flipped (as a side note the flipping doesn't seem to work under
 Windows but the API seems to support it and the unpatched GTK2 also
 supported that, so this is probably a bug in the Win32 widgetset).

 Also the watches toolbar in Lazarus is shown before and after the
 patch (notice the jaggies and missing pixels in the unpatched
 version).


 On Sat, Jan 4, 2014 at 4:38 PM, Juha Manninen juha.mannine...@gmail.com
 wrote:

 On Sat, Jan 4, 2014 at 5:20 PM, Kostas Michalopoulos
 badsectorac...@gmail.com wrote:

 Looking in the code, I think i see the problem.
 [...]


 Impressive. I still mostly don't understand GTK2 bindings code.


 For now i'm looking into trying to use the pixbuf when an image
 operation is requested and see if that helps for solving the most
 glaring issues with toolbars having no transparency and converting
 between tbitmap to tlazintfimage and back losing the alpha channel. It
 wont solve the issue of other operations (f.e. drawing a line, arc,
 rectangle, etc over an image with alpha channel), but that would
 require a complete rewrite of the GTK2 graphics context code to use
 Cairo (which will be necessary for GTK3 anyway).


 A patch for GTK2 bindings would surely be welcome.
 Do you know that GTK3 bindings also exist. They have a different
 architecture than GTK2 bindings.
 Zeljan has started them but they are in alpha state now.
 Contributions are welcome there, too.

 Juha

 --
 ___
 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



 --
 ___
 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] Beyond Compare 4 built with Lazarus 1.2

2014-01-04 Thread Kostas Michalopoulos
That is great, i *really* don't want to think about different
encodings between OSes and such and if i can make a UTF-8 everywhere
flag (where everywhere means LCL, FCL, RTL, Windows, Linux, OS X, etc
:-P) it would be perfect for me :-)

On Sat, Jan 4, 2014 at 12:27 PM, Michael Van Canneyt
mich...@freepascal.org wrote:


 On Sat, 4 Jan 2014, Jy V wrote:

 +1

 On 1/4/14, Kostas Michalopoulos badsectorac...@gmail.com wrote:

 Is there a way to ignore all these and make everything to work with
 UTF-8? Like setting some global variable that makes all strings
 (ansistrings) UTF-8 codepage or something that also causes any
 system-specific calls (Assign, Writeln, etc) to do automatic
 conversion from/to whatever the underlying OS uses?


 You'll be able to set a variable that will control the default codepage.
 This variable can be set to utf-8. That should do what you want.

 Michael.


 --
 ___
 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


[Lazarus] Alpha transparency on GTK2 widgetset

2014-01-04 Thread Kostas Michalopoulos
Hello,

I have a problem with the GTK2 widgetset: it doesn't seem to support
alpha channel. I'm using TLazIntfImage and related classes/objects
(TRawImage) to load and display images (converting from/to custom
bitmap structure to native structures so i can use them with canvas
for drawing, adding them to imagelists for use with icon views, tree
views, comboboxes, menus, etc). This works fine in Win32 and from a
quick test it seems to work in Qt4 too, but for the latter i'd like to
avoid it since i'm not using a Qt-based desktop myself and i prefer
GTK+. Also i would like to avoid the qt4pas dependency.

By looking around the bugtracker it seems that other people encounter
the same issue - some bugreports are old, like Graeme's one about
missing transparency from 2012.

What is the problem with (full) transparency in GTK2? Is anyone working on this?

Kostas

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


Re: [Lazarus] Alpha transparency on GTK2 widgetset

2014-01-04 Thread Kostas Michalopoulos
Looking in the code, I think i see the problem. The graphics
operations for GTK2 use GDK drawables which do not support alpha
blending. The bitmaps can be stored in 32bit pixbufs, but those are
not drawables and when a graphics operation is needed (drawing to a
canvas or blitting from one image to another), the graphics context
contains a generated pixmap (which only holds RGB data) and a mask
(which is 1bit). So all drawing operations are limited to 1bit
transparency.

However GDK does offer functionality for drawing pixbufs to drawables
but it is incompatible with the rest of the GDK graphics operations
(f.e. you can't draw an arc to a pixbuf so pixbufs cannot be used for
everything).

For now i'm looking into trying to use the pixbuf when an image
operation is requested and see if that helps for solving the most
glaring issues with toolbars having no transparency and converting
between tbitmap to tlazintfimage and back losing the alpha channel. It
wont solve the issue of other operations (f.e. drawing a line, arc,
rectangle, etc over an image with alpha channel), but that would
require a complete rewrite of the GTK2 graphics context code to use
Cairo (which will be necessary for GTK3 anyway).


On Sat, Jan 4, 2014 at 2:24 PM, Juha Manninen juha.mannine...@gmail.com wrote:
 On Sat, Jan 4, 2014 at 3:00 PM, Kostas Michalopoulos
 badsectorac...@gmail.com wrote:
 What is the problem with (full) transparency in GTK2?

 I have no idea.

 Is anyone working on this?

 Unfortunately not. There are only few people who know the GTK2
 bindings code. We would need more contributors for it.

 Right now I am going through Mantis issues with target 1.2. There are
 270 of them. Uhhh!
 Most of them must be postponed but maybe we can make it down to 250 before 
 that.
 Anybody who is interested, please look at the issues.
 Find the ones already fixed and provide patches for the ones that are
 not. Thanks. :)

 Juha

 --
 ___
 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] Alpha transparency on GTK2 widgetset

2014-01-04 Thread Kostas Michalopoulos
I've made a patch that fixes the common cases (drawing an image with
an alpha channel with optional scaling and flipping). It can be
downloaded here:

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

Here is also an image showing what this fixes:

http://i.imgur.com/FH8wbX0.png

The test program (attached on the bug report) shows the toolbar,
image/icon and generated bitmap with TLazIntfImage/TRawImage. The
latter is drawn normally, stretched, flipped and both stretched and
flipped (as a side note the flipping doesn't seem to work under
Windows but the API seems to support it and the unpatched GTK2 also
supported that, so this is probably a bug in the Win32 widgetset).

Also the watches toolbar in Lazarus is shown before and after the
patch (notice the jaggies and missing pixels in the unpatched
version).


On Sat, Jan 4, 2014 at 4:38 PM, Juha Manninen juha.mannine...@gmail.com wrote:
 On Sat, Jan 4, 2014 at 5:20 PM, Kostas Michalopoulos
 badsectorac...@gmail.com wrote:
 Looking in the code, I think i see the problem.
 [...]

 Impressive. I still mostly don't understand GTK2 bindings code.


 For now i'm looking into trying to use the pixbuf when an image
 operation is requested and see if that helps for solving the most
 glaring issues with toolbars having no transparency and converting
 between tbitmap to tlazintfimage and back losing the alpha channel. It
 wont solve the issue of other operations (f.e. drawing a line, arc,
 rectangle, etc over an image with alpha channel), but that would
 require a complete rewrite of the GTK2 graphics context code to use
 Cairo (which will be necessary for GTK3 anyway).

 A patch for GTK2 bindings would surely be welcome.
 Do you know that GTK3 bindings also exist. They have a different
 architecture than GTK2 bindings.
 Zeljan has started them but they are in alpha state now.
 Contributions are welcome there, too.

 Juha

 --
 ___
 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] Beyond Compare 4 built with Lazarus 1.2

2014-01-03 Thread Kostas Michalopoulos
Is there a way to ignore all these and make everything to work with
UTF-8? Like setting some global variable that makes all strings
(ansistrings) UTF-8 codepage or something that also causes any
system-specific calls (Assign, Writeln, etc) to do automatic
conversion from/to whatever the underlying OS uses?

On Fri, Jan 3, 2014 at 11:42 PM, Graeme Geldenhuys
mailingli...@geldenhuys.co.uk wrote:
 On 2014-01-03 21:37, Sven Barth wrote:

 This might bite you with 2.7.1 as ShortString is considered as being
 encoded in CP_ACP. Thus on systems were the system code page is not

 Thanks for pointing that out, and I've made a note to test this when the
 time comes. As previously mentioned, fpGUI only uses UTF-8 internally,
 and has fpg* specific functions for working with RTL and custom string
 functions. So when there is a String[4] or AnsiString type used
 somewhere, it is what some here consider a AnsiString hack.. ie: an
 array of bytes representing a UTF-8 string, but stored in an AnsiString
 container. When TfpgChar or TfpgString is used, the framework knows it
 contains UTF-8 encoded text.

 All this will be revisited and tested once the FPC 2.8.0 (or 3.0)
 release gets closer to realisation.


 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/

 --
 ___
 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] The future of desktop

2013-12-03 Thread Kostas Michalopoulos
On Mon, Dec 2, 2013 at 9:55 PM, Hans-Peter Diettrich
drdiettri...@aol.com wrote:

 Right, but it was the first desktop presented by Microsoft.


No it wasn't. GEM was presented by Digital Research, Microsoft had
nothing to do with it.


 I'm not sure what GEM has to do with multitasking.


You said that they were technically similar, which isn't the case.
Multitasking was an example of a major technical difference they had.


 I don't see a need for an special Windows compiler. The only requirement is
 a linker that links the resources into the executable. This was a separate
 program for a long time, in addition to the compiler and linker.


Windows (Win16) executables are a different format and while a linker
*could* do it, a windows-aware compiler is still needed. The Win16
calling convention is (was) different to whatever DOS compilers used
(usually compilers used their own). Windows was doing software-based
virtual memory management and would unload parts of the program by
unloading functions and patching the memory where the function was
make a system call for loading them back (so running code that tried
to call the function would continue to work). The compiler had to know
about that do make proper prologs and epilogs. Also AFAIK callbacks
required special handling too.

Some notes are given in
http://www.openwatcom.org/index.php/Exploring_Windows_3.x but that is
mostly Win3.x specific. There some notes about Windows 1.0 and Windows
2.0 in Raymond Chen's the old new thing blog, but i can't find
specifics right now.

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


Re: [Lazarus] The future of desktop

2013-12-02 Thread Kostas Michalopoulos
Actually, Microsoft has nothing to do with GEM, it was made by Digital
Research. Also technically GEM is/was very different from Windows (GEM
relies on interrupts and can run only a single program while Windows
was multitasking from the start, GEM apps can be made by any DOS
compiler that can issue interrupts and has the necessary header files,
Windows apps require special compilers, etc). You can check FreeGEM
for an up to date version (the source code of GEM was released a while
ago and some people fixed bugs and added a few features).

Both Microsoft and Digital Research were sued by Apple when their
systems were released. DR decided to modify their 'desktop' program to
disallow overlapping windows and removed the trash can (previously it
looked very similar to Mac Finder) while Microsoft decided to counter
Apple's claim. In fact Windows 2 was even more like Mac (overlapping
windows vs Windows 1's tiled windows, more Mac-like colors, etc) and
AFAIK even when Windows 3 was released, they hadn't settled yet on the
case.

Check http://toastytech.com/guis/guitimeline.html for a timeline, some
history notes, screenshots, etc of various GUIs over time, from the
first Alto to Windows 8.1 The site is slightly biased against
Microsoft, but the historic comments are good. I've read about
Microsoft's and Apple's history from a couple of books too (i like
computer history) and i think whatever mentioned there is mostly
right. I haven't checked everything in the site though and i believe
it misses some aspects (f.e. Lisa introduced more than just pulldown
menus - f.e. the whole concept of finder was something new at the time
and Andy Hertzfeld's book on the development of Macintosh has images
from other prototypes that show how much the Mac and Lisa teams
actually came up with that today we take granted).


On Mon, Dec 2, 2013 at 2:39 PM, Hans-Peter Diettrich
drdiettri...@aol.com wrote:
 Michael Schnell schrieb:

 On 12/02/2013 10:55 AM, Mark Morgan Lloyd wrote:

  I think you're at risk of mixing layers again.

 Of course you are absolutely right and I do know this.

 But I replied to Microsoft being the inventor of the desktop we are using.
 And Microsoft does not use a  (publicly) defined X layer but that layer is
 an integral part of what is perceived as the thingy that holds the programs'
 GUIs (and might be called Desktop).


 The first MS desktop was GEM, borrowed from Digital Research borrowed from
 Apple, I used it also on my Atari ST. License issues forced MS to create
 something slightly different, named Windows. The major difference of Windows
 (vs. GEM) is the added messaging system, with message pipes and loops, which
 turned the GEM event polling model upside down. Next come menus, which were
 moved from the screen into forms. The rest is technically almost the same,
 with only a different look to convince judges in defense against Apple and
 DRI claims.

 DoDi



 --
 ___
 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] Local CHM help files or web based?

2013-11-13 Thread Kostas Michalopoulos
For a very simple help (f.e. for a small program or utility) you can
also use LazHelp to embed the documentation in your application:
http://badsector.github.io/lazhelp/

Note that i haven't updated for a while so it might not compile
cleanly (it does compile though). Also i'm going to move it eventually
to some other place since i'm (slowly) migrating away from Git and
GitHub to self-hosted Fossil repositories.


On Tue, Nov 12, 2013 at 2:20 PM, Richard Mace richard.m...@gmail.com wrote:
 Hi all, I'm just about to start writing help files for my application but I
 can't work out whether to use web based ones or local c h m ones any ideas
 welcome?

 Richard


 --
 ___
 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] Why development remains constant for msdos?

2013-09-23 Thread Kostas Michalopoulos
On Mon, Sep 23, 2013 at 4:47 PM, Nikolay Nikolov nick...@gmail.com wrote:

 OpenWatcom may be the only other compiler that is able to do it, since
 they haven't dropped 16-bit support and are supposedly working on 64-bit,
 but their 64-bit port is still not ready AFAIK.


FWIW, there is an OpenWatcom fork which is under more active development
than the main one and has 64bit support there:
http://sourceforge.net/projects/openwatcom/. I haven't tried the 64bit
support myself though.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus scattered windows

2013-09-02 Thread Kostas Michalopoulos
On Mon, Sep 2, 2013 at 11:29 AM, Martin laza...@mfriebe.de wrote:

 Very often, when I use Alt+TAB to switch back to Lazarus I only see
 the source editor but none of the other windows (object inspector,
 message window, Lazarus main window, etc.).


 So how exactly do you not see the other windows? Or more to the point: Why?

 - Was Lazarus minimized before, and only one Window (e.g. SourceEdit was
 restored)?


I have experienced the same problem under Windows. It is somewhat rare and
seems to occur randomly, but IIRC when it happens Lazarus is minimized.
Although i can't reproduce it right now, so take this with a grain of salt.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Res: Re: bug in open package file

2013-08-28 Thread Kostas Michalopoulos
Try VLC. The video is quite clear about his steps.


On Wed, Aug 28, 2013 at 9:20 PM, Mattias Gaertner nc-gaert...@netcologne.de
 wrote:


  Junior lazarus.li...@gmail.com hat am 28. August 2013 um 06:07
 geschrieben:
 
 
  Lazarus 1.1 r42508M FPC 2.6.2 i386-linux-gtk 2
 
   r42508M 
 
  See:
  http://www.meulinux.com.br/lazarus.avi

 It does not play here.

 Maybe you can use words?

 Mattias

 --
 ___
 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] Cross compiler

2013-07-31 Thread Kostas Michalopoulos
On Mon, May 27, 2013 at 7:27 PM, Sven Barth pascaldra...@googlemail.comwrote:

 Compiling from Win64 to Win32 using a cross compiler is not supported,
 because of missing Extended support. Only when the softfloat unit is fully
 implemented support for


I might be getting things wrong and misunderstood the topic, but i'm sure
that you can compile Win32 programs from Win64 lazarus by settings the
proper target CPU and arch in the project settings. In fact this is how i
made the executable for this utility:
http://runtimelegend.com/rep/fullscreenizer/index (which i tried in a VM
running 32bit Windows XP and it worked).
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ReactOS

2013-07-29 Thread Kostas Michalopoulos
Every now and then i try ReactOS to see how things are going, but always
find some showstopper bugs. I might be a bit harsh, but i think that there
has to be something fundamentally broken with their approach if the project
is 17 years old (according to the copyright line at least) and they still
have issues with clipping regions (moving a window over another flickers
already visible stuff - which should never happen), bitmaps, etc. Also
sometimes opening a file dialog brings the whole thing to a blue screen -
i'd expect people to work on stabilizing the kernel before starting work on
the GUI. Sadly because of these issues i don't see it becoming usable as a
desktop OS any time soon.

Having said that, command-line stuff seem to more or less work, so  i was
considering using it to make automated Windows builds. Assuming this won't
crash the system, it should do the work just fine.




On Sun, Jul 28, 2013 at 10:16 PM, Graeme Geldenhuys gra...@geldenhuys.co.uk
 wrote:

 On 2013-07-28 13:21, Hans-Peter Diettrich wrote:
 
  Is somebody familiar with this problem? Who contributed Lazarus to
 ReactOS?

 I've had great success with fpGUI based applications tested under ReactOS.

 btw: I'm a bit confused about your statement... contributed Lazarus to
 ReactOS? As far as I understand ReactOS is a Windows OS clone, and
 allows simply running the setup.exe of any Windows program to install
 it. So why is Lazarus contributed to ReactOS? Are you suggesting there
 is a special build just for ReactOS? I would suggest simply download
 the lastest setup.exe of Lazarus from SourceForge and give it a go.

 Regards,
   Graeme



 --
 ___
 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] ReactOS

2013-07-29 Thread Kostas Michalopoulos
I can't say i hold Wine in that kind of positive view :-P. Although it has
been much more stable and compatible than ReactOS. I think Wine uses the
underlying window system while ReactOS has to implement its own.


On Mon, Jul 29, 2013 at 1:13 PM, Graeme Geldenhuys
gra...@geldenhuys.co.ukwrote:

 On 2013-07-29 07:46, Kostas Michalopoulos wrote:
  Every now and then i try ReactOS to see how things are going, but always
  find some showstopper bugs. I might be a bit harsh, but i think that
 there


 I have no idea how big the ReactOS development team is - I would guess
 small. I know they now use (or collaborate) a lot with the WINE project,
 and WINE is pretty good at running Windows software these days. If
 ReactOS uses the WINE code, it should be pretty good at running Windows
 apps, but I guess there might be some other factors at play too.

 Regards,
   - Graeme -




 --
 ___
 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] Memo for touchscreen

2013-07-18 Thread Kostas Michalopoulos
AFAIK this depends on the widgetset and OS configuration. In Windows 7 and
8 (desktop) for example you get a small icon/button at the bottom right of
side of the screen that shows a virtual keyboard you can use to type
stuff.


On Thu, Jul 18, 2013 at 1:54 PM, Koenraad Lelong
lazar...@de-brouwerij.bewrote:

 Hi,

 For a touchscreen-application  (so no real keyboard) I need something like
 a memo.
 I first tried a memo, but how do I enter text at the caret ? And the
 caretpos is readonly.
 Next I tried synMemo, but if I move the caret, the caret disappears. How
 can I show it ?
 How do I send a BackSpace, Delete ?
 How do I hide the rightedge of the synMemo ? Just set it to the
 backgroundcolor ?

 Is there a better component ?

 B.T.W. it will run on linux.

 Regards,

 Koenraad Lelong.

 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] Firefox OS

2013-07-17 Thread Kostas Michalopoulos
 Now if something like that can't, ultimately, be run from a shell or a
 makefile it's going to be problematic for an FPC port. It's going to be
 particularly problematic for the various tests that are run automatically
 to test the compiler's correctness: it's all very well saying that in the
 target environment FPC - asm.js is used strictly to run apps in the
 context of Firefox but that's hardly going to be convenient for working
 through a large corpus of test cases.


Asm.js is 100% compatible with normal JavaScript - the only difference is
that it is slower. But for testing this shouldn't be a problem and you can
use any JavaScript interpreter. Google V8's source code has a command-line
version (which Emscripten uses or used at some point for tests too) that
you can build (it is very easy, i did it at the past when i was messing
with Emscripten). Here is some information:
http://stackoverflow.com/questions/1802478/running-v8-javascript-engine-standalone

You will obviously need some sort of interface between the asm.js
function and the outside world for tests (f.e. what writeln would do?)
but you'd need that interface anyway since even for real asm.js use people
will need to provide such interfaces
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Kostas Michalopoulos
Since Firefox (and i assume Firefox OS) uses the new asm.js subset of
javascript (a js subset that looks like assembly which can be converted to
native code, something like a js-based portable LLVM bitcode), couldn't FPC
generate asm.js code instead of x86 assembly/machine code?

Obviously that wouldn't solve the GUI issue (one will still need to
implement a HTML-based (or whatever) LCL backend, but i think with canvas
nowadays that is possible).



On Mon, Jul 15, 2013 at 12:15 PM, Michael Schnell mschn...@lumino.dewrote:

 On 07/15/2013 11:58 AM, Michael Van Canneyt wrote:

 Delphi XE5 - scheduled for release in september is supposed to contain
 Android support.


 They already delayed this several times, so I don't hold my breath.

 In fact this would be the first support for Linux after Kylix death. (Of
 course without VCL compatibility.) In fact, this done, they rather easily
 should be able to support PC Linux and non-mobile ARM systems.

 -Michael


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] External SigFPE

2013-07-10 Thread Kostas Michalopoulos

 But maybe (not tested) this directive can help:
 http://www.freepascal.org/docs-html/prog/progsu69.html

Thanks, this is what i was asking for :-)
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] External SigFPE

2013-07-09 Thread Kostas Michalopoulos
On Sat, Jun 29, 2013 at 8:08 AM, Ludo Brands ludo.bra...@free.fr wrote:

 for speed optimization. If you want to raise the exception on the
 correct location you should insert an fwait opcode after every floating
 point operation which is very expensive.


Is there a way to enable this in FPC? Sometimes i get weird FP exceptions
that i'm not sure they point at the proper place.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [OT] New Lazarus website

2013-06-23 Thread Kostas Michalopoulos
Looks *great*! A huge improvement over the previous chaos... err, webpage i
meant :-P.

The only nitpick i have is that Tip of the day should be Random tip (or
something like that) since it changes every time you refresh the page, not
daily :-P


On Sun, Jun 23, 2013 at 4:42 PM, Juha Manninen juha.mannine...@gmail.comwrote:

 On Sun, Jun 23, 2013 at 4:56 PM, Juha Manninen
 juha.mannine...@gmail.com wrote:
  The process was already made as easy as possible by NOT requiring a
  local SMS installation.

 Sorry, I meant SMF, the Simple machines forum SW.

 Juha

 --
 ___
 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] Sharing of large files

2013-04-19 Thread Kostas Michalopoulos
On Thu, Apr 18, 2013 at 9:28 PM, Andrew Brunner atbrun...@aurawin.comwrote:

 I'm going to have to stop at this singular point.  Aurawin web apps are
 instantly accessible globally and scaleable.


Yeah, but the majority of people use their apps in one or two computers
(home and work) so it doesn't matter. But even if they wanted more...


  No fuss.  No desktop even today can do that.


...they could simply use a USB key to carry around their apps. Desktop apps
today tend to be more portable (in the you carry it around in your USB
key sense) than they used to.

Or more likely, they could simply install the app in both computers.


  Nothing to install, nothing to remove, and no risk to you.  Complete
 opposite of desktop software installs.


If the user wants to use an application he will download it and install it.
Users who want to use applications go out of their way to make them run if
these applications have any value to them (people are building *emulators*
to be able to do that!).

If there is no value in the application, then, sure, you must remove any
possible friction. But at that point you should keep in mind that you are
making something the users do not find worth even downloading.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Sharing of large files

2013-04-18 Thread Kostas Michalopoulos
On Tue, Apr 16, 2013 at 6:33 PM, Andrew Brunner atbrun...@aurawin.comwrote:

 Well, the only thing I would suggest is to compare.  Aurawin offers stream
 compression across all your devices.  And since it's a virtualized desktop,
 it works on ANY HTML5 enabled device :-) Further, Aurawin offers video
 streaming and conversion features that take your camera videos and converts
 them to streamable Mpeg formats.


I'm sorry if i'll sound too negative, but... Aurawin is the worst kind of
the web-based bloatedness that started to spread the last few years.

PLEASE PEOPLE STOP PUTTING ALL THIS #(*(@ ON THE BROWSER!

It is like developers wake up every morning and come up with new things to
shove in the browser. The web wasn't made for this!


 The Aurawin project is open source, so that means anyone can run their own
 servers.  Think of it as an open source virtual computer with apps.  File
 sharing is just one included offering.


Maybe, but right now i'm on a network that serves downloads for multiple
users over the world and i *still* had to wait several seconds in order to
show a simple login form. My 4.77MHz XT could do it faster than this.


 I feel that Aurawin social networking goes far beyond what our competition
 will **safely** offer.  But there is still much more work to be done there.


I don't care for your bloatedness. Dropbox installs a small deamon that
syncs files across computers with little network usage. That is all it does
and doesn't need to do anything more!

Stop bulletpoint driven development.

I agree.  But both Microsoft and their flagship Windows product is rapidly
 becoming irrelevant.


Yeah, only everyone minus a tiny ~2% minority in the world uses Windows.
And my quote was only an example to show that Features Do Not Matter. It is
where the people go that matters.

Now please stop the spam. Thanks.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Sharing of large files

2013-04-18 Thread Kostas Michalopoulos
On Thu, Apr 18, 2013 at 3:19 PM, Andrew Brunner atbrun...@aurawin.comwrote:

  Ok,  I can tell you are no fan of HTML5 :-(


No actually i am a fan, but not for shoving in the browser stuff that
should have been native applications that take full advantage of my
computer's resources and my operating system's facilities.

For example i am a fan of offline storage for storing things like the last
mailbox i opened in my web-based mail client (which makes total sense since
we're talking about something networked). I'm a fan of JavaScript using
requests to update the page partially so the whole thing doesn't have to be
reloaded every time. I'm a fan for WebGL when it is used for stuff like
showing in practice how some 3D math work (a recent series of
OpenGL/WebGL tutorials did that - for every lesson you had interactive demo
alongside the lesson - and it was a very good to learn).

I'm not a fan for trying to mimic desktop UIs (we have the desktop for
that) using a much slower technology that was never designed for such a
use. I'm not a fan of web apps which try to do stuff that would have been
trivial to do in the desktop using a dedicated tool for that (such as
Lazarus) and present the feat as something positive. I'm not a fan for
trying to create editors that - for security reasons obviously - cannot
fully access my file system. I'm not a fan of playing Quake 2 on my browser
when i can simply launch Steam and do it fine.

I'm not a fan of web apps which do stuff that proper native programs did
better and faster 20 years ago on the desktop.

I'm not a fan of web apps that if they were released as shareware 10
years ago would have been largely ignored by the users because of their
mediocre features and design and the only way they manage to survive today
is that users do not have to pay for them because the developers managed to
convert users to products by selling ads, usage statistics and other stuff.

I'm not a fan of relying on programs developed by people like the above and
by people whose only reason to make the program (service they call it
usually - but service to whom?) is so they get big and be bought by
Facebook, Google, Microsoft or whomever for whatever reason on which later
people will depend on them to not shut down like many others in the past.
Of course if you ask these developers they'll swear that they would never
do that and it never crossed their minds.

I'm not a fan of losing control of my computer.

That's simply not going to happen.  There is a rising tide that is pushing
 HTML to new heights.


The higher it'll go, the more painful the crash will be when it falls on
our heads.



 Wow.  That has to be the boldest statement I have ever heard.  On who's
 authority did you make that assessment?


it is right there in the name of the most important part of the whole web
platform: Hyper*TEXT* Markup Language.


 First loading, your browser must cache the framework.  Subsequent loads
 are fast.


Subsequent loads from the same computer with the same browser and assuming
i haven't configured the browser (or isn't configured by the IT department)
to clean the cache when i close it. Which, btw, even if it wasn't
configured as such, it is still too small (and for a reason: i'm not using
a cache to download the whole Internet).

If every site needs 1MB of framework (or whatever, i didn't really check
the framework size there) then they'll start fighting against each other in
the cache and invalidate it.

I'm not getting a faster connection so people can make bloated pages made
using the latest and greatest fad they learned about, i'm getting a faster
connection so things *will load faster*.


 Ah, so you are a minimalist.


When i want to do X i prefer a tool that does X alone, not X and Y and Z
and a bunch of other stuff i do not care about, especially when the latter
tool is MUCH slower than the former.


 Care to elaborate?


Do not develop software only to have more things to list as features. Good
software isn't always the software that has the most features.


 http://www.foxnews.com/tech/2013/04/16/windows-its-over-tech-site-declares


You could link to the original article, i found it more interesting :-P.

Yes, i agree that Metro is a failure and shouldn't exist (and probably wont
exist for long), but Microsoft has a TREMENDOUS inertia. It'll need
multiple equally big blunders for them to start being anything close to
irrelevant.


 As HTML5+ becomes adopted you will see a shift in alliances towards
 independence.


Sadly most of the time this independence seems to be independence from
users.


 I like to think that's what we're doing here.


Hopefully not. After all browsers aren't written to run in themselves.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Is the site http://forum.lazarus.freepascal.org dead?

2013-04-18 Thread Kostas Michalopoulos
Works from here too.

Very Wild Guess: maybe you have some sort of DNS cache issues or some bad
modem/router? I used to have an awful modem/router which every few months
would behave weirdly and needed a restart. Try to power it off and on again.


On Thu, Apr 18, 2013 at 8:07 PM, GREP eperg...@outlook.com wrote:

 Thanks.
 Is the address http://forum.lazarus.freepascal.org/ correct?
 Strange, It worked fine, but now I can't access it with IE nor with Firefox




 --
 View this message in context:
 http://free-pascal-lazarus.989080.n3.nabble.com/Is-the-site-http-forum-lazarus-freepascal-org-dead-tp4030766p4030773.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] What is most Lazarus Friendly Linux Distro

2013-04-16 Thread Kostas Michalopoulos
Similar to what Graeme suggested, except for Ubuntu: install the
libgtk2.0-dev (and the requirements), get FPC's binary (.tar) installer
(make sure you install it in /usr/local and not the default /usr), get the
source code for Lazarus, put it somewhere in your home directory (f.e.
~/Code/lazarus) and inside it type 'make bigide' (you don't need to do an
install since you can run it from there with ./startlazarus - not to
mention that you wont need to to mess with permissions later to rebuild
Lazarus in order to install components).


On Mon, Apr 15, 2013 at 11:18 PM, Graeme Geldenhuys gra...@geldenhuys.co.uk
 wrote:

 Slackware comes with ALL required libraries to do LCL-QT, LCL-GTK2,
 fpGUI etc development. Simply install FPC from the binary (*.tar)
 release. Download the source for Lazarus and do a 'make install bigide'.
 Nothing else is required.


 The same goes for FreeBSD 9.1.

 Regards,
   Graeme.


 --
 ___
 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] Sharing of large files

2013-04-16 Thread Kostas Michalopoulos
On Mon, Apr 15, 2013 at 5:25 PM, Andrew Brunner atbrun...@aurawin.comwrote:

 I disagree.  I think most people are willing to think different. The first
 come first serve is probably best disproved by MySpace vs Facebook and in
 turn Facebook vs Google.  People are free to make choices.  Otherwise you
 will have nothing but stagnation.


I didn't meant that people wouldn't go to another service, but it is true
that Dropbox has a lot of inertia and the alternatives do not offer
anything important to switch. Personally in all cases i know, they offer
worse - Dropbox is available in all major desktop OSes and mobile
platforms, has a very simple and intuitive setup and website, integrates
with the desktop even if you use something non-mainstream like Linux with
LXDE, has very good network usage with delta compression and such which is
very important if you use 3G, etc... i simply haven't seen all these
features combined in other similar services.

And with the folder sharing and the last feature they added with APIs for
developers to use they're also developing a strong network effect which
will make it harder for people to switch to somewhere else.

Also i'm not sure if people *always* switch to better alternatives. Case in
point: ICQ vs MSN. When MSN was introduced, ICQ was superior. But MSN came
with Windows :-).
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What is most Lazarus Friendly Linux Distro

2013-04-16 Thread Kostas Michalopoulos
On Tue, Apr 16, 2013 at 10:39 AM, Graeme Geldenhuys gra...@geldenhuys.co.uk
 wrote:

 The problem there being, if you install on a system that doesn't have
 internet, you can't install the libgtk2.0-dev (the X11 and GTK2
 requirements), libXft-devel (for anti aliased font support),
 libQtxxx-dev (for Qt work) etc.. The requirements is a hefty download -
 after the OS install.


If you do not have internet you wont be able to get Lazarus in the first
place.

If you do have internet but not at the machine you want to install Lazarus
you can use apt-zip which generates a script that can be executed in
another machine (including Windows machines, but it'll need wget and
probably Cygwin or MSYS) to download the necessary files and copy them to
an external USB drive. Then move the files to the target machine where you
want Lazarus, etc and install them there.

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


Re: [Lazarus] Sharing of large files

2013-04-15 Thread Kostas Michalopoulos
I use Dropbox for this and is good for my uses. Also most people seem to
use Dropbox instead of other similar services (possibly because it was the
first 'good' such service) and it is hard to convince them switch to other
stuff :-P


On Mon, Apr 15, 2013 at 4:21 PM, Graeme Geldenhuys
gra...@geldenhuys.co.ukwrote:

 On 15/04/13 14:04, Andrew Brunner wrote:
 
  I would certainly recommend people check out Aurawin.


 Just some user feedback...

 1) When I visit the url with Firefox, I get a nasty looking warning
 about website certificate issue - the website doesn't supply ownership
 information. I had to confirm the warning and check a combobox to
 permanently ignore the warning in future. Then only could I see the
 website. Not sure what that is about, but not a good entry to a website.

 2) What is up with the scrollbars? They operate wrong way round!
 Everywhere where I see a scrollbar on the right and click the
 scroll-button, and drag it with the mouse, the content moves in the
 wrong direction, compared to all other scrollbars on my PC. This is very
 annoying and confusing.

 3) Also while dragging the scrollbar-button, my mouse pointer moves
 faster than the scrollbar. So very quickly my mouse is at the bottom of
 the screen, but the scrollbar is still high up in the page. I have to
 then click the scrollbar again and do the scroll again. I have to repeat
 this a few times to get to the bottom of any scrollable area.



  Aurawin is entirely done with Lazarus/FPC :-)

 +1


 Regards,
   - Graeme -


 --
 ___
 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] Linux GUI Application define CONSOLE

2013-04-14 Thread Kostas Michalopoulos
As a side note, in order to figure out if your program is running under X11
in Linux you can simply check  for the DISPLAY environment variable:

program test;
uses
  SysUtils;
begin
  if GetEnvironmentVariable('DISPLAY')  '' then
Writeln('Hello X11')
  else
Writeln('Hello Console');
end.

Obviously the program will detect X11 even if it is running under a
terminal emulator like xterm, konsole, gnome-terminal, etc.

This way you can detect if the user tries to run the program from a pure
console (like a virtual terminal from Ctrl+Alt+F1 to F6 in most Linux
machines or from a remote connection via SSH) or from under X11 and use the
appropriate user interface at launch time.



On Sun, Apr 14, 2013 at 3:54 PM, leledumbo leledumbo_c...@yahoo.co.idwrote:

 If your design is modular enough, you can use frontend-backend
 architecture.
 Only the frontend should differ. This could be achieved by having 2 .lpi
 referencing the same backend unit, with each own frontend (user interface).

 Another way would be to use build mode, differing in -Fu paths. One will
 refer to the console unit, while the other to the gui. This way requires
 you
 to have both units having the same interface. To ease maintenance, you
 could
 instead make one unit, but the implementation part is just an {$include}
 directive. This time, -Fi (instead of -Fu) will decide the path where the
 include file should be searched. So the layout is like:

 Solution 1 (-Fu):
 -backend.pas
 -frontend/
 --console/
 ---frontend.pas
 --gui/
 ---frontend.pas

 Solution 2 (-Fi):
 -backend.pas
 -frontend.pas
 -include/
 --console/
 ---frontend.inc
 --gui/
 ---frontend.inc




 --
 View this message in context:
 http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Linux-GUI-Application-define-CONSOLE-tp4030537p4030599.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] IUnknown and reference counting

2013-03-21 Thread Kostas Michalopoulos
I haven't used (COM) interfaces so far since i didn't found any use for
them in my code, but i didn't knew about their reference counting
properties. That could save a lot of headaches i have with my 3D world
editor's lightmap generation (currently there is some wrong memory
deallocation somewhere that crashes the editor in partial lightmap
recalculations). I plan to redesign it at some point soon and i was
thinking how to handle this. Since there is native refcounting support in
FPC it makes things much easier.

However i did a small test and i noticed something that, to me (as someone
who hasn't used COM at all) looks a bit weird:

If i do a declaration like

type
  IResource = interface  end;
  TResource = class(TInterfacedObject, IResource) ... stuff ... end;

  TSomething = class
...
Resources: array of TResource;
...
  end;

then reference counting doesn't work. However if i change Resources to

Resources: array of IResource;

then it works. It seems that the compiler checks only the topmost type
and doesn't check if TResource implements the IResource and thus doesn't do
any reference counting. Is this a bug or it is supposed to work this way?

If the latter, is there a way to make the compiler do reference counting on
a variable that has a class type which implements an interface instead of a
type that is an interface itself? Or is there any other form of reference
counted classes?


On Thu, Mar 21, 2013 at 12:45 PM, Michael Schnell mschn...@lumino.dewrote:

 On 03/21/2013 12:30 PM, Graeme Geldenhuys wrote:

 On 2013-03-21 08:33, Michael Schnell wrote:

 parameters to the IDE when designing the program ? Based on this, COM /
 CORBA / ORB might be described as specializations of the concept.

 I'm not sure I understand your question.

 COM is Component Object Model and DCOM is Distributed Component Object
 Model, developed by Microsoft. This only works on the Windows platform.
 That is how the do ActiveX, and how Delphi does multi-tier support with
 MIDAS (using DCOM).

 That is exactly why I think the *language-concept* (here a thingy that
 provides reference counting, auto-creation and auto-deletion of an instance
 etc of a classes instance) should be described independently of COM, DCOM,
 Axtive X, MIDAS and such things that are not related to the language
 itself, while the language concept/syntax - being useful in itself, anyway,
 can *additionally* be used to allow the programmer to handle  COM, DCOM,
 Axtive X, MIDAS and such things.


  In terms of Free Pascal and Interfaces support. COM style interfaces
 simply means they are _compatible_ with Microsoft COM, and are reference
 counted. CORBA style interfaces are _compatible_ with how interfaces are
 implemented in the CORBA standard, and there they are not reference
 counted.

 Yep. But IMHO calling them something like reference counting interfaces
 and  not reference counting interfaces instead of COM style interfaces
 and CORBA style interfaces would be a lot more appropriate, as they are
 defined and usable for completely other stuff as well. In fact the term
 interface is rather misleading (as they are defined and usable for
 completely other stuff as well), but this of course is a Delphi heritage.


  For more information on COM, DCOM, CORBA and XPCOM technologies, search
 WikiPedia.

  Not necessary because (I already know) and *here* I am interested in the
 language concepts and not in the environment of the IDE or the program to
 be created.

 -Michael


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] IUnknown and reference counting

2013-03-21 Thread Kostas Michalopoulos
Yes, that is what i mean with topmost type: if you look at the
inheritance as a tree, TInterfacedObject is the topmost (or root, if you
think of it as an upside-down tree) of the type hierarchy. In this code

  type
IBlah = interface ... end;
TBlah = class(TInterfacedObject, IBlah) ... end;

TBlah is an IBlah, so i'd expect it to behave like IBlah.



On Thu, Mar 21, 2013 at 2:10 PM, Sven Barth pascaldra...@googlemail.comwrote:

 Am 21.03.2013 13:55, schrieb Kostas Michalopoulos:

  I haven't used (COM) interfaces so far since i didn't found any use for
 them in my code, but i didn't knew about their reference counting
 properties. That could save a lot of headaches i have with my 3D world
 editor's lightmap generation (currently there is some wrong memory
 deallocation somewhere that crashes the editor in partial lightmap
 recalculations). I plan to redesign it at some point soon and i was
 thinking how to handle this. Since there is native refcounting support in
 FPC it makes things much easier.

 However i did a small test and i noticed something that, to me (as
 someone who hasn't used COM at all) looks a bit weird:

 If i do a declaration like

 type
   IResource = interface  end;
   TResource = class(TInterfacedObject, IResource) ... stuff ... end;

   TSomething = class
 ...
 Resources: array of TResource;
 ...
   end;

 then reference counting doesn't work. However if i change Resources to

 Resources: array of IResource;

 then it works. It seems that the compiler checks only the topmost type
 and doesn't check if TResource implements the IResource and thus doesn't do
 any reference counting. Is this a bug or it is supposed to work this way?

 If the latter, is there a way to make the compiler do reference counting
 on a variable that has a class type which implements an interface instead
 of a type that is an interface itself? Or is there any other form of
 reference counted classes?

  The compiler does not check for any topmost type. It uses reference
 counting only for variables that are of an interface type not for a class
 type.

 E.g.:

 === example begin ===

 var
   i: IInterface;
   t: TInterfacedObject;
 begin
   t := TInterfacedObject.Create;
   t.Free;
   // no reference counting is done here

   i := TInterfacedObject.Create;
   i := Nil;
   // reference counting is done here
 end;

 === example end ===

 Regards,
 Sven


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] IUnknown and reference counting

2013-03-21 Thread Kostas Michalopoulos
Thanks, i understand that. My question is, can i somehow make FPC to add
AddRef/Release calls also to TBlah so i can use refcounting with a class
just like i would use it with an interface? Is there some technical
limitation on why this is only done with interfaces and not all objects
that descend from a refcounted interface?


On Thu, Mar 21, 2013 at 2:38 PM, Sven Barth pascaldra...@googlemail.comwrote:

 Am 21.03.2013 14:23, schrieb Kostas Michalopoulos:

  Yes, that is what i mean with topmost type: if you look at the
 inheritance as a tree, TInterfacedObject is the topmost (or root, if you
 think of it as an upside-down tree) of the type hierarchy. In this code

   type
 IBlah = interface ... end;
 TBlah = class(TInterfacedObject, IBlah) ... end;

 TBlah is an IBlah, so i'd expect it to behave like IBlah.


 And it behaves like an IBlah, because you can assign a TBlah to every
 variable or parameter that expects a IBlah.
 The point however is that the compiler only inserts calls to AddRef and
 Release (which are provided by the base interface IUnknown/IInterface and
 of which every (COM) interface is derived) if the variable you work with is
 of an interface type.


 Regards,
 Sven

 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] IUnknown and reference counting

2013-03-21 Thread Kostas Michalopoulos
No, i never said that. I said that i have a problem with the way i'm using
memory in my code currently (which is the result of the code doing stuff i
didn't originally planned - in particular i didn't plan to have partial
lightmap calculations) and i want to redesign it. Previously i would do
either something like manual refcounting or use some sort of lightmap
manager that would take care of managing the memory.

What i'm thinking right now is to simply create the lightmap objects (as
interfaces) from the lightmapper side and send them to the 3D world side.
My only concern for now is if interfaces are thread safe (that is, what
happens if two threads keep a reference for the same object) or i need to
do my own locking.



On Thu, Mar 21, 2013 at 3:09 PM, Graeme Geldenhuys
gra...@geldenhuys.co.ukwrote:

 On 2013-03-21 12:55, Kostas Michalopoulos wrote:
  properties. That could save a lot of headaches i have with my 3D world
  editor's lightmap generation (currently there is some wrong memory
  deallocation somewhere that crashes the editor in partial lightmap


 Don't be fooled to think Interfaces is the answer to all memory issues.
 The use of Interfaces is an advanced topic. There are many pitfalls
 you need to look out for when using them.


 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/


 --
 ___
 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] Labels and Font size

2013-03-18 Thread Kostas Michalopoulos
Using the anchor editor is a more lightweight and flexible approach than
using nested panels. You only need nested panels for very complex layouts.
The only problem is the anchor editor itself obscures the form you're
editing more often than not - i'd prefer to see anchor editing to be done
inside the form editor (possibly with the help of small context-sensitive
popups like those in Visual C#'s form editor) instead of using a big
separate window.

(btw in case you haven't used anchor editor, it isn't the same as editing
the anchors property in the object inspector - it something way more
flexible and configurable that i wish all GUI toolkits had)


On Mon, Mar 18, 2013 at 6:27 PM, Alexsander Rosa
alexsander.r...@gmail.comwrote:

 You must design the UI taking multi-platform in account.
 Default font is a safe bet; other fonts may be missing in some setup.
 Use autosize and nested panels to make sure the widgets don't get cropped.
 http://port2laz.blogspot.com.br/2012/02/new-screenshots.html


 2013/3/18 Jürgen Hestermann juergen.hesterm...@gmx.de


 Am 2013-03-15 19:14, schrieb Avishai:

  Have you specified a Font.Name and Font.Size?  If not, it will use the
 default Font for the system it is running on.


 No, I have used it with default font settings (I wasn't aware that this
 will not work).
 Can I be sure that a predefined font is available on all machines the
 program will be run on?


 --
 Atenciosamente,
 Alexsander da Rosa


 --
 ___
 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] What's External: SIGFPE?

2013-03-07 Thread Kostas Michalopoulos
Most likely it is your GTK+ theme. Many GTK+ themes and theme engines abuse
floating point calculations which go unnoticed normally since the vast
majority of C/C++ programs do not check for them. The solution is to do
something like (IIRC):

SetExceptionMask([]);


Which disables all floating point exceptions. Alternatively switch to a
theme that doesn't mess FP calculations, bu you can't guarantee that your
users will have it.


On Thu, Mar 7, 2013 at 10:04 AM, Xiangrong Fang xrf...@gmail.com wrote:

 2013/3/7 leledumbo leledumbo_c...@yahoo.co.id


 Because setting the mask means telling the processor to generate (or not
 to
 generate? I forgot) SIGFPE for the given operations. e.g. exZeroDivide may
 trigger SIGFPE if there's a division by zero with floating point
 operation.
 How to trace? You already get it, the program will report the line that
 causes it, you can directly go to the respective line to see what happens.
 But this requires that the code lies in the program space (not in external
 library) and the code is compiled with runtime error backtrace (-gl).
 Otherwise, the program can only report as deep as it can find.


 I don't understand:

 1) even if I set the masks, why an empty LCL application generate SIGFPE?
 It means that somewhere GTK or whatever library *indeed* do things like
 1/0, only that they are normally hidden/not reported?

 2) I already found the problem in my code which is a like look like:

 *if tbLog.Down then Y := exp(Y);*

 And Y is a big number e.g. 2500, which caused floating point overflow.
 The problem was that the number itself should be Log()ed, so that exp()
 only restore its original value.   That was my bug, but the weird thing is
 that SIGFPE is generated in unit LCLType on the line that set font height,
 which is very innocent, and after I commented out the font.Height
 operation, the SIGFPE slipped to somewhere else, but NEVER on the line that
 generated it!

 Could you explain why? and how to locate where the SIGFPE occurred?

 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] Ok I give up!

2013-03-04 Thread Kostas Michalopoulos
Do SaveToFile/LoadFromFile handle Unicode/UTF8 properly? The TStrings stuff
is in LCL which AFAIK doesn't use UTF8.


On Sun, Mar 3, 2013 at 3:14 AM, waldo kitty wkitt...@windstream.net wrote:

 On 3/2/2013 13:20, Mark Morgan Lloyd wrote:

 Note that if you download the helpfiles manually, you might have to be
 careful
 of exactly where you put them: it's easy to have a situation you've
 unpacked
 them in a slightly different directory from where lhelp expects.


 agreed... and if following the given instructions, things do work but
 files are not where they should apparently be...

 by that i mean that chm files are placed in html directory instead of chm
 directory or whatever the instructions call for... it was something i
 noticed a while back but never followed up on...



 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] Lazarus 1.0.6 Release

2013-02-19 Thread Kostas Michalopoulos
Just got it, i noticed a small typo in the installer:

- The LCL is licensed LGPL with linking exception. This allows you to
create apps with any license you want, including comercial.

I think it should have been commercial (two m).


On Thu, Feb 7, 2013 at 4:09 PM, Martin laza...@mfriebe.de wrote:

 On 07/02/2013 12:37, leledumbo wrote:

 Probably the one after this, note that Lazarus and FPC have separate
 release
 cycle, and Lazarus default distribution will always depend on the latest
 stable release of FPC (2.6.2 isn't out yet, right?).


 Yep. Currently the newest (released) fpc is 2.6.0

 AFAIK, on the snapshot page there are Lazarus with fpc snapshots.

 Once fpc 2.6.2 is released we plan to release an update, within a short
 time.


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] GetSystemDirectory

2013-02-18 Thread Kostas Michalopoulos
Why do you need this? There might be an alternative for that.


2013/2/17 Juha Manninen juha.mannine...@gmail.com

 Hi

 Is there anything cross-platform similar with Windows GetSystemDirectory?

 Juha

 --
 ___
 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] TOpenGLControl.DepthBits default value

2013-01-24 Thread Kostas Michalopoulos
Ah, interesting. I probably had ChoosePixelFormat in mind which from what i
remember tries to get a close format and falls back to whatever is
available if it cannot find one.


On Wed, Jan 23, 2013 at 4:48 PM, Michalis Kamburelis 
michalis.ka...@gmail.com wrote:

 Kostas Michalopoulos wrote:

 AFAIK even if you ask for 24 and there is no support for it, you'll get
 a 16bit buffer anyway.


 No. This is a required minimal value, at least for GLX and modern
 wglChoosePixelFormatARB. It was *possibly* treated in more relaxed way by
 the old ChoosePixelFormat, but you should not depend on that. Links to
 relevant docs are on 
 http://wiki.freepascal.org/**Extending_TOpenGLControlhttp://wiki.freepascal.org/Extending_TOpenGLControl.


 Michalis


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] TOpenGLControl.DepthBits default value

2013-01-23 Thread Kostas Michalopoulos
AFAIK even if you ask for 24 and there is no support for it, you'll get a
16bit buffer anyway.


On Wed, Jan 23, 2013 at 12:21 AM, Michalis Kamburelis 
michalis.ka...@gmail.com wrote:

 Reimar Grabowski wrote:

 Hi,

 the in the topic mentioned property defaults to a value of 16. Is
 there any special reason for it? IMHO the default value should be 24.
 After all it's 2013 and not 1998.

 It's not really a problem, I just want to know the reason why this
 value was chosen.


 Before my patch on 
 http://bugs.freepascal.org/**view.php?id=22170http://bugs.freepascal.org/view.php?id=22170the
  depth bits were hardcoded (16 on WinAPI and 1 on GLX). So I set the
 default value for TOpenGLControl.DepthBits at safe 16.

 The general idea is that TOpenGLControl has safe default values, that are
 guaranteed to work (and be fast) even on really really ancient graphic
 cards or when the system is running under virtual machine (which often
 means you don't get hardware-accelarated 3D until you explicitly
 install/enable something). For the same reason e.g.
 TOpenGLControl.StencilBits is by default 0, even though all modern GPUs can
 give you at least 8-bit stencil buffer.

 Other APIs to get OpenGL context, like GtkGLExt or Glut or low-level
 WinAPI or GLX follow the same convention. The defaults are very
 conservative.

 That said, I would be personally fine with changing this default to 24, if
 others think it's a good idea. A developer can always lower it to 16 when
 that's enough. So, I don't really have a strong preference about it.

 Michalis


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] Difference between Delphi 2010 / Lazarus

2012-12-14 Thread Kostas Michalopoulos
What does Calculated do?


On Thu, Dec 13, 2012 at 11:57 PM, Howard Page-Clark h...@talktalk.netwrote:

 On 13/12/12 9:45, Jorge Gonçalves wrote:

 Hi,
 I'm translating one application from delphi  to lazarus, and I'm having
 some problems with the way lazarus and delphi stores calculate fields in
 the dfm.
 The delphi store one more property :Calculated. This property is
 public and are stored using the procedure DefineProperties at TField
 level.

 dfm example :
 Delphi :
 object DetailsTOTAL: TFloatField
FieldKind = fkCalculated
FieldName = 'TOTAL'
DisplayFormat = '0.00'
 *   Calculated = True*

  end

 Lazarus :
 object DetailsTOTAL: TFloatField
FieldKind = fkCalculated
FieldName = 'TOTAL'
DisplayFormat = '0.00'
  end

 Any easy way to solve the problem ?


 Bit of a hack, but you could use the Tag property as a boolean on Lazarus.
 Its published, so is stored in the .lfm. But obviously this would require
 {$IFDEF  } to compile on Delphi too.


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://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] [fpc-pascal] G+ community for Free Pascal and Lazarus

2012-12-12 Thread Kostas Michalopoulos
Joined :-)


On Tue, Dec 11, 2012 at 6:10 PM, silvioprog silviop...@gmail.com wrote:

 2012/12/11 Graeme Geldenhuys gra...@geldenhuys.co.uk

 On 2012-12-11 15:41, Vincent Snijders wrote:
 
  In that case, I better not join.


 I'll be nice and say you can come play too. :)


 PS: members are up to 117 already!!


 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/


 I invited members here in Brazil. \o/

 --
 Silvio Clécio
 My public projects - github.com/silvioprog

 --
 ___
 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] Converting pence into pounds and then to string

2012-12-12 Thread Kostas Michalopoulos
Perhaps not the most efficient solution but that would do:

// p is the integer, f.e. 208
IntToStr(p div 100) + '.' + IntToStr((p mod 100) div 10) + IntToStr(p mod
10)




On Wed, Dec 12, 2012 at 12:23 PM, Richard Mace richard.m...@gmail.comwrote:

 Hi All,
 Got a simple question that has stumped me, which tends to happen if I
 don't do development for a couple of months.

 How's the best way of converting an integer number 208 (that is pence)
 into a string value that is in pounds (2.08)

 Thanks as always in advance.

 Richard

 --
 ___
 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] New user interface for future major releases of Lazarus

2012-12-04 Thread Kostas Michalopoulos
I prefer the multiwindow approach too, although i mostly align the windows
in tiles that could theoretically be done in a docked window.

I tried the dock manager (AnchorDocking i think) but i found two problems
that made me not stick to it:

1. The form designer wasn't part of the docked window which was obscuring
it. With the multiwindow approach i leave the a big hole at the center for
the form designer and the code editor (which is the default basically).

2. The titles had some hideous big fat bevels made of extreme ugliness
which looked bad even in the classic Win9x theme, let alone the Aero,
Aqua and whatever Ubuntu uses. I'm a visual person and this stuff bothers
me a lot :-P. Since no widgetset (AFAIK) provides styling features for such
things i think the only solution would be to make these styleable by the
user.

Keep in mind that it has been a while since i tried it though so things
might have changed.


On Tue, Dec 4, 2012 at 9:46 AM, Avishai avishai.g...@gmail.com wrote:

 I agree with Michael.  I tried AnchorDocking and it did not work for
 me.  I need to be able to change values in the Property Editor and see
 the Form at the same time.  I could not do that with Docking.

 On Tue, Dec 4, 2012 at 10:40 AM,  michael.vancann...@wisa.be wrote:
 
 
  On Tue, 4 Dec 2012, Felipe Ferreira da Silva wrote:
 
 I would like to propose and discuss about a new graphical user
  interface for the next major releases. Nowadays, most of the RAD tools
 use a
  docked interface(MonoDevelop, Delphi, VS), and in some cases they are
  stylish(like the recent Visual Studio versions). I think that a
  better-looking IDE would not just make the programming task more
 pleasant,
  but also could attract more people to Pascal.
 
 I know about the existence of AnchorDocking package for a docked
  IDE, but I think that if such feature were built-in, the IDE could be
  improved with appropriated features for a docked app - and since the
 forms
  would be still undockable, the user could switch back to the
 Delphi7-like
  interface.
 
 My propose is ask if you guys would mind if I work on some
 projects
  with a different interface and made in Lazarus(of course) to you
 evaluate.
  I'm good at create components and customize to give them a stylish
  appearance like in the case of VS. But I would like to know from you
 guys
  first.
 
 
  As long as you can completely undo it, I don't see why not.
 
  Not everyone is comfortable with the so-called docked interface.
  Tastes in what is considered a 'modern gui' change every so-and-so years.
  It's not because an interface has been around for a while that it is less
  good.
 
  I work with Delphi XE, and reverted completely to the D7 look, including
 the
  'old' component palette. Even my windows 7 has the 'classic' look.
 
  Michael.
 
  --
  ___
  Lazarus mailing list
  Lazarus@lists.lazarus.freepascal.org
  http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 Shalom,
 Avishai
 avishai.g...@gmail.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] Getting X Window handle ?

2012-11-06 Thread Kostas Michalopoulos
Why not a TContol (or TWinControl) method?

On Tue, Nov 6, 2012 at 11:04 AM, Mark Morgan Lloyd
markmll.laza...@telemetry.co.uk wrote:
 zeljko wrote:

 On Tuesday 06 of November 2012 10:20:03 Mark Morgan Lloyd wrote:

 Kostas Michalopoulos wrote:

 I'd like such a function myself too, sometimes it is useful to access
 the *real* native window regardless of the widgetset you use (GTK, Qt,
 Carbon, etc).

 Definitely agreed. In my case so that a program can disable the screen
 saver whilst it's running using xdg-screensaver.


 Maybe we can add LCLIntf.GetNativeHandle(Handle: HWND): PtrUInt ?


 +1 here. I had to resort to calling xwininfo, since it was the only way I
 could be absolutely confident that the ID was always correct irrespective of
 the combination of wm/desktop and display manager.


 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]

 --
 ___
 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] Getting X Window handle ?

2012-11-06 Thread Kostas Michalopoulos
Yeah i wasn't sure which one is the handle-less which is why i
mentioned both :-P

On Tue, Nov 6, 2012 at 12:16 PM, zeljko zel...@holobit.net wrote:
 On Tuesday 06 of November 2012 11:44:04 Kostas Michalopoulos wrote:
 Why not a TContol (or TWinControl) method?


 TControl does not have handle, so if it's implemented in LCL it should be
 TWinControl.

 zeljko


 On Tue, Nov 6, 2012 at 11:04 AM, Mark Morgan Lloyd

 markmll.laza...@telemetry.co.uk wrote:
  zeljko wrote:
  On Tuesday 06 of November 2012 10:20:03 Mark Morgan Lloyd wrote:
  Kostas Michalopoulos wrote:
  I'd like such a function myself too, sometimes it is useful to access
  the *real* native window regardless of the widgetset you use (GTK, Qt,
  Carbon, etc).
 
  Definitely agreed. In my case so that a program can disable the screen
  saver whilst it's running using xdg-screensaver.
 
  Maybe we can add LCLIntf.GetNativeHandle(Handle: HWND): PtrUInt ?
 
  +1 here. I had to resort to calling xwininfo, since it was the only way I
  could be absolutely confident that the ID was always correct irrespective
  of the combination of wm/desktop and display manager.
 
 
  --
  Mark Morgan Lloyd
  markMLl .AT. telemetry.co .DOT. uk
 
  [Opinions above are the author's, not those of his employers or
  colleagues]
 
  --
  ___
  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

 --
 ___
 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] Getting X Window handle ?

2012-11-05 Thread Kostas Michalopoulos
I'd like such a function myself too, sometimes it is useful to access
the *real* native window regardless of the widgetset you use (GTK, Qt,
Carbon, etc).

On Mon, Nov 5, 2012 at 11:32 AM, zeljko zel...@holobit.net wrote:
 On Monday 05 of November 2012 11:24:41 Michael Van Canneyt wrote:
 On Mon, 5 Nov 2012, zeljko wrote:
  On Monday 05 of November 2012 10:35:45 Michael Van Canneyt wrote:
  Hello,
 
  I'm trying to embed the VLC player (using the videolan DLLS) in a LCL
  application. On Windows, this works fine. On Linux, this does not work.
 
  The reason is that the VideoLan library expects the native window
  handle. On Windows, TWinControl.Handle provides this.
 
  On Linux, TWinControl.Handle returns the GTK widget pointer if I'm using
  GTK. (I imagine it will be something similar when using Qt)
 
  How can I get access to the low-level X window handle (id) of a
  TWinControl on Linux ?
 
  It's not so problematic. Look at qtx11.inc in lcl/widgetset/qt or in
  gtk2widgetset.inc (there's IFDEF X11 or similar) which gets X11 TWindow
  from GdkWindow.

 Actually, it is in gtk2proc, FormToX11Window :-)

 Thanks.

 The function could accept a TWinControl instead of TCustomForm I would
 think. Maybe an overloaded version can be added. The code is the same.

 I'd even suggest adding a GetNativeHandle : Pointer to TWinControl,
 but I suspect that will encounter some resistance :-)

 Yes, I'm suspicious about it too :)

 zeljko

 --
 ___
 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] Deep exe strip :)

2012-10-26 Thread Kostas Michalopoulos
Build modes are something else (groups of option presets). What i'm
talking about would be a checkbox that you check in your release
build mode so that it builds the smallest executable using a release
build of LCL with no debug info whatsoever and you have unchecked in
debug build mode which uses a normal build.

I think this also needs LCL to not be rebuilt at the same place so
that changing build mode wont rebuild the whole world.

On Thu, Oct 25, 2012 at 5:54 PM, Martin laza...@mfriebe.de wrote:
 On 25/10/2012 14:29, Kostas Michalopoulos wrote:

 I think there should be a one checkbox solution in project settings
 that builds (and rebuilds) stuff with the proper settings to make
 things compact. From what i understand the current situation is way
 too complex.

 It is possible.

 Look on the wiki for build modes.

 The only thing missing are preset modes


 --
 ___
 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] Deep exe strip :)

2012-10-26 Thread Kostas Michalopoulos
So all the steps that Krzysztof mentioned in his initial message can
be done in a buildmode?

On Fri, Oct 26, 2012 at 2:25 PM, Martin laza...@mfriebe.de wrote:
 On 26/10/2012 12:27, Kostas Michalopoulos wrote:

 Build modes are something else (groups of option presets). What i'm
 talking about would be a checkbox that you check in your release
 build mode so that it builds the smallest executable using a release
 build of LCL with no debug info whatsoever and you have unchecked in
 debug build mode which uses a normal build.

 I think this also needs LCL to not be rebuilt at the same place so
 that changing build mode wont rebuild the whole world.


 Changing the buildmode should already rebuild the LCL (if something relevant
 changed, compared to the previous buildmode)

 So 1 buildmodes release fastest, release smallest should be all you need


 --
 ___
 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] Deep exe strip :)

2012-10-25 Thread Kostas Michalopoulos
I think there should be a one checkbox solution in project settings
that builds (and rebuilds) stuff with the proper settings to make
things compact. From what i understand the current situation is way
too complex.

On Thu, Oct 25, 2012 at 1:35 PM, Martin laza...@mfriebe.de wrote:
 On 25/10/2012 11:50, Krzysztof wrote:

 Does the size change if you do a

 strip --strip-all executable

 in one of the large versions down to the small version?

 With strip-all I can't get the smallest exe which I get with lazarus
 switchers - 3.7 MB


 strip and smart-linking/linkable are not related.
 - strip can and will only remove debug info.
 - Smart link can remove unused code.

 And you can go further and try
 http://wiki.freepascal.org/Whole_Program_Optimization



 --
 ___
 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] Deep exe strip :)

2012-10-24 Thread Kostas Michalopoulos
Does the size change if you do a

strip --strip-all executable

in one of the large versions down to the small version?

On Wed, Oct 24, 2012 at 3:02 PM, Krzysztof dib...@wp.pl wrote:
 Hi,

 I did some tests with linking options. Tested on CodeTyphon 2.90,
 Linux mint GTK2 64bit. Empty form:

 1. Project options:
   - smart linking (-CX),
   - optimization level 3,
   - unchecked create debugger information
   - clear debug symbolx (-Xs)
   - smart linking (-XX)

 Result: 5 MB


 2. Same project options, but IDE rebuild with -CX and -XX options

 Result: 2.9 MB

 3. Same options but added VirtualTreeView control from additional package

 Result: 3.8 MB

 3. Same options but rebuild VirtualTreeView package with unchecked
 option create debugger information

 Result: 3.6 MB

 My question is: Is exists any global strip to get the smallest
 possible exe size? Why when I have configured release build mode in
 my project with all striping and smart linking, requied packages
 still have debuger informations and I must uncheck and rebuild it
 manually? I'm not complaining, I'm just curious :) . For example
 rebuild 4 requied packages with unchecked create debugger info in my
 project, I get exe smaller by 1MB

 Regards.

 --
 ___
 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] Please define delphi compatibility

2012-10-04 Thread Kostas Michalopoulos
This discussion is derailing the thread, Lazarus was is and will
always be crossplatform with support for Windows, Linux, Mac OS X and
whatever other widgetset people need and LCL will have to be designed
with crossplatform support in mind.

Platform popularity doesn't matter, it is up to the Lazarus developers
and contributors to decide that by submitting actual working code -
code speaks better than words.

What this thread is about and some of us want to make it clear so said
code can be better be thought and designed is the stance and exact
meaning of Delphi compatibility. Does it mean we screw everything if
it is incompatible with Delphi? Does it mean making Delphi users'
lives easier but without compromising better solutions and if a
clearly better solution is available use that instead of Delphi's way?
Does it mean screw Delphi, any compatibility is a coincidence nowadays
due to Lazarus' past history? Does it mean something else?

Kostas Bad Sector Michalopoulos

On Thu, Oct 4, 2012 at 12:17 PM, Malcolm Buckingham m...@admagres.com wrote:

  It would be interesting to know what percentage of
 programmers using
  Lazarus are developing cross platform software. Unfortunately I
  suspect that answers obtained via this list would be skewed
 towards multi-platform.

 However, I think that you're confusing cross platform with
 not using Delphi's supported platform(s). My own suspicion
 is that far more people are targeting a single platform
 (Linux, BSD, potentially Android
 etc.) than are seriously trying to make sure that their code
 runs on a collection of different OSes and CPUs (with
 different word size, endianness and alignment requirements).


 I'm sure you are correct when you say that many people are writing for a
 single platform. If I had to write for Linux then Lazarus would be my first
 choice. The software I write is usually for controlling scientific hardware
 and then processing the data obtained. Some of the core software tends to be
 low level and difficult to write in an OS independent way. Things like
 shared memory, USB drivers, etc. Not impossible to write but definitely more
 work. Once you instrument control software is Windows based then any other
 data processing software has to run on Windows as well.

 I've seen other companies working in this area supporting both Windows and
 Linux only to discover that 95% of the installations were for Windows but
 customer support issues were about 50/50. In the end they dropped Linux
 support. This is nothing to do with which OS is the best, but if most of
 your customers are wedded to Windows then supporting Linux is a lot of work
 for very little gain.

 On the other hand things may change in the future. If Tablets really take
 off in business then maybe there will be a more even split between Windows,
 Android and Apple. Then having a cross-platform development would make a lot
 of sense.

 Malcolm


 --
 ___
 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] Please define delphi compatibility

2012-10-03 Thread Kostas Michalopoulos
Personally i think of it as that looks familiar to people who used
Delphi before.

Sadly, most Lazarus developers seem to be more chained by Delphi :-P
(case in point: TColor in 2012 does not have support for alpha channel
in order to be compatible with old Delphi code that was designed in
early 90s...).

On Wed, Oct 3, 2012 at 5:07 PM,  michael.vancann...@wisa.be wrote:


 On Wed, 3 Oct 2012, Graeme Geldenhuys wrote:


 [based on my suggestion about changes to the TDBNavigator component]


 What is Lazarus's take on delphi compatibility?

 Does that mean...

 a) Lazarus simply makes it easy to move Delphi projects to Lazarus - a
 once off process, and only in that specific direction.


 That's all I would sign up for, where visual things are concerned.

 Michael.


 --
 ___
 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] TDBNavigator icons break symmetry

2012-10-02 Thread Kostas Michalopoulos
Usually a red X is more common. Also searching for database toolbar
in Google images shows a bunch of toolbars using a black + for
adding and a red X for deleting.

On Tue, Oct 2, 2012 at 10:54 AM, Graeme Geldenhuys
gra...@geldenhuys.co.uk wrote:
 On 2012-10-01 21:52, Bart wrote:

 I normally do not associate - with delete, that's why I replaced
 it with th trashcan icon.

 Even my computer illiterate clients know + is adding something, and
 - is subtracting (deleting) something. This is a well established
 metaphor in computers.

 I'm not saying the trashcan icon is wrong (I haven't even seen how it
 looks like), I'm just pointing out that a - is a well known symbol for
 a delete action.


 Graeme.



 --
 ___
 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


  1   2   >