Re: [Lazarus] Built console app on Linux, but won't run on another Linux machine

2018-10-29 Thread Martin Schreiber via Lazarus
On Sunday 28 October 2018 17:25:45 Bo Berglund via Lazarus wrote:
> On Sun, 28 Oct 2018 09:24:40 +0200, Juha Manninen via Lazarus
>>I personally would just copy the needed indy units into my project
>>subdirectory and add them to the project. If any of those units
>>require LCL, the project will not compile. Simple, ha?
>
> Well, years ago I tried that with Delphi, but it turned out that the
> units needed expanded from the first one since they are interdependent
> so in the end I used environment variables to direct the Delphi
> compiler to the correct Indy10 dirs where all files were collected.
> Different IDE paradigm of course
>
As Juha writes, using NoGUI is a hack. You should find out which units pull in 
LCL and remove them. Different ways how to find out which units are affected 
already have been described in this thread, please read again.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Built console app on Linux, but won't run on another Linux machine

2018-10-28 Thread Martin Schreiber via Lazarus
On Sunday 28 October 2018 08:24:40 Juha Manninen via Lazarus wrote:

> I personally would just copy the needed indy units into my project
> subdirectory and add them to the project. If any of those units
> require LCL, the project will not compile. Simple, ha?

Or add the Indy *.ppu directory as a -Fu parameter without using Indy 
packages?
https://mseide-msegui.sourceforge.io/pics/indypath.png

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Built console app on Linux, but won't run on another Linux machine

2018-10-28 Thread Martin Schreiber via Lazarus
On Sunday 28 October 2018 00:44:17 Bo Berglund via Lazarus wrote:
>
> But when I tried to build the project it complained that it could not
> find Interfaces, so I remembered that this is supplied by LCL, so I
> tried adding LCL back to the project required packages.
> Then the project built OK.

Why don't you do what I suggested in order to find out which unit pulls in the 
interfaces and gtk2 dependency?

In order to get the MSEunitdep tool do:
"
git clone https://gitlab.com/mseide-msegui/mseide-msegui.git
cd mseide-msegui
fpc -Fulib/common/* -Fulib/common/kernel/linux tools/unitdep/mseunitdep.pas
"
A work of less than a minute.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Built console app on Linux, but won't run on another Linux machine

2018-10-27 Thread Martin Schreiber via Lazarus
On Saturday 27 October 2018 14:32:38 Bo Berglund via Lazarus wrote:
>
> That is the problem, I don't know how to remove a dependency like
> this...
>
Another option:
- Compile the project with -vu, copy the message to a file.
- Analise the file with the MSEunitdep tool from here:
https://gitlab.com/mseide-msegui/mseide-msegui/tree/master/tools/unitdep
- Setup 'Start Unit' and 'Dest- Unit' in order to check the dependency path, 
see the screenshot:
https://mseide-msegui.sourceforge.io/pics/mseunitdep.png

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Scaling of menuitem icons

2018-10-14 Thread Martin Schreiber via Lazarus
On Saturday 13 October 2018 22:08:59 Juha Manninen via Lazarus wrote:
>
> I wanted to take a screenshot but the IDE's menus always close when
> Spectacle (screeshot app) takes it.

Do you use a delay?
https://userbase.kde.org/Spectacle#Screenshot_delay

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Trying to install Lazarus with fpc setup for debugging its libraries.

2018-06-01 Thread Martin Schreiber via Lazarus
On Friday 01 June 2018 21:03:15 Donald Ziesig via Lazarus wrote:
> I needed to compile fpc and the rtl and fpl libraries for debugging so I
> downloaded the sources from SourceForge.
>
> I built fpc from the sources (with -gl flag for debugging - it runs)

Please don't forget -O-.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to debug DB errors.

2018-05-30 Thread Martin Schreiber via Lazarus
On Wednesday 30 May 2018 18:44:12 Donald Ziesig via Lazarus wrote:
> I am now going to uninstall Lazarus and FPC and re-installing it from
> scratch.  Hopefully that will fix it.  If not, I'll let you know.
>
If the information in the stack window is insufficient in case of an exception 
stop *all* used units including the Free Pascal RTL, FCL and the LCL should 
be compiled with -gl -O-.

If you are on a 64 bit Windows FPC version and there still is no usable stack 
trace compiling with 32 bit FPC may work better.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to debug DB errors.

2018-05-30 Thread Martin Schreiber via Lazarus
On Wednesday 30 May 2018 16:24:30 Donald Ziesig via Lazarus wrote:
> Hi Everyone,
>
> I have been developing database apps for years and I have finally
> reached my limit.  Occasionally I get exceptions in the db code but the
> Call Stack is truncated as is shown below.  I usually just "bite the
> bullet" and single step through the code till I find the offending
> line.  This time, I got an exception after 8 hours of execution.  Is
> there any way that I can set this up so that I get a location in my own
> code?
>
Run the application in the IDE and activate the 'Stop on exception' option in 
IDE. I don't know how it is named in Lazarus, in MSEide it 
is 'Project'-'Options'-'Debugger'-'Stop on Excep.'.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] OI / App crash - components with published interfaces

2018-02-18 Thread Martin Schreiber via Lazarus
On Sunday 18 February 2018 13:16:36 Andreas Friec39f via Lazarus wrote:
> Now i have inserted code in the TIntfComp to remove the link to the
> interface
>
> 
>
> destructor TIntfComp.Destroy;
> begin
>    FObjectHasInterface := nil;  // <<-- Crahe here now
>    inherited Destroy;
> end;
> 
>
> And now i it crash explicitly  at the line wher i try to 'unlink'. And
> the Callstack from Lazarus give me some information. The setting to nil,
> call fpc_intf_assign and  call IUnknown(D)._Release. But this is
> absolutly unwated (and unexpected) for me here.
>
I did not read the whole thread.
If you want to set a COM interface pointer to nil without calling _release() 
use 
"
 pointer(FObjectHasInterface):= nil;
"
It is very difficult or even impossible in Delphi and FPC to reliable mix 
reference counted COM interfaces with TComponent/TObject life cycle 
management. If you need interfaces without reference counting use CORBA 
interfaces.
Never use COM-interface variables if there are TObject.Destroy() calls. It is 
an undefined "implementation detail" when the interface variable goes out of 
scope, there is a risk that it goes out of scope and _release() will be 
called after the according object has been destroyed by a TObject.Destroy() 
call.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-05 Thread Martin Schreiber via Lazarus
On Tuesday 05 December 2017 13:01:43 Michael Schnell via Lazarus wrote:
> On 05.12.2017 12:16, Martin Schreiber via Lazarus wrote:
> > What is wrong with TDBGrid???
>
> As I quoted, Graeme claims it's slow.
>
I doubt it. At least the MSEgui DB-grids are not slow. DB-grids get the data 
from dataset field buffers for the visible rows only, for strings it means to 
fetch a UnicodeString by copying a pointer.
TDBWidgetGrid has columns where the placed TDB*EditWidget defines the colum 
data type and edit functionality of the column. Any edit widget can build a 
data column, also data-buttons, lookup-dropdown-widgets, images, sliders, 
dialog widgets...
TStringGrid on the other hand needs a local copy of the whole recordset which 
looks suboptimal and it has limited functionality without additional 
programming and endless StrTo*() and *ToStr() conversions.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-05 Thread Martin Schreiber via Lazarus
On Tuesday 05 December 2017 09:41:30 Michael Schnell via Lazarus wrote:
>
> While for perfect performance / clearness / portability / ... , DBGrid
> supposedly should not be used in a production release, it might be very
> helpful when designing an application.
>
What is wrong with TDBGrid???

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-04 Thread Martin Schreiber via Lazarus
On Tuesday 05 December 2017 00:50:19 Graeme Geldenhuys via Lazarus wrote:
> On 2017-12-02 14:48, Marcos Douglas B. Santos via Lazarus wrote:
> > I think you misunderstand me. I said "RAD is the best way to code a
> > GUI", the visual part, not the business rules.
>
> For that you just need a visual form designer. RAD normally entails a
> whole lot else like hooking into events (in the UI), live view of data
> in form designer (using eg: a TDBGrid) etc.
>
> > I don't use db-aware — well only TDBGrid just to show data
>
> And DBGrid behaves slightly different to TStringGrid, and is slow. Many
> DB-aware components behave slightly different to the non DB-aware
> versions. Why two sets of basically the same component? Yet another
> layer of components that can contain bugs. With Model-GUI-Mediator you
> use the standard components only, and the mediators are literally just a
> few lines of code. The rest of MGM (at least the implementation in
> tiOPF) is all non-GUI and well unit tested.
>
This also is your opinion, I don't think you are so absolutely right as your 
statements allways sound. :-)
In MSEgui the DB-components work very well, are convenient and fast and 
provide much more possibilities than a TStringGrid. And there is no overhead 
and limitations and additional complexity by an additional layer like 
tiOPF. ;-)

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-01 Thread Martin Schreiber via Lazarus
On Friday 01 December 2017 09:47:04 Michael Schnell via Lazarus wrote:
> On 01.12.2017 08:22, Martin Schreiber via Lazarus wrote:
> > For me Delphi is not the best RAD environment and therefore
> > developments made with Delphi should not be used to disqualify RAD as
> > a whole.
>
> Which are there other than Delphi and its siblings ?
>
Apparently MSEide+MSEgui which is no Delphi sibling. ;-)

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-11-30 Thread Martin Schreiber via Lazarus
On Friday 01 December 2017 08:01:06 Graeme Geldenhuys via Lazarus wrote:
> On 2017-12-01 06:42, Martin Schreiber via Lazarus wrote:
> > That is your opinion, my opinion is that RAD is the most productive
> > development technology for most of the projects if done right,
>
> And your last 3 words is the most important part - "if done right". In
> my 20+ years of using Delphi, I can count of one hand how many company
> products I've seen "done right" using the RAD style approach. And I've
> worked at plenty of companies in that 20+ years. It seems "if done
> right" is a near impossibility for most Delphi developers.
>
For me Delphi is not the best RAD environment and therefore developments made 
with Delphi should not be used to disqualify RAD as a whole.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-11-30 Thread Martin Schreiber via Lazarus
On Friday 01 December 2017 00:30:05 Graeme Geldenhuys via Lazarus wrote:
> On 2017-11-30 11:46, Michael Schnell via Lazarus wrote:
> > Nonetheless, IMHO RAD is a great way to start programming, as you
> > immediately and painlessly can see (visualize) what your "business
>
> RAD should only be used for prototyping. ie: once the prototype is done
> and not needed, bin the code. And don't be fooled thinking small utility
> apps are great for RAD too. Once that utility get traction, feature get
> added, the thing grows like wild-fire and you are in a sh*t storm once
> again. Even "small" utilities can do with a good design and business
> logic separation.
>
> It might sound harsh, but boy will you save yourself from headaches
> years down the line when your application has grown to multi-million
> lines of code.
>
That is your opinion, my opinion is that RAD is the most productive 
development technology for most of the projects if done right, separating of 
GUI and business logic is perfectly possible with RAD.
For me MSEide+MSEgui doubled the productivity compared with other tools.
It seems to me because you repeat your statement over and over again you never 
made a RAD development "right" with the right tools. ;-)
And the often heard statement that RAD should not be used because it is 
possible to write bad applications with RAD applies to every other design 
methology too.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-11-26 Thread Martin Schreiber via Lazarus
On Sunday 26 November 2017 14:53:54 Stéphane Aulery via Lazarus wrote:
> Hello,
>
> On Thu, Nov 23, 2017 at 04:23:19AM +0200, Kostas Michalopoulos via Lazarus 
wrote:
> > My main motivation is wanting to get away from the modern madness of
> > GTK3+/Qt5+/Wayland and all that stuff and their dependencies but i'd
> > rather not rewrite in C all the tools and library code i wrote in
> > Lazarus, so a custom widgetset that relies only on Little Forms (which
> > itself makes an effort to rely only on libX11 with an optional Xft
> > dependency) sounds ideal.
>
> You could give a try to fpGUI Toolkit :
>
> http://fpgui.sourceforge.net/
>
or MSEide+MSEgui:
https://sourceforge.net/projects/mseide-msegui/
Just released version 4.6.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Delphi, Kylix or Lazarus multi-form DB app example

2017-10-05 Thread Martin Schreiber via Lazarus
On 10/05/2017 11:09 AM, Graeme Geldenhuys via Lazarus wrote:
> Hi,
> 
> I'm just curious. Kylix and Delphi (at least v7) comes with excellent
> documentation and quite a few example projects. But not a single DB
> example shows a multi-form database application.

Here is a Free Pascal RAD-style multi-form DB project for Firebird 3:
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/kicad/bom

It strictly separates GUI and business logic, in practice one probably
would be less strict...

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running Unit tests for all projects

2017-07-19 Thread Martin Schreiber via Lazarus
On Wednesday 19 July 2017 15:08:55 Marcos Douglas B. Santos via Lazarus wrote:
> On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus
>
> <lazarus@lists.lazarus-ide.org> wrote:
> > Screenshot:
> > http://mseide-msegui.sourceforge.net/pics/mserun.png
> > Binaries:
> > https://sourceforge.net/projects/mseuniverse/files/mserun/
> > Source:
> > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun
>
> Hi Martin,
> It looks like it's about Git, not about testing... right?
>
Why do you think so? The screenshot shows the unittests of MSElang.
Another screenshot which shows the run to create MSE* releases.
http://mseide-msegui.sourceforge.net/pics/mserun1.png

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Running Unit tests for all projects

2017-07-19 Thread Martin Schreiber via Lazarus
On Wednesday 19 July 2017 14:43:02 Marcos Douglas B. Santos via Lazarus wrote:
> On Tue, Jul 18, 2017 at 11:11 AM, Graeme Geldenhuys via Lazarus
>
>  wrote:
> > On 2017-07-18 14:42, Marcos Douglas B. Santos via Lazarus wrote:
> >
> > MSEide+MSEgui has such a tool in its MSEUniverse repository. It's a bit
> > cryptic to use (and no help as always), but once you get the gist of
> > things (Martin will surely lend a hand explaining things) it works pretty
> > well.
>
> Thanks, I'll take a look.
>
Screenshot:
http://mseide-msegui.sourceforge.net/pics/mserun.png
Binaries:
https://sourceforge.net/projects/mseuniverse/files/mserun/
Source:
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus and Windows 10 IoT

2017-03-22 Thread Martin Schreiber via Lazarus
On Wednesday 22 March 2017 14:19:43 LacaK via Lazarus wrote:
>
> If not, is there possibility to create same application for Raspberi Pi
> - ARM - Linux ?
> (Target OS=Linux, Target CPU=Arm ? ... can I crosscompile from
> Linux/i386 to Linux/Arm ?)
>
Yes:
https://www.mail-archive.com/mseide-msegui-talk@lists.sourceforge.net/msg08750.html

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Does anybody know a TStrinGrid-Component capable of sorting Date. Time, Float ...

2017-02-13 Thread Martin Schreiber via Lazarus
On Monday 13 February 2017 20:25:48 John Landmesser via Lazarus wrote:
> Hi,
>
> i searched some time for such a component ... in vain!
>
> So i developed myself a TStringGrid,  that sorts columns with TDate,
> TTime, TFloat ...
>
TWidgetGrid from MSEgui supports it. There TDataEdit descendendants 
(TStringEdit, TRealEdit, TDateEdit...) can be placed in the grid and build a 
column of the given type. TwidgetGrid does not inherit from TStringGrid but 
from TCustomGrid. There is also TDBWidgetGrid which connects to a 
TDatasource.

The code is here:
https://gitlab.com/mseide-msegui/mseide-msegui

> I can't believe that this doesn't allready exists for Lazarus?!
>
The implementation is very complex...

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Teaching Pascal at College

2017-01-16 Thread Martin Schreiber via Lazarus
On Sunday 15 January 2017 15:30:44 Martin Vahi via Lazarus wrote:
>
> I haven't used Lazarus yet, I need to learn it,
> but during the development of my own
> JavaScript GUI library I have came to a conclusion
> that GUI-s are inherently something that require
> "dynamic programming" or the code gets really bloated.
>
That's the reason why systems like Lazarus, fpGUI and MSEide+MSEgui have been 
invented. ;-)
You really should try them.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Memo.Lines.Add seems to be slow with Lazarus 1.6

2016-11-06 Thread Martin Schreiber via Lazarus
On Monday 07 November 2016 00:39:51 Graeme Geldenhuys via Lazarus wrote:
> On 2016-11-06 15:45, zeljko via Lazarus wrote:
> > No, I don't know any widgetset which supports different font color/style
> > for texthint.
>
> fpGUI does - for some years now. ;-) I also implemented a specific
> colour alias constant (clPlaceholderText) and alias font name, to make
> it easier to customise in user-defined custom style classes.
>
Marketing is the most important task in software development, so here what 
MSEgui provides:
http://mseide-msegui.sourceforge.net/pics/empty_text.png

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Teaching Pascal at College

2016-10-25 Thread Martin Schreiber via Lazarus
On Monday 24 October 2016 19:53:21 Mehmet Erol Sanliturk via Lazarus wrote:
>
>
> My opinion is that event based programming needs special care .
> A simulation example may be useful , for example , by using PetriSim
> sources , adapted to Free Pascal .
>
The last chapter of "Programmieren macht Spass!" is a lift simulation:
http://mseide-msegui.sourceforge.net/pics/aufzug.mpeg

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Teaching Pascal at College

2016-10-21 Thread Martin Schreiber via Lazarus
On Friday 21 October 2016 13:26:13 Lars via Lazarus wrote:
> On Fri, October 21, 2016 2:11 am, Martin Schreiber via Lazarus wrote:
> > On Friday 21 October 2016 09:51:38 Lars via Lazarus wrote:
> >> I'm not so sure event driven programming is a must to become a
> >> competent programmer, I would have to think about that.
> >
> > "Event driven" probably means that there is an event queue with a central
> >  toolkit-main-eventloop which dispatches the events instead a program
> > specific flow control.
>
> What about a pure win32 API app written in C.  Do you essentially reinvent
> your own event system using callbacks with program flow control? Or the
> win32 api has an event system in its api itself?

Win32 API works with message queues.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Teaching Pascal at College

2016-10-14 Thread Martin Schreiber via Lazarus
On Friday 14 October 2016 13:08:13 Mehmet Erol Sanliturk via Lazarus wrote:

>
> In previous years
>
> https://sourceforge.net/projects/mseide-msegui/
>
> was limited to Linux .

MSEide+MSEgui runs on Windows and Linux from start at 1999. Since several 
years it runs on FreeBSD too.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Teaching Pascal at College

2016-10-14 Thread Martin Schreiber via Lazarus
On Friday 14 October 2016 10:50:28 Michael Schnell via Lazarus wrote:
>
> With a more careful design it's absolutely possible to do "non RAD"
> programs by doing "GUI units" and "business code Units" that interact
> via Objects with functions, properties and events (callback-properties) .
>
Separating GUI and program logic is also possible with RAD. See for example 
MSEkicadBOM, the application I am currently working on.
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/kicad/bom
It is a component and footprint database program for KiCad.

It consists of a datamodule with the program logic and the database and action 
components:
http://mseide-msegui.sourceforge.net/pics/kicadbommainmo.png

a mainform with the mainmenu, GUI actions and the main datagrid:
http://mseide-msegui.sourceforge.net/pics/kicadbommainfo.png

and several editforms:
http://mseide-msegui.sourceforge.net/pics/kicadbomcomponented.png

The editforms inherit from a common base editform with base functionality 
(datasource, navigator, timestamp display, window close logic...) and have no 
or GUI-code only. The connection GUI<>datamodule is made with TDataSource, 
action- and ifi-dataendpoint-components.

If done right the RAD-approach is productive and convenient, the projects are 
easily extendable and maintainable.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Teaching Pascal at College

2016-10-13 Thread Martin Schreiber via Lazarus
On Thursday 13 October 2016 16:27:44 Martin Schreiber wrote:

A better screenshot who shows what the binary value displays do:
http://mseide-msegui.sourceforge.net/pics/rechenkunst.png

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Teaching Pascal at College

2016-10-12 Thread Martin Schreiber via Lazarus
On Wednesday 12 October 2016 20:10:50 Adrian De Armas via Lazarus wrote:

> Today I had a meeting about doing the module more interesting to the
> students. Currently we teach algorithms making console applications and
> usually I receive questions like "Why don't we do something more modern?".
>
I made such an experiment with Free Pascal and MSEide+MSEgui:

https://sourceforge.net/projects/mseuniverse/files/book/
"programmierspass_0_1.zip" contains the text and example code (German).

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Martin Schreiber via Lazarus
On Tuesday 11 October 2016 16:19:18 Tony Whyman via Lazarus wrote:
> On 11/10/16 15:14, Martin Schreiber via Lazarus wrote:
> >  case i2 of
> >   5,6,8,44,56,57,64: begin
>
> Agree with 5,6, 44, 56, 57 as  two byte character sets.
>
> 8 doesn't seem to exist (at least in my version).
>
> 64 is KOI8U. According to Wikipedia "KOI8-U is an 8-bit character
> encoding, designed to cover Ukrainian, which uses a Cyrillic alphabet.
> It is based on KOI8-R, which covers Russian and Bulgarian, but replaces
> eight graphic characters with four Ukrainian letters Ґ, Є, І, and Ї in
> both upper case and lower case."
>
> It should be the same character width as character set 63 (KOI8R) i.e. 1.

I don't remember from where I got the numbers. Maybe by reading FB-sources or 
reading RDB$BYTES_PER_CHARACTER. On my current FB 2.5 installation "64" 
actually is 1 byte per character, thanks for pointing it out, it allready has 
been fixed in git master.
In MSEgui and the newer ZEOSlib versions the datasize of a string in TDataset 
record buffer is sizeof(pointer). In MSEgui it is a UnicodeString in ZEOS 
IIRC a pointer to a special string record.

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TColor and Alpha channel support

2016-09-26 Thread Martin Schreiber via Lazarus
On Monday 26 September 2016 15:01:04 Graeme Geldenhuys via Lazarus wrote:
> On 2016-09-26 13:52, Martin Schreiber via Lazarus wrote:
> > Or:
> > "
> >  Alpha := ...; // property Alpha: TColor
> > "
> > for alpha per colour channel.
>
> In that case I would make it a record type with RedAlpha, GreenAlpha and
> BlueAlpha: Byte. Why?, Because TColor's range is way to large, with most
> of the acceptable values being meaningless.
>
Using TColor has the advantage that the same mechanism of RGB-lookup 
of "logical" colours as with normal TColor values can be used. TColor with 
the MSB = 0 is a special case where the lower bytes contain the RGB values. 
Simple and efficient.
In MSEgui the MSB defines the kind of the logical color value, "functional" 
(cl_invalid,cl_default..), "mapped" (cl_dkshadow,cl_shadow...), "named RGB" 
(cl_black, cl_dkgray...) and "user".

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TColor and Alpha channel support

2016-09-26 Thread Martin Schreiber via Lazarus
On Monday 26 September 2016 14:25:14 Ondrej Pokorny via Lazarus wrote:
>
> In this case maybe this property pair would be more appropriate (?):
>
> Color := ...;
> Alpha := ...; // property Alpha: Byte
>
Or:
"
 Alpha := ...; // property Alpha: TColor
"
for alpha per colour channel. MSEgui works this way with pixmap opacity. In 
case of pixmaps with simple alpha channel the 8 bit alpha value is (R+G+B) 
div 3.
In MSEgui mask- and color-data of TMaskedBitmap are separate pixmaps with own 
canvas. 

Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus