Re: [Lazarus] Translating php://input into fcl-web

2014-08-24 Thread Leonardo M. Ramé

On 24/08/14 00:08, silvioprog wrote:

Oops,

On Sun, Aug 24, 2014 at 12:02 AM, silvioprog silviop...@gmail.com
mailto:silviop...@gmail.com wrote:

On Sat, Aug 23, 2014 at 9:07 PM, Leonardo M. Ramé
l.r...@griensu.com mailto:l.r...@griensu.com wrote:

[...]
Thank you very much Silvio for testing.

My setup is XUbuntu 14.04 64bits, and Apache/2.4.7 (Ubuntu).
Also I'm testing on Firefox 31 For Ubuntu with the latest
version of Flash Plugin.

What confuses me is the same setup, but instead of the CGI, if I
use PHP, the file is stored with the complete audio.


Worked on Ubuntu too, please try it online here:

_https://brookframework.org/leo/_

I used chmod 777 -R /var/www/html/leo/tmp/ to my CGI can write
waves into this directory.

The modified source code (i'm using jQuery in this demo to less
coding hehe):

http://tempsend.com/06FD41FF11


Please try online demo again. And in your code change this lines:

...
stopButton.on('click', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).prop('disabled', true);
startButton.prop('disabled', false);
Wami.stopRecording();
setTimeout(function() {
downloadLink.removeClass('hidden');
}, 3000);
});
...
--
Silvio Clécio
My public projects - github.com/silvioprog http://github.com/silvioprog



Thanks, this works perfectly. I'm using the same browser, the same swf 
but your Ubuntu server and your CGI example. Can you send me your 
cgiproject1.bf (the compiled version) to check it in my PC?.


I deployed my example to an external Ubuntu 12.04 server, with the CGI 
compiled in my machine, and the result is a file of correct size, 
playable with mplayer but just about 1 second of audio then mute until 
the playing ends, the same result as my local config.


I'm starting to think there must be something wrong in my fpc version...


--
Leonardo M. Ramé
http://leonardorame.blogspot.com

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


Re: [Lazarus] Translating php://input into fcl-web

2014-08-24 Thread Leonardo M. Ramé

On 24/08/14 07:31, Leonardo M. Ramé wrote:

On 24/08/14 00:08, silvioprog wrote:

Oops,

On Sun, Aug 24, 2014 at 12:02 AM, silvioprog silviop...@gmail.com
mailto:silviop...@gmail.com wrote:

On Sat, Aug 23, 2014 at 9:07 PM, Leonardo M. Ramé
l.r...@griensu.com mailto:l.r...@griensu.com wrote:

[...]
Thank you very much Silvio for testing.

My setup is XUbuntu 14.04 64bits, and Apache/2.4.7 (Ubuntu).
Also I'm testing on Firefox 31 For Ubuntu with the latest
version of Flash Plugin.

What confuses me is the same setup, but instead of the CGI, if I
use PHP, the file is stored with the complete audio.


Worked on Ubuntu too, please try it online here:

_https://brookframework.org/leo/_

I used chmod 777 -R /var/www/html/leo/tmp/ to my CGI can write
waves into this directory.

The modified source code (i'm using jQuery in this demo to less
coding hehe):

http://tempsend.com/06FD41FF11


Please try online demo again. And in your code change this lines:

...
stopButton.on('click', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).prop('disabled', true);
startButton.prop('disabled', false);
Wami.stopRecording();
setTimeout(function() {
downloadLink.removeClass('hidden');
}, 3000);
});
...
--
Silvio Clécio
My public projects - github.com/silvioprog http://github.com/silvioprog



Thanks, this works perfectly. I'm using the same browser, the same swf
but your Ubuntu server and your CGI example. Can you send me your
cgiproject1.bf (the compiled version) to check it in my PC?.

I deployed my example to an external Ubuntu 12.04 server, with the CGI
compiled in my machine, and the result is a file of correct size,
playable with mplayer but just about 1 second of audio then mute until
the playing ends, the same result as my local config.

I'm starting to think there must be something wrong in my fpc version...




Confirmed!, I completely removed my fpc and Lazarus, then downloaded 
from svn and rebuilded everything and it works now.


Thanks you Silvio again for your help.


--
Leonardo M. Ramé
http://leonardorame.blogspot.com

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


Re: [Lazarus] Translating php://input into fcl-web

2014-08-24 Thread silvioprog
On Sun, Aug 24, 2014 at 8:37 AM, Leonardo M. Ramé l.r...@griensu.com
wrote:

 On 24/08/14 07:31, Leonardo M. Ramé wrote:

 On 24/08/14 00:08, silvioprog wrote:

 Oops,

 On Sun, Aug 24, 2014 at 12:02 AM, silvioprog silviop...@gmail.com
 mailto:silviop...@gmail.com wrote:

 On Sat, Aug 23, 2014 at 9:07 PM, Leonardo M. Ramé
 l.r...@griensu.com mailto:l.r...@griensu.com wrote:

 [...]
 Thank you very much Silvio for testing.

 My setup is XUbuntu 14.04 64bits, and Apache/2.4.7 (Ubuntu).
 Also I'm testing on Firefox 31 For Ubuntu with the latest
 version of Flash Plugin.

 What confuses me is the same setup, but instead of the CGI, if I
 use PHP, the file is stored with the complete audio.


 Worked on Ubuntu too, please try it online here:

 _https://brookframework.org/leo/_

 I used chmod 777 -R /var/www/html/leo/tmp/ to my CGI can write
 waves into this directory.

 The modified source code (i'm using jQuery in this demo to less
 coding hehe):

 http://tempsend.com/06FD41FF11


 Please try online demo again. And in your code change this lines:

 ...
 stopButton.on('click', function(e) {
 e.preventDefault();
 e.stopPropagation();
 $(this).prop('disabled', true);
 startButton.prop('disabled', false);
 Wami.stopRecording();
 setTimeout(function() {
 downloadLink.removeClass('hidden');
 }, 3000);
 });
 ...
 --
 Silvio Clécio
 My public projects - github.com/silvioprog http://github.com/silvioprog
 


 Thanks, this works perfectly. I'm using the same browser, the same swf
 but your Ubuntu server and your CGI example. Can you send me your
 cgiproject1.bf (the compiled version) to check it in my PC?.

 I deployed my example to an external Ubuntu 12.04 server, with the CGI
 compiled in my machine, and the result is a file of correct size,
 playable with mplayer but just about 1 second of audio then mute until
 the playing ends, the same result as my local config.

 I'm starting to think there must be something wrong in my fpc version...



 Confirmed!, I completely removed my fpc and Lazarus, then downloaded from
 svn and rebuilded everything and it works now.

 Thanks you Silvio again for your help.


You're welcome! :-)

My environment: Lazarus 1.2.2 rUnknown FPC 2.6.4 x86_64-linux-gtk 2 (will
update to Lazarus 1.2.4)

After some problems using unstable FPC, now I use only current stable
versions.

-- 
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2014-08-24 Thread Joost van der Sluis

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

Managed to create a small test program:

program tproj;

uses sysutils;

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

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

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


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


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


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


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


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


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


Joost.

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


Re: [Lazarus] font.name=default

2014-08-24 Thread Philippe
 

just for information ... 

I tried to use your suggestion ... it
works ... but ... I am using TGroupBox in TGroupBox in TGroupBox ...


your example just loops on the top level controls of the form ...
needing to use recursive function to go through contained group boxes
... what I´ll do later. 

Philippe 

Em 22.08.2014 10:26, Salvatore
Coppola escreveu: 

 You can choose the controls you want this way 


 var i: integer; 
 begin 
 for i:=0 to ControlCount-1 do 
 if
Controls[i] is TButton then 
 ShowMessage(Controls[i].Name); 
 end; 

Ciao 
 
 2014-08-21 13:09 GMT+02:00 Philippe
phili...@quarta.com.br:
 
 I wrote about a suggestion ... a Lazarus
default font ... 
 
 may be, as far as I understand, using Parent
Font property is the way ... I´ll try it! 
 
 Philippe 
 
 Em
20.08.2014 19:54, Philippe escreveu: 
 
 thank for your answer.

 
 I found the default font on my machine/windows 8 is Segoe UI.
I´ll check if it is avalaible under other version of Windows ... 


 your suggestion (looping controls) is interesting, I didn´t know
it, but will change all the controls of the form ... and that is not
what I need ... I just want to change the Lazarus default. So it will
change the font of controls using font.name [1]='Default' in the
configuration/object inspector. 
 
 Philippe 
 
 Em
20.08.2014 12:58, Salvatore Coppola escreveu: 
 
 2014-08-16
12:40 GMT+02:00 Philippe phili...@quarta.com.br:
 
 I wrote a
program, used font.name [1]=default for allmost everything ... it was
looking as Arial font. Fine. 
 
 It was on a Windows 8
machine. 
 
 Then I copied the program to a Windows XP machine
to check. 
 
 Where static text and others are written with
something looking as a New Times Roman ...
 and sometimes not
fitting in the field width ... and be splitted! 
 
 I
undestood there is something about windows default font. Googled ... ...
... 
 
 On the my W8 machine default font (from registers) are
Microsoft Sans Serif and Tahoma ... diferent. 
 
 I made a
test. In the attached image, the first text is with default, the second
with Arial, both with bold mode. Arial was the closest font from default
I found ... but still a bit diferent. 
 
 Question 1): which
default font is used with Lazarus ?
 
 the theme fonts 


 Question 2): is there a way I can set the default font in
Lazarus?
 
 I don't know if is possible in RAD way, but you can
set the font you want in on create event for each controls you want.

 
 procedure TForm1.FormCreate(Sender: TObject); 
 var i:
integer; 
 begin 
 for i:=0 to ControlCount-1 do 

Controls[i].Font:=YOURFONT; 
 end; 
 
 Thank for your help

 
 Philippe 
 
 PS. F1 in
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]


 --
 ___
 Lazarus
mailing list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
 

--
 ___
 Lazarus mailing
list
 Lazarus@lists.lazarus.freepascal.org

http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
--
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[3]
http://webmail.quarta.com.br/div

gt;nbsp;lto:Lazarus@lists.lazarus.freepascal.orgquot;gt;Lazarus@lists.lazarus.freepascal.org
gt;nbsp;http://lists.lazarus.freepascal.org/mailman/listinfo/lazarusnbsp;[2]
gt;nbsp;
gt;nbsp;--nbsp;___nbsp;Lazarusnbsp;mailingnbsp;listnbsp;Lazarus@lists.lazarus.freepascal.org
/divepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] LazReport: TfrReport.LoadFromFile question

2014-08-24 Thread Bart
Hi,

TfrReport.LoadFromFile does not raise an exception (or return ay other
indication of error) if the file does not exist and the filename has
the .lrf extension.
If the filename has another extension the code results in a dialog
'Unsupported FRF format'.
This to me is even more bothersome, I cannot trap this in code at all,
nor can I suppress the dialog.

Similar to other components that have a LoadFromFile (TMemo, TSynEdit,
TStringGrid to name a few), I would expect the LoadFromFile to raise
an exception in both cases.

Before I file this in the bigtracjker, I ask here.
Maybe this is by design (compatibility with Delphi perhaps)?

Bart

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


Re: [Lazarus] font.name=default

2014-08-24 Thread Hans-Peter Diettrich

Philippe schrieb:

just for information ...

I tried to use your suggestion ... it works ... but ... I am using 
TGroupBox in TGroupBox in TGroupBox ...


your example just loops on the top level controls of the form ... 
needing to use recursive function to go through contained group boxes 
... what I´ll do later.


Then use Components[] instead of Controls[].

DoDi


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