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

2016-01-26 Thread Fabrício Srdic
2016-01-25 23:09 GMT-02:00 silvioprog :

> But, unfortunatelly, even with this pros, Pascal programmers avoid to use
> external libraries, that's a real fact. :-/
>
>
This issue is not restricted to Pascal programmers, this problem is
inherent in any development platform.

The root problem of using an external library is: when you add an external
dependency on your code, your code becomes constrained by the limitations
of that external dependency. For example, let's suppose you are writing a
code that handles an exotic file format. Your code are supposed to run on
windows. Then you find an external library which solves your problem. Three
months after, your project's requirements changes. The new requirement is
that your code shall run on Linux. However, that external library runs only
on windows. So, your code are constrained by this limitation. Now, you need
to find an alternative solution. Sometimes, none of them are feasible and
this fact can lead your project to fail.

By other side, if you find a solution in pascal, your code are constrained
only by the limitations of the compiler.

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


[Lazarus] Treeview example(s) needed

2016-01-26 Thread Joe Shepherd
Hi

 

I'm having trouble with TTreeView - no doubt due to ignorance. Does anyone have simple example(s) of builing and using a treeview?

 

Here's the sort of ignorance I confess to:

 

I have tv: TTreeview on a form, and code that adds some nodes:

 

       newnode := tv.items.addchild(nil, 'A');
       newnode := tv.items.addchild(nil, 'B');
       newnode := tv.items.addchild(newnode, 'B1');
       newnode := tv.items.addchild(newnode, 'B12');
       newnode := tv.items.addchild(newnode, 'B123');      

 

and that builds a tree OK, schematically like this

 

...A

...B

..B1

.B12

B123 

 

If the treeview option tvoAutoExpand is True, I get the whole tree and can click about the tree and select nodes. But if tvoAutoExpand is False, the tree is (correctly) drawn collapsed, and  clicking to expand (eg node B), or on a node with no children (eg Node A) both result in a SigSegV in include/treeview.inc at line 1590 which is the indicated line here:

 

function TTreeNode.GetLevel: Integer;
// root is on level 0
var
  ANode: TTreeNode;
begin
  Result := 0;
  ANode := Parent;         <<
  while Assigned(ANode) do
  begin
    Inc(Result);
    ANode := ANode.Parent;
  end;
end;  

 

 

Obvioiusly I'm missing a lot but I cannot find any example to dispel the fog. Anyone got one?

 

Joe
-
joe.sheph...@cyberservices.com
Perth, WA, Australia.

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Michael Van Canneyt



On Tue, 26 Jan 2016, Graeme Geldenhuys wrote:


On 2016-01-26 22:39, Mattias Gaertner wrote:

Maybe it would be better to show them in the completion box with
some warning marker.


+1 for that idea.


+ !

Michael.

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


Re: [Lazarus] Printing on Raspberry Pi

2016-01-26 Thread Koenraad Lelong

Op 29-10-15 om 16:24 schreef Koenraad Lelong:

Hi,

I'm trying to print a lazreport on a Raspberry Pi2.
It's not working, I get :
Bus Error or misaligned data access
Press OK to ignore ...

Pressing OK does nothing.

Any suggestions to solve this ?

I also tried the example from
http://wiki.lazarus.freepascal.org/Using_the_printer.

Koenraad.


Hi,

Hopefully someone with more knowledge than me will look into this :
bugtracker issue# 29512

B.T.W. the program from the wiki-page mentioned above does work on the PI.

Koenraad.


--
___
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 silvioprog
On Tue, Jan 26, 2016 at 9:17 AM, Fabrício Srdic 
wrote:

> 2016-01-25 23:09 GMT-02:00 silvioprog :
>
>> But, unfortunatelly, even with this pros, Pascal programmers avoid to use
>> external libraries, that's a real fact. :-/
>>
>>
> This issue is not restricted to Pascal programmers, this problem is
> inherent in any development platform.
>

Well, I disagree. I'm working with other languagens (C - libs, Java -
3rdparty things, and NodeJS - compiled modules), I joined on their
communities, and I find many programmers adopting C libraries there.

The root problem of using an external library is: when you add an external
> dependency on your code, your code becomes constrained by the limitations
> of that external dependency. For example, let's suppose you are writing a
> code that handles an exotic file format. Your code are supposed to run on
> windows. Then you find an external library which solves your problem. Three
> months after, your project's requirements changes. The new requirement is
> that your code shall run on Linux. However, that external library runs only
> on windows. So, your code are constrained by this limitation. Now, you need
> to find an alternative solution. Sometimes, none of them are feasible and
> this fact can lead your project to fail.
>

As I said: "... But the one of the basic steps before chosing a library
(from any language) is read its specification, and know if it provides the
needed features, works in the expected SOs, and provides a good
documentation with a stable support. I need to make a device and it need a
microcontroller, so I found that the best choice is a PIC16F64A because its
datasheet shows all the features and the basic hardware that I need".

...

"... Well, the mostly C libraries work fine in many OSs. One that I use
works in the popular systems (currently I need it just for Windows and
Linux) like GNU/Linux, FreeBSD, OpenBSD, NetBSD, Android, OS X, Win32/64
and special systems like Symbian and z/OS, and it's already available in
some tools like apt, yum, npm, maven, pacman...".


> By other side, if you find a solution in pascal, your code are constrained
> only by the limitations of the compiler.
>

IMHO this isn't a reason, I also can find Pascal code that works only on a
specific SO, and hard to be implemented in other systems, so I prefer to
get some C library that already do it instead of spending a long time
trying to implement it just because "oh, I can't work with libraries". :-)

The main a real reason that I find is: mostly Pascal programmers can't
debug a C libraries. And many Pascal programmers can't use or don't know
how to use shared/static libraries by themselves and can't find time to
know it, but anyway they use external libraries implicitly, when they
declare Pascal units that uses them.

Imagine if Lazarus developers think this same way, they probably would not
have created Lazarus for GTK and Qt. :-)

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


Re: [Lazarus] Bug 28281

2016-01-26 Thread Michael Van Canneyt



On Tue, 26 Jan 2016, Mattias Gaertner wrote:


On Mon, 25 Jan 2016 21:37:16 +0100 (CET)
Michael Van Canneyt  wrote:



Hi,

Any news on bug 29281 ?

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

I can add the following extra info:

if compilation fails, it quite often never detects this and fails to show the 
compiler error.
I need to do a recompile, "abort" the previous build, and then it sometimes 
shows the actual error.


I wonder why it happens only on your platform. Perhaps it is only
triggered by specific stdout/stderr content length and error IDs. This
would explain, why a recompile works, where the output is shorter than
a full compile.


I can reproduce it on 2 machines. One a desktop, one a laptop.
Both run the same Kubuntu version, have more or less the same configuration.

Since my report is marked as related to/duplicate of another, it's not just
me that has this...


Also, I get a 100% failure rate when I press ctrl-F9 when the project
inspector is the active dialog.


I have no idea, how the project inspector could influence the external
tools. I hope it is not some memory corruption.


Maybe the problem is keyboard (keyup/keydown/onkey events) related. 
Keydown caught in project inspector, transferred to mainform (or wherever) for processing, 
keyup caught somewhere else, command again executed.

Something like that.

It doesn't happen when I select the compile item from the run menu. 
That would support this theory.


Anyway, I will test tonight with your new define. 
We'll see where this gets us. Thanks for looking into this.


Michael.

--
___
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 Fabrício Srdic
Em 26/01/2016 11:30, "silvioprog"  escreveu:
>
> As I said: "... But the one of the basic steps before chosing a library
(from any language) is read its specification, and know if it provides the
needed features, works in the expected SOs, and provides a good
documentation with a stable support. I need to make a device and it need a
microcontroller, so I found that the best choice is a PIC16F64A because its
datasheet shows all the features and the basic hardware that I need".
>
> ...
>
> "... Well, the mostly C libraries work fine in many OSs. One that I use
works in the popular systems (currently I need it just for Windows and
Linux) like GNU/Linux, FreeBSD, OpenBSD, NetBSD, Android, OS X, Win32/64
and special systems like Symbian and z/OS, and it's already available in
some tools like apt, yum, npm, maven, pacman...".
>

You are right. However, often we can't prevent when the requirements of our
project will change and what will change. As i have said, you can find a
library that address your problem today, but after some time, your
project's requirements changes and that external dependency becomes a
problem. The problem of cross-platform availability was just an example. A
particular library may have many other kinds of limitations. Very often,
you can't just figure out  which of that limitations may become a problem
in the future.

>
> IMHO this isn't a reason, I also can find Pascal code that works only on
a specific SO, and hard to be implemented in other systems, so I prefer to
get some C library that already do it instead of spending a long time
trying to implement it just because "oh, I can't work with libraries". :-)

I am not against the use of libraries. What i am trying to say is, when you
add an external dependency to your code, your code becomes constrained by
the limitations of that external dependency so, would be better if you can
solve the problem without add a new level constraints to your code.

> The main a real reason that I find is: mostly Pascal programmers can't
debug a C libraries. And many Pascal programmers can't use or don't know
how to use shared/static libraries by themselves and can't find time to
know it, but anyway they use external libraries implicitly, when they
declare Pascal units that uses them.
>
> Imagine if Lazarus developers think this same way, they probably would
not have created Lazarus for GTK and Qt

Why i can't make an Android app using Lazarus, as the free pascal compiler
provides support to it? Is it because there is no GTK to android? And if
the lazarus GUI framework did not depends on external libraries?

The lazarus team did the right thing. They did not stopped to develop the
Lazarus for Unix because "they couldn't use libraries". However, how would
be the actual scenario if the GUI framework of the Lazarus was developed
using just Pascal? Perhaps, I would not currently facing the problem of not
being able to develop an android app using Lazarus provided frameworks.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] CodeTools bug

2016-01-26 Thread Aradeonas
Hi,

It seems CodeTools has a problem with packages that are in address with
"#" in the directory name at least in Windows. It cant find package
units and do auto complete but program will compile and this problem
will happen for only packages and units that are in a folder like this
"c:\test\#dir\package.lpk" . Please someone  test and confirm it.

Regards, Ara

-- 
http://www.fastmail.com - Does exactly what it says on the tin

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


Re: [Lazarus] Bug 28281

2016-01-26 Thread Michael Van Canneyt



On Tue, 26 Jan 2016, Michael Van Canneyt wrote:



I have no idea, how the project inspector could influence the external
tools. I hope it is not some memory corruption.


Maybe the problem is keyboard (keyup/keydown/onkey events) related. Keydown 
caught in project inspector, transferred to mainform (or wherever) for 
processing, keyup caught somewhere else, command again executed.

Something like that.

It doesn't happen when I select the compile item from the run menu. That 
would support this theory.


Anyway, I will test tonight with your new define. We'll see where this gets 
us. Thanks for looking into this.


Uploaded a file.

I had it now during compilation of the IDE itself: it was just stuck.

Looking at the log file, the thread ends normally, which seems to indicate that 
the notification of the end of compilation is somehow not registered ?


Michael.

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


[Lazarus] Code completion question

2016-01-26 Thread Michael Van Canneyt


Hi,

Just curious: if I ask code completion in a class

TMyClass = Class(TMYParentClass)
Protected
  Procedure Valid|

Cursor is at |. I ask the codetools to complete in order to override a 
method in the parent class. 
It doesn't show a procedure that it I KNOW is present in the parent class.


Then it dawned on me: the procedure exists, but is Public. I changed the
visibility to public, and then I got the procedure.

So: 
do the codetools refuse to show identifiers with less restricted visibility ?

(so in a protected section, I will not get public)

Is this intentional ?

I can imagine it is confusing to the beginner and experienced dev alike...

Michael.

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Mattias Gaertner
On Tue, 26 Jan 2016 21:50:43 +0100 (CET)
Michael Van Canneyt  wrote:

> [...]
> do the codetools refuse to show identifiers with less restricted visibility ?
> (so in a protected section, I will not get public)
> 
> Is this intentional ?
> 
> I can imagine it is confusing to the beginner and experienced dev alike...

Please report the bug.

Mattias

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Vojtěch Čihák

Hi,
 
It is a bug? I know this behaviour for a long time and I always believed it is 
by design.
 
V.
__

Od: Mattias Gaertner 
Komu: 
Datum: 26.01.2016 22:46
Předmět: Re: [Lazarus] Code completion question


On Tue, 26 Jan 2016 21:50:43 +0100 (CET)
Michael Van Canneyt  wrote:


[...]
do the codetools refuse to show identifiers with less restricted visibility ?
(so in a protected section, I will not get public)

Is this intentional ?

I can imagine it is confusing to the beginner and experienced dev alike...


Please report the bug.

Mattias

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


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


Re: [Lazarus] Code completion question

2016-01-26 Thread Mattias Gaertner
On Tue, 26 Jan 2016 23:12:51 +0100
Vojtěch Čihák  wrote:

> Hi,
>  
> It is a bug? I know this behaviour for a long time and I always believed it 
> is by design.

FPC gives a warning, so it is bad coding, but it is not forbidden.

Maybe it would be better to show them in the completion box with
some warning marker.

Mattias

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Ondrej Pokorny

On 26.01.2016 23:12, Vojtěch Čihák wrote:
It is a bug? I know this behaviour for a long time and I always 
believed it is by design.


I also came across it and it confused me for a second as well. Then I 
realized my mistake.


But anyway, you can do it and the code compiles, so CodeTools should 
allow it. During the compilation you get a hint about "overriden method 
has lower visibility [...]", if I remember correctly.


So yes, to avoid confusion I would say the visibility filter is 
unnecessarily restrictive.



+ What bugs me even more is that protected methods are not available 
with the inherited keyword:


procedure TMyClass2.Foo;
begin
  inherited Proc // CodeTools do not list Proc that is in protected 
section of parent class from different unit. It works without the 
"inherited" keyword, though

end;

I have to check why.

Ondrej

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Graeme Geldenhuys
On 2016-01-26 22:39, Mattias Gaertner wrote:
> Maybe it would be better to show them in the completion box with
> some warning marker.

+1 for that idea.


Regards,
  - Graeme -


My public PGP key:  http://tinyurl.com/graeme-pgp

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Ondrej Pokorny

On 26.01.2016 23:39, Ondrej Pokorny wrote:
+ What bugs me even more is that protected methods are not available 
with the inherited keyword:


procedure TMyClass2.Foo;
begin
  inherited Proc // CodeTools do not list Proc that is in protected 
section of parent class from different unit. It works without the 
"inherited" keyword, though

end;

I have to check why.


Fixed this one in r51425. Hopefully with no regressions.

Ondrej

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Ondrej Pokorny

On 26.01.2016 21:50, Michael Van Canneyt wrote:


Just curious: if I ask code completion in a class

TMyClass = Class(TMYParentClass)
Protected
  Procedure Valid|


If you complete it like this:

TMyClass = Class(TMYParentClass)
Protected
  Valid|

CodeTools list it (and also add it correctly as "procedure Valid; 
override;").


So yes, it is a bug.

Ondrej

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


Re: [Lazarus] Code completion question

2016-01-26 Thread Ondrej Pokorny

On 26.01.2016 21:50, Michael Van Canneyt wrote:

Just curious: if I ask code completion in a class

TMyClass = Class(TMYParentClass)
Protected
  Procedure Valid|


Fixed this one as well in r51426. The methods are shown in gray.
Good night :)

Ondrej

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


--
___
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 silvioprog
On Tue, Jan 26, 2016 at 1:01 PM, Fabrício Srdic 
wrote:

> Em 26/01/2016 11:30, "silvioprog"  escreveu:
> >
> > As I said: "... But the one of the basic steps before chosing a library
> (from any language) is read its specification, and know if it provides the
> needed features, works in the expected SOs, and provides a good
> documentation with a stable support. I need to make a device and it need a
> microcontroller, so I found that the best choice is a PIC16F64A because its
> datasheet shows all the features and the basic hardware that I need".
> >
> > ...
> >
> > "... Well, the mostly C libraries work fine in many OSs. One that I use
> works in the popular systems (currently I need it just for Windows and
> Linux) like GNU/Linux, FreeBSD, OpenBSD, NetBSD, Android, OS X, Win32/64
> and special systems like Symbian and z/OS, and it's already available in
> some tools like apt, yum, npm, maven, pacman...".
> >
>
> You are right. However, often we can't prevent when the requirements of
> our project will change and what will change. As i have said, you can find
> a library that address your problem today, but after some time, your
> project's requirements changes and that external dependency becomes a
> problem. The problem of cross-platform availability was just an example. A
> particular library may have many other kinds of limitations. Very often,
> you can't just figure out  which of that limitations may become a problem
> in the future.
>
There is no a language/compiler/library that can prevent all
possible future problems or customers needs. :-)

> > IMHO this isn't a reason, I also can find Pascal code that works only on
> a specific SO, and hard to be implemented in other systems, so I prefer to
> get some C library that already do it instead of spending a long time
> trying to implement it just because "oh, I can't work with libraries". :-)
>
> I am not against the use of libraries. What i am trying to say is, when
> you add an external dependency to your code, your code becomes constrained
> by the limitations of that external dependency so, would be better if you
> can solve the problem without add a new level constraints to your code.
>
Any choice must be done carefully for everything, language, compiler,
library, Pascal component etc.

Sometimes is better to reuse codes that already exit, instead of spending a
long time trying to solve the problem alone. For example, I still can't
find a pure Pascal package to build a HTTP 2.0 server, but I can create a
Pascal header to reuse some C library that already does it properly.

> > The main a real reason that I find is: mostly Pascal programmers can't
> debug a C libraries. And many Pascal programmers can't use or don't know
> how to use shared/static libraries by themselves and can't find time to
> know it, but anyway they use external libraries implicitly, when they
> declare Pascal units that uses them.
> >
> > Imagine if Lazarus developers think this same way, they probably would
> not have created Lazarus for GTK and Qt
>
> Why i can't make an Android app using Lazarus, as the free pascal compiler
> provides support to it? Is it because there is no GTK to android? And if
> the lazarus GUI framework did not depends on external libraries?
>
> The lazarus team did the right thing. They did not stopped to develop the
> Lazarus for Unix because "they couldn't use libraries". However, how would
> be the actual scenario if the GUI framework of the Lazarus was developed
> using just Pascal? Perhaps, I would not currently facing the problem of not
> being able to develop an android app using Lazarus provided frameworks.
>
I couldn't understand what you meant.

--
Silvio Clécio
--
___
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 Fabrício Srdic
Em 26/01/2016 23:23, "silvioprog"  escreveu:
>
> On Tue, Jan 26, 2016 at 1:01 PM, Fabrício Srdic 
wrote:
>>
>> Em 26/01/2016 11:30, "silvioprog"  escreveu
>> Why i can't make an Android app using Lazarus, as the free pascal
compiler provides support to it? Is it because there is no GTK to android?
And if the lazarus GUI framework did not depends on external libraries?
>>
>> The lazarus team did the right thing. They did not stopped to develop
the Lazarus for Unix because "they couldn't use libraries". However, how
would be the actual scenario if the GUI framework of the Lazarus was
developed using just Pascal? Perhaps, I would not currently facing the
problem of not being able to develop an android app using Lazarus provided
frameworks.
>
> I couldn't understand what you meant.
>
> --
> Silvio Clécio

To summarize my opinion: if I am java programmer, would be better if I can
solve my problem via Java classes than using C library binds. If i am a
Pascal programmer, i prefer to solve my problem via Pascal classes instead
of C binds.  Add an external dependency to the code may be a good option in
short term, however may become a big problem in long term. Perhaps, if the
Lazarus GUI framework was developed using pure pascal ( like fpGUI) instead
of using external libraries and frameworks, we could develop mobile apps
using Lazarus today.

Best regards
--
___
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 silvioprog
On Tue, Jan 26, 2016 at 9:54 PM, Marc Santhoff  wrote:

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

I agree. And using lib I can use the modularization concept with Free
Pascal.


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


Awesome!

-- 
Silvio Clécio
--
___
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 silvioprog
On Tue, Jan 26, 2016 at 10:51 PM, Fabrício Srdic 
wrote:

> Em 26/01/2016 23:23, "silvioprog"  escreveu:
> >
> > On Tue, Jan 26, 2016 at 1:01 PM, Fabrício Srdic <
> fabricio.sr...@gmail.com> wrote:
> >>
> >> Em 26/01/2016 11:30, "silvioprog"  escreveu
> >> Why i can't make an Android app using Lazarus, as the free pascal
> compiler provides support to it? Is it because there is no GTK to android?
> And if the lazarus GUI framework did not depends on external libraries?
> >>
> >> The lazarus team did the right thing. They did not stopped to develop
> the Lazarus for Unix because "they couldn't use libraries". However, how
> would be the actual scenario if the GUI framework of the Lazarus was
> developed using just Pascal? Perhaps, I would not currently facing the
> problem of not being able to develop an android app using Lazarus provided
> frameworks.
> >
> > I couldn't understand what you meant.
> >
> > --
> > Silvio Clécio
>
> To summarize my opinion: if I am java programmer, would be better if I can
> solve my problem via Java classes than using C library binds. If i am a
> Pascal programmer, i prefer to solve my problem via Pascal classes instead
> of C binds.  Add an external dependency to the code may be a good option in
> short term, however may become a big problem in long term. Perhaps, if the
> Lazarus GUI framework was developed using pure pascal ( like fpGUI) instead
> of using external libraries and frameworks, we could develop mobile apps
> using Lazarus today.
>
Me too, but Java programmers mostly time use external C libraries when it
hasn't already implemented some feature yet, it is a good choice, and you
can use that Java classes without knowing that it make calls to an external
C library. The Free Pascal and Delphi do it too, for example, when you
access a database using SQLdb, it uses an external C library (the database
client), that is made in C, and many Pascal programmers uses SQLdb with
pure Pascal interfaces (headers) without knowing that the main
implementation is in the external C library.

-- 
Silvio Clécio
--
___
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 Mattias Gaertner
On Tue, 26 Jan 2016 10:17:36 -0200
Fabrício Srdic  wrote:

>[...]Three
> months after, your project's requirements changes. The new requirement is
> that your code shall run on Linux. However, that external library runs only
> on windows. So, your code are constrained by this limitation. Now, you need
> to find an alternative solution. Sometimes, none of them are feasible and
> this fact can lead your project to fail.

True, although this is an argument for using only cross platform open
source libs. Not specially for using only Pascal libs. Not all Pascal
libs run on all platforms.

Mattias

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


Re: [Lazarus] Bug 28281

2016-01-26 Thread Mattias Gaertner
On Mon, 25 Jan 2016 21:37:16 +0100 (CET)
Michael Van Canneyt  wrote:

> 
> Hi,
> 
> Any news on bug 29281 ?
> 
> http://bugs.freepascal.org/view.php?id=28281
> 
> I can add the following extra info:
> 
> if compilation fails, it quite often never detects this and fails to show the 
> compiler error.
> I need to do a recompile, "abort" the previous build, and then it sometimes 
> shows the actual error.

I wonder why it happens only on your platform. Perhaps it is only
triggered by specific stdout/stderr content length and error IDs. This
would explain, why a recompile works, where the output is shorter than
a full compile.

 
> Also, I get a 100% failure rate when I press ctrl-F9 when the project
> inspector is the active dialog.

I have no idea, how the project inspector could influence the external
tools. I hope it is not some memory corruption.

Mattias

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