Re: [Lazarus] FPC Pestering Peacock (3.0.0) release

2015-11-26 Thread Joost van der Sluis

Op 26-11-15 om 12:57 schreef Bart:

On 11/25/15, Joost van der Sluis <jo...@cnoc.nl> 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] FPC 3.0.0-rc2 release

2015-10-21 Thread Joost van der Sluis

Hello

We have placed the second release candidate of the Free Pascal Compiler
version 3.0.0 on our ftp servers. Most important change since the first 
release candidate is a change in the unicode resource-string handling. 
Also there is a new Windows to Android cross-compiler installer.


You can help improve the upcoming 3.0.0 release by downloading and
testing this release. If you want you can report what you have done here:
http://wiki.freepascal.org/Testers_3.0.0

New features are listed at
http://wiki.freepascal.org/FPC_New_Features_3.0

Changes that may break backwards compatibility are documented at
http://wiki.freepascal.org/User_Changes_3.0.0

Issues with this release candidate that we already know of are listed in
the wiki: http://wiki.freepascal.org/Issues_3.0.0

A preview of the 3.0.0 docs is available at
http://www.freepascal.org/docs-html/3.0.0/

Downloads are available at:
* ftp://gd.tuwien.ac.at/languages/pascal/fpc/beta/3.0.0-rc2
* ftp://ftp.freepascal.org/pub/fpc/beta/3.0.0-rc2

Enjoy!

The Free Pascal Compiler Team


Free Pascal Compiler

 Version 3.0.0-rc2


* Introduction


Please also read the platform specific README file, if it exists.

This package contains an advanced freeware 32-bit/64-bit/16-bit pascal
compiler for several platforms. The language and the runtime library are
almost compatible with Turbo Pascal 7.0 and recent Delphi releases. There is
also partial support for the Macintosh pascal dialect.

News and changes related to this release are described in whatsnew.txt.

Free Pascal 3.0.0 is currently available for the following platforms:
- Linux-i386
- Linux-x86_64 (amd64)
- Linux-powerpc
- Linux-sparc
- Linux-ARM
- Win32-i386 (2000/XP, WinNT or later)
- Win64-x86_64 (XP or later)
- Wince-ARM (cross compiled from win32-i386)
- FreeBSD-i386
- FreeBSD-x86_64
- Mac OS X/Darwin for PowerPC (32 and 64 bit)
- Mac OS X/Darwin for Intel (32 and 64 bit)
- iOS (ARM and AArch64/ARM64) and iPhoneSimulator (32 and 64 bit)
- OS/2-i386 (OS/2 Warp v3.0, 4.0, WarpServer for e-Business and eComStation)
- Haiku-i386
- GO32v2-i386
- Nintendo Gameboy Advance-ARM (cross compile from win32-i386)
- Nintendo DS-ARM (cross compile from win32-i386)
- Nintendo Wii-powerpc (cross compile from win32-i386)
- AIX 5.3 and later for PowerPC (32 and 64 bit)
- Java JVM (1.5 and later) and Android Dalvik (Android 4.0 and later)
- Android (ARM, i386, MIPS) via cross-compiling.
- MS-DOS-i8086 (cross compiled from win32-i386 and Linux)
- Amiga, MorphOS and AROS

There are other platforms (like other BSD variants) which are more or less
working, but there is currently no maintainer for them and thus we cannot
provide adequate support. If you want to change this and create and
maintain versions for other platforms and targets, feel free to contact us,
e-mail addresses are listed below.



* Features


- high speed compiler
- fully 16, 32 or 64-bit code
  - 32 bit compiler can be used on x86_64 Linux distributions to compile
32 bit applications
- language features:
  - almost fully compatible with Borland Pascal and Borland Delphi
  - ansi strings
  - wide strings
  - exception support
  - RTTI support
  - procedure overloading
  - generics (experimental)
  - operator overloading
  - COM, CORBA and raw interfaces support
  - dynamic array support
  - variant support
  - inlining
- code optimizer:
  - peephole optimizer (80x86 only)
  - jump optimizer
  - loading of variables into registers
  - assembler level dataflow analyzer (80x86 only)
  - stack frame eliminations
  - sophisticated register allocator
- integrated BASM (built-in assembler) parser
  - supports ATT syntax used by GNU C
  - supports Intel syntax used by Turbo Pascal (80x86-only)
- can compile code into assembler source code for these assemblers:
  - GNU Assembler (GAS)
  - Netwide assembler (Nasm)
  - Microsoft Assembler/Turbo Assembler (Masm/Tasm)
  - Watcom assembler (wasm)
- internal assembler for ultra fast object file generation
- can call external C code
  - h2pas utility to convert .h files to Pascal units
- smart linking (also known as dead code stripping)
- support for the GNU debugger
- integrated development environment (disabled by default on Mac OS X)
  - powerful user friendly Wordstar compatible multi file editor
  - context sensitive help supports help files in HTML, Windows HLP and
Borland TPH format.
  - debugger on most platforms
- can create binaries running natively under both DOS and OS/2 (EMX version)
- no need for Linux distribution specific binaries, programs you write run
  on all distributions
- high quality documentation



[Lazarus] Lazarus 1.4 review

2015-04-30 Thread Joost van der Sluis

Hi all,

Now Lazarus has been released a week ago, I've finished a simple review 
with an overview of some of it's new features. For those interested: 
http://www.cnoc.nl/en/lazarus-1-4-review/


Regards,

Joost.


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


Re: [Lazarus] Lazarus 1.4 review

2015-04-30 Thread Joost van der Sluis
 This website seems a bit weird. I went to have a look at the article and 
 the page was blank. Now I always uses the excellent noscript to 
 protect me from some of more nasty aspects of the internet and this was 
 clearly blocking something. Looking at the HTML, comes up with things like:

It's just wordpress, using a common template and some plugins to create a 
layout dynamically. Maybe that those need a lot of javascript and are not that 
nice.

 It seems like the author does not want us to view the site unless we let 
 javascript run. Why? Sorry, but I am a bit paranoid when it comes to web 
 security.

The site has been setup by our cms-supplier. For me it's not important enough 
to spend any time on it's internal design. That takes only time. It works, 
maybe not entirely how I would want it to, but it's good enough.

But I'm sorry to hear that there are people who can not read it due to this, 
but it's just a simple site with some content, nothing to spend too much time 
on...

Regards,

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


Re: [Lazarus] need suggestion about TDataset.Lookup

2015-04-23 Thread Joost van der Sluis

On 04/16/2015 03:10 PM, FreeMan wrote:

I need use TDataset.Lookup, I know how to do this, but need help about,
result field is blob field


The whole idea of blob-fields is that they are not loaded into the 
dataset-in-memory.


They are only read from the database if they are specifically read.

So, no, you can not use lookup to access them.

Joost.

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


Re: [Lazarus] Release of Lazarus 1.4

2015-04-23 Thread Joost van der Sluis

On 04/23/2015 12:28 PM, Mark Morgan Lloyd wrote:

Mattias Gaertner wrote:

On Wed, 22 Apr 2015 16:40:02 +0200
Michael Schnell mschn...@lumino.de wrote:


On 04/22/2015 02:07 PM, Mattias Gaertner wrote:

Why downgrade? You can install both and switch any time in the IDE.

Thanks !

But how to install most easily on Linux (I always use the svn) .


cd your/fpc/svn
make install INSTALL_PREFIX=/usr


This is broken on 2.7.1. Mantis 27272.


It's make install PREFIX=/usr and it is not broken. Case 27272 is 
about INSTALL_BINDIR.


But in general, you don't have to specify any prefix. To install fpc 
from source:


cd your/fpc/svn
make clean all install

That's it. It could be that you have to adapt your fpc.cfg, though.

Joost.


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


Re: [Lazarus] GUI front-end for Firebird Trace Manager

2015-04-23 Thread Joost van der Sluis

On 04/20/2015 11:08 AM, Graeme Geldenhuys wrote: Hi,


Has anybody built (or know about) a cross-platform GUI front-end for
Firebird 2.5's Trace Manager? I know there are commercial products that
seem very good, but they are all Windows platform only. :-/


Yes, I've build such a tool. But after I've got from it what I needed, I 
stopped the project.


If you want, I can dig it up.

Joost.



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


Re: [Lazarus] TDBCalendar problems

2015-04-03 Thread Joost van der Sluis

On 03/15/2015 12:04 AM, Donald Ziesig wrote:

Hi All!

I have been trying to get the TDBCalendar control to update my database
with no success.  If I manually update the date field in the table, the
value is immediately reflected in the control - it changes to the
correct date.  On the other hand, if I put the dataset in Edit or Insert
mode and change the control's date, nothing happens after posting the
data.  The field retains its original value (either blank or the date I
manually entered).

While trying to debug this, I found a method
TFieldDataLink.UpdateRecord which is invoked by many of the included
files (*.inc) from DBCtrls.pp, but I can't find anywhere in the source
code where this method is declared.  Since this is where I would expect
the value to be written in the table,  and debugger step-into doesn't,
I am at a dead end in debugging.


Search for the fpc/packages/fcl-db source-folder. Make this the default 
directory in a console and do fppkg install -o -gl. Thereafter you can 
step-into the fcl-db code. Maybe that can help.


And to see if you have done something strange, a simple example 
application would be nice. Especially if it can use the test-database in 
packages/fcl-db/tests.


Joost.


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


Re: [Lazarus] BreakIf

2015-03-27 Thread Joost van der Sluis

On 03/27/2015 01:45 PM, JuuS wrote:

procedure BreakIf( b : Boolean );
begin
  if b then
  asm
INT 3==debugger would then stop here
 and one could then F8 step to the offending
 routine based on the boolean condition passed
  end;
end;

I believe this is windows specific (?) and I'm now working on Linux
machines.

The question is:

This does not work in Linux and I wonder if there is a similar way to
achieve this in Linux environment?


Wow.. that's a nasty trick

And it should still work, also on Linux.

But I think that debuggers nowadays are more clever, they detect that 
the breakpoint is actually self-inflicted, and so they decide to 
continue. After all: the developer can have it's reasons to call this 
interrupt, and the debugger should not influence normal execution.


I don't know if fpdebug has this same check. (I think it has, though, 
but I'm not sure) If you are using a development Lazarus version you can 
try to install the LazDebuggerFp package, and choose the 'Fpdebug 
internal Dwarf-debugger' as debugger in the debugger-options. See what 
happens if you do that...


Regards,

Joost.

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


Re: [Lazarus] BreakIf

2015-03-27 Thread Joost van der Sluis

On 03/27/2015 02:53 PM, Sven Barth wrote:

Am 27.03.2015 14:17 schrieb Joost van der Sluis jo...@cnoc.nl
mailto:jo...@cnoc.nl:
  But I think that debuggers nowadays are more clever, they detect that
the breakpoint is actually self-inflicted, and so they decide to
continue. After all: the developer can have it's reasons to call this
interrupt, and the debugger should not influence normal execution.

This might be true on an embedded system, but if you run any of the
normal OSes where you can't modify interrupt handlers anyway then on
x86(_64) INT 3 (or $CC) /always/ means breakpoint. And from experience I
know that both GDB and WinDBG respect these as they should.


It should result in a sigtrap (it *IS* a sigtrap), and the debugger can 
stop on those. But that's something else than the debugger report a stop 
at a breakpoint.


Joost.




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


[Lazarus] Lazarus crashes on startup with g_object_unref: assertion 'G_IS_OBJECT (object)' failed

2015-03-26 Thread Joost van der Sluis

Hi all,

I received a bug-report that Lazarus does not start on Fedora 22. Yeah, 
that version has not been released yet, so we can fix this problem 
before it actually occurs. ;)


It was originally reported against Lazarus v1.2, but I updated to 1.4rc2 
and the problem is still there.


The bugreport can be found here, with a backtrace attached to it: 
https://bugzilla.redhat.com/show_bug.cgi?id=1203118


Regards,

Joost.

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


Re: [Lazarus] Typecast set to byte in mode OBJFPC

2014-12-31 Thread Joost van der Sluis

On 12/31/2014 04:40 PM, Jürgen Hestermann wrote:

type FlagType= (Flag1,Flag2);
  FlagSetType   = set of FlagType;
var i : SizeInt;
   S : FlagSetTyp;

S := [Flag1];
i := byte(S); //  Error illegal type conversion


i := ord(S); ?

But it's still invalid, though. A set can contain more then 32 items, 
and then your conversion does not hold anymore.


Joost.


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


Re: [Lazarus] Lazarus Configuration

2014-12-22 Thread Joost van der Sluis

On 12/22/2014 05:19 PM, J S wrote:


In my cursory examination, it appears that lazarus looks in a hardwired
directory for configuration information. If this is true, it seems very,
very wrong to me. My expectation was that there would be a configuration
file for lazarus in the current search path that would guide its
compilation.


It's easy: If you compile Lazarus from within Lazarus, it uses the same 
compiler as it uses for all other projects. And you can set this 
compiler in the configuration. There's nothing strange here.


If you build from the command-line, the compiler in your path is used, 
unless you provide one in the command-line.


Joost.

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


[Lazarus] Range-check error in TCarbonListColumn.SetHeaderWidth

2014-12-06 Thread Joost van der Sluis

Hi all,

Each time I start Lazarus on OS/X-Carbon, I get a range-check error.

This because TCarbonDataBrowser.AutoSizeColumns calculates a negative 
width. It calculates ((cRect.right-cRect.left)-sWidth) div aCnt. I think 
that sWidth is the sum of the width of all columns which are not 
auto-sized, and aCnt is the number of columns that are autosized. The 
problem arises if the sWidth is larger then the width of the rect.


I can think of several ways to fix this. But what is .AutoSizeColumns 
supposed to do in this case?


Regards,

Joost

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


Re: [Lazarus] Default debug mode and internal debugger

2014-12-06 Thread Joost van der Sluis

On 12/04/2014 04:29 PM, Mattias Gaertner wrote:

On Thu, 4 Dec 2014 16:11:54 +0100
Reimar Grabowski reimg...@web.de wrote:


if you let the IDE create debug and release build modes for you the resulting 
debug mode sets the -Xg flag (GDB external debug symbols file).
The internal debugger does not work with this set and complains about not 
finding debug symbols.
Perhaps the default debug mode should not set this flag so that both debuggers 
get at least the chance to work.


Or add a capability flag to the debugger class for external debug
symbols. If the current debugger does not support it, the IDE does not
pass the flag.


Same holds for stabs-debug info. And yes, a capability flag would be nice.

Regards,
  Joost.


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


Re: [Lazarus] Need testers for the a new debugger

2014-11-28 Thread Joost van der Sluis

On 11/25/2014 07:50 PM, Mattias Gaertner wrote:

On Mon, 24 Nov 2014 11:48:38 +0100
Joost van der Sluis jo...@cnoc.nl wrote:


On 11/22/2014 12:18 AM, Mattias Gaertner wrote:

On Fri, 21 Nov 2014 23:08:00 +
Martin Frb laza...@mfriebe.de wrote:


[...]
So as far as the debugger goes, this would then be correctly following
the debug info.


Funny fpc. Thanks for checking.

BTW, the default TGDBMIDebugger jumps even worse. Begin, End, Begin,
i:=3. So the new debugger is better here.


:-) Yet another thing the new debugger is better at.

Btw: It could be that this problem is fixed in fpc-trunk. If not I have
to look at it.

There's also the NextOnlyStopOnStartLine debugger-specific-option. You
can try if that fixes your problem.


This is enabled by default.
If I disable it I get the same as with the TGDBMIDebugger.

BTW, Step into does not work with FPC 2.7.1.


More likely is that you've encountered one of the situations where Step 
into does not work. Normally it works?


Joost.


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


Re: [Lazarus] lresources.pp(3089, 67) Error: Identifier not found RT_RCDATA

2014-11-24 Thread Joost van der Sluis

On 11/23/2014 09:09 PM, waldo kitty wrote:

On 11/22/2014 6:45 PM, Mattias Gaertner wrote:

On Sat, 22 Nov 2014 23:27:30 +0100
Bart bartjun...@gmail.com wrote:


On 11/22/14, Joost van der Sluis jo...@cnoc.nl wrote:


Add the windows-unit to the uses section of lresources as a quick fix.


Done.


i pulled your update last evening and compiled... it seems to have
worked...


With 'quick-fix' I meant that you could do this change locally to avoid 
the problem. Not that it should be committed as a definitive fix.


I think it's a bug in fpc. Sven?

Regards,

Joost.


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


Re: [Lazarus] Need testers for the a new debugger

2014-11-24 Thread Joost van der Sluis

On 11/22/2014 12:45 PM, C Western wrote:

I have been switching back and forth between gdb and the new one - both
have some issues. The one I noticed most recently with the new one is
with a multi threaded application - a break set in the thread seem to
cause the debugger to become lost. Is the debugger set up to cope in
this situation? (I will often turn off the multi threading for
debugging, but this is not always possible.)


I did not do anything threading-related. So I'm not surprised that it 
does not really work.


Can you create a bug report for this? And the OS you were using?

Regards,

Joost.


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


Re: [Lazarus] Need testers for the a new debugger

2014-11-24 Thread Joost van der Sluis

On 11/22/2014 12:18 AM, Mattias Gaertner wrote:

On Fri, 21 Nov 2014 23:08:00 +
Martin Frb laza...@mfriebe.de wrote:


[...]
So as far as the debugger goes, this would then be correctly following
the debug info.


Funny fpc. Thanks for checking.

BTW, the default TGDBMIDebugger jumps even worse. Begin, End, Begin,
i:=3. So the new debugger is better here.


:-) Yet another thing the new debugger is better at.

Btw: It could be that this problem is fixed in fpc-trunk. If not I have 
to look at it.


There's also the NextOnlyStopOnStartLine debugger-specific-option. You 
can try if that fixes your problem.


Regards,

Joost.

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


Re: [Lazarus] lresources.pp(3089, 67) Error: Identifier not found RT_RCDATA

2014-11-22 Thread Joost van der Sluis

On 11/22/2014 08:30 PM, waldo kitty wrote:


fpc trunk r29110
lazarus trunk r46966
vista 32-bit

i just updated fpc trunk and lazarus trunk... fpc compiled ok... lazarus
fails with

lresources.pp(3089,67) Error: Identifier not found RT_RCDATA


Add the windows-unit to the uses section of lresources as a quick fix.

Joost.


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


[Lazarus] Lazarus conference in the Netherlands

2014-11-07 Thread Joost van der Sluis

Hi all,

November 15th there is a Lazarus-conference in the Netherlands.

The one-day conference will be about Free Pascal and Lazarus. A place to 
meet other developers and to discuss Pascal related issues.


There will be a lecture about Free Pascal and Lazarus on the Raspberry 
Pi. The second session is about converting Delphi applications to 
Lazarus. Projects from attendees will be used as examples on how to 
handle the change from Delphi to Lazarus. And there is a talk about 
Pascal scripting in Lazarus and Free Pascal. There will also be a 
demonstration of dynamic packages using Free Pascal. A new feature that 
is now in development.


For registration and more information about the event you have to visit 
the Blase Pascal Magazine website. 
(http://www.blaisepascal.eu/DucthPascon/Info_Laz_2014.php)


I hope to see you there,

Joost van der Sluis.

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


Re: [Lazarus] lazarus trunk compile fails with fpc trunk

2014-11-06 Thread Joost van der Sluis

On 11/06/2014 01:18 AM, waldo kitty wrote:

On 11/5/2014 10:14 AM, Joost van der Sluis wrote:

On 11/04/2014 04:50 PM, waldo kitty wrote:

i updated my fpc trunk last night to 28981 and this morning i updated my
lazarus trunk to 46747... fpc built properly with no problems...
lazarus, on the other hand, gave me the following failure output...



   $004AA2F3  TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION,  line 1178 of
ideexterntoolintf.pas
   $004B43E7  TEXTERNALTOOL__SETTHREAD,  line 570 of exttools.pas


Could you try with fpc-trunk revision 28964? It could be that 28965
introduces
this problem. But I want to know for sure before I pass this one to
Jonas. (I
also see that you are on Windows... well, please try 28964, then we
know more)


/if/ i did it right then that seems to have fixed it... i was able to
get back to r28964 in FPC and get it compiled after a distclean (which i
normally do before updating)... after that i ran my normal updatelaz
script which pulled some new code and the built to completion... it
looks like it went ok...


Ok, if you now want to update to r28965 and try again. If that one 
fails, please create a bug-report for fpc. And include all this information.


Joost.




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


Re: [Lazarus] lazarus trunk compile fails with fpc trunk

2014-11-05 Thread Joost van der Sluis

On 11/04/2014 04:50 PM, waldo kitty wrote:

i updated my fpc trunk last night to 28981 and this morning i updated my
lazarus trunk to 46747... fpc built properly with no problems...
lazarus, on the other hand, gave me the following failure output...



   $004AA2F3  TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION,  line 1178 of
ideexterntoolintf.pas
   $004B43E7  TEXTERNALTOOL__SETTHREAD,  line 570 of exttools.pas


Could you try with fpc-trunk revision 28964? It could be that 28965 
introduces this problem. But I want to know for sure before I pass this 
one to Jonas. (I also see that you are on Windows... well, please try 
28964, then we know more)


Joost.

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


Re: [Lazarus] TFMTBCDField problem

2014-10-30 Thread Joost van der Sluis

On 10/30/2014 04:45 PM, Chris Rempas wrote:

...as a last resort, i formatted an old disk, installed windows 8.1,
installed lazarus, downloaded a new snapshot from freepascal site,
extracted and followed instructions.

I get an error (i think in fpmkunit.pp) when i execute make clean all.
i tried to execute make install but i get the same error


Can you show us the error?

Regards,

Joost.


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


Re: [Lazarus] TPQConnection.CreateDB: ENCODING, OWNER, TEMPLATE, LC_CTYPE, TABLESPACE

2014-10-29 Thread Joost van der Sluis

On 10/28/2014 02:03 AM, silvioprog wrote:

On Wed, Oct 8, 2014 at 12:44 PM, Michael Van Canneyt

Hello buddy, sorry for my long delay.

Thanks for the great tip, I tried it too, but unfortunately the postgre
rejected that talking something like unrecognized param for this
operation.

Today I fixed that using a mix of codes: creating the database using
the original postgre driver for Java, and calling java -jar create_mydb
params via TProcess. Now it worked like a charm!


Damn, that looks difficult. You know that the bindings for the postgres 
driver are available for fpc? What you need is PQexec(Handle, 'create 
mydb params'); That's all.


And sqldb is not some magical tool, it's just a wrapper around this 
driver. You could have looked at TPQConnection.CreateDB and 
TPQConnection.ExecuteDirectPG. That way you could have added the 
parameters that you want. (If I look at ExecuteDirectPG, the parameters 
are only passed when a connection to the DB is made, not when it's 
created. It's trivial to add, though)


Or you can just copy-paste the code and use a modified version of it in 
your application.


Well, calling Java with a TProcess works also obviously...

Joost.


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


Re: [Lazarus] TFMTBCDField problem

2014-10-27 Thread Joost van der Sluis

On 10/27/2014 09:28 AM, Chris Crori wrote:

Hi Vincent,
 can you help me build lazarus with fpc 2.7.1?  I downloaded fpc
trunk, changed the file folders, undated the lazarus configuration, but
I cannot build fpc and lazarus tells me it can’t find fpc.cfg file...
the file exists!


When you have downloaded fpc 2.7.1, go to the command-line and do 'make 
clean all'. Make sure that the compiler-executable (ppc386.exe and 
fpc.exe) are in your search-path. If you are on Windows this is not 
always the case. (set path=%path%:c:\lazarus\fpc\2.6.4\bin\i386-win32)


Then you have to do a 'make install'. But to do so, you need 
administrator-rights. So make sure that you use the right-mouse button 
when you start your console (cmd or poweshell) and select 'run as 
administrator'.


If you passed this step, you have fpc installed in c:\pp. Adapt the path 
so that it points to this new location for the compiler-binaries. (Nore 
that you still need a reference to the old lazarus-fpc-location, because 
it also contains helper utilities like make.exe)


If you are editing the fpc.cfg file, search for the lines that start 
with -Fu.  Those need changing.


If you want to know where to place your fpc.cfg, use ppc386.exe -vt.

Then adapt the Lazarus configuration, and you should be done.

There are also scripts that do all this for you, btw.

Joost.

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


Re: [Lazarus] TFMTBCDField problem

2014-10-24 Thread Joost van der Sluis

On 10/24/2014 09:22 AM, Chris Rempas wrote:

   I downloaded trunk fpc but i can't get it to work, is there an easy
way to get fpc 2.7.1 compiled for lazarus?


Hmm, it was always available at the snapshot-page 
http://www.hu.freepascal.org/lazarus/ but it's not there.


Maybe that the 2.7.1 snapshot is not build anymore. But coincidentally I 
made a change in fpc 2.7.1 yesterday that broke building fpc on Windows.


And I received a warning from Vincent that building the snapshot failed.

So I know for sure that these snapshots are still being build. Maybe you 
have just bad luck that it is not available today, due to a mistake from 
me. So maybe wait one day, or that someone else can point out where the 
snapshot (from a day earlier) can be found.


Joost.

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


Re: [Lazarus] TFMTBCDField problem

2014-10-23 Thread Joost van der Sluis

On 10/23/2014 01:07 AM, Chris Rempas wrote:

Hi guys!
 I am using SQLdb with Firebird 2. I have a DECIMAL(9,5) field that
SQLdb makes it TFMTBCDField automatically. Mt problem is that i cannot
save any value to the database. If i let the field with the NULL value,
my record is saved fine, if i try to put any value and save the record,
it fails with Invalid Variant convertion error.
 I Edited the record with an external tool and it loads up fine in
my grid. In my grid i can change the data and scroll to another records
(cached data is fine) but if i try to execute ApplyUpdates, i get the
same error.

 Google could not help and i could not find anything in the
bugtracker for the last 3 days!


If you are using fpc 2.6.4, could you try 2.7.1? (A development snapshot)?

Joost.


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


Re: [Lazarus] Enabling menu-options depending on a Lazarus-setting?

2014-09-13 Thread Joost van der Sluis

On 09/04/2014 11:42 PM, Martin Frb wrote:

Example in
procedure TDebugManager.ConnectMainBarEvents;


This was at least a little bit of use. Frustrating that disabling a 
menu-item in the IDE takes more time than implementing the whole 
pseudo-terminal feature.


It still does not work, though. TDebugManager.SetDebugger is useless 
because it is only called when the debugger is started. So I had to set 
it somewhere else.


The problem that I have now is that when I add the BaseDebugManager to 
the implementation uses-section of the debugger unit, *all* ide-settings 
are lost as soon as I open the options-screen. Seems like some magic is 
happening here. Does anyone have a clue what?


Regards,

Joost.


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


Re: [Lazarus] Enabling menu-options depending on a Lazarus-setting?

2014-09-04 Thread Joost van der Sluis

On 09/02/2014 03:31 PM, Martin Frb wrote:

On 02/09/2014 12:11, Joost van der Sluis wrote:
Add a class[1] method to the debugger-class. return true/false,
depending on the availability of the feature.

The base class, would have the current ifdef. All other code depends on
the value of the method.


In ide/DebugManager the debugger class is selected and setup. That would
be the place to update the menu (maybe enable/disable instead of hiding).


How do I enable/disable a menu-item in the IDE?

Joost.


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


[Lazarus] Enabling menu-options depending on a Lazarus-setting?

2014-09-02 Thread Joost van der Sluis

Hi all,

On Linux there's the option to view a window with the console-output of 
applications being debugged.


This option is enabled with the define DBG_ENABLE_TERMINAL in three units.

In debugger/debugger.pp the define is set for linux only, with the 
result that the window is actually visible in the menu.


In components/lazdebuggergdbmi/gdbmimiscclasses.pp and 
components/lazdebuggergdbmi/gdbmimiscclasses.pp the define is also set 
on linux, so that this debugger actually sends the console output to the 
screen.


Now I have my own debugger, and this debugger also supports the 
console-window on OS/X. So I could adapt the define in debugger.pp for 
OS/X, but then the menu-item also appears when a gdb-based debugger is 
used, which do not support this option on OS/X.


So, question: what would be the correct way to display this menu-option, 
based onto the selected debugger. (Add a property to TDebuggerIntf, but 
after that?)


regards,

Joost.



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


[Lazarus] Leakview missing from tools menu

2014-09-01 Thread Joost van der Sluis

Hi all,

I have LeakView installed, but I can't find it in the tools menu. Am I 
the only one with this problem?


Lazarus+svn trunk, Linux/Fedora/gtk2.

Joost.

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


Re: [Lazarus] Leakview missing from tools menu

2014-09-01 Thread Joost van der Sluis

On 09/01/2014 06:39 PM, Mattias Gaertner wrote:

On Mon, 01 Sep 2014 17:51:03 +0200
Joost van der Sluis jo...@cnoc.nl wrote:

I have LeakView installed, but I can't find it in the tools menu. Am I
the only one with this problem?

Lazarus+svn trunk, Linux/Fedora/gtk2.


Leakview was extended and moved to View / Leaks and Traces.


Thanks, I've updated the wiki.

Joost.


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


Re: [Lazarus] Need testers for the a new debugger

2014-08-25 Thread Joost van der Sluis

On 08/25/2014 02:02 PM, Dmitry Boyarintsev wrote:

On Mon, Aug 25, 2014 at 6:26 AM, C Western l...@c-m-w.me.uk
mailto:l...@c-m-w.me.uk wrote:


1. How about a slow step option?

What's is slow step option? Is it stepping over each instruction until
the next known line reached?


As I wrote that a 'perfect' step (the step you described) would be very 
slow, I think that this is what he means, yes.


I've tried that: LCL without debug-info, created a OnFormCreate event 
and then I stepped into the CreateForm function. With this 'slow step' 
it took more than 15 minutes before the debugger stopped inside the event.


So a slow step is not a real option. What could be done is adding a 
setting for how many levels deep the debugger will use simple 
single-stepping.


But for now I'm happy with the current solution.


2. Could the compiler add more information to make this easier? Or
is it simply a matter of compiling everything with a stack frame?

How about using a 3d party library compiled without debugging info /
stack frame?
The library could use your code compiled with debug info (i.e. by
calling a callback), where the debugger should stop.


Indeed. That's one problem. Another problem is that on i386 a 
third-party library could use another calling convention. And for some 
(most?) compiler-proc's it is not possible to create a stack-frame, 
which also would slow down the code.


What the compiler could do is adding line-info for the complete code. 
But I doubt that an average developers will appreciate that. An 
alternative could be to add line-info, but with a remark that the code 
could be skipped during stepping. But then we need to add something new 
to the Dwarf-format.


Joost.

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


Re: [Lazarus] Need testers for the a new debugger

2014-08-24 Thread Joost van der Sluis

On 07/21/2014 10:11 PM, C Western wrote:

Managed to create a small test program:

program tproj;

uses sysutils;

procedure a(const s: string);
var
  a: string;
  r: array [0..10] of Double;
begin
  a := s+s+s;
  r[8] := StrToFloat(a);
  WriteLn(a, ' ', r[8])
end;

begin
  a('6'); -Set break point here, and hit step into here twice
end.

First step into ends on begin in procedure, second on final end.
Seems to be related to size of stack frame - if I didn't have the 
array in, it works as expected. I compiled it with all stack checks on.


I know this stuff can be difficult - I have certainly seen some odd 
things with Delphi and gdb. My hope is we can resolve some of these 
things as we now have control over all parts of the system.


Solving this particular problem was easy, but debugging your 
test-application opened a whole new can of worms.


I've re-written the step-into-line code completely. It's not fool-proof, 
but at least it works stepping into a procedure one level deep. (That 
means: if the procedure being called has debug-info.) If it does not 
have debug-info but another procedure with debug info is called 
further-on, it will probably work.


The problem lies in functions that do not set the stack-frame. Among 
those are the compiler-procedures. If two of those are called after each 
other, the debugger can loose track...


So, please test. I'm convinced that a solution that always works and is 
also reasonable fast is impossible. (gdb also makes comparable mistakes)


Oh, and I added re-direction of the console in- and output to the 
console-debug screen.


Joost.

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


Re: [Lazarus] Cannot find -lpthread

2014-08-22 Thread Joost van der Sluis

On 08/21/2014 05:22 PM, Leonardo M. Ramé wrote:

/usr/bin/ld: aviso: link.res contiene secciones de salida. ¿Olvidó -T?
/usr/bin/ld: no se puede encontrar -lpthread
/usr/bin/ld: no se puede encontrar -ldl
/usr/bin/ld: no se puede encontrar -lc
fpmake.pp(44,1) Error: Error while linking

Does anyone know which package I'm missing? I've installed 
build-essential and libpthread-stubs0, but it still cannot find 
pthread...


It can not even find libc. On my system (Fedora) that means that I have 
to install glibc-devel.


But did you try to build fpc without threading in fpmake?

make clean all OPT=-dNO_THREADING

Or without using TPocess:

make clean all NO_UNIT_PROCESS=1

Or without TProcess and the unit zipper:

make clean all NO_UNIT_PROCESS=1 NO_UNIT_ZIPPER=1

You still need libc and pthreads though to compile Lazarus...

Joost.


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


Re: [Lazarus] Need testers for the a new debugger

2014-07-21 Thread Joost van der Sluis
 2014.07.14. 23:13 keltezéssel, Joost van der Sluis írta:
  To install the debugger just install the
  components/lazdebuggers/lazdebuggerfp.lpk package.
 
 Can anybody install on Win32?

I 've tried that myself again and it installed without any problems.

Maybe you can try to run the Lazarus itself in GDB, after you've installed the 
package. Then when you get the 'out of memory' problem, type 'bt' and send us 
the backtrace.

If you do not know how to work with GDB from the console, look here: 
http://wiki.freepascal.org/Creating_a_Backtrace_with_GDB

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-21 Thread Joost van der Sluis
 On 20/07/14 15:47, Joost van der Sluis wrote:
 I haven't seen the spurious SIGSEGV for a while, so maybe that is fixed. 
 I am still seeing the spurious leaving of a routine on pressing step 
 into on one particular begin, but mostly it looks good - I think it is 
 rather faster than the gdb debugger.

It's not that strange it's faster then the gdb-debugger, as gdb is an external 
application from which the output is parsed.

The step-into-next-line code is quite complicated. Just single-stepping until 
another procedure with line-info has been hit is too slow. So it uses 
watchpoints on the stack, so that the debuggee stops when a new procedure is 
being called, or the current procedure has ended. Then it compares the 
line-info with the line-info at the start of the step-into-next-line. It is 
very well possible that for some reason the start of the procedure is ignored, 
so that it immediately steps to the end of the procedure.

Can you create a small test-application with a procedure that has this problem? 
With some steps to reproduce?

If you want to look at it yourself, look at the TDbgControllerStepIntoLineCmd 
class in fpdbgcontroller.pas. The DoContinue function is called when the 
debuggee has to start running again.  When the debuggee stops running, 
ResolveEvent is being called. ResolveEvent has to set Finished to true if the 
command has finished. If Finished is set to false, DoContinue is called again, 
and the debuggee continues running.

 Not sure about the spurious step - I notice on some routines stepping 
 steps to the end line sometimes and then back into the routine. Perahps 
 it is related to this?

Do you have an example? It could be that the execution point really jumps 
up-and-down, or that the debug-info gives some strange results. 

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-20 Thread Joost van der Sluis
 On 19/07/14 22:26, Joost van der Sluis wrote:
 Do you get a message on the console like 'failed to write data at
  xx'?
   
Just tried it again - it doesn't seem to be consistent. The specific was
stepping into a routine, and the problem seems to happen when stepping
into at the first begin. Trying it just now the debugger step into in
these circumstances - it now exits the routine. There are lots of
Failed to read data at address $10B70F08C08347F8 from processid 11321.
Errcode: 5
Failed to read data at address $E800C766D388 from processid 11321.
Errcode: 5
Failed to read data at address $E800C766D388 from processid 11321.
Errcode: 5
Failed to read data at address $E800C766D388 from processid 11321.
Errcode: 5
Failed to read data at address $E800C766D388 from processid 11321.
Errcode: 5
Failed to read data at address $E800C766D388 from processid 11321.
Errcode: 5
 
  Can you run Lazarus in a debugger (gdb, but in principle fpdebug is also
  possible ;) ) and set a breakpoint on fpdbglinuxclasses.pas:591. This is
  the line where the error above is printed. Then please try to reproduce
  the problem, and send me a backtrace when that breakpoint is hit.
 
 The behavior failed to read messages seem rather random. I think they 
 may only arise when I have the locals window open, in which case 
 presumably read failures are to be expected. A backtrace (below) doesn't 
 look that useful. The step into failing on a begin failure seems 
 consistent, though it certainly doesn't happen on every begin.

You are right, the backtrace looks normal. I suspected that the read was not 
being called from within the debug-thread. Although in that case the error-code 
normally is 3, not 5. But from the backtrace it is clear that this is not the 
case.

You are probably right that it is something unrelated, such as the 
watches-window.

But I can not reproduce your problem, with a rtl compiled with OPT=-gw2 I can 
step through as much as I want. I did fix some problems with resetting 
breakpoints and did apply your patch to find relative filenames. Can yu update 
and try again? Maybe I'm lucky...

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-19 Thread Joost van der Sluis
 when I switched to the new debugger, I have no output in the Console window 
 (Terminal Output).
 
 Whenever I use WriteLn() or  DebugLn() in code, this window remains empty 
 while 
 with GDB I can see it.

Yeah, that window was added because with gdb it's difficult to debug 
console-applications. But in this case you can use the console itself, so you 
don't need this console-window. 

Maybe I could add a setting to let you choose which console to use. And it's 
possible to re-direct everything to the console window like is done width the 
gdb output. But I think that that' something that Martin is better at. It has 
nothing to do with the debugger, but is an IDE-thing.

For now you could try to start lazarus from the console, and then use that 
console to see the debug-output.

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-19 Thread Joost van der Sluis
 Follow up to this - a simple patch (attached) allows the rtl source to 
 show, rather than the assembler window. However there seems to be a more 
 fundamental problem, in that a step into that ends up stepping into a 
 rtl routine like fpc_shortstr_SInt reports a SIGSEGV in the debugged 
 program, when no such exception has occurred.

Did you step directly into fpc_shortstr_SInt, or did you do a 'step into', and 
did it eventually arrived at fpc_shortstr_SInt, because it was the first 
procedure with debug-info?

In the first case, a software-debug breakpoint is set, which is probably not 
removed correctly. In that case the debuggee does SIGSEGV, only it will only do 
this because the debugger did change it's code.

In the second case, it's difficult to say what happens, since 
hardware-breakpoints are used in that case.

Do you get a message on the console like 'failed to write data at xx'?

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-19 Thread Joost van der Sluis
  Did you step directly into fpc_shortstr_SInt, or did you do a 'step
  into', and did it eventually arrived at fpc_shortstr_SInt, because it
  was the first procedure with debug-info?
 
  In the first case, a software-debug breakpoint is set, which is probably
  not removed correctly. In that case the debuggee does SIGSEGV, only it
  will only do this because the debugger did change it's code.
 
  In the second case, it's difficult to say what happens, since
  hardware-breakpoints are used in that case.
 
  Do you get a message on the console like 'failed to write data at xx'?
 
 
 Just tried it again - it doesn't seem to be consistent. The specific was 
 stepping into a routine, and the problem seems to happen when stepping 
 into at the first begin. Trying it just now the debugger step into in 
 these circumstances - it now exits the routine. There are lots of 
 Failed to read data at address $10B70F08C08347F8 from processid 11321. 
 Errcode: 5
 Failed to read data at address $E800C766D388 from processid 11321. 
 Errcode: 5
 Failed to read data at address $E800C766D388 from processid 11321. 
 Errcode: 5
 Failed to read data at address $E800C766D388 from processid 11321. 
 Errcode: 5
 Failed to read data at address $E800C766D388 from processid 11321. 
 Errcode: 5
 Failed to read data at address $E800C766D388 from processid 11321. 
 Errcode: 5

Can you run Lazarus in a debugger (gdb, but in principle fpdebug is also 
possible ;) ) and set a breakpoint on fpdbglinuxclasses.pas:591. This is the 
line where the error above is printed. Then please try to reproduce the 
problem, and send me a backtrace when that breakpoint is hit.

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-18 Thread Joost van der Sluis

On 07/16/2014 09:53 AM, Joost van der Sluis wrote:

  I hung lazarus by hitting F4 (step to current line). The backtrace
may help:

Step to current line is indeed broken, I'll fix that.


This one is fixed. But I discovered that removing breakpoints while the 
debuggee is running is buggy.


Joost.


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


Re: [Lazarus] Need testers for the a new debugger

2014-07-16 Thread Joost van der Sluis
 On 14/07/14 22:13, Joost van der Sluis wrote:
  Hi all,
 
  As I've written before there's a new debugger available for Lazarus.
  (Actually there are two new debuggers, but I'm talking about the new
  gdb-less debugger)
 
  The debugger has been improved a lot and I could need some help testing
  the thing.
 
 Looks promising, but (on current SVN):
 
 an explicit raise Exception.Create causes an assembler window to appear, 
 trying to show ../inc/except.inc rather than the source line with the 
 raise as the standard debugger does.

Do you have a rtl with debug-info enabled? In that case it's normal, as this is 
the location where the exception actually takes place.
 
 I hung lazarus by hitting F4 (step to current line). The backtrace may help:

Step to current line is indeed broken, I'll fix that.

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-15 Thread Joost van der Sluis
 Il 14/07/2014 23:13, Joost van der Sluis ha scritto:
  Hi all,
 
  As I've written before there's a new debugger available for Lazarus. 
  (Actually there are two new debuggers, but I'm talking about the new 
  gdb-less debugger)
 
  The debugger has been improved a lot and I could need some help 
  testing the thing.
 
 [...]
 
 In my setup (Lazarus trunk + fpc 2.6.4) it fails to compile:
 
 fpdbglinuxclasses.pas(436,27) Error: Incompatible types: got procedure 
 variable type of procedure(TObject) of object;Register expected procedure 
 variable type of procedure;Register
 
 It would appear that the reason is that in fpc process.pp 
 TProcessForkEvent is defined as a procedure as opposed to procedure of 
 object (as required in fpdbglinuxclasses.pas).

I've tried to fix it but I don't have fpc v2.6.4 here, nor Linux. (I'm in the 
train)

Can you do a svn update, try again, and tell if it works?

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


Re: [Lazarus] Need testers for the a new debugger

2014-07-15 Thread Joost van der Sluis
 Am 15.07.2014 09:47 schrieb Gabor Boros gaborbo...@yahoo.com 
 mailto:gaborbo...@yahoo.com :
 
  2014.07.14. 23:13 keltezéssel, Joost van der Sluis írta:
 
  To install the debugger just install the
  components/lazdebuggers/lazdebuggerfp.lpk package. After you've done
  this, go to tools-options-debugger and select the 'FpDebug internal
  Dwarf-debugger'.

  components\lazdebuggers\lazdebuggerfp\lazdebuggerfp.lpk
 
  Compile error on Win32 with 2.6.4:
  fpdebugdebugger.pas(1371,11) Error: identifier idents no member Queue
 
 TThread.Queue is only supported in FPC 2.7.1. Maybe try to replace it with a 
 Application.QueueAsyncCall.

Damn, I didn't think of that. Should be fixed now. 

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


[Lazarus] Need testers for the a new debugger

2014-07-14 Thread Joost van der Sluis

Hi all,

As I've written before there's a new debugger available for Lazarus. 
(Actually there are two new debuggers, but I'm talking about the new 
gdb-less debugger)


The debugger has been improved a lot and I could need some help testing 
the thing.


The debugger only works on i386 and x86_64 with Linux, Windows and OS/X. 
Note that on Windows it is not possible to debug x86_64 applications 
with a 32-bit Lazarus. And on OS/X you have to sign your 
Lazarus-executable, and you'll have to use a dSym-debug bundle. (see the 
dsymutil command)


This debugger is initially started by Marc Weustink and I used some 
stuff from Duby, written by Dmitry Boyarintsev. The part to actually 
parse the debug-info and to evaluate expressions is mostly written by 
Martin Friebe. This code is shared with the FpGdbmiDebugger.


Please report any bugs you may find. Maybe I can not help with bugs in 
the expression-evaluation part, which is Martin's code.


To install the debugger just install the 
components/lazdebuggers/lazdebuggerfp.lpk package. After you've done 
this, go to tools-options-debugger and select the 'FpDebug internal 
Dwarf-debugger'.


You can simply use this new debugger, but keep in mind that when you 
think that your application is behaving somewhat strange, it also might 
be a bug in the debugger, instead of a problem with your application.


Happy debugging,

Joost van der Sluis.


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


Re: [Lazarus] Can't compile a saved project

2014-06-12 Thread Joost van der Sluis

On 06/12/2014 10:41 AM, Michael Van Canneyt wrote:



On Thu, 12 Jun 2014, Michael Schnell wrote:


On Linux x86 32 Bits, using the current svn version, since two days,
while I still can create a new-application, after I just did save
project as and saved the two files, I can't compile any more but get
lots of error messages (seemingly when linking) starting with

Compile Project: Exit code 256, Errors:50
/usr/bin/ld: warning: link.res contains output sections; did you
forget -T?
/home/mschnell/Downloads/svn/lazarus/trunk/lcl/units/i386-linux/wsimglist.o:
In function `REGISTERCUSTOMIMAGELIST':
wsimglist.pp(262,1) Error: undefined reference to
`WSRegisterCustomImageList'
/home/mschnell/Downloads/svn/lazarus/trunk/lcl/units/i386-linux/wsmenus.o:
In function `REGISTERMENUITEM':
wsmenus.pp(221,1) Error: undefined reference to `WSRegisterMenuItem'


What to do ?


Sounds like a missing 'interfaces' unit in your project source.


See also:

http://wiki.lazarus.freepascal.org/Lazarus_Faq#When_I_compile_a_project.2C_that_uses_a_LCL_unit.2C_I_get_a_linker_error

Joost.

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


Re: [Lazarus] Problem rounding values at post

2014-06-04 Thread Joost van der Sluis

On 06/04/2014 01:20 PM, Daniel Erles wrote:


Strange. I tried many values and y found this happens:

...
inserting 0.06 stored as 0.0599
0.07 -- 0.07
0.08 -- 0.08
0.09 -- 0.0899
0.10 -- 0.10
0.11 -- 0.11
0.12 -- 0.1199
0.13 -- 0.13
0.14 -- 0.14
0.15 -- 0.1499
0.16 -- 0.16
0.17 -- 0.17
0.18 -- 0.1799
...

there's a patron here. Could this be a bug ?



Yep, there's a pattern. And Mattias explained the pattern in his post.

And no, this is not a bug. But as designed. You'll need a TBCDField to 
read these decimal-type values. Or you can use a currency-field. (That 
is: if Zeos did implement those fields right)


Joost.



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


Re: [Lazarus] [lazarus] update version 1.22 doesn't compile

2014-05-25 Thread Joost van der Sluis

On 05/25/2014 04:46 AM, Martin Frb wrote:

On 25/05/2014 00:43, Bob Axtell wrote:

My lazarus WAS working fine until I updated to 1.22.

Errors say that it can't find PPU unit INTERFACES.PPU, but IN FACT it
is right there, in the very spot it is complaining about.

Don't know how to proceed...go back to the last version?


What OS?

If you did not uninstall the old version then you likely still have the
FPC 2.6.2 from Lazarus1.0, and at the same time the new one 2.6.4

There is no problem with having both, but if the old one still exists,
then your config is not updated.

So go to tools  Options, and make sure it use fpc 2.6.4.


It's very nice of you and Mattias to write an answer. But is it really 
necessary to reply to a question from the FAQ?


And I think it's the most common asked question of all. So, please read 
the answer on the FAQ:


http://wiki.lazarus.freepascal.org/Lazarus_Faq#When_I_try_to_compile_a_project.2C_I_get_an_error_message_.22Cannot_find_Unit_interfaces.22

And if the answer in the FAQ is not complete or clear enough. We should 
change that. ;)


joost.




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


Re: [Lazarus] New member with compiler query

2014-05-07 Thread Joost van der Sluis

On 05/07/2014 08:03 PM, Gordon Cooper wrote:

problem. My compiled  fP file  runs immediately and perfectly
on Puppy Linux but will not run on Kubuntu or Mepis. Both these
systems are asking me to select a program to run the file.
This may be a permissions issue, although all appears to be
correct.


Does your application has the executable-bit set? And are all systems 
using the same kind of processor (32 or 64 bit)


Joost


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


Re: [Lazarus] Early daredevil alpha testers: FpGdbmiDebugger

2014-05-07 Thread Joost van der Sluis

On 05/03/2014 05:42 PM, Martin Frb wrote:

If anyone using trunk feels a bit daredevilish, feel free to test
FpGdbmiDebugger.

Do NOT use for production. / Use at your own risk only.

Important: Read  http://wiki.lazarus.freepascal.org/FpGdbmiDebugger

It explains what to expect.
More important, also what not to expect.
And most important what not yet to report.

The page also explains how to install it.


Well, the FpGdbmiDebugger is more something for *junior* daredevils. 
Real man/women install the package 
components/lazfpdebuggers/lazdebuggerfp. Then they go to the 
debug-options and select the

'FpDebug internal Dwarf-debugger (alfa)'

That's so alpha it doesn't even have a wiki-page. Basicly it uses the 
same code to evaluate the debug-information as the FpGdbmiDebugger, but 
it also uses the debug-capabilities of fpDebug. That means that it does 
not use GDB at all.


It only works on win32 (and OS/X i386, but in that case you have to 
code-sign your Lazarus executable).


Software exceptions are not caught (yet) and all information on the 
wiki-page about fpGdbmiDebugger also applies.


Its not very useful to send bugs for features that are obviously 
missing. (like support for the evaluate/modify dialog. Watches do work, 
though) Bugs like 'If I have code like this:  and the current line 
is line XX and I do a 'step', then the debugger continues, instead of 
stepping one line.' are really welcome. (Well, not *really* welcome, 
because my code is flawless, obviously. But you get what I mean...)


Just for ppl who want to have a look...

Joost.


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


Re: [Lazarus] Retina Font Rendering not working anymore in Lazarus Trunk

2014-04-17 Thread Joost van der Sluis

On 09/04/14 10:00, Michael Ring wrote:

I realized a few weeks ago that fonts inside of lazarus started to look
ugly again on my Macbook Pro Retina, it seems that even though the App
has the retina flag set the fonts are rendered in 1920x1080 (My screen
resolution) and do not look smooth anymore.


But it did work in the past? Maybe you can confirm that by re-installing 
an older version again.


And if no-one here answers, the best thing to do is to open a 
bug-report. So that this will not be forgotten.


Joost.


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


Re: [Lazarus] Delphi 5 project migration to Lazarus or Delphi XE* ?

2013-08-23 Thread Joost van der Sluis

On 08/23/2013 03:34 PM, Roland Turcan wrote:

I am about to migrate my key project from Delphi to Lazarus, but...



5. TWordApplication, TWordDocument, ... OLE support for MS Word - 


That's just ActiveX. The only thing you need are the right bindings.

But if you own a valid Delphi 5 license, you can simply use the 
definitions that come with Delphi, and compile those in Lazarus/fpc.


I don't know it that will work, but you could at least try...

Joost.



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


[Lazarus] SquiziMouse

2013-08-04 Thread Joost van der Sluis

Hi all,

Everyone is on vacation over here. But I' still here but want to do 
something else for a change.


So I thought it would be nice to join some programming-contest. But I 
couldn't find any I liked.


Well, but as a developer you can build your own. So I did.

The idea is simple: there's a maze and you have a mouse. Steer the mouse 
through the maze and find the cheese. When your mouse found the cheese, 
the cheese is re-located and you have gained a point.


The only information that the mouse gets is which turn it is, which 
directions it can choose from and if the cheese was found in the prior 
turn. Ow, and when the cheese is near, your mouse can smell it...


It' difficult to create a game that is fair and does not have a 
'trivial' solution. So I'm really curious if there are people who like 
to develop their own mouse.


You can download a starter-kit from her:
https://cnoc.nl.alt001.com/extranet/SquiziMouse/

There are Linux and Windows server-executables. You can create your own 
mouse to connect to the server and play the game.


At this moment I don't want to distribute the SquiziMouseServer's source 
code. So that it's not possible to just use some of the logic used in there.


You can see the mice in action here: http://youtu.be/e5yyymMtV5Q

Joost van der Sluis.

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


Re: [Lazarus] Cross compiler

2013-05-27 Thread Joost van der Sluis
On Mon, 2013-05-27 at 11:18 +0200, Antonio Fortuny wrote:
 I then copied folders compiler, ide and installer from fpcsrc
 from the zip file into the folder C:\lazarus\fpc\2.6.2\source
 Didn't touch the packages and 'rtl as they are up to date.
 open a command line console:

You'll need to copy the complete fpcsrc folder. And I would use the two
commands separately. 'make all OS_TARGET=win32 CPU_TARGET=i386' and
'make crossinstall OS_TARGET=win32 CPU_TARGET=i386'

But it could be that you'll encounter problems with the 10-bit floating
point support.

In that case you can simply download a bootstrap compiler for win32
(ftp://ftp.freepascal.org/fpc/dist/2.6.2/bootstrap/) and do:

'make clean all PP=c:\path\to\bootstrap\compiler\ppc386.exe'

On win64 you can run 32 bit applications, after all, so
cross-compilation is not strictly necessary. Just install a 32 bit
compiler

Joost


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


Re: [Lazarus] Cross compiler

2013-05-27 Thread Joost van der Sluis
On Mon, 2013-05-27 at 12:01 +0200, Antonio Fortuny wrote:
 Le 27/05/2013 11:47, Joost van der Sluis a écrit :
  On Mon, 2013-05-27 at 11:18 +0200, Antonio Fortuny wrote:
  I then copied folders compiler, ide and installer from fpcsrc
  from the zip file into the folder C:\lazarus\fpc\2.6.2\source
  Didn't touch the packages and 'rtl as they are up to date.
  open a command line console:
  You'll need to copy the complete fpcsrc folder. And I would use the two
  commands separately. 'make all OS_TARGET=win32 CPU_TARGET=i386' and
  'make crossinstall OS_TARGET=win32 CPU_TARGET=i386'
 
  But it could be that you'll encounter problems with the 10-bit floating
  point support.
 
  In that case you can simply download a bootstrap compiler for win32
  (ftp://ftp.freepascal.org/fpc/dist/2.6.2/bootstrap/) and do:
 
  'make clean all PP=c:\path\to\bootstrap\compiler\ppc386.exe'
 this line compiles what ? In which directory should it be run ?

In fpcsrc. It does the same as above: compiling Free Pascal. The only
difference is that you force the usage of the 32-bit compiler to compile
the new compiler.

Joost.


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


Re: [Lazarus] Cross compiler

2013-05-27 Thread Joost van der Sluis
On Mon, 2013-05-27 at 12:05 +0200, Mattias Gaertner wrote:
  Joost van der Sluis jo...@cnoc.nl hat am 27. Mai 2013 um 11:47 
  geschrieben:
 [...]
  But it could be that you'll encounter problems with the 10-bit floating
  point support.
 
 10-bit FP?

Byte (Extended)

Joost.



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


[Lazarus] New iOS xib-Designer for Lazarus available for testing

2013-02-17 Thread Joost van der Sluis
Hi all,

I've finished a version of my iOS xib-Designer which is good enough for 
testing. ;) 

This package adds a designer to design iOS layouts, which are stored in 
xib-files. You can create an xib-file in Lazarus, then open it in XCode to 
adapt it and open it in Lazarus again, without any changes being lost.

Outlets are added automatically. This way you can use the objects in the iOS 
layout as you are used to from working with the LCL.  There is one big 
difference though: the (objective-C) class you are editing is not the window as 
you see in the designer, but a delegate which is bound to the window. 
With the LCL you create a new TFormXX class, that inherits from the TForm 
class. On iOS you have one or multiple UIWindows in the designer, and the code 
contains a class that is a delegate for these windows.

More information can be found in the wiki: 
http://wiki.freepascal.org/iOS_Designer

There's a lot that still can be done. For example my painting skills are almost 
non-existing, so there's a lot of improvement possible there. More objects can 
be added, and more properties/settings for the existing objects.

Oh, and if someone is so kind to create some icons for the component palette...

All input is welcome.

Despite all it's shortcomings, it is possible to build and publish applications 
with it. I do have several commercial applications which are already build with 
it.

Joost.

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


Re: [Lazarus] New iOS xib-Designer for Lazarus available for testing

2013-02-17 Thread Joost van der Sluis
 On 17.02.2013 17:10, Joost van der Sluis wrote:
  I've finished a version of my iOS xib-Designer which is good enough for 
 testing. ;)
 
  This package adds a designer to design iOS layouts, which are stored in 
 xib-files. You can create an xib-file in Lazarus, then open it in XCode to 
 adapt it and open it in Lazarus again, without any changes being lost.
 
 Though I'm not developing for iOS (or even Mac OS X) congratulation.

Thank you.

 I've not closely followed your recent discussions with the Lazarus devs, 
 so one little question: are you using the non-LCL designer included with 
 Lazarus here?

Yes. Mattias wrote that for me a few years ago for another project. Now it is 
also used for this xib-designer. 

Biggest difference between this version and earlier versions is that the 
xib-file is used as a resource-file, so it can be opened in Xcode and 
thereafter opened in Lazarus again. The earlier version could only export to 
xib-file, not import it. 

Joost.

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


Re: [Lazarus] New iOS xib-Designer for Lazarus available for testing

2013-02-17 Thread Joost van der Sluis
  Yes. Mattias wrote that for me a few years ago for another project. Now it 
  is 
 also used for this xib-designer.
 
  Biggest difference between this version and earlier versions is that the 
 xib-file is used as a resource-file, so it can be opened in Xcode and 
 thereafter opened in Lazarus again. The earlier version could only export to 
 xib-file, not import it.
 
 Ok, nice. Finally the non-LCL designer is put to good use :P
 
 Do you think you could add screenshots of the designer in action to the 
 wiki page? This way one can imagine how it looks like.

You mean like the screenshot in the link in the first mail in this thread?

And maybe the video with the first version: 
http://www.youtube.com/watch?v=DtltlNHnNMU

Joost.

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


[Lazarus] Patch to use different resource-formats within the ide

2013-02-16 Thread Joost van der Sluis
Hi all,

Maybe someone can have a look at the patch in 
http://bugs.freepascal.org/view.php?id=23814 . It adds the ability to register 
other resource-formats then the lfm-format inside the IDE.

If we can agree on adding this feature, I can ask people to help testing the 
XIB-designer.

Joost.

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


Re: [Lazarus] Problem with zeos and sqlite-3

2013-02-16 Thread Joost van der Sluis
 
 In our WinCE client for our application we use it for a miniature 
 version of our database. As the client does not need all tables and only 
 a specific subset of the data we generate a database on the host 
 computer and download that to the device. When the user is done the 
 database is copied back and the created data is integrated with the 
 normal database (which is either a Oracle, MSSQL or DB2 one).

What you could do is: use TSQLQuery to perform a query on Oracle or MSSQL. Then 
store the dataset to file. Then copy this file to your WinCE client. Then you 
can work with it on your client, but don't use ApplyUpdates but do save your 
dataset to disk. When you're done, copy the dataset to another computer. Open 
the dataset into an TSQLQuery and run ApplyUpdates...

But this only works if you do not use SQL on your WinCE client. But maybe this 
can be solved since ZMSQL adds that functionality to TBufDataset? (I only read 
the wiki-article, never actually looked at it)

Joost.

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


[Lazarus] Creating methods using rtti-info

2013-02-02 Thread Joost van der Sluis
Hi all,

I'm writing my own method propertyeditor. And I want it to create the source 
for a new method. Only problem is that it should use the RTTI-information to 
obtain the method's parameters.

Now if I look at TMainIDE.OnPropHookCreateMethod, it does exactly what I want 
except that CodeToolBoss.CreatePublishedMethod is called with the 
UseTypeInfoForParameters parameter set to false. In my case it has to be true. 
;)

Now I could try to write my own method which does the same thing, but then I'll 
need several things which are defined in the ide-package, which I can not use. 
Especially the FormEditor1.CreateNewJITMethod is necessary, or else it is not 
possible to return a create JITMethod for the new event.

Any ideas how to proceed?

Joost.

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


Re: [Lazarus] Creating methods using rtti-info

2013-02-02 Thread Joost van der Sluis
 Joost van der Sluis jo...@cnoc.nl wrote:
 
  Hi all,
  
  I'm writing my own method propertyeditor. And I want it to create the 
  source 
 for a new method. Only problem is that it should use the RTTI-information to 
 obtain the method's parameters.
  
  Now if I look at TMainIDE.OnPropHookCreateMethod, it does exactly what I 
  want 
 except that CodeToolBoss.CreatePublishedMethod is called with the 
 UseTypeInfoForParameters parameter set to false. In my case it has to be 
 true. 
 ;)
 
 Why?
 The RTTI might use mediator objects or things from the wrong
 platform. The codetools use the project sources and that's what
 the compiler is seeing too.

Because in my case, there are no events in the project-sources. It's an iOS 
objective-pascal project. The events for objective-c objects are not defined in 
the sources/headers, afaik. So it is not possible to adapt the codetools to 
find them from the sources.

It's just: event 1 is always onTouchDown, which has one parameter 'id'. 
(Actually only the amount of parameters is important for Objective-C, but 
Objective-Pascal also needs the type)
  
  Now I could try to write my own method which does the same thing, but then 
 I'll need several things which are defined in the ide-package, which I can 
 not 
 use. Especially the FormEditor1.CreateNewJITMethod is necessary, or else it 
 is 
 not possible to return a create JITMethod for the new event.
 
 Wow. That's the worst hack of the IDE. I was glad to get rid of it and
 now someone asks for its return.
 Are you sure you need them?

Well... I needed them earlier, for reading the events. To work around the 
absence of CreateNewJITMethods I had to use the TReader-class, and keep a list 
of all defined TJITMethods, so I know which TJITMethod actually corresponds 
with each real event.

But I don't need direct access to TJITMethod, if I have a way to create an 
event based on the rtti-info in some other way.

Joost.

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


Re: [Lazarus] Creating methods using rtti-info

2013-02-02 Thread Joost van der Sluis
 Wow. That's the worst hack of the IDE. I was glad to get rid of it and
 now someone asks for its return.
 Are you sure you need them?

I can think of two other options: (Maybe there are more, let me know if you can 
think of any...)

1: Adapt the codetools in such a way that when dealing with an objcclass the 
typeinfo is always used to get the parameter-information. 

2: I could create a complete new property-editor, which does not inherits from 
the default event propertyeditor. That way I can also get rid of the other 
hacks and don't have to work with the TJITMethod. But in that case these 
'events' will not show up in the Events-tab of the Object Inspector, but in the 
Properties-tab. But I'm sure that there's a possibility to add a class-method 
to TPropertyEditor to check in which tb the property/event should show up.

Maybe 2 is the best solution (although more work for me ;) )

I think I still need some help from you to get the right 'UnitInfo' and 
'SrcEdit' in the new property-editor, since I can not use BeginCodeTool.

btw: if you want to try it yourself, It's about the iOSDesigner package in the 
lazarus-ccr. You have to apply the patch from bug 23814 though to make it work. 

Joost.

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


Re: [Lazarus] Creating methods using rtti-info

2013-02-02 Thread Joost van der Sluis
 I added a TDesignerMediator.UseRTTIForMethods.
 I don't have an example to test it myself.

Works flawless. Thanks.

Joost.

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


Re: [Lazarus] What is GeckoPort version 2 status?

2013-01-19 Thread Joost van der Sluis
 H. I thought i fixed that. Maybe forgot to commit and package. Normally 
 lazarus shows the error location. Cast the nativewindow (or something like 
 that) to a thandle. You have to do this on two or three locations. I'll 
 update 
 the package tomorrow.. 

 Free Pascal Compiler version 2.6.1 [2013/01/19] for i386
 Copyright (c) 1993-2012 by Florian Klaempfl and others
 Target OS: Win32 for i386
 Compiling GeckoComponents.pas
 Compiling GeckoBrowser.pas
 Compiling CallbackInterfaces.pas
 Compiling GeckoChromeWindow.pas
 GeckoChromeWindow.pas(79,25) Hint: Parameter Sender not used
 H:\Documents and Settings\Max\Local Settings\Application 
 Data\FreePascal\fppkg\fpc-gecko\GeckoChromeWindow.pas(175,32) Error: 
 Incompatible types: got LongWord expected Pointer
 H:\Documents and Settings\Max\Local Settings\Application 
 Data\FreePascal\fppkg\fpc-gecko\GeckoChromeWindow.pas(556) Fatal: There 
 were 1 errors compiling module, stopping

Should be fixed. Try 'fppkg update' 'fppkg install gecko' and then install the 
gecko package into Lazarus.

Joost.

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


Re: [Lazarus] What is GeckoPort version 2 status?

2013-01-19 Thread Joost van der Sluis
Could be the exception mask, which does not cooperate with javascript. You 
could try to experiment with that.Op 19-01-13 15:56 schreef Maxim Ganetsky:
19.01.2013 16:39, Joost van der Sluis пишет:
 H. I thought i fixed that. Maybe forgot to commit and package. Normally
 lazarus shows the error location. Cast the nativewindow (or something like
 that) to a thandle. You have to do this on two or three locations. I'll 
 update
 the package tomorrow..

 Free Pascal Compiler version 2.6.1 [2013/01/19] for i386
 Copyright (c) 1993-2012 by Florian Klaempfl and others
 Target OS: Win32 for i386
 Compiling GeckoComponents.pas
 Compiling GeckoBrowser.pas
 Compiling CallbackInterfaces.pas
 Compiling GeckoChromeWindow.pas
 GeckoChromeWindow.pas(79,25) Hint: Parameter Sender not used
 H:\Documents and Settings\Max\Local Settings\Application
 Data\FreePascal\fppkg\fpc-gecko\GeckoChromeWindow.pas(175,32) Error:
 Incompatible types: got LongWord expected Pointer
 H:\Documents and Settings\Max\Local Settings\Application
 Data\FreePascal\fppkg\fpc-gecko\GeckoChromeWindow.pas(556) Fatal: There
 were 1 errors compiling module, stopping

 Should be fixed. Try 'fppkg update' 'fppkg install gecko' and then install 
 the gecko package into Lazarus.

Thanks, now it installs fine and after changes you mentioned earlier 
GBrowser (using Gecko 9) example does work with 
http://www.lazarus.freepascal.org (but immediately crashes with 
http://maps.google.com ;) ).

-- 
Best regards,
  Maxim Ganetsky  mailto:gan...@narod.ru


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


Re: [Lazarus] What is GeckoPort version 2 status?

2013-01-18 Thread Joost van der Sluis
On Sat, 2013-01-12 at 04:14 +0400, Maxim Ganetsky wrote:
 11.01.2013 19:50, Joost van der Sluis пишет:
  On Sat, 2012-11-03 at 02:39 +0400, Maxim Ganetsky wrote:
  As far as I can see latest SVN version of GeckoPort version 2 is broken.
  It cannot be compiled via Lazarus package (e.g. each-version directory
  is missing). Also GeckoPort version 2 cannot be installed via FpPkg (at
  least with FPC 2.6.1).
 
  What's its status? Will it be fixed? Is it usable at all?
 
  This might be a really old message, but if you still need help in
  getting it to work, I'm available.
 
  What's the problem you do have with the fppkg installation?
 
 Wow, thanks for your reply.

No problem. It was me that was so late...

 The problem is that GeckoPort v2 fails to compile. See full log:

Could you try again? 

For installation into Lazarus you have to supply the path of lazarus in
your fppkg.cfg. Did you do that?

 Installation to Lazarus via LPK fails too, of course. It seems, some 
 files are missing.
 
 BTW, is it possible to update GeckoPort to work with latest Gecko ESR 
 (as far as I understand, it is version 17)?

In principle it is. But I don't know if they changed a lot since I look
at it for the last time.

There is a parser that parses the sdk-files and generates pascal code.
That way it should be possible to update to gecko 17.

I just tested it with Gecko 9 on Windows. The GBrowser example did work,
only the registration of the mouse-events went wrong. I disabled those
by commenting-out line 1636 in GeckoBrowser (this is in the
Lazarus-package):
//  FDOMEvents := PGeckoDOMEventRegisterArray(@events);

If you can get this to work, we can look if it is possible to update to
gecko-18.

Joost.




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


[Lazarus] Reminder for patch 22483

2013-01-18 Thread Joost van der Sluis
Hi all,

A while ago I've send two patches to the bug-tracker. I need those
patches for the iOS-designer, and it would be nice if they could be
applied.

The first one is almost trivial:
http://bugs.freepascal.org/view.php?id=22483

It makes it possible to use the codetools to add methods to
objc-classes.

The second one is not that simple. And maybe there's a better solution
then my patch. But I would like the problem to be solved.


Thepro




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


Re: [Lazarus] Reminder for patch 22483

2013-01-18 Thread Joost van der Sluis
On Fri, 2013-01-18 at 17:24 +0100, Joost van der Sluis wrote:
 The second one is not that simple. And maybe there's a better solution
 then my patch. But I would like the problem to be solved.

Let me finished my mail. Accidentally send it:

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

The problem is that I have a designtime-only package, which depends on
the LCL. My project depends on this package.

Now when I compile my project, the designtime-only package is not
compiled, but the LCL is. Problem is that the LCL does not compile on
iOS.

If someone could help me with those two problems, that would be nice.

Joost.


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


Re: [Lazarus] What is GeckoPort version 2 status?

2013-01-18 Thread Joost van der Sluis
Sent from my phone, sorry for top posting. The error about the not existing dir 
is fixed in the latest lazmkunit package. Did you do an fppkg update, then 
fppkg install gecko? Maybe you need to explicitely update lazmkunit. (fppkg 
install lazmkunit)Op 18-01-13 22:47 schreef Maxim Ganetsky:
18.01.2013 20:15, Joost van der Sluis пишет:
 On Sat, 2013-01-12 at 04:14 +0400, Maxim Ganetsky wrote:
 The problem is that GeckoPort v2 fails to compile. See full log:

 Could you try again?

Now it compiles OK, thanks.

 For installation into Lazarus you have to supply the path of lazarus in
 your fppkg.cfg. Did you do that?

I added the following string to my fppkg.cfg:

FPMakeOptions=--lazarusdir=i:\FPC\lazarus\

But although this path definitely exists, Fppkg insists on the opposite:

[100%] Compiled package gecko
Installing package gecko
Lazarus directory 'i:\FPC\lazarus\' does not exist. Lazarus-package 
registration skipped.
Installation package gecko for target i386-win32 succeeded

 Installation to Lazarus via LPK fails too, of course. It seems, some
 files are missing.

 BTW, is it possible to update GeckoPort to work with latest Gecko ESR
 (as far as I understand, it is version 17)?

 In principle it is. But I don't know if they changed a lot since I look
 at it for the last time.

 There is a parser that parses the sdk-files and generates pascal code.
 That way it should be possible to update to gecko 17.

 I just tested it with Gecko 9 on Windows. The GBrowser example did work,
 only the registration of the mouse-events went wrong. I disabled those
 by commenting-out line 1636 in GeckoBrowser (this is in the
 Lazarus-package):
 //  FDOMEvents := PGeckoDOMEventRegisterArray(@events);

 If you can get this to work, we can look if it is possible to update to
 gecko-18.

 Joost.


-- 
Best regards,
  Maxim Ganetsky  mailto:gan...@narod.ru

--
___
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 GeckoPort version 2 status?

2013-01-18 Thread Joost van der Sluis
H. I thought i fixed that. Maybe forgot to commit and package. Normally 
lazarus shows the error location. Cast the nativewindow (or something like 
that) to a thandle. You have to do this on two or three locations. I'll update 
the package tomorrow.. Op 18-01-13 23:38 schreef Maxim Ganetsky:
19.01.2013 1:47, Maxim Ganetsky пишет:
 18.01.2013 20:15, Joost van der Sluis пишет:
 On Sat, 2013-01-12 at 04:14 +0400, Maxim Ganetsky wrote:
 The problem is that GeckoPort v2 fails to compile. See full log:

 Could you try again?

 Now it compiles OK, thanks.

 For installation into Lazarus you have to supply the path of lazarus in
 your fppkg.cfg. Did you do that?

 I added the following string to my fppkg.cfg:

 FPMakeOptions=--lazarusdir=i:\FPC\lazarus\

 But although this path definitely exists, Fppkg insists on the opposite:

 [100%] Compiled package gecko
 Installing package gecko
 Lazarus directory 'i:\FPC\lazarus\' does not exist. Lazarus-package
 registration skipped.
 Installation package gecko for target i386-win32 succeeded

Forget this, updating to latest FPC 2.6.1 made this problem disappear.

Now when I try to install GeckoComponent in Lazarus via Add/Remove 
packages dialog I get the following build error.

Free Pascal Compiler version 2.6.1 [2013/01/19] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling GeckoComponents.pas
Compiling GeckoBrowser.pas
Compiling CallbackInterfaces.pas
Compiling GeckoChromeWindow.pas
GeckoChromeWindow.pas(79,25) Hint: Parameter Sender not used
H:\Documents and Settings\Max\Local Settings\Application 
Data\FreePascal\fppkg\fpc-gecko\GeckoChromeWindow.pas(175,32) Error: 
Incompatible types: got LongWord expected Pointer
H:\Documents and Settings\Max\Local Settings\Application 
Data\FreePascal\fppkg\fpc-gecko\GeckoChromeWindow.pas(556) Fatal: There 
were 1 errors compiling module, stopping

 Installation to Lazarus via LPK fails too, of course. It seems, some
 files are missing.

 BTW, is it possible to update GeckoPort to work with latest Gecko ESR
 (as far as I understand, it is version 17)?

 In principle it is. But I don't know if they changed a lot since I look
 at it for the last time.

 There is a parser that parses the sdk-files and generates pascal code.
 That way it should be possible to update to gecko 17.

 I just tested it with Gecko 9 on Windows. The GBrowser example did work,
 only the registration of the mouse-events went wrong. I disabled those
 by commenting-out line 1636 in GeckoBrowser (this is in the
 Lazarus-package):
 //  FDOMEvents := PGeckoDOMEventRegisterArray(@events);

 If you can get this to work, we can look if it is possible to update to
 gecko-18.

 Joost.




-- 
Best regards,
  Maxim Ganetsky  mailto:gan...@narod.ru

--
___
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 GeckoPort version 2 status?

2013-01-11 Thread Joost van der Sluis
On Sat, 2012-11-03 at 02:39 +0400, Maxim Ganetsky wrote:
 As far as I can see latest SVN version of GeckoPort version 2 is broken. 
 It cannot be compiled via Lazarus package (e.g. each-version directory 
 is missing). Also GeckoPort version 2 cannot be installed via FpPkg (at 
 least with FPC 2.6.1).
 
 What's its status? Will it be fixed? Is it usable at all?

This might be a really old message, but if you still need help in
getting it to work, I'm available.

What's the problem you do have with the fppkg installation?

Joost.




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


Re: [Lazarus] make clean is leaving more than 20MB stuff behind (this number is after compression!)

2012-10-14 Thread Joost van der Sluis
On Sat, 2012-10-13 at 10:46 +0200, Reinier Olislagers wrote:
 On 8-10-2012 14:50, Bernd wrote:
  2012/10/8 Mattias Gaertner nc-gaert...@netcologne.de:

 FYI: FPC make distclean didn't work:
 
 fpc trunk log:
 r22621 | joost | 2012-10-12 23:26:16 +0200 (Friday, 12 Oct 2012) | 6 lines
 
  * For some reason burried in the past a 'make distclean' in fpc's root
is passed to utils as a 'make cleanall' which is an alias for
 'distclean'.
The Makefile.fpc did not recognize the 'cleanall' alias because in
packages 'distclean' is being used. This means that nothing was
 cleaned at all.

Note that this is only about the files in utils/fppkg/units/*. As only
fppkg is compiled by fpmake by default.

Joost.


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


Re: [Lazarus] Please define delphi compatibility

2012-10-14 Thread Joost van der Sluis
On Thu, 2012-10-11 at 11:55 +0200, Sven Barth wrote:
 Am 10.10.2012 18:42, schrieb Florian Klämpfl:
  Am 10.10.2012 16:11, schrieb Bart:
 I would even go into the opposite direction and adjust Delphi's 
 attribute syntax:

 to a more Pascal like:
 
 === hypothetical example ===
 
 type
TSomeClass = class
  property SomeProperty {...} attributes [Some3rdAttribute('a', 'b')];
end attributes [SomeAttribute(1, 2, 3), SomeOtherAttribute];
 
 === hypothetical example ===

I don't know if you participated in the discussion about this feature
before I started the first implementation. But we discussed this then. I
decided not to do it, for the simple reason that I don't need it since
I'm doing this for an application that has to be compiled by both Delphi
and fpc. And as I was the one who implemented it, I had to decide.

But feel free to add this syntax to objfpc mode. This can be done on the
parser level only. And it's simpler then the 'Delphi' syntax as it does
not need to remember the attribute until it parses the next statement.
(Which is off course why the Delphi-class-attributes-syntax is not a
Pascal syntax at all)

 And if Joost isn't fast enough with his attributes branch I might do 
 that indeed ;P

In fact that branch works completely, as far as I know. I have to add
some more tests, and maybe some checks here and there. But the
attributes do work.

Joost.


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


Re: [Lazarus] Please define delphi compatibility

2012-10-14 Thread Joost van der Sluis
On Sun, 2012-10-14 at 13:11 +0200, michael.vancann...@wisa.be wrote:
 
 On Sun, 14 Oct 2012, Joost van der Sluis wrote:
 
  On Thu, 2012-10-11 at 11:55 +0200, Sven Barth wrote:
  Am 10.10.2012 18:42, schrieb Florian Klämpfl:
  Am 10.10.2012 16:11, schrieb Bart:
  I would even go into the opposite direction and adjust Delphi's
  attribute syntax:
 
  to a more Pascal like:
 
  === hypothetical example ===
 
  type
 TSomeClass = class
   property SomeProperty {...} attributes [Some3rdAttribute('a', 'b')];
 end attributes [SomeAttribute(1, 2, 3), SomeOtherAttribute];
 
  === hypothetical example ===
 
  I don't know if you participated in the discussion about this feature
  before I started the first implementation. But we discussed this then. I
  decided not to do it, for the simple reason that I don't need it since
  I'm doing this for an application that has to be compiled by both Delphi
  and fpc. And as I was the one who implemented it, I had to decide.
 
  But feel free to add this syntax to objfpc mode. This can be done on the
  parser level only. And it's simpler then the 'Delphi' syntax as it does
  not need to remember the attribute until it parses the next statement.
  (Which is off course why the Delphi-class-attributes-syntax is not a
  Pascal syntax at all)
 
  And if Joost isn't fast enough with his attributes branch I might do
  that indeed ;P
 
  In fact that branch works completely, as far as I know. I have to add
  some more tests, and maybe some checks here and there. But the
  attributes do work.
 
 What stops you from merging this to trunk ?

The tests. I want to add those first. I'll do this next week.

Joost.


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


Re: [Lazarus] PascalScript on Win x64

2012-09-08 Thread Joost van der Sluis
On Thu, 2012-09-06 at 09:47 +0200, Sven Barth wrote:
 Am 06.09.2012 04:40, schrieb Paul Ishenin:
  04.09.12, 22:10, Sven Barth пишет:
 
  RTTI may (you need to establish if this applies to *all* cases) tell
  you
  that procedure Foo(a: integer) takes 1 int param.
  But it will not tell you, if this needs to be on the stack, or in a
  register (or which register).
 
 
  Sorry, not correct. It does: in calling convention.
 
  The point I meant to made is: you still need to get the value into that
  register, or set up the stack. That can only be done in asm
 
  Yes, it can only be done in ASM, but the Invoke function is part of the
  RTL and thus would by definition be available for all platforms
  supported by FPC (even if not every platform would be available at once).
 
  Maybe at the first step to move the code for invokation of FPC methods
  from PascalScript code into a LCL unit (if license allows) - so later it
  will be simple moved to FPC RTL?
 
 If the license allows it this might be an interesting idea. The most 
 important thing that is missing is the TValue type and also I don't know 
 how the Invoke code knows if the pointer passed in is a global one, a 
 method, a class method or a static method...

Please take a look at the
http://svn.freepascal.org/svn/fpc/branches/joost/classattributes branch.
It contains an initial implementation of the TValue type. I still have
to add some testcases and tidy thins up and then this can be merged to
trunk.

Adding invocation to fpc's RTTI isn't that hard, only quite some work to
implement on all platforms.

Joost.


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


Re: [Lazarus] building lazarus 1.0 with make OPT=-n and fpc.cfg in different location

2012-09-08 Thread Joost van der Sluis
On Wed, 2012-09-05 at 10:38 +0200, Reinier Olislagers wrote:
 Once I used fpcmkcfg instead of samplecfg, I never looked back ;)

Nowadays samplecfg is only a wrapper around fpcmkcfg, for
backwards-compatibility.

Joost.


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


Re: [Lazarus] Compiling LCL units via commandline

2012-07-25 Thread Joost van der Sluis
On Wed, 2012-07-25 at 08:39 -0300, luciano de souza wrote:
 You say that Lazbuild could be adapted. What does it mean? Should I
 call some special commandline parameters or Lazbuild should be changed
 implying an development effort under Lazbuild?
 If the reply is that the code of Lazbuild should be changed, regarding
 I don't know the code of Lazbuild, I prefer to invest in an automatic
 routine to produce the XML file since it will be simpler for us.
 But before choosing definetely Lazbuild, let me ask you: configuring
 properly fpc.cfg, there's no way to compile a project using LCL?

Well... there's still the plan to adapt fpmake so that it can compile
the lcl and applications that are using the lcl.

Coincidentally I've worked on that yesterday, and I was surprised how
easy it was. I'll continue with it but do not expect that it will become
really stable soon

Joost van der Sluis


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


Re: [Lazarus] Changing the translation of forms while the program is running

2012-07-16 Thread Joost van der Sluis
On Fri, 2012-07-13 at 15:51 +0200, zeljko wrote:
 On Friday 13 of July 2012 15:49:37 Joost van der Sluis wrote:
  I'm using the DefaultTranslator unit to translate my application,
 but I
  would also like to switch to another language on-the-fly, thus
 without
  restarting the application.

 I need that too atm :)

Try the attached patch for DefaultTranslator. With SetDefaultLang('nl')
it will switch the language on-the-fly (to Dutch in this case). 

It will loop through all forms in screens and will change all properties
that are present in the .po-file.

Maybe it is an idea to apply this patch so that others can also use
this? Or should users write their own 'DefaultTranslator' unit? (Then
this one could be added to the Wiki as an example)

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl
Index: defaulttranslator.pas
===
--- defaulttranslator.pas	(revision 37902)
+++ defaulttranslator.pas	(working copy)
@@ -33,11 +33,22 @@
 
 uses
   Classes, SysUtils, LResources, GetText, Controls, typinfo, FileUtil, LCLProc,
-  Translations;
+  Translations, Forms;
 
 type
-  TDefaultTranslator = class(TAbstractTranslator)
+
+  { TUpdateTranslator }
+
+  TUpdateTranslator = class(TAbstractTranslator)
   private
+FStackPath: string;
+procedure IntUpdateTranslation(AnInstance: TPersistent);
+  public
+procedure UpdateTranslation(AnInstance: TPersistent);
+  end;
+
+  TDefaultTranslator = class(TUpdateTranslator)
+  private
 FMOFile: TMOFile;
   public
 constructor Create(MOFileName: string);
@@ -46,7 +57,9 @@
   PropInfo: PPropInfo; var Content: string); override;
   end;
 
-  TPOTranslator = class(TAbstractTranslator)
+  { TPOTranslator }
+
+  TPOTranslator = class(TUpdateTranslator)
   private
 FPOFile: TPOFile;
   public
@@ -56,6 +69,8 @@
   PropInfo: PPropInfo; var Content: string); override;
   end;
 
+procedure SetDefaultLang(Lang: string);
+
 implementation
 
 uses
@@ -64,9 +79,9 @@
 type
   TPersistentAccess = class(TPersistent);
 
-function FindLocaleFileName(LCExt: string): string;
+function FindLocaleFileName(LCExt: string; Lang: string): string;
 var
-  Lang, T: string;
+  T: string;
   i: integer;
 
   function GetLocaleFileName(const LangID, LCExt: string): string;
@@ -176,12 +191,12 @@
 
 begin
   Result := '';
-  Lang := '';
 
-  for i := 1 to Paramcount - 1 do
-if (ParamStrUTF8(i) = '--LANG') or (ParamStrUTF8(i) = '-l') or
-  (ParamStrUTF8(i) = '--lang') then
-  Lang := ParamStrUTF8(i + 1);
+  if Lang = '' then
+for i := 1 to Paramcount - 1 do
+  if (ParamStrUTF8(i) = '--LANG') or (ParamStrUTF8(i) = '-l') or
+(ParamStrUTF8(i) = '--lang') then
+Lang := ParamStrUTF8(i + 1);
 
   //Win32 user may decide to override locale with LANG variable.
   if Lang = '' then
@@ -225,19 +240,108 @@
   if (csDesigning in Component.ComponentState) then
 exit;
 
-  if not (Sender is TReader) then
-exit;
-  Reader := TReader(Sender);
-  if Reader.Driver is TLRSObjectReader then
-Result := TLRSObjectReader(Reader.Driver).GetStackPath
-  else
-Result := Instance.ClassName + '.' + PropInfo^.Name;
+  if (Sender is TReader) then
+  begin
+Reader := TReader(Sender);
+if Reader.Driver is TLRSObjectReader then
+  Result := TLRSObjectReader(Reader.Driver).GetStackPath
+else
+  Result := Instance.ClassName + '.' + PropInfo^.Name;
+  end else if (Sender is TUpdateTranslator) then
+Result := TUpdateTranslator(Sender).FStackPath + '.' + PropInfo^.Name;
   Result := UpperCase(Result);
 end;
 
 var
   lcfn: string;
 
+{ TUpdateTranslator }
+
+procedure TUpdateTranslator.IntUpdateTranslation(AnInstance: TPersistent);
+var
+  i,j: integer;
+  APropCount: integer;
+  APropList: PPropList;
+  APropInfo: PPropInfo;
+  TmpStr: string;
+  APersistentProp: TPersistent;
+  StoreStackPath: string;
+begin
+  APropCount := GetPropList(AnInstance.ClassInfo, APropList);
+  try
+for i := 0 to APropCount-1 do
+  begin
+  APropInfo:=APropList^[i];
+  if Assigned(PPropInfo(APropInfo)^.GetProc) and
+ assigned(APropInfo^.PropType) and
+ IsStoredProp(AnInstance, APropInfo) then
+case APropInfo^.PropType^.Kind of
+  tkSString,
+  tkLString,
+  tkAString:  begin
+  TmpStr := '';
+  LRSTranslator.TranslateStringProperty(self,aninstance,APropInfo,TmpStr);
+  if TmpStr '' then
+SetStrProp(AnInstance, APropInfo, TmpStr);
+  end;
+  tkclass:begin
+  APersistentProp := TPersistent(GetObjectProp(AnInstance, APropInfo, TPersistent));
+  if Assigned(APersistentProp) then
+begin
+if APersistentProp is TCollection then
+  begin

Re: [Lazarus] Changing the translation of forms while the program is running

2012-07-16 Thread Joost van der Sluis
On Mon, 2012-07-16 at 14:16 +0200, Mattias Gaertner wrote:
 On Mon, 16 Jul 2012 13:58:57 +0200
 Joost van der Sluis jo...@cnoc.nl wrote:
 
  On Fri, 2012-07-13 at 15:51 +0200, zeljko wrote:
   On Friday 13 of July 2012 15:49:37 Joost van der Sluis wrote:
I'm using the DefaultTranslator unit to translate my application,
   but I
would also like to switch to another language on-the-fly, thus
   without
restarting the application.
  
   I need that too atm :)
  
  Try the attached patch for DefaultTranslator. With SetDefaultLang('nl')
  it will switch the language on-the-fly (to Dutch in this case). 
  
  It will loop through all forms in screens and will change all properties
  that are present in the .po-file.
  
  Maybe it is an idea to apply this patch so that others can also use
  this? Or should users write their own 'DefaultTranslator' unit? (Then
  this one could be added to the Wiki as an example)
 
 Yes.
 Why is FStackPath a private variable instead of a parameter?

Because GetIdentifierPath (which needs FStackPath) is called from within
TranslateStringProperty, from which the parameters are defined in the
classes-unit?

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl


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


[Lazarus] Changing the translation of forms while the program is running

2012-07-13 Thread Joost van der Sluis
Hi all,

I'm using the DefaultTranslator unit to translate my application, but I
would also like to switch to another language on-the-fly, thus without
restarting the application.

Are there any tricks to do that?

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl


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


Re: [Lazarus] Changing the translation of forms while the program is running

2012-07-13 Thread Joost van der Sluis
On Fri, 2012-07-13 at 16:00 +0200, Corpsman wrote:
 Try this one :
 
 http://corpsman.de/index.php?doc=komponenten/multilanguage

Does it uses the .po and .mo files generated by Lazarus? 

Joost.


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


[Lazarus] TControl.InvalidatePreferredSize loop detected

2012-07-09 Thread Joost van der Sluis
Hi all,

I have an application which gives this exception when it is run:

TControl.InvalidatePreferredSize loop detected Panel1:TPanel
Bounds=l=0,t=1156,r=26,b=1200

Below the stacktrace. Did something change in this regard?

TApplication.HandleException TControl.InvalidatePreferredSize loop
detected Panel1:TPanel Bounds=l=0,t=1156,r=26,b=1200
  Stack trace:
  $0053595D line 5340 of include/control.inc
  $005357D5 line 5356 of include/control.inc
  $005279BE line 749 of include/control.inc
  $00518A39 line 3765 of include/wincontrol.inc
  $00527234 line 679 of include/control.inc
  $005352AD line 5187 of include/control.inc
  $00516FDA line 2999 of include/wincontrol.inc
  $0051661D line 3112 of include/wincontrol.inc
  $005160BE line 3189 of include/wincontrol.inc
  $0051ED2F line 6249 of include/wincontrol.inc
  $0052CE23 line 2853 of include/control.inc
  $0052CE63 line 2855 of include/control.inc
  $0052CB6C line 2898 of include/control.inc
  $005180A1 line 3500 of include/wincontrol.inc
  $00535C44 line 5446 of include/control.inc
  $00532288 line 4289 of include/control.inc
  $004E83CA line 488 of include/customform.inc


-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl


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


[Lazarus] Demonstration of developing iOS application using a non-lcl-designer

2012-05-13 Thread Joost van der Sluis
Hi all,

As I wrote earlier I'm working on a non-lcl-designer to make it easier
to develop for iOS.

I have all the basics working now. It needs some changes to Lazarus,
though. A few changes can be classified as 'ugly hack, will never be
accepted', but it is a start.

You can view the result here:
http://www.youtube.com/watch?v=DtltlNHnNMUv

Joost.


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


[Lazarus] Problems with painting controls on canvas

2012-04-20 Thread Joost van der Sluis
Hi,

I try to paint a widget with child-widgets on a canvas in an OnPaint
handler. But I can not get it right. Below is my current code. It almost
works, but when I resize the widgets in the designer, there are all kind
of artefacts on the lower right part. It has something to do with the
IntersectClipRect, but I do not understand what it does exactly. 

Can somebody help me with this?

This is my current code: (Adapted from the designnonlcl example)

procedure TMyWidgetMediator.Paint;

  procedure PaintWidget(AWidget: TMyWidget);
  var
i: Integer;
Child: TMyWidget;
  begin
with LCLForm.Canvas do
  begin
  if not (AWidget is TMyForm) then
begin
// fill background
Brush.Style:=bsSolid;
Brush.Color:=clLtGray;
// FillRect(0,0,AWidget.Width,AWidget.Height);
// outer frame
Pen.Color:=clRed;
Rectangle(0,0,AWidget.Width,AWidget.Height);
// caption
TextOut(5,2,AWidget.Caption);
end;
  // children
  if AWidget.ChildCount0 then
begin
//SaveHandleState;
// clip client area
{if IntersectClipRect(Handle, AWidget.left, AWidget.Top,
AWidget.left+AWidget.Width,
 AWidget.Height+AWidget.Top)NullRegion
then} begin
  for i:=0 to AWidget.ChildCount-1 do begin
SaveHandleState;
Child:=AWidget.Children[i];
// clip child area
MoveWindowOrgEx(Handle,Child.Left,Child.Top);
if
IntersectClipRect(Handle,0,0,Child.Width,Child.Height)NullRegion then
  PaintWidget(Child);
RestoreHandleState;
  end;
end;
//RestoreHandleState;
end;
  end;
  end;

begin
  PaintWidget(MyForm);
  inherited Paint;
end;

Joost.


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


Re: [Lazarus] Non-lcl-designer design question

2012-04-19 Thread Joost van der Sluis
On Wed, 2012-04-18 at 20:39 +0200, Joost van der Sluis wrote:
 On Wed, 2012-04-18 at 14:42 +0200, Joost van der Sluis wrote:
  On Wed, 2012-04-18 at 14:16 +0200, Mattias Gaertner wrote:
  
   Joost van der Sluis jo...@cnoc.nl hat am 18. April 2012 um 13:45
   geschrieben: 
   I will create a test example so we can check what is possible and what
   is needed. 
  
  Perfect. I can send you what I have this evening, I don't have my
  macbook with me right now. 
 
 I would have sent it know, if I hadn't deleted it while removing some
 old files in between the real code... ;(
 
 I'll have to do over some things...

Ok, restored. See attachment.

It's just a modification of the designnonlcl example. I did not even
bother to rename it. 

In principle: install the package, and create a new 'ios application'.
You can add components from the MyWidgetSet tab. Then there's some
trickery: you have to run 'Start my tool' from the tools menu while the
appdelegate_iphone designer is active. This is to create the .xib file.
Then you can build the application and run it in the iPhone simulator.

That's theory. Now the problems:

1: The package depends on the IDE package, so it is impossible to
install. Just remove the IDE dependency, install the package, and add
the IDE dependency again. This dependency is to be able to set the
'aftercompile' project-option. And to be able to obtain the
package-directory, because the .xib template is located there. (I'm sure
Mattias can help me with these issues)

2: All settings are for the 5.1 sdk on OS/X Lion with the latest Xcode.
Note that the location of Xcode has changed in this version. So maybe
the aftercompile.sh script has to be altered. And the 'other compiler
options'. We can make this more user-friendly later. (Revive the
iphonelazext and use that)

3: It seems that DoNewEditorfile does not save the file if it is really
opened in an editor. This means that the info.plist and appdelegateu.pas
files are not written to disk. Open the project-inspector, open these
files and save them to disk. Also something that Mattias can help with.
(It would also be nice to actually use Infp.plist, with a capital. And
is it possible to save appdelegate_iphone.pas quietly?)

4: The real issue: save the project, restart lazarus and open it again.
Now it won't work anymore...

5: There are a lot more, but I think these are the most important to get
you going...


 


designnonlcl.tgz
Description: application/compressed-tar
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Non-lcl-designer design question

2012-04-19 Thread Joost van der Sluis
On Thu, 2012-04-19 at 17:59 +0200, Sven Barth wrote:
 On 19.04.2012 15:12, Reinier Olislagers wrote:
  On 19-4-2012 14:51, Reimar Grabowski wrote:
  On Thu, 19 Apr 2012 09:05:45 +0200
  Graeme Geldenhuysgraemeg.li...@gmail.com  wrote:
 
  Every heard of Git?  ;-)
  You mean this old, little VCS that had so many problems on windows and was 
  superseded by Bazaar because Bazaar just works? ^^
 
  Yep, git's not that useful if you want to submit patches on windows to
  Lazarus/FPC svn... perhaps bazaar solved that problem...
 
  Thanks for brightening up my day and bringing up git. Perhaps somebody
  can start another unicode thread or a documentation dicussion to really
  heat up things around here...
 
 The Git discussions don't usually get as heated up as unicode or 
 documentation discussions ^^

You think? 

Maybe that's because the people that normally join the git discussion
have grown older and know that they better could not react anymore. ;)

Maybe you should have a look in the archive for some other
git-discussions. (Or better not, and just continue what you were doing
before this distraction. For example: have a look at the nonlcldesigner
for iOS)

Joost


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


Re: [Lazarus] Non-lcl-designer design question

2012-04-19 Thread Joost van der Sluis
On Thu, 2012-04-19 at 17:01 +0200, Joost van der Sluis wrote:
 On Wed, 2012-04-18 at 20:39 +0200, Joost van der Sluis wrote:
 In principle: install the package, and create a new 'ios application'.
 You can add components from the MyWidgetSet tab. Then there's some
 trickery: you have to run 'Start my tool' from the tools menu while the
 appdelegate_iphone designer is active. This is to create the .xib file.
 Then you can build the application and run it in the iPhone simulator.

6: Is there a way to intercept when a unit is saved? So that at the same
time the unit is saved, the .xib is created?

Joost.



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


Re: [Lazarus] Non-lcl-designer design question

2012-04-19 Thread Joost van der Sluis
On Thu, 2012-04-19 at 21:09 +0200, Marco van de Voort wrote:
 On Thu, Apr 19, 2012 at 05:59:20PM +0200, Sven Barth wrote:
   can start another unicode thread or a documentation dicussion to really
   heat up things around here...
  
  The Git discussions don't usually get as heated up as unicode or 
  documentation discussions ^^
 
 Maybe that's because the latter two are relevant.

I can see you've never been forced to use git. Or else you would know
that problems with documentation and unicode will slow you down. Just as
using git does. So they are all three relevant.

But for now, can we talk about non-lcl-designers and iOS again?

Joost.


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


[Lazarus] Non-lcl-designer design question

2012-04-18 Thread Joost van der Sluis
Hi,

I'm playing around with a non-lcl-designer to design xib forms. This
works quite nice, but there are a lot of issues.

Basic problem is that the 'objects' which are placed on the designer are
not TComponent descendants. In fact they aren't even classes but
objcclasses. 

To circumvent this problem I created a unit with TComponent descendants
with the same name as the objcclasses I really want to use. I thought
that the Lazarus designer uses the classes which are compiled into the
IDE. But this is not everywhere the case. Sometimes the codetools are
used. They look up the unit sources and then see completely different
classes then the 'fake' TComponent descendants that I used.

I can create a form, edit it, save it, compile it. But when I close it
and re-open it again the 'normal' TForm designer is used.

Does anyone see another approach? How could I handle this?

Joost.


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


Re: [Lazarus] Non-lcl-designer design question

2012-04-18 Thread Joost van der Sluis
On Wed, 2012-04-18 at 14:16 +0200, Mattias Gaertner wrote:

 Joost van der Sluis jo...@cnoc.nl hat am 18. April 2012 um 13:45
 geschrieben: 
  To circumvent this problem I created a unit with TComponent
 descendants 
  with the same name as the objcclasses I really want to use. I
 thought 
  that the Lazarus designer uses the classes which are compiled into
 the 
  IDE. But this is not everywhere the case. Sometimes the codetools
 are 
  used. They look up the unit sources and then see completely
 different 
  classes then the 'fake' TComponent descendants that I used. 
  
  Does anyone see another approach? How could I handle this? 
  
 
 Sounds similar to KOL.

Indeed, somewhat. But I want to use the designer-mediator to make it
better looking. 

 The designer needs components and that can not be changed easily. Many
 places only require TPersistent but that does not help with
 objcclasses. Your approach of creating fake TComponents is probably
 the easiest way.  
 
 I will create a test example so we can check what is possible and what
 is needed. 

Perfect. I can send you what I have this evening, I don't have my
macbook with me right now. 

Joost.




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


Re: [Lazarus] Non-lcl-designer design question

2012-04-18 Thread Joost van der Sluis
On Wed, 2012-04-18 at 14:42 +0200, Joost van der Sluis wrote:
 On Wed, 2012-04-18 at 14:16 +0200, Mattias Gaertner wrote:
 
  Joost van der Sluis jo...@cnoc.nl hat am 18. April 2012 um 13:45
  geschrieben: 
  I will create a test example so we can check what is possible and what
  is needed. 
 
 Perfect. I can send you what I have this evening, I don't have my
 macbook with me right now. 

I would have sent it know, if I hadn't deleted it while removing some
old files in between the real code... ;(

I'll have to do over some things...

Joost.


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


[Lazarus] TBaseCompilerOptions.ExecuteAfter not available in IDEIntf

2012-04-18 Thread Joost van der Sluis
Hi,

(While I'm re-writing my package, I can better report some problems I'm
having immediately)

I want to set TBaseCompilerOptions.ExecuteAfter in a package, but to do
that the package has to depend on the ide package. Not ideal, if not
impossible. 

Could .ExecuteAfter (and probably before) be added to
TLazCompilerOptions? 

Joost


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


Re: [Lazarus] Filtering on date with TDbf

2012-02-02 Thread Joost van der Sluis
On Thu, 2012-02-02 at 10:45 +0100, Koenraad Lelong wrote:

 Unfortunately, this does not help. The application I'm writing extracts 
 data from the database. The input into the database is handled by an old 
 application (dbase or a derivate), and I don't have the sources of it. 
 So I can't modify the database.
 
 If there is no solution, I will have to stick with Delphi then.
 Is this a deliberate omission, or a bug ? Should I file a bugreport ?

There's no difference between Delphi's tDbf and Free Pascal's tDbf.
Although since tDbf is not maintained anymore, the Free Pascal version
has some fixes which aren't in the 'official' tDbf version. 

And if I remember exactly,  tDbf can not filter on '' and '' but it
uses 'gt' and 'lt'. Why it did work on Delphi I don't know, though.

Joost.


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


Re: [Lazarus] Postgres Cannot connect

2011-11-23 Thread Joost van der Sluis
On Mon, 2011-11-21 at 15:36 -0500, Tom Russell wrote:
 Its like this:
 
 Procedure InitialisePostgres3;

Ok, then it has been changed in the mean-time. You could try fpc 2.6.0
(rc1) or higher.

Joost.




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


Re: [Lazarus] RE : GeckoPort - Qt and GTK2

2011-11-21 Thread Joost van der Sluis
On Sun, 2011-11-20 at 23:04 -0200, silvioprog wrote:
 2011/11/19 Ludo Brands ludo.bra...@free.fr:
  windres not found, switching to external mode
 
  On ubuntu I had to install mingw32-binutils to get windres. It wasn't part
  of the standard binutils. IRC I had also to create a symlink to
  i586-mingw32msvc-windres. Windres is used to compile resources in the
  windows format. Reason why you find it only in cross-binutils. FPC can read
  them, including on linux.
 
  Ludo.
 
 You can run this component in Ubuntu?

Yes, on 32 bit it should work out of the box. On x86_64 you need at
least fpc version 2.6.0 (rc1).

See here:
http://wiki.freepascal.org/index.php?title=User_Changes_2.6.0#IInterface.QueryInterface.2C_._AddRef_and_._Release_definitions_have_been_changed


Joost.


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


Re: [Lazarus] Postgres Cannot connect

2011-11-21 Thread Joost van der Sluis
On Mon, 2011-11-21 at 11:01 -0500, Tom Russell wrote:
 I tried this but it still cannot find the files I need to connect to postgres.

  When I try setting the connection property to true it states it cannot
  find the file and asks if Postgres is installed.

Can you tell us what 'the' file is? (And your Free Pascal version)

-- 
My Lazarus blog: http://www.lazarussupport.com/lazarus/weblog


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


  1   2   3   4   >