Re: [Lazarus] [solved] Re: Filtering shown files in TShellListView

2016-04-11 Thread Marc Santhoff
On Mo, 2016-04-11 at 11:38 +0200, Bart wrote:
> On 4/11/16, Marc Santhoff <m.santh...@web.de> wrote:
> 
> >> I didn't see it in OI, was too lazy to look it up in the source.
> >> Looks like a property that should be published?
> >
> > I think so. I only found it when I wanted to start implmenting it myself
> > while looking at the list population code. ;)
> 
> Done in r52165 (trunk).

Thank you.

> Since this is not a bug, it will not be merged to 1.6 fixes branch I think.

I can live with that, now that I know. ;)

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] [solved] Re: Filtering shown files in TShellListView

2016-04-10 Thread Marc Santhoff
On So, 2016-04-10 at 22:39 +0200, Bart wrote:
> On 4/10/16, Marc Santhoff <m.santh...@web.de> wrote:
> 
> > I thought so too, but only because I didn't look for the "Mask" property
> > of TCustomShellListView. :)
> 
> I didn't see it in OI, was too lazy to look it up in the source.
> Looks like a property that should be published?

I think so. I only found it when I wanted to start implmenting it myself
while looking at the list population code. ;)

-- 
Marc Santhoff <m.santh...@web.de>


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


[Lazarus] [solved] Re: Filtering shown files in TShellListView

2016-04-09 Thread Marc Santhoff
On So, 2016-04-10 at 00:57 +0200, Bart wrote:
> On 4/10/16, Marc Santhoff <m.santh...@web.de> wrote:
> 
> > I discovered the excellent TShellTreeView and TShellListView.
> >
> > How would I filter the shown files in TShellListView to a single or a
> > few types, like '*.txt' or '*.txt; '*.rtf'?
> 
> I don't think you can.

I thought so too, but only because I didn't look for the "Mask" property
of TCustomShellListView. :)

Work nicely, like in file dialogs and the like. Great code.

-- 
Marc Santhoff <m.santh...@web.de>


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


[Lazarus] Filtering shown files in TShellListView

2016-04-09 Thread Marc Santhoff
Hi,

I discovered the excellent TShellTreeView and TShellListView.

How would I filter the shown files in TShellListView to a single or a
few types, like '*.txt' or '*.txt; '*.rtf'?

TIA,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Bashing the developers

2016-04-09 Thread Marc Santhoff
On Sa, 2016-04-09 at 18:44 +0200, Jürgen Hestermann wrote:
> Am 2016-04-09 um 15:57 schrieb Juha Manninen:
>  > Regarding posts from Jürgen Hestermann.
>  > Unfortunately this is not the first time he finds excuses to blame
>  > Lazarus developers.
>  > The main theme is that developers have done a poor job and did not
>  > serve him well enough.
>  > Earlier it was about the new Unicode support. All the work I had done
>  > for it was irrelevant, he wanted to emphasize how poorly I had done
>  > the job.

> Oh my god!! What a histerical tirade!
> Why do you answer to all these posts if it brings you near to a heart attack?
> Just ignore them if it you don't want to discuss them.
> If you cannot live with any converse meanings then filter your mails
> from all these evil people like me.

I have no idea, what has been happening. I did not read any flame wars.
But only as a general remark I'd like to make a suggestion:

Anybody beeing unhappy with the lack of $something could start some work
to fill in the known gaps.

If this is about lacking documentation a first start could be to create
a wiki page and list the missing features there. Maybe some developer or
other person having enough knowledge is willing to give a short
description for those topics listed and then a not so informed person
could write a clear and polished documentation text.

Open Source is about helping to make things happen, not demanding others
to do so. For the rest who do not like it there is always Delphi (if it
still is named so ;).

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] lazarus asking for every symlink

2016-03-09 Thread Marc Santhoff
On Di, 2016-03-08 at 18:45 +0100, Marc Santhoff wrote:
> Hi,
> 
> the last update to Lazarus 1.4.2 from 2016-02-06 brought some extra fun:
> 
> For every opened file represented by a symlink Lazarus asks if it should
> follow the link. This is very annoying, there are at least 4 linked
> files open in my work session prmanently, so I have to klick 4 times
> extra.
> 
> Is thre an option to switch that behaviour of? I have found nothing in
> the options dialog.
> 
> Running on:
> FreeBSD 9.1-STABLE amd64

I've tried 1.4.4, because I'm bound to fpc 2.6.4 for a while, same
behaviour.

Any hints?


TIA, Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


[Lazarus] lazarus asking for every symlink

2016-03-08 Thread Marc Santhoff
Hi,

the last update to Lazarus 1.4.2 from 2016-02-06 brought some extra fun:

For every opened file represented by a symlink Lazarus asks if it should
follow the link. This is very annoying, there are at least 4 linked
files open in my work session prmanently, so I have to klick 4 times
extra.

Is thre an option to switch that behaviour of? I have found nothing in
the options dialog.

Running on:
FreeBSD 9.1-STABLE amd64

TIA,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] [ANN] Eye Candy Controls 0.9.4

2016-03-01 Thread Marc Santhoff
On So, 2016-02-28 at 18:45 +0100, Vojtěch Čihák wrote:
>  
> Hello,
>  
> I released new version of EC-Controls. Announcement is on the forum:
> http://forum.lazarus.freepascal.org/index.php/topic,31734.0.html
>  
> The main thing is the new tab-control alternative with support for tab
> stacking and multiple rows.

Cool stuff! I really like the look of switch an slider, very useful for
hardware device like guis. :)

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] 5dpo components last update

2016-02-14 Thread Marc Santhoff
On Sa, 2016-02-13 at 20:12 +, Paulo Costa wrote:
> On 13-Feb-16 09:27, Marc Santhoff wrote:
> > Is that code for the user space driver open? Can you give a pointer,
> > repository link or similar?
> 
> http://www.linux-projects.org/modules/news/index.php?storytopic=0=30

Wonderful, thanks a lot!

Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] 5dpo components last update

2016-02-13 Thread Marc Santhoff
On Do, 2016-02-11 at 22:59 +, Paulo Costa wrote:
> On 11-Feb-16 21:48, Michael Van Canneyt wrote:
> >> The most important changes are:
> >> - TSdpoSerial tested and working on the Raspberry Pi 2.
> >>
> >
> > Question: can these components be used to work with the pi's camera ?
> 
> 
> I have not tested yet (is in my to do list) but the UVC component should 
> work if the camera V4L driver does what is expected.
> In the beginning, a V4L driver didn't exist. Then, there was a user 
> space driver and now, I have read that a proper kernel driver exits.
> As soon as I can test it, I'll let you know.

Is that code for the user space driver open? Can you give a pointer,
repository link or similar?

Working on FreeBSD the V4L implementation is somewhat behind. From my
last tests only working at level of 4VL1 and having a user space driver
would give some mor possibilities for testing.

Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] bad luck

2016-02-03 Thread Marc Santhoff
Hi again,

the crash on CTRL-F9 occurs in the same way as soon as I start lazarus
using the old confguration directory. It's the one active when the error
first happend. The files in ~/.lazarus/ are visibly OK, formally correct
XML most of them.

Lacking time and need I did nothing but moving the configuration out of
the way making anything work but running programs. Compiling works OK
but when started hitting the button with the green arrowhead or typing
F9 there is a debugger error popping up, see attached picture.

Somthing is really fishy in the installation. What can I do now to find
the cause of those errors?

In the end I will erase anything and restore from backup, but I think
searching the cause is a good idea.


On Fr, 2016-01-29 at 21:10 +0100, Marc Santhoff wrote:
> Hi,
> 
> I really had some bad luck today. When starting Lazarus it worked
> normally first. Then I created a new unit, saved it having an
> appropriate name, typed in a class definition without any fields or
> methods and Hit CTRL-F9. That was the moment when my computer freezed
> for a while, say 30 seconds, and rebooted.
> 
> Afterwards Lazarus' configuration was hosed, the open projects .lpi was
> unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file
> system had a lot of errors.
> 
> I think the crash could be triggered by the fact that I have a  new,
> freshly cleaned and compiled Lazarus 1.4.4 and fpc 3.0.0 because I had
> to upgrade the compiler lastly for some reason. The projects object
> files may be new or old, but some other dependencies will relatively
> sure be old files from fpc 2.6.4.
> 
> OK, shit happens, but I wished there would be less destruciton in work
> files. It is possible to care for keeping files, I know since I had to
> program a system prone to spontaneous reboots to keep files under any
> circumstances and in the end it worked.
> 
> I had sth. similar once when running the debugger quite often and having
> to stop in the middle of the program for a source change. That made my
> computer fail similarly, destroying files.
> 
> Where in Lazarus sources are the spots handling file opening and saving
> when hitting CTRL-F9? Or do I need to look at the compiler, too?
> 
> And, maybe someone having enough knowledge can explain a bit aournd
> these spot?
> 
> TIA,
> Marc
> 

-- 
Marc Santhoff <m.santh...@web.de>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] bad luck

2016-01-29 Thread Marc Santhoff
On Fr, 2016-01-29 at 21:21 +, Mark Morgan Lloyd wrote: 
> Marc Santhoff wrote:
> > Hi,
> > 
> > I really had some bad luck today. When starting Lazarus it worked
> > normally first. Then I created a new unit, saved it having an
> > appropriate name, typed in a class definition without any fields or
> > methods and Hit CTRL-F9. That was the moment when my computer freezed
> > for a while, say 30 seconds, and rebooted.
> > 
> > Afterwards Lazarus' configuration was hosed, the open projects .lpi was
> > unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file
> > system had a lot of errors.
> 
> Good /God/ man, is that all? I opened this expecting to find that a 
> member of the community was in real trouble (frankly, the sort of thing 
> I was almost in over the last week).

It's enough. Costs me hour of frustrating work recreating anything,
doing nothing fruitful. Moreover I'm sitting on a time bomb, because I
really do not know, what other files may have been damaged. Last time
this happened I had some failures in other software that was detected
weeks(!) after the incident.

So, what know? Taken seriously I have to restore the complete system and
data from backup.

Seems I deserved some trouble because I'm not running development tools
on a dedicated machine or inside a virtual environment...

> What OS are you running, and how much privilege had you given yourself? 

FreeBSD 9, simple user having sudo privilges but nothing run as root or
by sudo. The session was the same as ever - besides Lazarus.

> Frankly, I think the suggestion that Lazarus /might/ have caused a 
> system crash is more serious than the discovery that a system crash 
> probably corrupted files.

You're right. That's why I told the story as introduction.

What I asked for is help locating and understanding Lazarus' file
handling. Some standard errors like unneccessarily holding files open
when not in use can be avoided easily.

-- 
Marc Santhoff <m.santh...@web.de>



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


[Lazarus] bad luck

2016-01-29 Thread Marc Santhoff
Hi,

I really had some bad luck today. When starting Lazarus it worked
normally first. Then I created a new unit, saved it having an
appropriate name, typed in a class definition without any fields or
methods and Hit CTRL-F9. That was the moment when my computer freezed
for a while, say 30 seconds, and rebooted.

Afterwards Lazarus' configuration was hosed, the open projects .lpi was
unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file
system had a lot of errors.

I think the crash could be triggered by the fact that I have a  new,
freshly cleaned and compiled Lazarus 1.4.4 and fpc 3.0.0 because I had
to upgrade the compiler lastly for some reason. The projects object
files may be new or old, but some other dependencies will relatively
sure be old files from fpc 2.6.4.

OK, shit happens, but I wished there would be less destruciton in work
files. It is possible to care for keeping files, I know since I had to
program a system prone to spontaneous reboots to keep files under any
circumstances and in the end it worked.

I had sth. similar once when running the debugger quite often and having
to stop in the middle of the program for a source change. That made my
computer fail similarly, destroying files.

Where in Lazarus sources are the spots handling file opening and saving
when hitting CTRL-F9? Or do I need to look at the compiler, too?

And, maybe someone having enough knowledge can explain a bit aournd
these spot?

TIA,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Treeview example(s) needed

2016-01-27 Thread Marc Santhoff
On Mi, 2016-01-27 at 06:01 +0100, Joe Shepherd wrote:
>  
> Obvioiusly I'm missing a lot but I cannot find any example to dispel
> the fog. Anyone got one?

Not really. Some information can be found there:

http://wiki.lazarus.freepascal.org/XML_Tutorial#Populating_a_TreeView_with_XML

But I cannot say if that helps you. The main page in the wiki is this
one:

http://wiki.lazarus.freepascal.org/VirtualTreeview

and it shows the way to get a help file:

http://wiki.lazarus.freepascal.org/VirtualTreeview#Help

Have fun,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Treeview example(s) needed

2016-01-27 Thread Marc Santhoff
On Mi, 2016-01-27 at 11:21 +0100, Mattias Gaertner wrote:
> On Wed, 27 Jan 2016 09:16:12 +0100
> Marc Santhoff <m.santh...@web.de> wrote:

> The main page in the wiki is this
> > one:
> > 
> > http://wiki.lazarus.freepascal.org/VirtualTreeview
> 
> VirtualTreeView <> TTreeView

Oops, I see. At least I've learned something today.

Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] [PATCH] components/turbopower_ipro: added the Iphttpbroker and its example

2016-01-26 Thread Marc Santhoff
On Mo, 2016-01-25 at 22:09 -0300, silvioprog wrote:

> But, unfortunatelly, even with this pros, Pascal programmers avoid to use
> external libraries, that's a real fact. :-/

Speaking of the core team, you may be right. And speaking about people
writing cross plattform programm it presumably is a wise decision to
translate things to pascal. Once done it reduces efforts of updating
external libs to newer versions, oddities when compiling for multiple
platforms, etc.

But besides that I'm not hesitating to use external libraries to get
things done. I had some USB access code from a third party and no time
to translate before the release, so it was a bliss to compile some cut
out C functions into objects and link them to the pascal program. Works,
still in use.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Raspberry Pi Debug Digital I/O

2016-01-25 Thread Marc Santhoff
On Mo, 2016-01-25 at 08:33 +0100, Bo Berglund wrote:
> On Mon, 25 Jan 2016 00:18:50 +0100, Marc Santhoff <m.santh...@web.de>
> wrote:
> 
> >> For me it is like this:
> >> pi@rpi2-jessie2:~/dev $ cat /etc/group | grep gpio
> >> gpio:x:997:pi
> >
> >Thje last one wrong, should have been
> >
> >$ ls -lL /sys/class/gpio/gpiochip0
> 
> New test:
> 
> pi@rpi2-jessie2:~/dev $ ls -lL /sys/class/gpio/gpiochip0
> total 0
> -rwxrwx--- 1 root gpio 4096 Jan 17 16:47 base
> drwxr-xr-x 3 root root0 Jan 17 16:47 device
> -rwxrwx--- 1 root gpio 4096 Jan 17 16:47 label
> -rwxrwx--- 1 root gpio 4096 Jan 17 16:47 ngpio
> drwxrwx--- 2 root gpio0 Jan 17 16:47 subsystem
> -rwxrwx--- 1 root gpio 4096 Jan 17 16:47 uevent
> 
> >and
> >
> >$ ls -lL ../../devices/platform/soc/3f20.gpio/gpio/
> 
> This is a relative path and you did not specify where one should be
> located in order to execute it. Cannot perform this command.
> Please supply an absolute path instead.

I know. The user can see from where links are not resolved by reading
the failing command. My point was to help diagnosing why a program
running as user pi did not work. I explained with the changed command,
for checking permissions on the targets of the links, not the links
themselves.

But since you found the cause by your patch differentiating between RPi1
and RPi2 it's obsolete now.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] technical knobs components

2016-01-24 Thread Marc Santhoff
On So, 2016-01-24 at 15:29 +0100, Michael Van Canneyt wrote:
> 
> On Sun, 24 Jan 2016, Marc Santhoff wrote:
> 
> > Hi,
> >
> > can someone give me a hint, if there is a free or cheap component
> > library for lazarus implementing operational controls like switches,
> > potentiometers and the like for makin a GUI lok like a physical device?
> 
> Maybe this can be of use ?
> 
> http://wiki.freepascal.org/uE_Controls

Yes, found it while browsing, and TDigitLed there, too:

http://breakoutbox.de/pascal/pascal.html

What is missing now are some linear sliders, because round knobs are not
so easy to handle using mouse or fingers on a touch screen.

Ah, since we're at it:
Last time I searched for a Star Trek gui lib I found nothing freely
avaliable. I don't ask for pascal, this could be done if necessary (and
not written in C++ ..) but does an open source variant exist?

Thanks,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


[Lazarus] technical knobs components

2016-01-24 Thread Marc Santhoff
Hi,

can someone give me a hint, if there is a free or cheap component
library for lazarus implementing operational controls like switches,
potentiometers and the like for makin a GUI lok like a physical device?


TIA,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Raspberry Pi Debug Digital I/O

2016-01-24 Thread Marc Santhoff
On So, 2016-01-24 at 20:59 +0100, Koenraad Lelong wrote:

> When I run the application as 'pi', I get this :
> 
> root@raspberrypi:/home/pi/Documents/lazarus/pascalio/koen-test# ls -l 
> /sys/class/gpio
> totaal 0
> -rwxrwx--- 1 root gpio 4096 jan 22 22:03 export
> lrwxrwxrwx 1 root gpio0 jan 24 19:43 gpio17 -> 
> ../../devices/platform/soc/3f20.gpio/gpio/gpio17
> lrwxrwxrwx 1 root gpio0 jan 24 19:43 gpio18 -> 
> ../../devices/platform/soc/3f20.gpio/gpio/gpio18
> lrwxrwxrwx 1 root gpio0 jan 22 22:03 gpiochip0 -> 
> ../../devices/platform/soc/3f20.gpio/gpio/gpiochip0
> -rwxrwx--- 1 root gpio 4096 jan 22 22:03 unexport
> root@raspberrypi:/home/pi/Documents/lazarus/pascalio/koen-test#
> 
> But the IO does not work. When I do
> echo 1 > /sys/class/gpio/gpio17/value
> from the command-line, the IO does not work, even when I do this as root.
> 
> When I run the application as root, everything works as expected.

What do

$ cat /etc/group | grep gpio

and

$ ls -lL /sys/class/gpio

show?

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Raspberry Pi Debug Digital I/O

2016-01-24 Thread Marc Santhoff
On Mo, 2016-01-25 at 00:11 +0100, Bo Berglund wrote:
> On Sun, 24 Jan 2016 21:42:06 +0100, Marc Santhoff <m.santh...@web.de>
> wrote:
> 
> >What do
> >
> >$ cat /etc/group | grep gpio
> >
> >and
> >
> >$ ls -lL /sys/class/gpio
> >
> >show?
> 
> For me it is like this:
> pi@rpi2-jessie2:~/dev $ cat /etc/group | grep gpio
> gpio:x:997:pi

Thje last one wrong, should have been

$ ls -lL /sys/class/gpio/gpiochip0

and

$ ls -lL ../../devices/platform/soc/3f20.gpio/gpio/

to see the the targets of the links (correct permissions there, too?)
and content of the directory, sorry.

> pi@rpi2-jessie2:~/dev $ ls -lL /sys/class/gpio
> total 0
> -rwxrwx--- 1 root gpio 4096 Jan 17 16:47 export
> drwxrwx--- 2 root gpio    0 Jan 17 16:47 gpiochip0
> -rwxrwx--- 1 root gpio 4096 Jan 17 16:47 unexport
> 
> 

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-08 Thread Marc Santhoff
On Do, 2016-01-07 at 18:14 -0500, Anthony Walter wrote:
> > Napoleon conquered the world some 200 years ago. That is long enough as
> nobody seems to have strong negative association with his actions
> 
> Follow this link if you want to see why WW2, and by extension the people
> who created it and the symbols they used, is such a big deal:
> 
> http://www.fallen.io/ww2/
> 
> In short, WW2 resulted in more deaths than any event in human history
> including the Black Death, the Napoleonic wars, the great Flu Pandemic of
> 1918, and Pol Pot anti intellectualism cleansing or chairman Mao's program
> of cultural cleansing.

You at least forget about Thirty Years' War.

>  I have five uncles, on both my mother's and father's
> side, who fought and died in WW2. When I've visited their graves in France
> and Hawaii everyone I met seemed to a good understanding of the war's cost
> in human life on both sides, and also the new connotations symbols like the
> Swastika had taken, for better or worse.

That very sad. But to boil down all this on one Symbol is much to
simple. And ignoring all other uses of a symbol is intolerant.

> Even if you like the shape of the Nazi style Swastika, and have
> appreciation of its history in Finland, most everyone in the developed
> Western world now recognizes it as a symbol of Nazism, and by extension a
> symbol of prejudicial racism and hate.

All of that has nothing to do with an internationally used programming
project.

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-08 Thread Marc Santhoff
On Fr, 2016-01-08 at 08:16 -0500, Dmitry Boyarintsev wrote:
> On Fri, Jan 8, 2016 at 2:43 AM, Marc Santhoff <m.santh...@web.de> wrote:
> 
> > People see something and are driven by feelings. I watched a case like
> > this already regarding FreeBSD. Some users insisted of changing the
> > deamon logo because they are afraif of the devil. Rather  ridiculous, it
> > actually was a cuddly toy or comic like figure, but in the end the logo
> > got changed.
> >
> 
> Was it changed? I can still see it on their official site.
> https://www.freebsd.org/
> 
> Btw, this is bsd thread (
> http://lists.freebsd.org/pipermail/freebsd-questions/2010-July/219173.html)
> seems to be identical to PaintSwastika.

I did not follow it completely, bailed out early.

IIRC the startup screen having an ASCII-art was changed at least, even
better it was made switchable.

You're right, the old one is still or again visible, but it is the
mascot now. The official logo, seen above besides the FreeBSD-Name, is
only a sphere with two cone peaks.

It is used there, too:
https://en.wikipedia.org/wiki/FreeBSD

and the page has a paragraph about the logo, linking there:
http://www.osnews.com/story/9660/FreeBSD-logo-design-competition

So it were not only technical reasons reagarding graphics printing but
complaints motivated by religion that made it happen later on. Robert
Watson is one of the project leaders.

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-08 Thread Marc Santhoff
On Fr, 2016-01-08 at 08:25 -0500, Dmitry Boyarintsev wrote:
> On Fri, Jan 8, 2016 at 2:48 AM, Marc Santhoff <m.santh...@web.de> wrote:
> 
> > It is. I'm living in Germany, and the law forbids the use of Nazi
> > symbols. I don't know exactly, what it looks like, but there actually is
> > a clear definition how it looks like. Probably the circle around the
> > swastika and the color scheme play a role.
> >
> 
> This is some sort of odd coincidence:
> http://news.sky.com/story/1618909/hitlers-mein-kampf-on-sale-again-in-germany
> But bans are expiring.

It's in the news all day ...

The bavarian government, who owned the publishing rights, did not want
to allow re-printing. Now these rights are invalidated by german
copyright law.

The new release is a commented version, it shall be usable for teaching
because of the comments. A commission of scientists has taken three year
to make it.

OTOH the raw text is said to be downloadable from the internet very easy
ever sinc (the net exists).

But we're even further off topic now.

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-07 Thread Marc Santhoff
On Do, 2016-01-07 at 11:40 +0100, Mattias Gaertner wrote:
> On Wed, 06 Jan 2016 17:32:46 +0100
> Marc Santhoff <m.santh...@web.de> wrote:
> 
> >[...]
> > > NB. The function was apparently introduced by Seppo (over 9 years ago)
> > 
> > Who's that? A Nazi, historan or hindu? A joker most probably.
> 
> Our Finnish translator since 12 years.

Seems I was a bit excited there, asking for the reason for writing those
procedures in a very sarcastic manner. I didn't want to insult someone
personally. And we all learned that the swastika is a very common symbol
in Finnland.

So, Seppo, if you read that and read this: sorry for shooting in your
direction.

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-07 Thread Marc Santhoff
On Do, 2016-01-07 at 23:27 +0200, Juha Manninen wrote:
> On Thu, Jan 7, 2016 at 10:44 PM, Dmitry Boyarintsev
> <skalogryz.li...@gmail.com> wrote:
> > Swastika = Nazis, by default these days.
> 
> Ok, this must be a cultural difference then.

It is. I'm living in Germany, and the law forbids the use of Nazi
symbols. I don't know exactly, what it looks like, but there actually is
a clear definition how it looks like. Probably the circle around the
swastika and the color scheme play a role.

And the immediate identification of Swastika=Hakenkreuz happens. People
don't think long enough, but (re)act first...

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-07 Thread Marc Santhoff
On Do, 2016-01-07 at 22:20 +0200, Juha Manninen wrote:
> On Thu, Jan 7, 2016 at 8:43 AM, Marc Santhoff <m.santh...@web.de> wrote:
> > Maybe this discussion can be closed when the names are mangled for
> > political correctness and/or there is a clear statement added in the
> > unit in question.
> 
> What is wrong with the names? The symbol is called "swastika".
>   https://en.wikipedia.org/wiki/Swastika

To me, nothing. I'm all against deleting or changing something because a
few persons feel funny about it, often they only misunderstood the
meaning.

What I'd tried with the mail you're replying to was to find a mild
compromise making everyone happy.

> > May it be in the documentation or some comments, so
> > people understand the generic nature of those drawing procedures.
> 
> Why would people not understand the generic nature now?
> The procedures draw graphics without any political pamphlets or such.
> It is as generic as it can be.

People see something and are driven by feelings. I watched a case like
this already regarding FreeBSD. Some users insisted of changing the
deamon logo because they are afraif of the devil. Rather  ridiculous, it
actually was a cuddly toy or comic like figure, but in the end the logo
got changed. If they started thinking a short moment or actually go
inside a catholic church and look around they'd have seen much more
horrible pictures of devlish creatures all around. 

Disgusting, if you ask me. To me freedom is much more important than
superstition.

> You actually want to turn this project into a political one. Why?
> Now you want a "politically correct" statement that we are contra some
> ideology. The next step is add a statement that we are for some other
> ideology.
> Why?

Again: No.

Please read carefully again some emails of mine and you'll see. I'm all
against a politically forced change and fought against it. But this if
life, and life demands compromise to live together happily.

Maybe you answered to the wrong email?

> What means "political correctness" exactly? Does it mean that one must
> repeat the bad things done by Nazis well over 70 years ago, at the
> same time ignoring other bad things and genocides done after it?
> If so, I don't want to be politically correct.

Exactly that is the reason for my idea to change nothing but explain
what we discussed here in short words in a comment for those guys
anxious about symbols they misinterpret.

> I don't know what is going on here but guys hey, wake up!
> It is year 2016 already.
> There are many explosive spots around the world. Many dangerous
> ideologies, groups and governments, but none of them are Nazis. Nazis
> are part of history. Maybe it is time to move to this century now.

Now you are taking the political banner an wave it around. ;)

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-06 Thread Marc Santhoff
On Mi, 2016-01-06 at 00:51 -0500, Anthony Walter wrote:
> While browsing the docs I found:
> 
> http://docs.getlazarus.org/#lcl+extgraphics+paintswastika

Btw., I only see a header and an empty page ...

> Do we really need this procedure in the lcl? I think it should probably be
> removed.

Additionally to Micheals answer:

Please don't be foolish. Would you want to dispel any star symbol
because the soviet union, satanists and northern korea use(d) a red
star?  This would put the question on "PaintCross" and some more.

One could demand to remove any religious reference, then the name would
have to be changed. Or to filter out any bad words when printing text,
censorship that is.

Please, be tolerant. You're free not to use those procedures or delete
them in your copy.

-- 
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; \
finger; mount; gasp; yes; uptime; umount; sleep


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


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

2016-01-06 Thread Marc Santhoff
On Mi, 2016-01-06 at 13:07 -0500, Dmitry Boyarintsev wrote:

> ExtGraphics doesn't really have any other religions/cultural symbols there.

Hooray! Let's sing!

"Ding-Dong! The Witch Is Dead"



How about that:

procedure TForm1.PaintBox1Paint(Sender: TObject);
var
  r: TRect;
begin
  r.Top := 0;
  r.Left := 0;
  r.Bottom := 200;
  r.Right := 200;
  PaintFivePointLineStar(PaintBox1.Canvas, r);
end;

Got some silver knifes and black candles at hand?


-- 
Is sex dirty?  Only if it's done right.
-- Woody Allen, "All You Ever Wanted To Know About Sex"
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2016-01-06 Thread Marc Santhoff
On Mi, 2016-01-06 at 16:31 +0100, Bart wrote: 

Look there:
https://en.wikipedia.org/wiki/Swastika

> While I am willing to defend each and everyone's freedom of speech,
> IMO this does not imply that we (the Lazarus community) should
> actively support speading such logo's.
> (Nor should we e.g. support bashing of any religion/race etc in our
> sourcecode or comments.)
> 
> As for the "its an ancient rune" argument: the same thing can be said
> for several phrases that now are considered to be offending to e.g.
> ethnic groups, and we do not promote these her as well.

Well what about "PaintCross", "PaintFivePointStar",
"PaintFivePointLineStar", "PaintChevron"? 

All in the same unit ... has anyone ever used that procedures, what do
the results actually look like?

> Current state is that the Swastika now has very strong associations
> witj the Nazi regime and all the evil it stood for.
> 
> So, yes, IMVPAPO, it should be removed.

I'd be with you and support that idea if any star symbol having a
satanistic or stalinistic look would be removed, too.

Go ahead, burn the witch, what's next?

> NB. The function was apparently introduced by Seppo (over 9 years ago)

Who's that? A Nazi, historan or hindu? A joker most probably.

-- 
Marc Santhoff <m.santh...@web.de>




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


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

2016-01-06 Thread Marc Santhoff
On Do, 2016-01-07 at 00:02 +0100, Sven Barth wrote:
> Am 06.01.2016 20:44 schrieb "Marc Santhoff" <m.santh...@web.de>:
> > Got some silver knifes and black candles at hand?
> 
> Ehm... You do know that the one with the tip at the top is *not* a satanic
> symbol? It's a protective symbol instead. The satanic one is the one
> standing on its tip. I should know, because I like to wear the protective
> variant ;)

Ok, I've learned sth. today. But this thread is about what (anxious)
people see. Anthony sse a Hakenkreuz. I have seen a satanic symbol - for
other reasons. ;)

Maybe this discussion can be closed when the names are mangled for
political correctness and/or there is a clear statement added in the
unit in question. May it be in the documentation or some comments, so
people understand the generic nature of those drawing procedures.

-- 
Marc Santhoff <m.santh...@web.de>


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


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

2016-01-06 Thread Marc Santhoff
On Mi, 2016-01-06 at 14:50 -0500, Dmitry Boyarintsev wrote:
> On Wed, Jan 6, 2016 at 2:45 PM, Marc Santhoff <m.santh...@web.de> wrote:
> 
> >
> > How about that:
> >
> >   PaintFivePointLineStar(PaintBox1.Canvas, r);
> >
> > Got some silver knifes and black candles at hand?
> >
> 
> That's the point :) It's FivePointLineStart, not Pentagram. (
> https://en.wikipedia.org/wiki/Pentagram)
> It might look the same, but in the end it's FivePointLineStart.



I see. But from that view: the Nazi symbol is named "Hakenkreuz", not
"Swastika". If you argue like this, you can revert the patch. ;)

-- 
NOBODY EXPECTS THE SPANISH INQUISITION


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


Re: [Lazarus] Phasing out support for Windows 98 and Windows ME

2015-12-14 Thread Marc Santhoff
On So, 2015-12-13 at 22:15 +0100, Bart wrote:
> On 12/13/15, Marc Santhoff <m.santh...@web.de> wrote:
> 
> > Good to know, thank you. Is there a matching wiki page where this
> > implicit information can and should be published?
> 
> It's here: http://wiki.lazarus.freepascal.org/Version_Numbering
> (Since today.)

Well done, thanks.

I'd have done if I knew where.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Phasing out support for Windows 98 and Windows ME

2015-12-13 Thread Marc Santhoff
On Mi, 2015-12-09 at 14:36 +0100, Bart wrote:
> Dear Lazarus users,
> 
> The Lazarus team has decided to finally phase out support for the
> Windows 9x platform.
> 
> Reasons for doing so are:
> 1) The platform is not supported anymore by Microsoft.
> 2) The platform is hardly in use anymore.

It is, regarding some industrial stuff. Those installations are made for
long life, 20y+.

> 3) The new 3.0 series compiler does not support this platform anymore.
> 4) There is only 1 maintainer of the Windows 9x code base.
> 5) Cleaning up the Win32 widgetset code will make it easier to
> maintain and less prone to bugs.

I understand the motivation.
Go on. ;)

> It may (or may not) be necessary to build your application using the
> 2.6.4 compiler in order to get a functional Windows 9x application.
[...]
> We are aware of the fact that this decision may affect a niche group
> of Lazarus users who develop for end-uses that still run Windows 98,
> but these can still use the 1.6 branch of Lazarus.

It would be helpful for those few user that
- have running installation of Win9x with fpc/lazarus programs
- have to be able to compile old programs

to know an easy way of getting the correct compiler and maybe lazarus
version. I suggest making at least a tagged version in svn and maybe a
branch and executable that clearly states "last working version for
Win9x" or similar.

Thank for attention,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Phasing out support for Windows 98 and Windows ME

2015-12-13 Thread Marc Santhoff
On So, 2015-12-13 at 19:43 +0200, Juha Manninen wrote:
> On Sun, Dec 13, 2015 at 7:17 PM, Marc Santhoff <m.santh...@web.de> wrote:
> > I suggest making at least a tagged version in svn and maybe a
> > branch and executable that clearly states "last working version for
> > Win9x" or similar.
> 
> The Lazarus SVN branch "fixes_1_6" will always support Win9x.
> The last release will be 1.6.x (maybe 1.6.4 or 1.6.6) somewhere over a
> year from now.
> That version can be used forever by people who need it.

Good to know, thank you. Is there a matching wiki page where this
implicit information can and should be published?

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Detecting when decompiler is running

2015-12-04 Thread Marc Santhoff
On Fr, 2015-12-04 at 14:20 +, Mark Morgan Lloyd wrote:
> Marc Santhoff wrote:
> > On Fr, 2015-12-04 at 08:29 +, Richard Mace wrote:
> >> Hi All,
> >> I was wondering if there was a way where an application, written in
> >> Lazarus, could detect when a compiler is running, perhaps by it's mutex?
> >> My idea was, in my application, I could periodically check to see if a
> >> decompiler was running and then my app could perform an operation, such as
> >> maybe closing.
> > 
> > As others said, decompilers and disassemblers are not detectable. But
> > for protection there are other counter measures.
> > 
> > 1. Protect your program using checksums. Refuse to run if tampered.
> 
> The ld linker for ELF can embed a fingerprint, that can be read back 
> fairly easily but I've not attempted to verify an entire binary against 
> it. What I don't know is what part of a binary contribute to this, and 
> whether- as a specific example- stripping symbols changes it.

Not easy but possible ...

I will not publicly tell more about the nasty upper and the ghastly
lower layers in use ... ;)

> The real problem however is the ease with which an attacker can 
> substitute a hostile library, e.g. using (something like) 
> LD_LIBRARY_PATH on unix.

For hacking protection external functions are not used. External in the
sense of being located in some dynamically loaded lib.

Protection against other frauds is another topic.

> > 2. Use varying protection schemes randomly. I did sth. like that by
> > including protection code that is switched from the make process between
> > multiple versions. If some hacker really solves the riddle for one
> > executable, her hack will fail on most others. Same scheme as compiling
> > in a serial number, that is changed for each compilation.
> > 
> > 3. Check integrity of the program often, from many placces in the
> > program. If really paranoid, you can combine with randomly selected
> > checking routines. Using a code scanner/parser and injection code for
> > checks is relaitvely simple, e.g. at the start of a procedure insert a
> > check and exit code (or leave out, depending on the moons phase or so).
> 
> Making random choices can be unwise, because sooner or later you hit a 
> weak combination.

Never had that problem. In principle you're right, but If the goal is to
check some validation points and exit on fail it is meaningless for the
rest of the program. The other case is "do nothing if OK". If there are
some timing sensitive hardware function, those have to be taken out of
the code insertion run.

> Also as a general point I once had a colleague who spent his lunchtimes 
> methodically single stepping through AutoCAD with a view to finding out 
> how the security dongle worked, and he was broadly successful despite 
> professing to know no x86 assembler.
> 
> So you can obfuscate things as much as you want, but that's no 
> protection against somebody with patience.

That's why often and unexpected are the main guidelines for this scheme.
You need to hack each and every executable, which mostly isn't worth the
effort. And even if you try, it will take ages.

The other thing is, the hacker has to distribute the binary executable
of the program hacked, for all others it will not work. If the program
is worth a lot you'll have to fight against illegal copying in any case.

For the general case of software distribution the use of activation
codes bound to some checksums retrieved on the target computer are safe
(enough), me thinks.

> > If you have enough checks, enough randomness between varying mechanisms,
> > hackers will give up for sure. You are in trouble if those programm
> > sould be distributed on DVD from one master, though.
> 
> Yes, big trouble. And I assume that you've seen yesterday's news about 
> Raspbian being insecure because all copies start with the same (or no) 
> "entropy", so SSH is seeded the same.
> 
> There is no substitute for a piece of hardware or software being 
> uniquely serialised, and the user's contract (or license, or whatever 
> you want to call it) being tied to that.

What I did not mention is, that I used this scheme from the solid
position of being able to rely on some hardware serial numbers.

General software (only) distribution needs another source of checksum,
but that one will need to be checked, too.

> > I'd like to hear from others about their anti hacking tools ... ;)

Still so, how do you protect?

Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Detecting when decompiler is running

2015-12-04 Thread Marc Santhoff
On Fr, 2015-12-04 at 08:29 +, Richard Mace wrote:
> Hi All,
> I was wondering if there was a way where an application, written in
> Lazarus, could detect when a compiler is running, perhaps by it's mutex?
> My idea was, in my application, I could periodically check to see if a
> decompiler was running and then my app could perform an operation, such as
> maybe closing.

As others said, decompilers and disassemblers are not detectable. But
for protection there are other counter measures.

1. Protect your program using checksums. Refuse to run if tampered.

2. Use varying protection schemes randomly. I did sth. like that by
including protection code that is switched from the make process between
multiple versions. If some hacker really solves the riddle for one
executable, her hack will fail on most others. Same scheme as compiling
in a serial number, that is changed for each compilation.

3. Check integrity of the program often, from many placces in the
program. If really paranoid, you can combine with randomly selected
checking routines. Using a code scanner/parser and injection code for
checks is relaitvely simple, e.g. at the start of a procedure insert a
check and exit code (or leave out, depending on the moons phase or so).

If you have enough checks, enough randomness between varying mechanisms,
hackers will give up for sure. You are in trouble if those programm
sould be distributed on DVD from one master, though.

I'd like to hear from others about their anti hacking tools ... ;)

Marc

Btw., the licence of the library code permits making closed source
programs. Only Lazarus itself and the compiler code are open source. One
point I like FPC/Lazarus for and use it.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] How to create a wmf file

2015-12-03 Thread Marc Santhoff
On Di, 2015-12-01 at 19:11 +0800, Dennis wrote:
> I have a custom panel that draws lines and rectangles on its canvas.
> How can I draw the same things on the canvas of a Windows Metafile 
> canvas so I can save the panel display as a wmf file?
> Thanks a lot.

If you are on Windows fpvectorial seems to be able to write wmf:

http://wiki.lazarus.freepascal.org/TAChart_documentation/uk#WMF_drawer

FpVectprial is included with Lazarus. See there for a start:

http://wiki.lazarus.freepascal.org/fpvectorial

For other OS you would need to do wmf writing code yourself, iirc it is
a rather simple format having drawing items (e.g. Line) and coordinates
for doing so.

Things get a bit more complicated for EMF or EMF+:

https://en.wikipedia.org/wiki/Windows_Metafile
https://msdn.microsoft.com/en-us/library/cc250370.aspx

Have fun,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Encoding with SDF dataset

2015-11-06 Thread Marc Santhoff
On Do, 2015-11-05 at 19:01 +0100, Marc Santhoff wrote:
> On Do, 2015-11-05 at 15:57 +0100, Michael Van Canneyt wrote:
> > 
> > On Thu, 5 Nov 2015, Marc Santhoff wrote:
> > 
> > > On Do, 2015-11-05 at 14:25 +0100, Marc Santhoff wrote:
> > >> On Mi, 2015-11-04 at 19:01 +0100, Marc Santhoff wrote:

> > >>> How can I fix it?
> 
> Got to ask some more questions ...

Forget about it. Too small budget, too much work. Stopped.

Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Encoding with SDF dataset

2015-11-05 Thread Marc Santhoff
On Mi, 2015-11-04 at 19:01 +0100, Marc Santhoff wrote:
> Hi,
> 
> when trying to us a TSdfDataset connected to a TDatasource and a
> TDBGrid, only some unicode symbols are shown (those little squares
> holding four tiny numbers) for string data.
> 
> The data files are encoded iso-8859 but I have found no switch for
> setting the encoding of TDataSource or TSdfDataset. When loading a
> TFileStream is used, but I did not find a property or method for
> changing the encoding on the fly in it, either.
> 
> How can I fix it?

Digging some TSream*-Classes in Unit Classes I think one way to go would
be to make a TString-descendant of some type, maybe TCustomMemoryStream
or TStringStream and add a method "ReadUTF8()" or similar. Or directly
override the Read()-Method for returning converted Strings.

Still hoping for a more simple solution, any ideas or hints?

TIA,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Encoding with SDF dataset

2015-11-05 Thread Marc Santhoff
On Do, 2015-11-05 at 14:25 +0100, Marc Santhoff wrote:
> On Mi, 2015-11-04 at 19:01 +0100, Marc Santhoff wrote:
> > Hi,
> > 
> > when trying to us a TSdfDataset connected to a TDatasource and a
> > TDBGrid, only some unicode symbols are shown (those little squares
> > holding four tiny numbers) for string data.
> > 
> > The data files are encoded iso-8859 but I have found no switch for
> > setting the encoding of TDataSource or TSdfDataset. When loading a
> > TFileStream is used, but I did not find a property or method for
> > changing the encoding on the fly in it, either.
> > 
> > How can I fix it?
> 
> Digging some TSream*-Classes in Unit Classes I think one way to go would
 t

> be to make a TString-descendant of some type, maybe TCustomMemoryStream
   TStream-

> or TStringStream and add a method "ReadUTF8()" or similar. Or directly
> override the Read()-Method for returning converted Strings.
> 
> Still hoping for a more simple solution, any ideas or hints?
> 
> TIA,
> Marc
> 

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Encoding with SDF dataset

2015-11-05 Thread Marc Santhoff
On Do, 2015-11-05 at 15:57 +0100, Michael Van Canneyt wrote:
> 
> On Thu, 5 Nov 2015, Marc Santhoff wrote:
> 
> > On Do, 2015-11-05 at 14:25 +0100, Marc Santhoff wrote:
> >> On Mi, 2015-11-04 at 19:01 +0100, Marc Santhoff wrote:
> >>> Hi,
> >>>
> >>> when trying to us a TSdfDataset connected to a TDatasource and a
> >>> TDBGrid, only some unicode symbols are shown (those little squares
> >>> holding four tiny numbers) for string data.
> >>>
> >>> The data files are encoded iso-8859 but I have found no switch for
> >>> setting the encoding of TDataSource or TSdfDataset. When loading a
> >>> TFileStream is used, but I did not find a property or method for
> >>> changing the encoding on the fly in it, either.
> >>>
> >>> How can I fix it?

> >> Still hoping for a more simple solution, any ideas or hints?
> 
> None. It is an old problem, see:
> 
> http://bugs.freepascal.org/view.php?id=16587
> 
> This can be easily solved when we start the Unicode RTL and classes.

OK, at least I'm not writing code already done.

Thanks,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Encoding with SDF dataset

2015-11-05 Thread Marc Santhoff
On Do, 2015-11-05 at 15:57 +0100, Michael Van Canneyt wrote:
> 
> On Thu, 5 Nov 2015, Marc Santhoff wrote:
> 
> > On Do, 2015-11-05 at 14:25 +0100, Marc Santhoff wrote:
> >> On Mi, 2015-11-04 at 19:01 +0100, Marc Santhoff wrote:
> >>> Hi,
> >>>
> >>> when trying to us a TSdfDataset connected to a TDatasource and a
> >>> TDBGrid, only some unicode symbols are shown (those little squares
> >>> holding four tiny numbers) for string data.
> >>>
> >>> The data files are encoded iso-8859 but I have found no switch for
> >>> setting the encoding of TDataSource or TSdfDataset. When loading a
> >>> TFileStream is used, but I did not find a property or method for
> >>> changing the encoding on the fly in it, either.
> >>>
> >>> How can I fix it?

Got to ask some more questions ...

> None. It is an old problem, see:
> 
> http://bugs.freepascal.org/view.php?id=16587
> 
> This can be easily solved when we start the Unicode RTL and classes.

How would that easy solution look like?

>From digging the code and thinking about it it is clear that my
implementation has to be inside TSdfDataset or a descendant. It cannot
be done using a special file stream because of the byte count change
with UTF8.

How can the current system encoding be retrieved in a platfrom neutral
way? 

Would it be OK to only stick any string into Ansi2utf8() and hand over
the result in this case? Here I know the files encoding and it is fixed
to iso8859-1, no change ever.

But a general solution would have a property storing the files encoding
and a list of known encodings, do fpc/lazarus have knowledge of
encodings somewhere?

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Encoding with SDF dataset

2015-11-04 Thread Marc Santhoff
On Mi, 2015-11-04 at 18:49 +, Mark Morgan Lloyd wrote:
> Marc Santhoff wrote:
> > Hi,
> > 
> > when trying to us a TSdfDataset connected to a TDatasource and a
> > TDBGrid, only some unicode symbols are shown (those little squares
> > holding four tiny numbers) for string data.
> > 
> > The data files are encoded iso-8859 but I have found no switch for
> > setting the encoding of TDataSource or TSdfDataset. When loading a
> > TFileStream is used, but I did not find a property or method for
> > changing the encoding on the fly in it, either.
> > 
> > How can I fix it?
> 
> In my limited experience depends critically on the version etc. of the 
> OS you're running.

I don't understand. I'm using FreeBSD, but the program will run on
Windows.

I'm seeking a hook for attaching sth. like "new := ANSI2Unicode(old)",
or a switch for changing the expected encoding in one of those
components involved. Man .csv importers do ask for the encoding,
Openoffice does.

The alternative would be to parse the file and convert each string piece
by piece, showing in a simple TStringGrid - I don't like that idea. ;)

-- 
Marc Santhoff <m.santh...@web.de>


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


[Lazarus] Encoding with SDF dataset

2015-11-04 Thread Marc Santhoff
Hi,

when trying to us a TSdfDataset connected to a TDatasource and a
TDBGrid, only some unicode symbols are shown (those little squares
holding four tiny numbers) for string data.

The data files are encoded iso-8859 but I have found no switch for
setting the encoding of TDataSource or TSdfDataset. When loading a
TFileStream is used, but I did not find a property or method for
changing the encoding on the fly in it, either.

How can I fix it?

TIA,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Working on big units

2015-10-21 Thread Marc Santhoff
On Mi, 2015-10-21 at 21:02 +0100, Martin Frb wrote:

> Code tools (read the entire page, it is useful not just for navigation)
>http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools
>Method_Jumping   and Find_Declaration
> 
> Code explorer  (try it, the description is not that good))
>http://wiki.lazarus.freepascal.org/IDE_Window:_Code_Explorer

+1

The most helpful key combinations are

  CTRL-SHIFT-

to jump from the interface section to the method the cursor is in

  CTRL-SHIFT-

for the inverse, jumping from inside a method implementation to the
interface section of that class

And not to forget, put the cursor inside a variable name or class name
or function name, use the right mouse key for popping up the context
menu and select

  "find declaration of ..."

as first entry.

Using those three plus the code explorer I'm happy navigating huge untis
with little irritations.

Have fun,
Marc

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Theoretical question about future of Lazarus

2015-10-14 Thread Marc Santhoff
On Mi, 2015-10-14 at 22:58 +0200, Bo Berglund wrote:
> On Mon, 12 Oct 2015 23:13:53 +0300, Juha Manninen
> <juha.mannine...@gmail.com> wrote:
> 
> $  time make clean bigide
> 
> I have never seen such a command before, does it print the time the
> command following time takes to complete???
> man time does not mention such a functionality...

Yes, it does. See here:

https://www.freebsd.org/cgi/man.cgi?query=time=FreeBSD
+9.3-stable

Sorry, no Linux man page link at hand, but I think any Linux variant
will know that command.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Theoretical question about future of Lazarus

2015-10-13 Thread Marc Santhoff
On Di, 2015-10-13 at 00:00 +0200, Bo Berglund wrote:
> Are you supposed to
> be able to build Lazarus (and FPC) as a non-priviliged user? 

Yes, if you install Lazarus into the users home directory.

I do this since years with fpc and Lazarus. It has the advantage of
being writable by the user. If I like to fiddle with Lazarus' code,
build the examples or some components need to be installed - all
possible without changing the OS installation.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Theoretical question about future of Lazarus

2015-10-13 Thread Marc Santhoff
On Di, 2015-10-13 at 10:39 +0300, Juha Manninen wrote:

> I wrote about it in forum (thread "dead computer") and hoped somebody would
> measure the time in a really fast machine. How fast are they nowadays?

You only want a figure, the big picture?

Making target "bigide" is not completely comparable, it depends on what
additional components are installed. And if the disk is a rotating one
or an SSD. And the moons phase, me thinks ... ;)

 > dmesg|grep -i cpu
CPU: AMD Phenom(tm) II X4 975 Processor (3612.05-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs

OK,not really fast and a bit dated, but enough for me. ;)
Since "gmake -j4" failed I'm posting only one test:

> gmake clean
> time gmake bigide
135.043u 10.460s 2:39.86 91.0%  2541+1181k 1059+11804io 74pf+0w
> gmake clean
> time gmake bigide
135.264u 10.245s 2:37.18 92.5%  2542+1182k 0+11803io 0pf+0w

Files are stored on a rotating disc.
Two and a half minutes is not enough for a coffee break.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Theoretical question about future of Lazarus

2015-10-13 Thread Marc Santhoff
On Di, 2015-10-13 at 18:07 +0300, Juha Manninen wrote:
> On Tue, Oct 13, 2015 at 5:02 PM, Marc Santhoff <m.santh...@web.de> wrote:
> > You only want a figure, the big picture?
> 
> Yes, basically.
> 
> > Making target "bigide" is not completely comparable, it depends on what
> > additional components are installed.
> 
> No, "bigide" has a fixed set of components.

Hmm, but it does build the components I have installed as an extra to
"naked" Lazarus. So it does more work than a vanilla installation?

> > And if the disk is a rotating one or an SSD. And the moons phase, me thinks 
> > ... ;)
> 
> SSD is a valid way to speed up a computer.
> Moon phase clearly was the cause for some nasty bugs which I could not
> solve, but "make bigide" timing can be reproduced quite accurately
> with the same compiler settings.

Compiler settings are unchanged from the installation.

> >  > dmesg|grep -i cpu
> > CPU: AMD Phenom(tm) II X4 975 Processor (3612.05-MHz K8-class CPU)
> > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
> 
> 3,6 GHz. Is it the Black Edition (Deneb)?

I had no idea, but a search for the invoice said: yes, it is.

> > OK,not really fast and a bit dated, but enough for me. ;)
> > Since "gmake -j4" failed I'm posting only one test:
> >
> >> gmake clean
> >> time gmake bigide
> > 135.043u 10.460s 2:39.86 91.0%  2541+1181k 1059+11804io 74pf+0w
> >> gmake clean
> >> time gmake bigide
> > 135.264u 10.245s 2:37.18 92.5%  2542+1182k 0+11803io 0pf+0w
> >
> > Files are stored on a rotating disc.
> > Two and a half minutes is not enough for a coffee break.
> 
> Not bad. Still a lot faster than Beebox.

Need it for CAD, simulations and the like. But the Beebox looks good for
smaller servers and media boxes. And it's beautiful to some extent.

But the first run was Lazarus 1.4.2. Trying again using version 1.4.4
and including gmake clean:

> time gmake clean bigide
135.607u 11.301s 2:39.85 91.8%  2513+1182k 56+17961io 0pf+0w

> gmake clean
> time gmake bigide
135.717u 10.049s 2:37.20 92.7%  2537+1180k 37+11886io 0pf+0w

No big difference. For fun another run on a SSD:

> time gmake clean bigide
135.293u 9.968s 2:26.14 99.3%   2526+1184k 23+5787io 37pf+0w

Helps a bit.

I'd like to see the times for RPi and RPi2 ... but on those devices the
storage media playes a role even bigger, some sd-cards are awfully slow.

> Yet, the processing power / electric power ratio is quite amazing in
> Celeron N3000. Its TDP is 4W.

That's the only thing not so nice, but using power management functions
it's ok, having enough power when needed.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Theoretical question about future of Lazarus

2015-10-13 Thread Marc Santhoff
On Di, 2015-10-13 at 18:05 +0200, Mattias Gaertner wrote:
> On Tue, 13 Oct 2015 17:56:15 +0200
> Marc Santhoff <m.santh...@web.de> wrote:
> 
> >[...]
> > > No, "bigide" has a fixed set of components.
> > 
> > Hmm, but it does build the components I have installed as an extra to
> > "naked" Lazarus. So it does more work than a vanilla installation?
> 
> A "naked" Lazarus is built with "make all".
> "make bigide" contains a lot of packages. Both are fixed sets.
> 
> "make useride" calls "lazbuild --buildide" which builds your own set
> of packages.

You're right, some development packages I installed temporarily are
gone. I stumbled on RTTI, but it seems to be included in the standard
set.
 
> >[...]
> > But the first run was Lazarus 1.4.2. Trying again using version 1.4.4
> > and including gmake clean:
> > 
> > > time gmake clean bigide
> > 135.607u 11.301s 2:39.85 91.8%  2513+1182k 56+17961io 0pf+0w
> > 
> > > gmake clean
> > > time gmake bigide
> > 135.717u 10.049s 2:37.20 92.7%  2537+1180k 37+11886io 0pf+0w
> 
> I forgot to mention. My times were for 1.5.

Which svn revision would check out 1.5?

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Theoretical question about future of Lazarus

2015-10-13 Thread Marc Santhoff
On Di, 2015-10-13 at 20:02 +0300, Juha Manninen wrote:
> On Tue, Oct 13, 2015 at 6:56 PM, Marc Santhoff <m.santh...@web.de> wrote:
> >> Yet, the processing power / electric power ratio is quite amazing in
> >> Celeron N3000. Its TDP is 4W.
> >
> > That's the only thing not so nice, but using power management functions
> > it's ok, having enough power when needed.
> 
> Why is it not nice? 

Confusion. I was answering to your remark while thinking about my cpu.

> It enables a fanless passively cooled design.
> IMO it is great!

It is.

> Your CPU has TDP 125W. It needs a big power supply and efficient cooling.

_That's_ not so nice.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Theoretical question about future of Lazarus

2015-10-13 Thread Marc Santhoff
On Di, 2015-10-13 at 18:38 +0200, Mattias Gaertner wrote:
> On Tue, 13 Oct 2015 18:25:58 +0200
> Marc Santhoff <m.santh...@web.de> wrote:
> 
> >[...]
> > Which svn revision would check out 1.5?
> 
> If you mean the URL:
> http://svn.freepascal.org/svn/lazarus/trunk

It's on trunk, ok.

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Where is hwiringPi?

2015-09-19 Thread Marc Santhoff
On Fr, 2015-09-18 at 18:50 -0500, Bo Berglund wrote:
> The hiwiringpi.pas file is an interface to something else written in C
> if I understood the text correctly.
> How does that work? It seems like I have to compile something in C on
> the Pi as well and it produces an *.o file. Does that act like a dll
> in Windows or like a lib file that gets linked into the final
> executable?

Yes, it does. A statically linked library (.a in contrast to a
dynamically linked library .so) is nothing more than an archive holding
a bunch of .o files. As long as the compiler creates the same type of
object file (ELF mostly) thosse are the same created when compiling
pascal files. This .o files can be linked into a pascal program.

If using dynamical linking things are different, but in general it works
the same as using dll files on Windows.

I did use object files compiled from C to use some USB functions
withstanding my translation trials vigorously. ;)

-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] Where is hwiringPi?

2015-09-19 Thread Marc Santhoff
On Sa, 2015-09-19 at 18:53 +0200, Marc Santhoff wrote:
> On Fr, 2015-09-18 at 18:50 -0500, Bo Berglund wrote:
> > The hiwiringpi.pas file is an interface to something else written in C
> > if I understood the text correctly.
> > How does that work? It seems like I have to compile something in C on
> > the Pi as well and it produces an *.o file. Does that act like a dll
> > in Windows or like a lib file that gets linked into the final
> > executable?
> 
> Yes, it does. A statically linked library (.a in contrast to a
> dynamically linked library .so) is nothing more than an archive holding
> a bunch of .o files. As long as the compiler creates the same type of
> object file (ELF mostly) thosse are the same created when compiling
> pascal files. This .o files can be linked into a pascal program.
> 
> If using dynamical linking things are different, but in general it works
> the same as using dll files on Windows.
> 
> I did use object files compiled from C to use some USB functions
> withstanding my translation trials vigorously. ;)

I forgot:

These C-Functions are activated in pascal files like this:


{ -- low level C functions -- }

function domotorrequest(device : integer ; motor: integer; speed: 
integer):integer; cdecl; external;
{$L domotorrequest.o}

function doserialrequest(device: longint; buffer: pAnsiChar):integer; cdecl; 
external;
{$L doserialrequest.o}


After that they can be used like any other function.
One of the C files:


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include "usb-serial.h"

int doserialrequest(int dev, char* buffer)
{
usb_device_descriptor_t devdescr;
struct usb_string_desc stringdescr;
int res;
/*int dev;*/
int i;

bzero(, sizeof(devdescr));
res = ioctl(dev, USB_GET_DEVICE_DESC, );
if (res < 0) {
printf("USB get_device_descriptor failed: %s\n",
strerror(errno));
exit(-1);
}

bzero(, sizeof(stringdescr));
stringdescr.usd_string_index = devdescr.iSerialNumber;
res = ioctl(dev, USB_GET_STRING_DESC, );
if (res < 0) {
printf("USB get_string_descriptor failed: %s\n",
strerror(errno));
exit(-1);
}

for (i = 0 ; i < stringdescr.usd_desc.bLength; i++ ) {
//printf("%c", (char)UGETW(stringdescr.usd_desc.bString[i]));
buffer[i] = (char)UGETW(stringdescr.usd_desc.bString[i]);
}
return i;
}



-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] PostgreSql: unexpected EOF on client connection with an open transaction

2015-09-02 Thread Marc Santhoff
On Di, 2015-09-01 at 14:26 -0300, Leonardo M. Ramé wrote:
> Hi, this is kind of a dejavu, I'm pretty sure I have asked this question 
> before, but I can't find the old message, so, here I go.
> 
> In my postgresql.log file I get this two messages every time I 
> query/update the database:
> 
> could not receive data from client: Connection reset by peer
> unexpected EOF on client connection with an open transaction
> 
> I'm using TPQConnection/TSqlTransaction/TSqlQuery in a CGI with this method:
> 
> procedure TDataModule1.ExecSql(ASql: string);
> var
>lSql: TSQLQuery;
> begin
>lSql := TSQLQuery.Create(nil);
>try
>  lSql.DataBase := PQConnection1;
>  lSql.Transaction := SQLTransaction1;
>  lSql.SQL.Text:= ASql;
>  lSql.ExecSQL;
>  SQLTransaction1.Commit;

Only guessing: maybe the transaction object is set to "autocommit" and
the .Commit statement produces the error?

Marc

>finally
>  lSql.Free;
>end;
> end;
> 
> The query is executed without issues, data is stored into the db, but I 
> keep getting those messages.
> 
> I'm using FPC 3.1.1 - Lazarus 1.5 - Linux 64bits (Ubuntu 15.04).
> 
> Regards,


-- 
Marc Santhoff <m.santh...@web.de>


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


Re: [Lazarus] multi step dialog

2015-08-19 Thread Marc Santhoff
On Mi, 2015-08-19 at 11:20 +0200, Bart wrote:
 On 8/18/15, Marc Santhoff m.santh...@web.de wrote:
 
  On Mo, 2015-08-17 at 16:39 +0200, Bart wrote:
  On 8/17/15, Marc Santhoff m.santh...@web.de wrote:
 
   Plus it's a recurring task (like reading directory entries into a
   container - Delphi has a class for, lazarus not). It would have been
   nice if there were a template or the like.
 
  Care to elaborate on that (in a new thread)?
 
 
  Regarding a TDirectory class I think the properties are the same. The
  difference is it's a very commen use case to read directories and files
  into acontainer.
 
 You say that delphi has a class that does this.
 Can you point me to the right place in Embarcaderos's DocWiki where
 this class is described?
 This way we might start a cleanroom implementation for this.

No, sorry. While searching the web I found some Delphi code snippets
showing the use of a class named TDirectory, that's all.  I personally
do not own or use Delphi ( Version 2).

 B.t.w. You know that we have FindAllFiles procedure and a
 TFileSearcher class in LazFileUtils?

No, I did not. I'll have a deep look.

Thanks,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] multi step dialog

2015-08-18 Thread Marc Santhoff
On Mo, 2015-08-17 at 16:39 +0200, Bart wrote:
 On 8/17/15, Marc Santhoff m.santh...@web.de wrote:
 
  Plus it's a recurring task (like reading directory entries into a
  container - Delphi has a class for, lazarus not). It would have been
  nice if there were a template or the like.
 
 Care to elaborate on that (in a new thread)?

Currently not, to be honest. I could not do much but discuss that topic.

To summarize on the wizard dialog:

- it sems to be a not-so-often occuring use case
- if asked about, a lot of programmers step forward telling I've done
it like this ...
- if made flexible and useful for mostly any case the code is getting
huge fast - see Luiz's implmentation

Regarding a TDirectory class I think the properties are the same. The
difference is it's a very commen use case to read directories and files
into acontainer.

And last but not least: it has to be taken into account that searching
code and learning howto use it often takes as much time as to write
something simple but working yourself.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] multi step dialog

2015-08-17 Thread Marc Santhoff
On Mo, 2015-08-17 at 09:34 +0100, Tony Whyman wrote:
 On 17/08/15 07:59, Graeme Geldenhuys wrote:

  In fpGUI I simply use a PageControl and set TabPosition = None. In
  Delphi 5-7 and Kylix I used to do similar, but can't remember what exact
  control I used... might have been PageControl too.

 A TPageControl is also what I use to get a multi-step dialog.
 
 Set ShowTabs to false and make each step a page in the pagecontrol. 
 The Form's OnShow Handler should set the initial tab index e.g.
 
 PageControl1.TabIndex := 0;
 
 Place the forward/back buttons outside of the pagecontrol and make the 
 body of each button's OnClick handler a case statement
 e.g.
 
 case PageControl1.TabIndex of
 0: begin
{validate}
   PageControl1.TabIndex := 1;
 end;
 1: begin
{validate}
   PageControl1.TabIndex := 2;
 end;
...
 end;
 
 The final step should set the ModalResult.
 
 Use each page's OnShow handler to set button captions, if they need to 
 change e.g. to change Next to Finish on the final tab,

Thank you all, I know it is somewhat trivial looking code and it
actually is somehow.  But one has to watch the state not only for dialog
pages but each and every input field, check consistency, and so on.

Plus it's a recurring task (like reading directory entries into a
container - Delphi has a class for, lazarus not). It would have been
nice if there were a template or the like.

And there is, Luiz made it. ;)

Have fun,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] multi step dialog

2015-08-16 Thread Marc Santhoff
Hi,

is there any template like dialog having multiple steps the user
switches with next/previous/finish-buttons?

Sth. like installer programs do for asking the user a lot of
information: what to install, where to, accept licence, some config
data, etc.

Maybe a source on LCCR or an example program has such code, I don't want
to invent the world anew. ;)

TIA,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] multi step dialog

2015-08-16 Thread Marc Santhoff
On So, 2015-08-16 at 11:41 -0300, Luiz Americo Pereira Camara wrote:
 2015-08-16 11:33 GMT-03:00 Marc Santhoff m.santh...@web.de:
 
  Hi,
 
  is there any template like dialog having multiple steps the user
  switches with next/previous/finish-buttons?
 
 
 https://code.google.com/p/luipack/source/browse/#svn%2Ftrunk%2Fluicontrols%2Fdemos%2Fwizard

Wow, very elaborated code. It's what I need, the only thing is it has
itself and another package installed in the IDE. I'll try to use it
dynamically wihtout installation, but that will take a while.

 The API is a bit cumbersome but works. Plan to improve the interface

I cannot comment on that, yet.

Thank you!

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] multi step dialog

2015-08-16 Thread Marc Santhoff
On So, 2015-08-16 at 19:37 +, Mark Morgan Lloyd wrote:
 Marc Santhoff wrote:
  Hi,
  
  is there any template like dialog having multiple steps the user
  switches with next/previous/finish-buttons?
  
  Sth. like installer programs do for asking the user a lot of
  information: what to install, where to, accept licence, some config
  data, etc.
  
  Maybe a source on LCCR or an example program has such code, I don't want
  to invent the world anew. ;)
 
 I've done it (for a database connection) using a notebook with tabs at 
 the top. The only significant complexity was due to having the buttons 
 on each page since it meant that I had to fudge the default as I 
 progressed through the sequence.

Me too, back in the 90ies, using Delphi 1 or 2. That's why I hoped there
may be a somewhat general implementation for such generic use case. Like
the one Luiz made - but I have to try it, learn how to use it first.

Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] help needed making an ide extension

2015-08-12 Thread Marc Santhoff
On Do, 2015-08-13 at 01:06 +0200, Mattias Gaertner wrote:
 On Thu, 13 Aug 2015 00:06:34 +0200
 Marc Santhoff m.santh...@web.de wrote:
 
 [...]
  Good example.
  
  I do not fully understand the creation mechanism. I see an extra
  register procedure in frmexploremenu.pas that actually sets the menu
  entry. I thought a constructor of the extension class would be called.
  But since it is a modal form that is done by execution of the menu code.
  
  Instead there is a notify event FormCreate(), where is that one
  called? Is it done that way by convention? Did I miss some piece of
  documentation?
 
 It is set by the lfm, which is parsed in the forms constructor.

I see, time to activate some code in the IDE instead of only reading it.
 
 [...]
   It opens all forms of the project.
  
  OK, not what I want. What strategy can be used to get a list of forms in
  the users project without having to open them all?
 
 If you need the list of all units with designer, you can simply search
 for lfm files.
 If you want only specific classes, you have to check each lfm.

Simple and effective. Beautiful.

 [...]
Afterwards, will the new component created and have owner, parent and
essential properties set and then added, like I would do in any other
program creating components in code at runtime or is there another way
(sth. like IDEDoCreateComponetntAndAdd(newcomponent.class))?
   
   Maybe such a function can be added to the IDEIntf.
  
  In principle making something like designer/designer.pp
  TDesigner.MouseUpOnControl AddComponent publicly available would
  suffice.
 
 It needs various parameters:
 ComponentClass
 ParentComponent
 Left,Top,
 Optional: Width,Height
 Optional: Name
 
 Would that suffice?

From my POV it would, although I'm not the most experienced extension
developer. ;)

   Can you give some more details what you are trying to achieve?
  
  I'm only learning how to do basic actions. Playing around, that is.
  
  Currently it is planned to show a list of available forms and let the
  user select one. Then he would select the parent component for one or
  more new components to insert.
 
 Just an idea: Why not select the form and parent component, by right
 clicking on the parent component and start the wizard via a menu item
 in the popup menu?

Neat, would save some dialog space and maybe one step. For usability
there should be a menu item at the standard location, but that's another
question.


Thanks again,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] help needed making an ide extension

2015-08-12 Thread Marc Santhoff
On Mi, 2015-08-12 at 23:17 +0200, Mattias Gaertner wrote:
 On Wed, 12 Aug 2015 21:16:22 +0200
 Marc Santhoff m.santh...@web.de wrote:
 
 [...]
  1. Is it correct that to make an extension basically all I have to do is
  write the code that
  - adds a menu entry for starting the code
  - save it as a lazarus package and check register in ide (or the
  like ;)
  and that's the basis for doing something useful?
 
 Yes, see for example examples/exploremenu.

Good example.

I do not fully understand the creation mechanism. I see an extra
register procedure in frmexploremenu.pas that actually sets the menu
entry. I thought a constructor of the extension class would be called.
But since it is a modal form that is done by execution of the menu code.

Instead there is a notify event FormCreate(), where is that one
called? Is it done that way by convention? Did I miss some piece of
documentation?

  2. When I want the user to select a form for the ide expert to work on,
  a list of available forms is needed. Is iterating over all the projects
  files and getting the form of a file the right way to go?
 
 It depends on what you mean with available.
 For example a project can also access the forms of packages.

Available means all forms the user has created in his own lazarus
project. He will want to place components there and forms from foreign
packages are r/o, me thinks. Except when actively working on an opened
package.

Hmm, you're right, not easy to distinguish which is which.

  Additionally if yes:
  
  The code there:
  
  http://wiki.lazarus.freepascal.org/Extending_the_IDE#Get_unit.2C_designer.2C_form_of_a_file
  
  looks OK, but doesn't it open all the files of a project?
 
 It opens all forms of the project.

OK, not what I want. What strategy can be used to get a list of forms in
the users project without having to open them all?

  And does 
  
  // get form
  aForm:=aDesigner.Form;
  
  give NIL if the file has no form?
 
 aDesigner will be nil.

OK.

  3. How do I create a new component on a form?
  For doing so one would need at least a reference to the active form and
  second a reference to the active component to use as parent.
 
 Adding a component can be complex.
 See designer/designer.pp TDesigner.MouseUpOnControl AddComponent.

Uff. Lots of safety belts, some tricky looking code for calculating
bounds, but in general it answers my question.

Seems to be necessary to inform the IDE about changing the form.
 
  Afterwards, will the new component created and have owner, parent and
  essential properties set and then added, like I would do in any other
  program creating components in code at runtime or is there another way
  (sth. like IDEDoCreateComponetntAndAdd(newcomponent.class))?
 
 Maybe such a function can be added to the IDEIntf.

In principle making something like designer/designer.pp
TDesigner.MouseUpOnControl AddComponent publicly available would
suffice.

 Can you give some more details what you are trying to achieve?

I'm only learning how to do basic actions. Playing around, that is.

Currently it is planned to show a list of available forms and let the
user select one. Then he would select the parent component for one or
more new components to insert. All done from a modal form, and if
feasible it will evolve to some sort of multi step wizard or
assistant dialog triggering complex actions.

Many thanks,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] help needed making an ide extension

2015-08-12 Thread Marc Santhoff
Hi,


I'd like to try building an extension to Lazarus. After reading a lot of

 http://wiki.lazarus.freepascal.org/Extending_the_IDE#See_also

I think I'm starting to understand how this can be done. But some
questions are left open:


1. Is it correct that to make an extension basically all I have to do is
write the code that
- adds a menu entry for starting the code
- save it as a lazarus package and check register in ide (or the
like ;)
and that's the basis for doing something useful?


2. When I want the user to select a form for the ide expert to work on,
a list of available forms is needed. Is iterating over all the projects
files and getting the form of a file the right way to go?
Additionally if yes:

The code there:

http://wiki.lazarus.freepascal.org/Extending_the_IDE#Get_unit.2C_designer.2C_form_of_a_file

looks OK, but doesn't it open all the files of a project?
And does 

// get form
aForm:=aDesigner.Form;

give NIL if the file has no form?
 

3. How do I create a new component on a form?
For doing so one would need at least a reference to the active form and
second a reference to the active component to use as parent.

Afterwards, will the new component created and have owner, parent and
essential properties set and then added, like I would do in any other
program creating components in code at runtime or is there another way
(sth. like IDEDoCreateComponetntAndAdd(newcomponent.class))?



If there is an example doing all of this stuff, please point me there.
After browsing some intresting names in lazarus/examples I haven't found
what's missing.

TIA,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Stats

2015-08-10 Thread Marc Santhoff
On So, 2015-08-09 at 20:08 +0100, Graeme Geldenhuys wrote:
 On 2015-08-09 16:50, mic...@gmail.com wrote:
  the sourceforge stats are pretty impressive
 
 I would be interested to know what the unknown list of Top OSes
 contain. Which OSes would register such a large group?

Count FreeBSD in. I'm using it and have never installed the ports,
always downloads via the web sites of fpc and lazarus.

 The Android download count, also in Top OSes, is also surprising. What,
 do people download FPC from their mobile phones?

Maybe some Raspberry Pi or the like, those can be running Android.

-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] checksums for downloads

2015-07-19 Thread Marc Santhoff
Hi,

since I have managed to destroy my fpc and/or lazarus installation and
have to install fresh ones, i wondered:

Are there chechsums available anywhere for the needed downloads - fpc,
fpc sources, lazarus?

I would feel mauch better, if so.

Thanks in advance,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] checksums for downloads

2015-07-19 Thread Marc Santhoff
On So, 2015-07-19 at 14:18 +0100, Martin Frb wrote:
 On 19/07/2015 12:56, Marc Santhoff wrote:
  Hi,
 
  since I have managed to destroy my fpc and/or lazarus installation and
  have to install fresh ones, i wondered:
 
  Are there chechsums available anywhere for the needed downloads - fpc,
  fpc sources, lazarus?
 
  I would feel mauch better, if so.
 
 
 I am not aware of them being separately published (except for the ones 
 on sourceforge, which are calculated by sourceforge).

I think it may be only little effort to publish those sums on the
website or put a file mdsums.txt aside wioth the downloads.

 As for the win installers, here are the checksums from the original 
 installers (the local copies I kept after the build).

Many thanks, but I'm using FreeBSD (8 and 9).


  MD5 SHA-1
 -fc90c4a3f0e34fecec9026be5b7a96bf
  
 610f535bfd3c6ea1addcdf019d21fc2c14edadb1 
 1.4.2\lazarus-1.4.2-fpc-2.6.4-cross-x86_64-win64-win32.exe 
 f177f00cbb16a87f044efc8cd7c90789 
 77b0a6914a9b4b5416b4cb4d14e867cbfa89c635 
 1.4.2\lazarus-1.4.2-fpc-2.6.4-win32.exe 28d8cd24dfb443ca48f8abec84d251a0 
 3b2a389fc5746ce7ea2d59125bd02b707528ba9e 
 1.4.2\lazarus-1.4.2-fpc-2.6.4-cross-arm-wince-win32.exe 
 fd1f7ddc01762a9c86b742c607b33319 
 34e89dd020e302414f1aa546b4318d104fee3ed1 
 1.4.2\w64\lazarus-1.4.2-fpc-2.6.4-cross-i386-win32-win64.exe 
 b4d4b91854915e6ca0a5772f2a27013b 
 88b537a1ef50ae321c0323adc627cdf600e6e43f 
 1.4.2\w64\lazarus-1.4.2-fpc-2.6.4-win64.exe

Your're right, the text is a bit messy but usable.

 Sourceforrge is (as of today) still showing the same checksums (so it 
 seems their recent downtime, has not led to modifications).
 Though of course that is, if the checksums shown today by sourceforge 
 actually matches the files online today.
 I have not downloaded todays files to check if they indeed have the 
 checksum that SF claims.

How do you manage to see checksums on Sourceforge? That would be a
start.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] gdb version for use with lazarus

2015-07-19 Thread Marc Santhoff
On Mo, 2015-07-20 at 00:08 +0100, Graeme Geldenhuys wrote:
 On 2015-07-19 18:16, Marc Santhoff wrote:
gdb --version
  GNU gdb 6.1.1 [FreeBSD]
 
 I forgot to mention in my previous reply, when you install a later GDB
 via ports, they use a different executable name so you can have multiple
 versions installed.
 
   /usr/bin/gdb -- v6.6
   /usr/local/bin/gdb781-- v7.8.1

Seems to be the case, the newer gdb from ports is installed, I only need
to tell lazarus.

Will do, will test, but not today.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] gdb version for use with lazarus

2015-07-19 Thread Marc Santhoff
On So, 2015-07-19 at 23:40 +0100, Martin Frb wrote:
 On 19/07/2015 18:16, Marc Santhoff wrote:
  Hi,
 
  still in the reconstruction process:
 
  Which version of gdb is requiered at least for us with lazarus on
  freebsd with fpc 2.6.4?
 
  I'm using nthe systems gdb which does not seem to suffice:
 
 gdb --version
  GNU gdb 6.1.1 [FreeBSD]
 
  Lazarus is from today, 1.4.2.
 
 
 It might not just be the version number.
 The lowest version regularly tested is or was till recently 6.3.5 (the 
 apple mac edition).
 But it is well possible that even older versions still work.
 
 IIRC the problem on freebsd is that some commands returns different 
 values. Instead of PID you get a Lightweight thread id, or something, 
 and it has a diff abbreviation.
 I remember 1 or 2 years back some reports and some changes. But I have 
 not tested since. (And I do not know, if those changes apply only to 
 certain version of the freebsd gdb.)
 
 Lets start with a log, on whatever gdb you currently have
 http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

If the newer gdb doesn't run, I will.

Since i really shot down my installation I cannot tell which gdb has
been used lastly, but lazarus was version 1.2.0 and that combination
worked - well somehow at least. Debugging a programm killed some config
files, some of my sources and maybe the compiler itself, cannot tell
because in the end the machine freezed and shortly rebooted on CTRL-F9.

The problem worked at was some confusion in the contruction chain, so I
had to stop several times even before a window showed up on the screen.

I kept the defect fpc and lazarus dirs, but not the hosed configuration,
it is repaired now. Lazarus stumbled across some zero length files, but
it should not reboot the computer. I think the damaged file system
killed the compiler or the like.

-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] gdb version for use with lazarus

2015-07-19 Thread Marc Santhoff
Hi,

still in the reconstruction process:

Which version of gdb is requiered at least for us with lazarus on
freebsd with fpc 2.6.4?

I'm using nthe systems gdb which does not seem to suffice:

  gdb --version
GNU gdb 6.1.1 [FreeBSD]

Lazarus is from today, 1.4.2.


TIA,
Marc


-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] checksums for downloads

2015-07-19 Thread Marc Santhoff
On So, 2015-07-19 at 12:08 -0400, waldo kitty wrote:
 On 07/19/2015 09:29 AM, Marc Santhoff wrote:
  On So, 2015-07-19 at 14:18 +0100, Martin Frb wrote:
  I am not aware of them being separately published (except for the ones
  on sourceforge, which are calculated by sourceforge).
 
  I think it may be only little effort to publish those sums on the
  website or put a file mdsums.txt aside wioth the downloads.
 
 ideally there would be one md5sum file for each individual file available for 
 download... this way, one can check the remote checksum file with a local one 
 to 
 see if the file has been updated since the checksums would be different... we 
 use this for automated update mechanisms...

Indeed, you're right. And then it would even better to have the archives
signed with a gpg key of the developer(s) tracable to the root cert. But
I wanted to keep things simple, not demanding too much. ;)

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] File sync system approach

2015-07-09 Thread Marc Santhoff
On Mi, 2015-07-08 at 11:54 -0700, aradeonas wrote:

 For one of my projects I want to send and receive files between server
 and client and for years I saw demos in Indy,Synapse ... but I wonder if
 any one done it in real world and have experience or suggestion that
 want to share with so prevent me to go wrong or reinvent wheel or engine
 if they are out.
 
 I want to know what is the best approach for making a sync system,what
 is the powerfullest library and live library,tips to know about security
 or even file changes recognition and upload just changed part like
 DropBox.
 I don't want all,just if you can help me in some part please do.

Maybe it would be a good idea to search for other projects doing the
job. How about Owncloud or other server centric application programs?
SourceForge or google code and many others are your friend.

Or ask your colleagues or friends, if they know something helpful where
you can look at the code.

If you find a library written in plain C it's not so complicated to make
an object pascal binding using fpc's h2pas tool.

Additionally you could have a look at relational databases. Locking
schemes and replication would be the keywords.

HTH,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] File sync system approach

2015-07-09 Thread Marc Santhoff
On Do, 2015-07-09 at 05:50 -0700, aradeonas wrote:
 Database schemes is not a big problem. for me complicity is more in file
 sending and receiving and dont know a good source in this subject so I
 asked maybe someone done it or know about. 
 Or even choosing library for this subject,Indy or synapse or else?

OK, you only need sth. for transferring the file from one machine to
another? For me SFTP woul be the protocoll of choice, but I don't know
what pascal library implements it.

Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Help for your applications

2015-07-04 Thread Marc Santhoff
On Fr, 2015-07-03 at 21:34 +0100, Richard Mace wrote:
 Hi,
 When writing help files and documentation for your apps, what are peoples
 preferences?

I like PasDoc, because it works like JavaDoc:

http://pasdoc.sipsolutions.net/

-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] PowerPDF PDF level

2015-06-23 Thread Marc Santhoff
Hi,

can someone please tell me what version of PDF documents PowerPDF
supports?

The docs in question are mostly 1.4, some rare 1.5, but who knows.

TIA,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] PowerPDF PDF level

2015-06-23 Thread Marc Santhoff
On Di, 2015-06-23 at 14:25 -0500, Jesus Reyes A. wrote:
 On Tue, 23 Jun 2015 04:57:44 -0500, Marc Santhoff m.santh...@web.de  
 wrote:
 
  Hi,
 
  can someone please tell me what version of PDF documents PowerPDF
  supports?
 
  The docs in question are mostly 1.4, some rare 1.5, but who knows.
 
  TIA,
  Marc
 
 
 PowerPDF writes 1.2 version documents.

Thank you, this Information wasn't noted anywhere.

But actually PowerPDF is the wrong tool for opening and reading PDF
files, it is only made for creation of documents. I dared to add this
info to the english wiki page. 

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Make table with TDataset structure

2015-06-22 Thread Marc Santhoff
On Mo, 2015-06-22 at 04:11 -0700, aradeonas wrote:
 Thank you Marc,very interesting point but now Im talking about INSERT
 SQL COMMAND.

Sorry, I read too fast over your mail.

 I want to make insert sql command for a table ,for example :
 INSERT INTO table1(Filed1,Filed2) VALUES(:Filed1,:Filed2);
 I know its possible because Lazarus data desktop do this but I count
 find out how and I thought with my self maybe It's Maker or others who
 work with its source can help me in this.

If your table is created and you have got a TSQLQuery or the like
attached and opened, you can iterate over it's FieldDefs property.

It should work similar to this pseudocode:

strinsertsql := 'INSERT INTO table name VALUES (';

for i=0 to Query.Fielddefs.Count do begin
strname := FieldDefs[i].Name;
strtype := map_type_from_laz_to_sqlite( FieldDefs[i].DataType;
strinsertsql := strinsertsql + ', ' + strname;
end;

... and so on.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Make table with TDataset structure

2015-06-20 Thread Marc Santhoff
On Sa, 2015-06-20 at 06:36 -0700, aradeonas wrote:
 No,I explained it badly. I mean working on Lazarus Data Desktop source
 didnt help to do what I want otherwise its a very good app,if I didnt go
 wrong you write the code more than 7 years ago and its clean,codes like
 this show me how to write code professionally.
 I want to do what this app done in a code but I will lost in it,as I
 said I have a connection to a sqlite database and want to make create
 sql for one of the tables.

(from my meomry, please check details yourself)

I think TDataset is not the best choice for the task. You would have to
iterate over all fields to store, create the metadata entries (field
type, length, contraint, etc.) and in the end trigger table creation.

It would be much easier to use TSQLQuery. Taht way you only have to set
the SQL string for table creation to a correct value like

'CREATE TABLE somthing(ID serial, shortname varchar(20), name
varchar(255), ...)'

and then run it using the ExecSQL method (or similar, lok in the docs).
Afterwards you can open it using the TDataset. This is much faster if
you have your field definitions ready before starting. You could store
the SQL or make it a constant.

If you need to have a universal table creation function you can still
iterate over the fields an have a mapping between lazarus/fpc types and
the storage types for your database, e.g. string - varchar(), integer
- int, and so on. More works, but it boils down to simple string
concatenation.

HTH somehow,
Marc


-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] TProcess not mirroring terminal

2015-06-02 Thread Marc Santhoff
On Di, 2015-06-02 at 14:21 +0200, JuuS wrote:

 Anyone have an idea why this is so???
 
 
 
 TERMINAL OUTPUT:
 juus@JuuSKub:~$ rsync -n -vshtplgiE --stats --modify-window=1 --progress
 /home/juus/Documents/** /media/juus/Lin1TB/BKactive
 skipping directory CodeBlocks
 skipping directory IntelliJ
 skipping directory qt
 f+ hackjs5.html
 f+ hackjs7.html
 f+ hackjs8.html
 
 Number of files: 3 (reg: 3)
 Number of created files: 3 (reg: 3)
 Number of deleted files: 0
 Number of regular files transferred: 3
 
 
 
 OUTPUT FROM MY PROGRAM
 rsync: link_stat /home/juus/Documents/** failed: No such file or
 directory (2)
 
 Number of files: 0
 Number of created files: 0
 Number of deleted files: 0
 Number of regular files transferred: 0

Maybe the difference is that your TProcess is reading only stdout, not
stderr. Dunno if there is a switch in TProcess, if not you'd need to
redirect stderr to stdout (which is shell dependant, 21 for sh,  for
csh, IIRC).

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Date value 0

2015-05-28 Thread Marc Santhoff
On Do, 2015-05-28 at 17:57 +0200, Jürgen Hestermann wrote:
 Am 2015-05-28 um 17:14 schrieb waldo kitty:
  i don't know why it isn't confident... am is morning so 12am is the very 
  first entry into morning as 12pm is the very first entry into afternoon...
  i don't understand the confusion or the problem...
 
 
 So the day starts with 12 at midnight and then switches to 1 an hour later?
 If that isn't confusing...

Wikipedia tries to de-confuse a bit:

https://en.wikipedia.org/wiki/12-hour_clock
https://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight

Other countries may have other conventions ...

For the germans:
https://de.wikipedia.org/wiki/2-mal-12-Stunden-Z%C3%A4hlung

HTH,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Oscilliscope Control

2015-03-22 Thread Marc Santhoff
On So, 2015-03-22 at 08:25 -0500, Paul Breneman wrote:
 On 03/21/2015 03:56 PM, Michael Thompson wrote:
  G'day,
 
  Over on the forum someone is asking for an oscilloscope control. That
  vaguely reminded me of something, so I went looking...

What do you mean wy saying oscilloscope control, are you searching for
steering the device on your desk or do you need a visual control
containing x-y-graph and some knobs?

The latter is very easy and fast to do yourself, I did once for testing.

 I've been looking around for a while to find out what is available for 
 an educational project (easy and inexpensive).  I'm looking for 
 something that will work with comedi.  Look at the *very* interesting 
 place where I found Free Pascal and Lazarus source code over a year ago 
 (links on this page):
http://controlpascal.com/comedi.htm

I like that one, but comedi is much to OS dependant and I'll never port
it to any other OS.

 I also got involved in this (expensive) oscilloscope project last year:
http://controlpascal.com/picoscope.htm

Pretty cool, thanks. Do you know if that code ist working with smaller
picoscopes, like the 3000- or 4000-series devices?

Another place to keep eyes on, especially for the cheaper kind of
hardware:

http://sigrok.org/
http://sigrok.org/wiki/Supported_hardware

HTH,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Oscilliscope Control

2015-03-22 Thread Marc Santhoff
On Mo, 2015-03-23 at 06:50 +1300, Michael Thompson wrote:
 On 23 March 2015 at 06:00, Marc Santhoff m.santh...@web.de wrote:
 
  On So, 2015-03-22 at 08:25 -0500, Paul Breneman wrote:
   On 03/21/2015 03:56 PM, Michael Thompson wrote:
G'day,
   
Over on the forum someone is asking for an oscilloscope control. That
vaguely reminded me of something, so I went looking...
 
  What do you mean wy saying oscilloscope control, are you searching for
  steering the device on your desk or do you need a visual control
  containing x-y-graph and some knobs?
 
 
 (and similar question from Mark Morgan Lloyd)
 Correct, I should have been clearer.  Visual control required only - no
 hardware control. I wanted to check out that ISA project as I was hoping
 for a disconnect between the hardware interface and the visual interface.
 
 As far as requirements in this instance go, new information has come to
 light for the forum user - looks like TAChart will suit them fine.

Exactly, using TAChart it's really easy to get get the x-y-plot working,
which is the most complicated task. Adding some buttons, sliders or
whatever for the rest is fun. :)

Sadly I cannot publish the project I've done, although it is pretty
small. But if you're working at it I will be able to post some pieces of
code to get you started.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Filling ListBox without triggering OnSelectionChange

2015-01-09 Thread Marc Santhoff
On Do, 2015-01-08 at 11:40 +0100, Bart wrote:
 On 1/7/15, Marc Santhoff m.santh...@web.de wrote:
  Hi,
 
  it has been a very long time since I've programmed GUIs. I have
  forgotten how to fill a ListBox without having the event handler
  OnSelectionChange executed.
 
 When I fill a listbox with items, there is no OnSelectionChange executed at 
 all.
 Lazarus 1.3, win32.

Yes, but if it is done in Form.OnCreate is is (here).

 Please show us the code you used to fill the listbox.
 Also please provide Lazars version and widgetset.

Here we go:
fpc 2.6.2
Lazarus 1.2.0, x86_64-gtk2
FreeBSD 9 amd64

I have simply made a new gui project, put some components on the form
and assigned the jhandlers by double clicking the object inspectors
event field.

Then I wrote this code:

snip

const
  taskmax = 2;

  tasks: array [0..taskmax] of string = (
'Tudies',
'Tudas',
'Sonstwas'
);

implementation

procedure TForm1.FormCreate(Sender: TObject);
var
  i: longword;
begin
  tasklist := TStringList.create;
  for i:=0 to taskmax do tasklist.add(tasks[i]);
  ListBox1.Items.Assign(tasklist);
end;

procedure TForm1.ListBox1SelectionChange(Sender: TObject; User:
boolean);
begin
  if (Sender  NIL) then begin
InvokeAction(tasks[(Sender as TListBox).ItemIndex]);
  end;
end;

/snip

InvokeAction() is a method of the same form and does get triggered when
I start the program, having the form in question as its main form. The
first Item in the list is selected.


-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Filling ListBox without triggering OnSelectionChange

2015-01-09 Thread Marc Santhoff
On Fr, 2015-01-09 at 13:31 +0100, Bart wrote:
 On 1/9/15, Marc Santhoff m.santh...@web.de wrote:
 
  Tried that solution already, but it does not help. There must be
  something special later in the form creation chain, that forces
  selection on the listbox and in turn trigger SelectionChange.
 
 Filling at designtime and setting ItemIndex to -1 also shows this behaviour:
 - Itemindex will be 0 at program start
 - OnSelectionChange is fired (with User = True).
 
 Only happens on GTK2
 QT behaves as expected.

I see.

 Filed a bugreport about it: http://bugs.freepascal.org/view.php?id=27276

Thank you!

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Filling ListBox without triggering OnSelectionChange

2015-01-09 Thread Marc Santhoff
On Fr, 2015-01-09 at 11:00 +0100, Bart wrote:
 On 1/9/15, Marc Santhoff m.santh...@web.de wrote:
 
  Yes, but if it is done in Form.OnCreate is is (here).
 
 No, it does not (with fpc 2.6.4/win32)

I'll see next time my Lazarus is updated. If the current version works
with fpc 2.6.2 that could happen immeadiately.

 Workaround would be like:
 
 procedure TForm1.FormCreate(Sender: TObject);
 var
   i: longword;
 begin
   tasklist := TStringList.create;
   for i:=0 to taskmax do tasklist.add(tasks[i]);
   ListBox1.OnSelectionChange := nil;
   ListBox1.Items.Assign(tasklist);
   ListBox1.OnSelectionChange := @ListBox1SelectionChange;
 end;

Tried that solution already, but it does not help. There must be
something special later in the form creation chain, that forces
selection on the listbox and in turn trigger SelectionChange.

If the assignment of OnSelectionChange hanlder is done a bit later, in
FormShow that is, it works as expected.

Maybe something else regarding the creation of forms has changed inside
LCL between Lazarus 1.2 and 1.3.

 If the InvokeAction only is supposed to be as a respons to the user
 clicking, you could also check the User parameter.

Will do.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] GUI design: fixed height panel at bottom

2015-01-07 Thread Marc Santhoff
On Mi, 2015-01-07 at 23:58 -0500, Dmitry Boyarintsev wrote:
 On Wed, Jan 7, 2015 at 11:45 PM, Marc Santhoff m.santh...@web.de wrote:
 
  In principle that approch is working, but seemingly using the align
  property and anchors together produces unexpected results - at least for
  me.
 
 
 In this simple design you don't need to use anchors at all.
 Alignment does it for you.
 If you need a margin from the sides of the form you can use border property
 of each panel.

Well, the question only touches a small detail of a bigger gui. But
Thinking about your answer I learned to use align'ment for simple
relations of only two components in one container and use anchors only
at inner levels where more complex relations between three or more
components have to fit in one container (TPanel). Sounds useful and more
simple, I'll go that way.

Thanks!

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] GUI design: fixed height panel at bottom

2015-01-07 Thread Marc Santhoff
On Mi, 2015-01-07 at 23:32 -0500, Dmitry Boyarintsev wrote:
 The bottom panel should have alignment alBottom. The top panel shoud have
 alClient

In principle that approch is working, but seemingly using the align
property and anchors together produces unexpected results - at least for
me.

Are those two designed to work together?
Currently I observe them as one or the other.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Filling ListBox without triggering OnSelectionChange

2015-01-07 Thread Marc Santhoff
On Mi, 2015-01-07 at 10:36 +0100, A. Fortuny wrote:
 Le 7/01/2015 07:49, Marc Santhoff a écrit :
  Hi,
 
  it has been a very long time since I've programmed GUIs. I have
  forgotten how to fill a ListBox without having the event handler
  OnSelectionChange executed.

 I've had the same problem for years, until I invented my method:
 - fill in the two events OnEnter and OnExit for the control
 - generate the code for the OnSelectionChange event and drop immediately 
 the event in the component explorer
 - manually fill in the following code in the three envents:
 
 TMyForm.MyComponentEnter(Sender: TObject);
 begin
MyComponent.OnSelectionChange := MyComponentSelectionChange;
 // do the same for all other events you want to drive
 end
 
 TMyForm.MyComponentSlectionChange(Sender: TObject; ...);
 begin
// do whatver to do when the event fires
 end
 
 TMyForm.MyComponentExit(Sender: TObject);
 begin
MyComponent.OnSelectionChange := nil
 end
 
 Of course you can control any firing event using the OnEnter and OnExit 
 events of the control. This allows the program to fire events only when 
 the user enters the control.
 I think that GUI's  lack a control property wich indicates whether the 
 events should always fire or fire only when the user enters the control.

Yes, assigning the event handler does work, if it is done in OnActivate.
When done in OnCreate of the form there must be some actions afterwards
setting the selection, And it is possible to set the ItemIndex to -1 for
deselecting the first item having the selection on start. Beautiful.

procedure TForm1.FormCreate(Sender: TObject);
var
  i: longword;
begin
  tasklist := TStringList.create;
  for i:=0 to taskmax do tasklist.add(tasks[i]);
  ListBox1.Items.Assign(tasklist);
end;

procedure TForm1.FormActivate(Sender: TObject);
begin
  ListBox1.ItemIndex := -1;
  ListBox1.OnSelectionChange := @ListBox1SelectionChange;
end;

Thank you!

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Filling ListBox without triggering OnSelectionChange

2015-01-07 Thread Marc Santhoff
On Mi, 2015-01-07 at 09:32 +, Howard Page-Clark wrote:
 On 07/01/2015 06:49, Marc Santhoff wrote:
  Hi,
 
  it has been a very long time since I've programmed GUIs. I have
  forgotten how to fill a ListBox without having the event handler
  OnSelectionChange executed.
  How can it be done?
 
 ListBox1.Items.Assign(someStringlist);
 
 does not trigger the OnSelectionChange event.

Well, for me it does. Using Lazarus 1.2.0 and fpc 2.6.2, that is. Maybe
there has been a change in a later version of LCL?

No, from what I've seen right now the form creation sequence does it at
a later time.

Thanks for pointing out.

-- 
Marc Santhoff m.santh...@web.de




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


[Lazarus] GUI design: fixed height panel at bottom

2015-01-07 Thread Marc Santhoff
Hi,

as the subject line says, I want to have a panel attached to the bottom
and the sides of a form, which is pretty easy to to using the anchor
editor.

What I can't do is make this panel fixed height. Setting it's propety
height in OnREsize of the form doesn't work, I think the other anchors
reset the height according to their rules.

The panel will hold some components visible in any case, while the rest
of the for above (in another panel) will show a set of varying
components depending on context.

How can this be made?

-
|   |
|   |
|   |
|height varying when form resized   |
|   |
|   |
|   |
|---|
|   |
|   height fixed|
|   |
-

-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] Filling ListBox without triggering OnSelectionChange

2015-01-06 Thread Marc Santhoff
Hi,

it has been a very long time since I've programmed GUIs. I have
forgotten how to fill a ListBox without having the event handler
OnSelectionChange executed.

I have tried (Un)LockSelectionChange on the list, setting ItemIndex to
-1, all in the forms create method. I've tried using add() or assign()
on the listbox's Items, nothing helps.

The wiki on TListBox doesn't say anything on this topic, neither does
the LCL help document.

How can it be done?

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] file name encoding

2014-12-15 Thread Marc Santhoff
On Mo, 2014-12-15 at 19:58 +0100, Bart wrote:
 On 12/14/14, Marc Santhoff m.santh...@web.de wrote:
 
  When reading directories and files using FindFirst()/FindNext() using
  system encoding my program hangs on german 'ß' (eszett).
 
 Did you try FindFirstUtf8/FindNextUtf8?

No, I didn't. I thought about using SysToUTF8 when reading, but when I'm
sure the system file names are not encoded UTF-8 that would have been
rather senseless. It don't know exactly, but any non ascii char would
have been encoded wrongly, wouldn't it?

I'll check that out of curiosity ... ;)

Thanks.
-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] file name encoding

2014-12-15 Thread Marc Santhoff
On Mo, 2014-12-15 at 21:14 +0100, Marco van de Voort wrote:
 On Sun, Dec 14, 2014 at 05:21:15PM +0100, Marc Santhoff wrote:
  hopefully this is not too far OT i dare to ask:
  
  When reading directories and files using FindFirst()/FindNext() using
  system encoding my program hangs on german '?' (eszett).
  
  I'm using fpc 2.6.2 and lazarus 1.2.0, so string encoding should
  normally be the same as the system encoding. On the console nothing is
  wrong, but in an xterm it fails.
 
 I can't imagine why it would go wrong, findfirst/findnext in 2.6.x are afaik
 binary, without encoding conversion. 
 
 Did you try to strace it ?

No, not yet. I wanted to avoid hours of strace or debugging sessions
with the chance of making a very dump known error. While waiting I
kicked out some other bugs in my code and today ... it can't be
reproduced.

When the error has been occuring it reproducably failed hanging in the
xterm on the char 'ß', verified by renaming the first file with that
char in the name and seeing the program hang on the second one. I had to
use CTRL-c to stop it. Other german chars, 'umlauts', where working fine
although being written to the xterm using a wrong char set.

The bugs fixed afterwards have no relation to encoding. One of them was
handing the wrong container to a deeper recursion level, but there are
no dangerous pointer handlings or similar involved. Only plain type
checked class instances, none of them got lost, only the wrong one was
filled with data. I have no idea what happened.

Sorry for the noise and thank you!

-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] file name encoding

2014-12-14 Thread Marc Santhoff
Hi,

hopefully this is not too far OT i dare to ask:

When reading directories and files using FindFirst()/FindNext() using
system encoding my program hangs on german 'ß' (eszett).

I'm using fpc 2.6.2 and lazarus 1.2.0, so string encoding should
normally be the same as the system encoding. On the console nothing is
wrong, but in an xterm it fails.

The encoding difference between consol and xterm is only:

XTERM_LOCALE=de_DE.ISO8859-15

and the termcap var belonging to it.

OS is FreeBSD 9.1-STABLE amd64

Complete locale settings:

console:
LC_CTYPE=de_DE.ISO8859-15
LC_COLLATE=de_DE.ISO8859-15
LC_TIME=de_DE.ISO8859-15
LC_NUMERIC=en_US.ISO8859-1
LC_MONETARY=de_DE.ISO8859-15
LC_MESSAGES=en_US.ISO8859-1

xterm:
TERMCAP=xterm|X11 terminal emulator:...
XTERM_LOCALE=de_DE.ISO8859-15
LC_MESSAGES=en_US.ISO8859-1
LC_CTYPE=de_DE.ISO8859-15
LC_TIME=de_DE.ISO8859-15
LC_COLLATE=de_DE.ISO8859-15
LC_NUMERIC=en_US.ISO8859-1
LC_MONETARY=de_DE.ISO8859-15

What is the exact problem here and how can it be solved?

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] FPC/Lazarus on non-x86 BSD

2014-04-26 Thread Marc Santhoff
On Sa, 2014-04-26 at 13:22 +, Mark Morgan Lloyd wrote:
 Marco van de Voort wrote:
  On Wed, Apr 23, 2014 at 08:38:14AM +, Mark Morgan Lloyd wrote:
  I'm exploring alternatives to Debian on SPARC. One of the obvious ones 
  is BSD which (I presume) will need some cross-builds to get FPC going.
  
  No, you will need to port FPC to those targets. The BSD rtls are afaik not
  Sparc ready.  (though there is not that much architecture dependent, and
  much can be copied from Linux I guess).
   
  Can anybody comment on /which/ BSD variant is likely to add fewest 
  problems to my heap?
  
  FreeBSD is generally more advanced, but Netbsd and openbsd are usually more
  non x86 friendly. However that is old sentiment, I don't know the current
  situation.
 
 Thanks, I'm not sure which direction I'm heading since Debian Wheezy 
 on SPARC is badly broken (e.g. FireFox/IceWeasel won't run). I'll be 
 trying Sid next to see if there's any hope at all, after that possibly 
 revisiting Solaris followed by Gentoo and possibly xBSD.

I'm using FPC  Lazarus on FreeBSD, too. It's nice to have a precompiled
binary for FPC and Laz at hand if something won't work. I can't speak
for SPARC though, but you can look there:

http://www.freebsd.org/platforms/sparc.html

Maybe other BSDs have better support (Tier 1 in FreeBSD terms).

Lastly you need to get the compiler working on your OS/CPU-combination,
as Marco mentioned ...

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] lfm file format

2014-04-06 Thread Marc Santhoff
On So, 2014-04-06 at 03:23 +0200, Mattias Gaertner wrote:
 On Sun, 06 Apr 2014 00:49:45 +0200
 Marc Santhoff m.santh...@web.de wrote:
 
  On Sa, 2014-04-05 at 12:23 +0200, Mattias Gaertner wrote:
   On Sat, 05 Apr 2014 12:06:20 +0200
   Marc Santhoff m.santh...@web.de wrote:
   
Hi,

ist there a complete documentation of Lazarus' LFM xml file format?
   
   No.
   If someone wants to start one I will help.
   Note: The xml format has not yet implemented all features.
  
  Oops, I confused something. I silently assumed .lfm's are stored in XML,
  but they are not. In fact the storage format is someting like XML
  without tags but python-like syntactical indentation.
 
 Yes.
 
  
  Now I'm confused. When and how is XML used to store form descriptions?
 
 Some people use it. The IDE does not.

I see.

  What use cases is it made for?
 
 Some people prefer xml.
 
  
  What I really want to do is to write some form descriptions (and code)
  by a generator program. If there is any existing code that can be reused
  it would be very helpful.
 
 This is too vague. What do you want to achieve?

I'm thinking about a programm that:
- opens a database
- generates form and source for each table
- uses mapping db-type - gui component
- uses configuration

If you ever used the Database Form Wizard/Assistant of Openoffice you
know what I want. Not exctly that way, but in result a basic form that
can be trimmed to fit by hand afterwards.
 
Maybe someone having good knowledge of the IDE source code can name the
unit(s) where writing and reading forms is handled?
   
   xml driver reader/writer:
   components/lazutils/laz_xmlstreaming.pas
   
   Component streaming in general:
   unit classes, see TReader/TWriter
   
   IDE additions:
   designer/jitforms.pp
  
  So for not generating form code myself I would learn to use jitforms
  unit. Do you see any problems in writing the code to a file instead of
  using it like in lazarus' desing mode?
 
 The jitforms unit is only useful if you want to write a form designer,
 which can load arbitrary forms with unknown classes.
 Normal loading/saving only needs the stuff of the RTL+LCL.

OK.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] lfm file format

2014-04-06 Thread Marc Santhoff
On So, 2014-04-06 at 21:03 +0200, Michael Van Canneyt wrote:
 
 On Sun, 6 Apr 2014, Marc Santhoff wrote:
 
  by a generator program. If there is any existing code that can be reused
  it would be very helpful.
 
  This is too vague. What do you want to achieve?
 
  I'm thinking about a programm that:
  - opens a database
  - generates form and source for each table
  - uses mapping db-type - gui component
  - uses configuration
 
  If you ever used the Database Form Wizard/Assistant of Openoffice you
  know what I want. Not exctly that way, but in result a basic form that
  can be trimmed to fit by hand afterwards.
 
 Yes !
 
 Please consider donating that to Lazarus :)

I thought about it, could be a good idea to get help.

 If you do, here some ideas:
 - Allow both grid/detail form.

Try the Wizard of Openoffice, the third (or so) step let's the user
switch between
- grid
- label above input field
- label in front of input field
- flating left to right, top to bottom (I'm not interested in this)

 - Let the user control to some extent the kind of control that is generated.

See mapping above. I was thinking about a type-component list to use at
generation time.

 - Having the ability to specify lookup controls for foreign key fields are 
 important.
That may include creating a new dataset that fetches data from the 
 referenced table.

I know, that's what e.g. Butler (java, on sourceforge) does. Not sure if
this is too much work for a first start.

 I have created such a wizard for Delphi (closed source) and it really helps 
 creating 
 forms very quickly. Having this available in Lazarus would be a real asset.

To reduce workload my idea is to have a standalone program. This saves
me from learning Lazarus' internals and wizard API. Maybe someone else
could take this task somewhen.

Currently I'm only in a pre-planning phase, my goal know is to check how
much work this would be, because it's a spare time effort.

[I knew I would open a can of worms ;)]

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] lfm file format

2014-04-06 Thread Marc Santhoff
On So, 2014-04-06 at 21:37 +0200, Marc Santhoff wrote:

 - flating left to right, top to bottom (I'm not interested in this)
floating


 Currently I'm only in a pre-planning phase, my goal know is to check how
   now


-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] lfm file format

2014-04-05 Thread Marc Santhoff
Hi,

ist there a complete documentation of Lazarus' LFM xml file format?

Maybe someone having good knowledge of the IDE source code can name the
unit(s) where writing and reading forms is handled?

TIA,
Marc

-- 
Marc Santhoff m.santh...@web.de


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


  1   2   3   >