Re: [Lazarus] DateDif function needed

2013-11-09 Thread Benito van der Zander
if you have stored dates in year, month, day... format. Each comparison then needs multiple convertions each time. nonsense. Store it as packed record word-byte-byte = int and you have faster comparisons than TDateTime! On 11/09/2013 04:23 PM, Jürgen Hestermann wrote: Am 2013-11-09 13:43,

Re: [Lazarus] Graeme would love this, or not, I think

2013-10-11 Thread Benito van der Zander
Well at least they are mandating Delphi. Could be worse, could be Visual Basic... On 10/11/2013 09:18 PM, vfclists . wrote: You couldn't make this up. Is it a joke or not? Department of Basic Education bans Free and Open Source Software in SA Schools and mandates programming an ancient,

Re: [Lazarus] Off Topic Wiki entries

2013-10-03 Thread Benito van der Zander
Perhaps search for him in the German Lazarus forum? http://www.lazarusforum.de/search.php?keywords=olafterms=allauthor=sc=1sf=allsr=postssk=tsd=dst=0ch=300t=0submit=Suche On 10/03/2013 11:50 AM, Bart wrote: On 10/3/13, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: I suspect he's

Re: [Lazarus] Behavior of Lazarus windows CE seems to differ from the windows mobile behavior

2013-07-29 Thread Benito van der Zander
Interesting topic What is the difference between Windows CE, Windows 8 and Windows Mobile? Which one can you use Lazarus to create apps for? On 07/29/2013 06:07 PM, Arí Ricardo Ody wrote: Someone suggested compile with Lazarus 1.1. I did it(downloaded and installed daily screenshot). The

Re: [Lazarus] Should TObject or TComponent have a Comment property?

2013-07-12 Thread Benito van der Zander
as you can see in the newer Delphi versions (called attributes instead of annotations though). Well, then they need to be added for Delphi compatiblity :o On 07/12/2013 02:20 AM, leledumbo wrote: Annotations like in Java would be nice... No IMHO, that would complicate reading the code (more

Re: [Lazarus] Should TObject or TComponent have a Comment property?

2013-07-11 Thread Benito van der Zander
Annotations like in Java would be nice... On 07/11/2013 10:22 PM, vfclists . wrote: Should TObject or TComponent have a Comment property? I think they should. One for the design itself and one for describing the usage at design or runtime. Smalltalk has it. Consider it a version of the

Re: [Lazarus] Unicode branch

2013-07-01 Thread Benito van der Zander
That would be much clearer to use, if Pascal had scope local variables and auto created stack objects: begin var x: SetBusyMouseCursorObject; end; That would also make the ref-counted classes at language level unnecessary, because you could just use type TObjectWithRefCounting=

Re: [Lazarus] try finally exit

2013-06-29 Thread Benito van der Zander
It supposed to be there already: http://bugs.freepascal.org/view.php?id=21711 On 06/29/2013 03:01 PM, Mattias Gaertner wrote: On Sat, 29 Jun 2013 14:46:26 +0200 Jürgen Hestermann juergen.hesterm...@gmx.de wrote: Am 2013-06-29 14:27, schrieb Mattias Gaertner: The language syntax is not

Re: [Lazarus] Android and network

2013-05-29 Thread Benito van der Zander
, no saved state then it's died, everything afterwards does not matter On 05/28/2013 10:18 PM, Kjow wrote: 2013/5/28 Benito van der Zander ben...@benibela.de mailto:ben...@benibela.de In the LCLActivity.java there is an event onCreate. There you can just copy it to afaik. Same crash

Re: [Lazarus] About Android slowness

2013-05-29 Thread Benito van der Zander
I, for one, gave up on it and just rewrote my gui in java... On 05/28/2013 10:30 PM, Kjow wrote: Just my two cents, About app slowness, I think it is related to the BMP generation... I noticed that the app seems to refresh only with some event (e.g. a touch on background). I'm trying some

Re: [Lazarus] Android and network

2013-05-27 Thread Benito van der Zander
tools out there Just start by calling android-sdk-linux/platform-tools/adb logcat On 05/27/2013 10:21 AM, Kjow wrote: 2013/5/27 Benito van der Zander ben...@benibela.de mailto:ben...@benibela.de What does the logcat say? [cut] And it has to be called in a new thread, unless you have

Re: [Lazarus] Android and network

2013-05-26 Thread Benito van der Zander
, on Nexus 10 the app goes on loop flashing all time until I kill it) So I can't test on real device. Thank you! Kjow 2013/5/24 Benito van der Zander ben...@benibela.de mailto:ben...@benibela.de Did you include the internettools package as requirement in your project? Because

Re: [Lazarus] Android and network

2013-05-26 Thread Benito van der Zander
StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); } | in the java file On 05/27/2013 12:30 AM, Kjow wrote: 2013/5/26 Benito van der Zander ben...@benibela.de mailto:ben...@benibela.de Anyway, something is broken on (my?) lazarus/fpc... when I compile

Re: [Lazarus] Android and network

2013-05-24 Thread Benito van der Zander
\androidinternetaccess.pas(35,8) Fatal: Can't find unit LCLProc used by androidinternetaccess I have both lcl and lclbase in package requirements. Thanks, Kjow 2013/5/23 Benito van der Zander ben...@benibela.de mailto:ben...@benibela.de You do not really need to install anything. Just add the paths

Re: [Lazarus] Android and network

2013-05-23 Thread Benito van der Zander
You do not really need to install anything. Just add the paths with the units to the search paths. But if you want to install it, you can open the internettools.lpk and click Use/Install On 05/23/2013 10:51 AM, Kjow wrote: 2013/5/22 Benito van der Zander ben...@benibela.de mailto:ben

Re: [Lazarus] Android and network

2013-05-22 Thread Benito van der Zander
Hi, last week I ported my Internet Tools (http://benibela.de/sources_en.html#internettools) to Android e.g.: uses simpleinternet; Memo2.Lines.text := retrieve(edit1.text); or if you need the headers: uses androidinternetaccess; var internet: TAndroidInternetAccess; begin

[Lazarus] conditional/platform dependent package requirement

2013-05-17 Thread Benito van der Zander
Hi, is there a way to have conditional package requirements? Specific example: have a package that requires FCL and LCL, if compiled on Android, but only FCL, if compiled everywhere else. Benito -- ___ Lazarus mailing list

Re: [Lazarus] android: debugln and thread

2013-05-09 Thread Benito van der Zander
I don't know for sure what the cause could be, but: do you use FPC 2.5.1 or 2.7.1? 2.7.1 I suppose you are talking about native code and LCL-CustomDrawn in Android, correct? mostly. (CustomDrawn has so many bugs, so I made the GUI in java instead and call the Pascal functions with JNI to

[Lazarus] android: debugln and thread

2013-05-08 Thread Benito van der Zander
Hi, does anyone know why creating a new thread breaks DebugLn? (till the execution returns to the JVM, Android, emulator, x86, ) This for example prints only Started to the log nothing else. But the thread is called and executed correctly (otherwise it would stay forever in the waiting part)

Re: [Lazarus] Is Mantis bad as i thought

2013-04-05 Thread Benito van der Zander
http://bugs.freepascal.org/view.php?id=8803 On 04/04/2013 09:29 PM, Zaher Dirkey wrote: I have monitored many bugs in Mantis, but no email for changes to notify me about this bugs even if i am the reporter. There is no option for that in Preferences in my account! I s that true, are there any

Re: [Lazarus] IUnknown and reference counting

2013-03-21 Thread Benito van der Zander
The GUID is also necessary if you want to have as and is support. It is? I have been using interfaces without GUID and as/is works fine. At least as/is Tsomeclass Benito On 03/20/2013 04:22 PM, Sven Barth wrote: Am 20.03.2013 15:28, schrieb Hans-Peter Diettrich: While I use interface

Re: [Lazarus] WinINet STDCALL callback crash

2013-03-15 Thread Benito van der Zander
the certificates allowed on the machine. Benito On 03/14/2013 08:51 AM, Ludo Brands wrote: On 03/14/2013 12:09 AM, Benito van der Zander wrote: However, I still get frequent, random segfaults when calling Windows functions. My current attempt, as simple as I can make it, is below. About 50

Re: [Lazarus] WinINet STDCALL callback crash

2013-03-13 Thread Benito van der Zander
However, I still get frequent, random segfaults when calling Windows functions. My current attempt, as simple as I can make it, is below. About 50% of the time, the first command in the execute procedure works fine; the other times it causes a crash. An actually crash or just a segfault

Re: [Lazarus] New user interface for future major releases of Lazarus

2012-12-04 Thread Benito van der Zander
Not everyone is comfortable with the so-called docked interface. usually I prefer non-docked, but the non-docked Lazarus interface completely sucks (at least on xfce): - all Lazarus windows have the same icon, so you cannot jump fast with alt+tab to them - = it takes forever to find the

Re: [Lazarus] Lazarus support for Sorting is completely inadequate.

2012-12-01 Thread Benito van der Zander
and there are other available too. Which and where? In an old post, I wrote: I recently grepped the fpc source to find a stable sort, and instead I only found QuickSort implementations. Seven of them! In TFPList.Sort, TStringList.QuickSort, TFPSList.QuickSort, TFPBaseDitherer.QuickSort,

[Lazarus] Viewing interface object in debugger

2012-10-18 Thread Benito van der Zander
Hi, is there anyway to view the content of an interfaced object with the Lazarus debugger? Benito -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Viewing interface object in debugger

2012-10-18 Thread Benito van der Zander
((pointer(i)) - 0x20) prints that, but is that reliable? it will probably break if a class implements multiple interfaces) Benito On 10/18/2012 04:17 PM, Martin wrote: On 18/10/2012 14:23, Benito van der Zander wrote: Hi, is there anyway to view the content of an interfaced object

Re: [Lazarus] Brush color on TListView

2012-09-14 Thread Benito van der Zander
On 09/13/2012 02:51 PM, Alexsander Rosa wrote: 2012/9/13 Benito van der Zander ben...@benibela.de mailto:ben...@benibela.de I ended up writing my own list view (http://www.benibela.de/components_en.html#treelistview), just to get differently colored rows May we use your

Re: [Lazarus] Brush color on TListView

2012-09-13 Thread Benito van der Zander
However, the tricks to set Brush color inside of OnCustomDraw or OnAdvancedCustomDraw do not work. Am I missing something? How is it done? You cannot do that. And even if you get it working with one widgetset, it would fail on any other OS, since they all draw it differently. I ended up

Re: [Lazarus] Issuing debug commands from the ide.

2012-06-01 Thread Benito van der Zander
Hi, Have you tried to compile the IDE with DBG_WITH_DEBUGGER_DEBUG defined? It does exactly the above. It has been there a very long time. It has also been decided, that this feature will only be available via this define. I think it would be much better, if it were a regular feature like

Re: [Lazarus] Issuing debug commands from the ide.

2012-06-01 Thread Benito van der Zander
of options, if gdb already knows its options On 06/01/12 19:40, Martin wrote: On 01/06/2012 18:30, Benito van der Zander wrote: Hi, Have you tried to compile the IDE with DBG_WITH_DEBUGGER_DEBUG defined? It does exactly the above. It has been there a very long time. It has also been decided

Re: [Lazarus] Issuing debug commands from the ide.

2012-06-01 Thread Benito van der Zander
, Benito van der Zander wrote: I already pointed out, how easy you can upset the IDE-to-gdb interface, if you issue the wrong command. You said that, but I have never seen it happen. But then, it is fair to say you are experienced with gdb. There are also lots of people starting on lazarus, who

Re: [Lazarus] RE : RE : RE : Issuing debug commands from the ide.

2012-06-01 Thread Benito van der Zander
it would be accomodated in a GUI and feel a little bit sorry that this exchange turned into a list of things the IDE can't do or needs improvement in. It just started as wanting to share a personal, small effort to combine the advantages of the GUI and the flexibility of the CLI. All the

Re: [Lazarus] Issuing debug commands from the ide.

2012-06-01 Thread Benito van der Zander
, and doesn't stop, if you call reset debugger. In fact, it doesn't even stop, if you close Lazarus. Now my laptop has been running at 100°C for 3 hours, I hope it hasn't been damaged... On 06/01/12 20:37, Benito van der Zander wrote: I already pointed out, how easy you can upset the IDE

Re: [Lazarus] Issuing debug commands from the ide.

2012-06-01 Thread Benito van der Zander
been that hot before, not even when playing computer games On 06/01/12 23:17, Martin wrote: On 01/06/2012 22:08, Benito van der Zander wrote: And running arbitrary commands is not special, there are other things that upset gdb, just as well. function TEST: integer; begin while true do ; end

Re: [Lazarus] watches length of dyn array [was: Re: Improve message dialog]

2012-05-26 Thread Benito van der Zander
There it works On 05/21/12 01:57, Martin wrote: On 18/05/2012 13:26, Benito van der Zander wrote: Do you have an example where it shows the wrong length? Always. (but I haven't updated Lazarus in a while, it's still r36797, perhaps it was fixed) Please try with r37368

Re: [Lazarus] usability: please not focus the messages window, only bring to front

2012-05-21 Thread Benito van der Zander
I had the same problem with jump-to-next-error/ctrl+f8 (on xfce), and fixed it somewhere else: http://bugs.freepascal.org/view.php?id=21706 But my change is just as ugly as yours On 05/21/12 17:41, Bernd wrote: There must be some explicit SetFocus() calls hidden somewhere deep inside the

Re: [Lazarus] Improve message dialog

2012-05-18 Thread Benito van der Zander
Hi, the watch dialog is already much better than it used to be (remember the time, it just dumped the entire gdb output in a single line...) so I think there are two other features that are really important for it: * complete support for dynamical arrays (still shows the wrong length / not

Re: [Lazarus] Improve message dialog

2012-05-18 Thread Benito van der Zander
. You can change the watch type to memory. Nice, there it is. Last time I checked it was disabled... Although it takes a while to figure out that you have to write own addresses like (0x7fffe9c0)^. Benito On 05/18/12 13:57, Martin wrote: On 18/05/2012 12:18, Benito van der Zander wrote

Re: [Lazarus] disable package checking

2012-04-11 Thread Benito van der Zander
What Lazarus version do you use? r36661 What reason is given for the recompile? Target: FCL 1.0.1 Build needed. File: /opt/lazarus/packager/registration/fcl.lpk Note: FPC unit /home/benito/hg/components/pascal/data/pseudoxpath.pas is newer than state file of FCL: unit age=04/11/12

Re: [Lazarus] disable package checking

2012-04-11 Thread Benito van der Zander
1. Put your units into a package instead of into fpc.cfg. Then the IDE knows the dependencies between the units and does not need to ask the compiler. Way to much trouble, in case I need to use them in some trivial test project or compile it without Lazarus 2. Open the package fcl.lpk and set

[Lazarus] disable package checking

2012-04-10 Thread Benito van der Zander
Hi, whenever I compile a project, it first compiles/checks the dependencies: Compiling package FCL 1.0.1 completed Compiling package LazUtils 1.0 completed Compiling package LCLBase 1.0.1 completed Compiling package LCL 1.0.1 completed Can you disable it somehow? It takes forever (2s) and it is

Re: [Lazarus] Use of .lps files to avoid unnecessary changes to .lpi files

2011-10-13 Thread Benito van der Zander
http://bugs.freepascal.org/view.php?id=17353 On 10.10.2011 15:39, Alexsander Rosa wrote: +1 for making save in .lps file in project directory the default. 2011/10/10 Reinier Olislagersreinierolislag...@gmail.com: On 10-10-2011 14:32, Flávio Etrusco wrote: 2011/10/9 Frank

Re: [Lazarus] [TIP] LazSolutions - How to get HTML content?

2011-08-28 Thread Benito van der Zander
How can I get exact element from the HTML and/or XML content (like with nokogiri http://nokogiri.org/) ? I'm working on a few classes to do that. (http://benibela.de/sources_en.html#internettools, although it doesn't support css-selectors (yet) ) The nokogiri example would look like this:

Re: [Lazarus] How to use GetElementById?

2011-01-30 Thread Benito van der Zander
Hi, i believe the DOM access methods are the most annoying thing ever, you can't just define a interface for all languages and expect it to be nice. Doesn't the LCL contains an XPath-parser? Then you could just use: html//div[@id=currency_converter_result]/text() If not, you can use my parser

Re: [Lazarus] using WM_USER const and TMessage to press escape to minimize form.

2010-12-27 Thread Benito van der Zander
What do I change WM_USER to? I am getting Identifier not found. LM_USER from unit LMessages, if you want to become platform independent (wm_user is also in that unit and defined as wm_user=lm_user). -- ___ Lazarus mailing list

Re: [Lazarus] [fpc-devel] win64 dwarf patch

2010-10-16 Thread Benito van der Zander
Property CustomData : TObject or so, as a public property. Or more flexible: CstomData: packed record case integer of 0 : (i64: int64); 1 : (lo32, hi32 : Cardinal); 2 : (Words : Array[0..3] of Word); 3 : (Bytes : Array[0..7] of Byte); 4 : (p : pointer);

Re: [Lazarus] [fpc-devel] win64 dwarf patch

2010-10-16 Thread Benito van der Zander
CstomData: packed record case integer of 0 : (i64: int64); 1 : (lo32, hi32 : Cardinal); 2 : (Words : Array[0..3] of Word); 3 : (Bytes : Array[0..7] of Byte); 4 : (p : pointer); 5 : (obj : TObject); end; You just invented a Variant type. Yes,

Re: [Lazarus] TListView compatibility Delphi = Lazarus?

2010-10-12 Thread Benito van der Zander
do the same, at least/especially if you want platform independence (or use my http://benibela.de/components_en.html#treelistview, or the virtual tree list view). Benito van der Zander -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

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

2010-09-26 Thread Benito van der Zander
Not really easy. The easiest way is to save your compiler options and reload them when you want to switch. Thanks, that works. But it also overrides the path settings, which is not optimal. For the windows build I solve this problem by having an external tool configured that will simply

[Lazarus] Build configuration

2010-09-25 Thread Benito van der Zander
Hi, is there an easy way to switch between different compile configurations? In C++ projects you usually have debug/release configurations, and what I need in Lazarus, are three configurations: debug (range/overflow check), release linux (smart linked, optimized), release windows (smart

Re: [Lazarus] Regex expressions

2010-09-10 Thread Benito van der Zander
Hi, I've tried some regex units implemented in pascal but they are either not complete or buggy or slow. Did you try TRegExpr by Andrey V. Sorokin? That is the best one. Benito -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

[Lazarus] Invalidation of parent control

2010-09-02 Thread Benito van der Zander
, that the tedit is clearing the content of my control. Benito van der Zander -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] How to produce a tone at Tone frequency for duration, MSecs (milliseconds)

2010-09-02 Thread Benito van der Zander
van der Zander -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Reconstructing Lazarus Website 1: the appearance

2010-02-01 Thread Benito van der Zander
I'm sorry, I searched with wrong query. Trying http://images.google.com/images?q=cheetah+cartoon resulted more cartoonish images. But, it looks that cheetah had been used by various products. :( Here are also three funny cheetahs: http://www.dailymail.co.uk/news/article-1246886/ Benito

Re: [Lazarus] Cross Compile: Host Linux amd64; Guests: Linux i386, Win32, Win64

2010-01-30 Thread Benito van der Zander
Using the scripts I managed to create Debian packages for Win32 crosscompiler. In this case I can not install because the package is not generated for the amd64 architecture, it is a package for the i386 architecture, this is correct? you can install and run the i386 package on amd64, you

Re: [Lazarus] [OT] Mantis, just send emails for my opened, tickets

2010-01-15 Thread Benito van der Zander
By default you get an email on tickets you entered. So Uncheck all Email on But than you don't get emails for comments on the tickets you created! There is even a bug report for that: http://bugs.freepascal.org/view.php?id=8803 Benito -- ___

[Lazarus] Line Endings

2009-12-23 Thread Benito van der Zander
everywhere... Benito van der Zander -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

[Lazarus] Revision in about dialog

2009-06-22 Thread Benito van der Zander
Hi, after the latest update the IDE shows 19346:20714M as revision in the about dialog. Is this a new feature or a bug in svn2revisioninc? Benito -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Revision in about dialog

2009-06-22 Thread Benito van der Zander
It is an existing feature. svn2revisioninc tries to use svnversion, a program distributed with svn clients, if it can find it. Now I understand, where it comes from, I installed the normal command line svn client yesterday, after becoming tired of using TortoiseSVN only. Benito --