Re: [lazarus] TClipboard.AssignToGraphic copies empty stream

2007-08-10 Thread Vincent Snijders

Mattias Gaertner schreef:

On Fri, 10 Aug 2007 11:18:59 +0400
skywriter <[EMAIL PROTECTED]> wrote:

LCL file clipbrd.inc contains the following method which is unable to 
get picture from clipboard (Lazarus 0.9.22, Win32 platfotm):


function TClipboard.AssignToGraphic(Dest: TGraphic; FormatID: 
TClipboardFormat

  ): boolean;
var
  MemStream: TMemoryStream;
begin
  Result:=false;
  if FormatID=0 then exit;
  MemStream:=TMemoryStream.Create;
  try
// if not GetFormat(FormatID,MemStream) then exit;


In current lazarus svn the above line is not commented.
Can you test if the bug still exists in the developer version?
Instead of CF_BITMAP use PredefinedClipboardFormat[pcfBitmap].



MemStream.Position:=0;
Dest.LoadFromMimeStream(MemStream,ClipboardFormatToMimeType(FormatID));
  finally
MemStream.Free;
  end;
  Result:=true;
end;

I think MemStream object should be filled by some data, isn't it? But
i don't know how to.

And also TClipboard.HasFormat( CF_Bitmap) returns false. But at the
same time i sure the clipboard contains bitmap,
and it is possible to paste this bitmap into MS Paint or extract in 
Delphi with "Destination.LoadFromClipboardFormat(CF_Bitmap, 
ClipBoard.GetAsHandle(CF_Bitmap), 0)" method.


I guess, the win32 interface function
TWin32WidgetSet.ClipboardRegisterFormatcan should be extended:

Instead of
  else if AMimeType=PredefinedClipboardMimeTypes[pcfBitmap] then
it should be:
  else if (AMimeType=PredefinedClipboardMimeTypes[pcfBitmap])
   or (AMimeType=PredefinedClipboardMimeTypes[pcfDelphiBitmap]) then

Can a win32 user test this?


SkyWriter, can you give me a test application?

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] lazxml #text nodes

2007-08-10 Thread Mattias Gaertner
On Fri, 10 Aug 2007 20:40:26 +0200
Marco van de Voort <[EMAIL PROTECTED]> wrote:

> On Fri, Aug 10, 2007 at 06:52:15PM +0200, Mattias Gaertner wrote:
> > Marco van de Voort <[EMAIL PROTECTED]> wrote:
> > > +end;
> > >//CheckHeapWrtMemCnt('TXMLConfig.GetValue H');
> > >//writeln('TXMLConfig.GetValue END Result="',Result,'"');
> > >  end;
> > 
> > This would mean '1000' becomes the default value for all attributes,
> > right?
> 
> Yes.
> 
> > For example GetValue('connectivity/answer_timeout/tag',2) will
> > return 1000 instead of 2.
> 
> Only if there is a nodevalue. But yes, that could be a problem. 

It is, because there is no function to change this value in TXMLConfig.
The main purpose of TXMLConfig is to get and set some config values,
not to parse an XML document.


> I'm no XML wizard, which is why I actually reused code instead of
> writing my own ( :-)) 
> 
> So what would be (a) more normal rule to distinguish child values from
> attributes?

The Document property gives full access to the internal XML.
I made the FindNode method public, so you can find the node easier.


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Testers for the unicode support on windows

2007-08-10 Thread Marco van de Voort
> News:
> http://trolltech.com/products/qt/gplexception
> 
> But:
> B) You must, on request, make a complete package including the
> complete source code of Your Software...

... to TROLLTECH. Not the general public. And you can charge Trolltech the
same amount of money for it as your normal customers.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Testers for the unicode support on windows

2007-08-10 Thread Luis R. Hilario B.
News:
http://trolltech.com/products/qt/gplexception

But:
B) You must, on request, make a complete package including the
complete source code of Your Software...

When BSD permits code closed, that is not a contradiction?

2007/8/8, Luis R. Hilario B. <[EMAIL PROTECTED]>:
> I know that since the principle.
>
> 2007/8/7, Vincent Snijders <[EMAIL PROTECTED]>:
> > Luis R. Hilario B. schreef:
> > > Qt license.
> > >
> >
> > You don't need a QT license to test the unicode support in windows using the
> > win32/win64 interface.
> >
> > Vincent
> >
> > > 2007/8/6, Felipe Monteiro de Carvalho <[EMAIL PROTECTED]>:
> > >> On 8/6/07, Luis R. Hilario B. <[EMAIL PROTECTED]> wrote:
> > >>> The problem of the license (commercial) discourages me
> > >> Which license are you talking about?
> > >>
> > >> My message is a specific call for testers on the unicode support for
> > >> the win32/64 interface.
> >
> > _
> >  To unsubscribe: mail [EMAIL PROTECTED] with
> > "unsubscribe" as the Subject
> >archives at http://www.lazarus.freepascal.org/mailarchives
> >
>
>
> --
> http://luisdigital.com
>


-- 
http://luisdigital.com

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] lazxml #text nodes

2007-08-10 Thread Marco van de Voort
On Fri, Aug 10, 2007 at 06:52:15PM +0200, Mattias Gaertner wrote:
> Marco van de Voort <[EMAIL PROTECTED]> wrote:
> > +end;
> >//CheckHeapWrtMemCnt('TXMLConfig.GetValue H');
> >//writeln('TXMLConfig.GetValue END Result="',Result,'"');
> >  end;
> 
> This would mean '1000' becomes the default value for all attributes,
> right?

Yes.

> For example GetValue('connectivity/answer_timeout/tag',2) will return
> 1000 instead of 2.

Only if there is a nodevalue. But yes, that could be a problem. 

I'm no XML wizard, which is why I actually reused code instead of writing my
own ( :-)) 

So what would be (a) more normal rule to distinguish child values from
attributes?

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TClipboard.AssignToGraphic copies empty stream

2007-08-10 Thread Mattias Gaertner
On Fri, 10 Aug 2007 11:18:59 +0400
skywriter <[EMAIL PROTECTED]> wrote:

> LCL file clipbrd.inc contains the following method which is unable to 
> get picture from clipboard (Lazarus 0.9.22, Win32 platfotm):
> 
> function TClipboard.AssignToGraphic(Dest: TGraphic; FormatID: 
> TClipboardFormat
>   ): boolean;
> var
>   MemStream: TMemoryStream;
> begin
>   Result:=false;
>   if FormatID=0 then exit;
>   MemStream:=TMemoryStream.Create;
>   try
> // if not GetFormat(FormatID,MemStream) then exit;

In current lazarus svn the above line is not commented.
Can you test if the bug still exists in the developer version?
Instead of CF_BITMAP use PredefinedClipboardFormat[pcfBitmap].


> MemStream.Position:=0;
> Dest.LoadFromMimeStream(MemStream,ClipboardFormatToMimeType(FormatID));
>   finally
> MemStream.Free;
>   end;
>   Result:=true;
> end;
> 
> I think MemStream object should be filled by some data, isn't it? But
> i don't know how to.
> 
> And also TClipboard.HasFormat( CF_Bitmap) returns false. But at the
> same time i sure the clipboard contains bitmap,
> and it is possible to paste this bitmap into MS Paint or extract in 
> Delphi with "Destination.LoadFromClipboardFormat(CF_Bitmap, 
> ClipBoard.GetAsHandle(CF_Bitmap), 0)" method.

I guess, the win32 interface function
TWin32WidgetSet.ClipboardRegisterFormatcan should be extended:

Instead of
  else if AMimeType=PredefinedClipboardMimeTypes[pcfBitmap] then
it should be:
  else if (AMimeType=PredefinedClipboardMimeTypes[pcfBitmap])
   or (AMimeType=PredefinedClipboardMimeTypes[pcfDelphiBitmap]) then

Can a win32 user test this?


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] lazxml #text nodes

2007-08-10 Thread Mattias Gaertner
On Fri, 10 Aug 2007 15:40:49 +0200
Marco van de Voort <[EMAIL PROTECTED]> wrote:

> 
> At work I also use laz_xmlcfg from Delphi, and I noticed that while
> it can parse the following format, there is no way to retrieve the
> value "1000".
> 
> 

[lazarus] lazxml #text nodes

2007-08-10 Thread Marco van de Voort

At work I also use laz_xmlcfg from Delphi, and I noticed that while it can
parse the following format, there is no way to retrieve the value "1000".


Re: [lazarus] svn troubles

2007-08-10 Thread Michael Van Canneyt


On Fri, 10 Aug 2007, Adriaan van Os wrote:

> For me, the Lazarus svn server works very fast, but a colleague in Canada
> reports
> 
> > Alazarus/ideintf/idetextconverter.pas
> > Alazarus/ideintf/componentreg.pas
> > Alazarus/ideintf/graphicpropedit.lrs
> > Alazarus/ideintf/treeviewpropedit.pas
> > Alazarus/ideintf/maskpropedit.pas
> > Alazarus/ideintf/Makefile.fpc
> > Alazarus/ideintf/fieldslist.pas
> > svn: REPORT request failed on '/svn/lazarus/!svn/vcc/default'
> > svn: REPORT of '/svn/lazarus/!svn/vcc/default': Could not read response
> > svn: body: connection was closed by server. (http://svn.freepascal.org)
> 
> which was after several previous failed attempts. For other tasks, his
> internet connection seems to be working fine. Any suggestions ?

Is he using a proxy ? It could be that the proxy has problems.

Michael.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TClipboard.AssignToGraphic copies empty stream

2007-08-10 Thread skywriter
LCL file clipbrd.inc contains the following method which is unable to 
get picture from clipboard (Lazarus 0.9.22, Win32 platfotm):


function TClipboard.AssignToGraphic(Dest: TGraphic; FormatID: 
TClipboardFormat

 ): boolean;
var
 MemStream: TMemoryStream;
begin
 Result:=false;
 if FormatID=0 then exit;
 MemStream:=TMemoryStream.Create;
 try
   // if not GetFormat(FormatID,MemStream) then exit;
   MemStream.Position:=0;
   Dest.LoadFromMimeStream(MemStream,ClipboardFormatToMimeType(FormatID));
 finally
   MemStream.Free;
 end;
 Result:=true;
end;

I think MemStream object should be filled by some data, isn't it? But i 
don't know how to.


And also TClipboard.HasFormat( CF_Bitmap) returns false. But at the same 
time i sure the clipboard contains bitmap,
and it is possible to paste this bitmap into MS Paint or extract in 
Delphi with "Destination.LoadFromClipboardFormat(CF_Bitmap, 
ClipBoard.GetAsHandle(CF_Bitmap), 0)" method.


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] svn troubles

2007-08-10 Thread Florian Klaempfl
Adriaan van Os schrieb:
> For me, the Lazarus svn server works very fast, but a colleague in
> Canada reports
> 
>> Alazarus/ideintf/idetextconverter.pas
>> Alazarus/ideintf/componentreg.pas
>> Alazarus/ideintf/graphicpropedit.lrs
>> Alazarus/ideintf/treeviewpropedit.pas
>> Alazarus/ideintf/maskpropedit.pas
>> Alazarus/ideintf/Makefile.fpc
>> Alazarus/ideintf/fieldslist.pas
>> svn: REPORT request failed on '/svn/lazarus/!svn/vcc/default'
>> svn: REPORT of '/svn/lazarus/!svn/vcc/default': Could not read
>> response body: connection was closed by server.
>> (http://svn.freepascal.org)
> 
> which was after several previous failed attempts. For other tasks, his
> internet connection seems to be working fine. Any suggestions ?
> 

So I guess he tried already to delete everything and thne checked out again?

So maybe he can try the sf mirror of the svn repository:
svn co https://lazarus.svn.sourceforge.net/svnroot/lazarus/trunk lazarus

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives