[fpc-pascal] OT: what happened with the Lazarus mailing list?

2017-11-25 Thread Lubos Pintes

Hello,
I don't know if the problem is somewhere on my side, but the latest 
message in Lazarus mailing list on gmane.org is from November 17.
I also looked into web archive and the situation is the same. And I am 
unable to find more information about what happened.

Also tried to subscribe, but no reply from the server. So what happened?
Thanks!

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Silencing redundand FPC messages

2017-06-18 Thread Lubos Pintes

Perfect, thank you!
Dňa 17. 6. 2017 o 16:05 Jonas Maebe napísal(a):

On 17/06/17 12:27, Lubos Pintes wrote:

But how  can I get rid of "Target OS XXX:"?


The parameter -vi- will disable all messages of the level "info", such 
as the above mentioned message and things like "Compiling XXX"



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Silencing redundand FPC messages

2017-06-17 Thread Lubos Pintes

Hello,
I am compiling from command line. I am screen reader user relying on 
spoken output. I would like to minimize the output as much as possible, 
especially if the output is redundant.
FPC outputs are concise and clean IMO, but some always-repeating things 
it outputs are just useless. One can be avoided by -l- switch. But how 
can I get rid of "Target OS XXX:"?

Thanks

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] importtl and ignored [out, retval] parameters

2017-05-04 Thread Lubos Pintes

Hello,
I wanted to import the UIAutomationClient type library. Thus I compiled 
the UIAutomationClient.idl to .tlb and then used importtl to convert it 
to pascal.
Importtl converted this incorrectly, it ignored [out, retval] parameters 
on many places. For example, two examples from IUIAutomationElement 
interface.

IDL:
HRESULT GetRuntimeId (
[out, retval] SAFEARRAY(int) * runtimeId );

HRESULT FindFirst (
[in] enum TreeScope scope,
[in] IUIAutomationCondition * condition,
[out, retval] IUIAutomationElement ** found );

Pascal:
// GetRuntimeId :
   function GetRuntimeId:HRESULT;stdcall;
// FindFirst :
   function 
FindFirst(scope:TreeScope;condition:IUIAutomationCondition):HRESULT;stdcall;



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] WideStringReplace bug?

2017-03-28 Thread Lubos Pintes

Sorry I forgot the FPC version:
3.1.1 [2017/02/15] for i386
Dňa 28. 3. 2017 o 11:22 Lubos Pintes napísal(a):

Hello,,
I am developing a console program which receives input in UTF-8, but it
is converted to WideString for communication with COM.
I found a weird behaviour of the WideStringReplace, and I extracted the
small program below:
program a;
{$apptype console}

uses SysUtils;

var
  U: UTF8String;
  W: WideString;

begin
  U := 'left[*]paren';
  W := WideStringReplace(WideString(U), WideString('[*]'), WideString('
'), [rfReplaceAll]);
  writeln(W);
end.

It seems to me that the output is garbaged, and it is not a problem of
writeln, because I also obtained the weird result which was sent to SAPI.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] WideStringReplace bug?

2017-03-28 Thread Lubos Pintes

Hello,,
I am developing a console program which receives input in UTF-8, but it 
is converted to WideString for communication with COM.
I found a weird behaviour of the WideStringReplace, and I extracted the 
small program below:

program a;
{$apptype console}

uses SysUtils;

var
  U: UTF8String;
  W: WideString;

begin
  U := 'left[*]paren';
  W := WideStringReplace(WideString(U), WideString('[*]'), WideString(' 
'), [rfReplaceAll]);

  writeln(W);
end.

It seems to me that the output is garbaged, and it is not a problem of 
writeln, because I also obtained the weird result which was sent to SAPI.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] googleapi package, TCalendarListResource.List, unhandled exception

2016-08-21 Thread Lubos Pintes

Hello Michael,
Yes, I called that method.
Dňa 21. 8. 2016 o 10:59 Michael Van Canneyt napísal(a):



On Fri, 19 Aug 2016, Lubos Pintes wrote:


Hello,
I am not sure if this is useful or not. After some fiddling with
compiler options, I was able to generate full line trace of exception
I obtain when I try to call the TCalendarListResource.List method.
I logged the requests, so I can confirm that the request is issued,
and data are retrieved correctly. But after that, this exception is
raised on the method call line:
An unhandled exception occurred at $00458D0E:
ERESTAPI: TCalendarList: unsupported array element type :
 $00458D0E  TBASEOBJECT__SETARRAYELEMENTS,  line 717 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $004591C0  TBASEOBJECT__SETARRAYPROPERTY,  line 799 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045B0B4  TBASEOBJECT__LOADPROPERTYFROMJSON,  line 1310 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045B361  TBASEOBJECT__LOADFROMJSON,  line 1348 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045729E  TGOOGLEAPI__SERVICECALL,  line 485 of
fpcsrc/packages/googleapi/src/googleservice.pp
 $004569EF  TGOOGLERESOURCE__SERVICECALL,  line 350 of
fpcsrc/packages/googleapi/src/googleservice.pp
 $00426F93  TCALENDARLISTRESOURCE__LIST,  line 987 of
fpcsrc/packages/googleapi/src/googlecalendar.pp
 $00401D00  main,  line 90 of a.dpr

I tested it against freshly built FPC, I built it today.


Did you call RegisterAPIResources ?

  // Register calendar resources.
  TCalendarAPI.RegisterAPIResources;

Michael.
___
fpc-pascal maillist  -
fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] googleapi package, TCalendarListResource.List, unhandled exception

2016-08-19 Thread Lubos Pintes

Hello,
I am not sure if this is useful or not. After some fiddling with 
compiler options, I was able to generate full line trace of exception I 
obtain when I try to call the TCalendarListResource.List method.
I logged the requests, so I can confirm that the request is issued, and 
data are retrieved correctly. But after that, this exception is raised 
on the method call line:

An unhandled exception occurred at $00458D0E:
ERESTAPI: TCalendarList: unsupported array element type :
  $00458D0E  TBASEOBJECT__SETARRAYELEMENTS,  line 717 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
  $004591C0  TBASEOBJECT__SETARRAYPROPERTY,  line 799 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
  $0045B0B4  TBASEOBJECT__LOADPROPERTYFROMJSON,  line 1310 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
  $0045B361  TBASEOBJECT__LOADFROMJSON,  line 1348 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
  $0045729E  TGOOGLEAPI__SERVICECALL,  line 485 of 
fpcsrc/packages/googleapi/src/googleservice.pp
  $004569EF  TGOOGLERESOURCE__SERVICECALL,  line 350 of 
fpcsrc/packages/googleapi/src/googleservice.pp
  $00426F93  TCALENDARLISTRESOURCE__LIST,  line 987 of 
fpcsrc/packages/googleapi/src/googlecalendar.pp

  $00401D00  main,  line 90 of a.dpr

I tested it against freshly built FPC, I built it today.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] googleapiconv

2016-08-14 Thread Lubos Pintes
Well it didn't seem relevant. I am a screen reader user and Lazarus is 
inaccessible, so I don't use it, it is currently unusable.
I tryed to compile some demos but I was unable to drive the IDe, even 
button captions are not read for me. And there were some packages 
missing, maybe only on Windows.
I compiled one Lazarus from trunk, not sure which version exactly but I 
suppose it was something like 1.7.

Dňa 13. 8. 2016 o 11:56 Michael Van Canneyt napísal(a):



On Sat, 13 Aug 2016, Lubos Pintes wrote:


Hello,
It seems to me that all this is broken in some way.
Well it may be my stupidity because I am receiving an Unhandled
exception.
I don't know how to generate useful trace, I am developing on Windows
from command line.
The lines I was able to see was GoogleService.pp, line 350 and
GoogleCalendar.pp, line 4265.
I am trying to write a console app for testing. After I authorize my
app and write the code Google provides, it is trying to call the
TCalendarResource.List with no parameters.



I'm a bit surprised at the difficulties you are experiencing, the GUI
sample programs with Lazarus worked fine when I wrote them.
More recently I wrote a google drive console demo app, it also works fine.
The drive code is in actual production use. Idem for the calendar, I use it
to hourly synchronize our company's calendar database with Google
calendar; It works since a long time...

I will look into writing a console app for testing the calendar.

Michael.
___
fpc-pascal maillist  -
fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] googleapiconv

2016-08-13 Thread Lubos Pintes

Hello,
It seems to me that all this is broken in some way.
Well it may be my stupidity because I am receiving an Unhandled exception.
I don't know how to generate useful trace, I am developing on Windows 
from command line.
The lines I was able to see was GoogleService.pp, line 350 and 
GoogleCalendar.pp, line 4265.
I am trying to write a console app for testing. After I authorize my app 
and write the code Google provides, it is trying to call the 
TCalendarResource.List with no parameters.


Dňa 12. 8. 2016 o 13:18 Michael Van Canneyt napísal(a):



On Fri, 12 Aug 2016, Dave Connolly wrote:


Hi all,

When I run googleapiconv, I get the following

./googleapiconv -s calendar/v3 -o calendar.pp
Exception at 00494F7F: ERESTAPI:
Unknown class : "t@\tX\t???\t???\t???\t(]t???]t???]tX^tp^t".

and

./googleapiconv -s tasks/v1 -o tasks.pp
Exception at 00494F7F: ERESTAPI:
Unknown class : "t@\tX\t???\t???\t???\t(]t???]t???]tX^tp^t".

Has something changed?


Not to my knowledge, I even recently converted all services again ?

Can you run with -k and send the downloaded .json file ?

Michael.
___
fpc-pascal maillist  -
fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Google Calendar API and unsupported exception

2016-08-09 Thread Lubos Pintes

Hello,
I am again here with questions about Google API. I am currently creating 
a console application for testing. Because it doesn't work, I tried to 
compile a fresh FPC trunk in the hope that prpoblem was fixed there.

I am trying to obtain a calendar list:
  Res := Calendar.API.CreateCalendarListResource;
!  List := Res.List('');
  Calendar.SaveSession;
  if List <> nil then for Entry in List.Items do writeln(Entry.description)

And I receive an exception on the marked line:
An unhandled exception occurred at $00451627:
ERESTAPI: TCalendarList: unsupported array element type :
... and after that some nice useless hex numbers.
The "-gl" switch only tells me that I have an exception on line 92 in my 
project, that is good but insufficient.

Am I doing something wrong, or there is a bug somewhere in the library?
Do I have to send whole program somewhere? It is not a problem of 
course, I just thought that snipped I provided could be sufficient.

Thanks!

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Google API on Windows

2016-08-08 Thread Lubos Pintes

Hello list,
Do I absolutely need the OpenSSL library if I want to use Google API 
under Windows?
I am asking just in case there is something native I am not aware of. I 
would like to have just one binary if possible.

Thanks

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Google API, OAuth2 and Windows

2016-08-05 Thread Lubos Pintes

Hello,
I want to use Google Calendar API with FPC 3.0.0 under Windows. I 
grabbed necessary units from SVN, because it seems to me that they are 
not available under FPC 3.0.0 units.
My question: how can I handle OAuth2? Do I need an external library like 
Synapse under Windows, or can I use existing units from FPC 3.0.0?
I noticed that there are units like fpoauth2, but I have no idea how to 
use them.

Thanks.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-24 Thread Lubos Pintes

Hello,
Here is a minimal program, it doesn't work as I expected either because 
there is a bug somewhere in the RTL, or, more probably, I misunderstood 
something.
Basically, I am reading an UTF-8 encoded text from stdin, and collecting 
it in a WideChar array. I am assigning UTF-8 string to a WideString, and 
then collecting chars from it into the mentioned array.
Then I am using a SetString procedure to recreate the WideString from 
collected chars.

Here is a simple program which demonstrates this:

program a;
{$mode delphi}

uses SysUtils;

var
  U: UTF8String;
  S, W: WideString;

begin
  U := 'Hello';
  W := U;
  SetString(S, @W[1], Length(W));
  W := Format(WideString('%s'), [S]);
  Writeln(W);
end.

Dňa 23. 12. 2015 o 17:29 Mark Morgan Lloyd napísal(a):

Lubos Pintes wrote:

Hello Mark,The result isthe same, I tried it before I wrote my
message.I even tried to temporarily write ordinal codes of characters,
it seems that a string is not automatically converted to a WideString
when assigned, there wereno zeros, like H#0e#0l#0, etc.
Dňa 23. 12. 2015 o 11:07 Mark Morgan Lloyd napísal(a):> Lubos Pintes
wrote:>> Hello,>> I have a text in the WideString variable. I want to
send this text to>> a SAPI5 synthesizer. I am doing this as follows:>>
WideStr := Format('%s', [Pitch,
Text]);>> Pitch is integer, Text is WideString.>> The result is
incorrect, only a half of the Text contents is copied to>> the
result.>> Tested with Free Pascal Compiler version 3.1.1 [2015/11/14]
for i386>> Thanks>> What happens if the format string is put into a
temporary widestring?>


I suggest posting a *minimal* test program would be appropriate, and
telling us exactly what OS etc. you've got.




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Lubos Pintes

I tried it now, and it doesn't work.
I also tried all string variables changed to WideString.
Dňa 23. 12. 2015 o 11:59 Michael Van Canneyt napísal(a):



On Wed, 23 Dec 2015, Lubos Pintes wrote:


Hello Mark,
The result isthe same, I tried it before I wrote my message.
I even tried to temporarily write ordinal codes of characters, it
seems that a string is not automatically converted to a WideString
when assigned, there wereno zeros, like H#0e#0l#0, etc.


Did you try
WideStr := Format(WideString('%s'),
[Pitch, Text]);
to make sure the correct function is used ?

Michael.


Dňa 23. 12. 2015 o 11:07 Mark Morgan Lloyd napísal(a):

Lubos Pintes wrote:

Hello,
I have a text in the WideString variable. I want to send this text to
a SAPI5 synthesizer. I am doing this as follows:
WideStr := Format('%s', [Pitch, Text]);
Pitch is integer, Text is WideString.
The result is incorrect, only a half of the Text contents is copied to
the result.
Tested with Free Pascal Compiler version 3.1.1 [2015/11/14] for i386
Thanks


What happens if the format string is put into a temporary widestring?




___
fpc-pascal maillist  -
fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Lubos Pintes

Hello Mark,
The result isthe same, I tried it before I wrote my message.
I even tried to temporarily write ordinal codes of characters, it seems 
that a string is not automatically converted to a WideString when 
assigned, there wereno zeros, like H#0e#0l#0, etc.


Dňa 23. 12. 2015 o 11:07 Mark Morgan Lloyd napísal(a):

Lubos Pintes wrote:

Hello,
I have a text in the WideString variable. I want to send this text to
a SAPI5 synthesizer. I am doing this as follows:
WideStr := Format('%s', [Pitch, Text]);
Pitch is integer, Text is WideString.
The result is incorrect, only a half of the Text contents is copied to
the result.
Tested with Free Pascal Compiler version 3.1.1 [2015/11/14] for i386
Thanks


What happens if the format string is put into a temporary widestring?




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Lubos Pintes

Hello,
I have a text in the WideString variable. I want to send this text to a 
SAPI5 synthesizer. I am doing this as follows:

WideStr := Format('%s', [Pitch, Text]);
Pitch is integer, Text is WideString.
The result is incorrect, only a half of the Text contents is copied to 
the result.

Tested with Free Pascal Compiler version 3.1.1 [2015/11/14] for i386
Thanks


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] WideString version of the Format function

2015-12-22 Thread Lubos Pintes

Hello,
Does FPC standard library have a WideString version of the Format function?
Thanks

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] FPC 3.x for Windows and reading UTF-8 encoded text from standard input

2015-12-03 Thread Lubos Pintes

Hi,
How can I read an UTF-8 encoded text under Windows? My Windows locale 
uses windows-1250 encoding. It seems to me that a conversion to ansi 
happens when I am reading from standard input, so the UTF-8 text is 
corrupted.

Do I need to do something special for this to work?
Thanks

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] FPC 3.x for Windows and code page conversion

2015-11-23 Thread Lubos Pintes

Hello,
I am developing a console application which receives an UTF-8 encoded 
text through stdin.
The text is, after possible modification, sent to SAPI5. The SAPI5 
generated interface wrappers have parameters of type string.
In FPC 2.6.4, I used UTF8toANSI on various places and that worked well. 
Now after reading about FPC 3.x's unicode support, I thought that adding 
this line say after begin in the main program could be enough:

SetMultiByteConversionCodePage(CP_UTF8);
It however doesn't work.
How can I solve this without conversion to ANSI?
Thanks

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Exception when trying to set a COM object property through OleVariant

2015-06-27 Thread Lubos Pintes

Hello,
I am using FPC 3.1.1.
I am playing with SAPI5. It almost works, but I am unable to set a Voice 
of SPVoice object through OleVariant.
The following program works fine in Delphi 6, but an exception on line 
12 is raised when compiled by FPC:


program sapi;

uses
  ActiveX, ComObj;

var
  SPVoice: OleVariant;

begin
  CoInitializeEx(nil, 0);
  SPVoice := CreateOleObject('SAPI.SPVoice');
  SPVoice.Voice := SPVoice.GetVoices.Item(5);
  SPVoice.Speak('Hello from SAPI5.', 0);
end.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal