Re: [Lazarus] pascal calling convention and code tools problem

2009-05-08 Thread Bogusław Brandys
Mattias Gärtner wrote:
> Zitat von Bogusław Brandys :
> 
>> I'm not sure if that was reported , but if I declare :
>>
>>   function  DoPascalCall(xa, xs, ys, xe, ye,ze, Tolerance : Integer)
>> : Boolean;pascal;
>>
>>
>> it break code tool , it doesn't allow to use class completion (Ctrl+shift+C)
>>
>>
>>   error is :
>>
>> pstestsimple.pas(28,90) Error: zamiast: : znaleziono: ;
>>
>>
>> which means that instead of : : found ;
> 
> I didn't know that "pascal" is allowed for methods.
> I added it to the list. Use svn r19850.
> 
> 
> Mattias
> 

I didn't know that too ;-] but it works ! I know it's a bit strange but 
I'm testing Pascal Script ability to use various calling conventions 
under x86.

Regards
Boguslaw

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


[Lazarus] pascal calling convention and code tools problem

2009-05-08 Thread Bogusław Brandys
I'm not sure if that was reported , but if I declare :

  function  DoPascalCall(xa, xs, ys, xe, ye,ze, Tolerance : Integer) 
: Boolean;pascal;


it break code tool , it doesn't allow to use class completion (Ctrl+shift+C)


  error is :

pstestsimple.pas(28,90) Error: zamiast: : znaleziono: ;


which means that instead of : : found ;


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ubuntu 9.04 (Lazarus too slow)

2009-05-08 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> On Fri, May 8, 2009 at 2:49 AM, Paul Ishenin  wrote:
>> Have you tried NX sessions? I like them ;)
> 
> I used NX sessions to connect from South Africa to Belgium servers. :)
>  I'm pretty sure internal LAN networks will be much faster, but why
> install extra remoting software when remoting is built into X11
> protocol already?
> 
> A simple "ssh -X u...@server" is all that is required to run
> applications remotely and display locally.
> 
> 
> Regards,
>   - Graeme -
> 
> 

Can you confirm my thought that the worst it become when trying to 
resize window in Lazarus IDE run remotely ? (that would proof too much 
repainting calls)

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ubuntu 9.04 (Lazarus too slow)

2009-05-07 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> On Thu, May 7, 2009 at 10:49 AM, Mark Morgan Lloyd
>  wrote:
>> I'm not fully up-to-date with versions etc. but what I've seen is that
>> under some circumstances Lazarus- particularly with gtk2- is
>> unreasonably slow running over a remote (i.e. networked) X session.
>> Speed to a local X session and remotely using VNC is acceptable.
> 
> Lazarus via a remove X session in TOTALLY unusable!! It is clearly a
> bug somewhere in the LCL-GTK2 widgetset, because other GTK2
> applications like Mozilla Firefox, Thunderbird, Nero for Linux, gEdit,
> Nautilus etc all run fine with acceptable speeds.
> 
> I can't remember how Lazarus with GTK1 runs over a remote X session. I
> would really like to develop remotely on our 64bit Linux server, but
> currently can't. This is one of the reasons I really want to get the
> LCL-fpGUI widgetset going - so remote development can become a
> reality.
> BTW: fpGUI based applications also run really nice over a remote X session.
> 
> And no I don't want or like VNC sessions.
> 
> -
> Regards,
>   - Graeme -
> 

My intuition tells me that it's all related with flickering which still 
occurs (I see it in lcl based gui applications under win32).It's not a 
problem with normal optimized video card speed but it is visible when 
using some framebuffer os like that (as I remember from linux course ;-) )

What do you think about it ?

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE UI consolidation (was: Re: lfm as pascal)

2009-05-06 Thread Bogusław Brandys
Alexander Klenin wrote:
> 2009/5/7 Bogusław Brandys :
>> In fact we see here old problem of two rights - both groups are right ,
>> partially.
>>
>> While it would be nice to have as many nice features placed in one "Code
>> explorer" as possible - that WILL double windows, because someone not
>> using docking (due to limited free memory for example) will find faster
>> to use Ctrl+F12 to show not bloated window with unit names then bloated
>> code explorer.
>> So what would show Ctrl+F12 shortcut in such case ?
> 
> Ctrl+F12 is a shortcut for "unit list", not "procedure list" Graeme
> was talking about.
> To me, this confusion is yet another argument that number of windows
> should be reduced ;-)
> 

I know ,it was only an example on not bloated window ;-)

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ubuntu 9.04 (Lazarus too slow)

2009-05-06 Thread Bogusław Brandys
Christian U. wrote:
> Lazarus is only so slow in VirtualBox.
> Its no Lazarus Version issue or an PC issue.
> Its works in every VirtualBox very slow and every other GTK2 app is fast.
> also generated executables are very slow.
> 
> best regards
> Christian

I bet ONLY GUI related executables,right ?
What about console applications (with stripped debug)

Boguslaw

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


Re: [Lazarus] IDE UI consolidation (was: Re: lfm as pascal)

2009-05-06 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> On Wed, May 6, 2009 at 12:28 PM, Martin Friebe  wrote:
>>> 1) "Find procedure" should be merged into "Code explorer"
>> Ok by me. (I never used it :) )  It's partly there anyway.
> 
> Lets discuss it first - I use "procedure list" a *lot*.  And at the
> moment it's behaviour is different to code explorer.
> 
> 
> Regards,
>   - Graeme -
> 
> 

Yes.I agree.+1 vote for Graeme :-)

In fact we see here old problem of two rights - both groups are right , 
partially.

While it would be nice to have as many nice features placed in one "Code 
explorer" as possible - that WILL double windows, because someone not 
using docking (due to limited free memory for example) will find faster 
to use Ctrl+F12 to show not bloated window with unit names then bloated 
code explorer.
So what would show Ctrl+F12 shortcut in such case ?

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE UI consolidation (was: Re: lfm as pascal)

2009-05-06 Thread Bogusław Brandys
Paul Ishenin wrote:
> Alexander Klenin wrote:
> 
>> If there is a general agreement, I can prepare detailed proposal for
>> consolidation,
>> but as a quick sketch:
>> 1) "Find procedure" should be merged into "Code explorer"
> 
> What is "Find procedure"? But since I dont use it I am not against :)
> 
>> 2) "Find in files", "Messages" and "Code observer" should be merged together,
>> with interface most resembling "Find in files"
> 
> "Code observer" shows IDE hints which IDE builds on the fly. "Messages" 
> appeared only after some actions mostly with compiler. "Find in files" 
> is also not a process which IDE do without demand. It is difficult to 
> imagine how you want to combine them together.
> 
> If you want to just add tabs to the Messages window then I am not 
> againts. But maybe just better to dock Code explorer window into source 
> editor? Then you will see "Code observer" all the time.


Excellent idea ! I think it should be true for any window to dock or put 
on top. Lastly I debuged asm code and had to click on Windows menu to 
bring registers window back on top to see how EDX changed. Very 
annoying.In fact under win32 it could be a few lines of code to make 
window stay on top but somehow it didn't work (Form.Handle is not 
correct WinApi HWND or something is messed with window parameters in 
runtime by LCL).Maybe docking will be better.

Best regards
Boguslaw Brandys
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EXC_BAD_ACCESS, Could not access memory

2009-04-27 Thread Bogusław Brandys
Roland Turcan wrote:
> Hello Dmitry,
> 
> Thanks for your reply, but I think, that you haven't understood me
> what I am trying to explain.
> 
> I have binary contents which are copied from memory using by an
> application which is written in Delphi. I am porting an application to
> MacOS X 10.5, but I need to use the same structures as I have in
> Delphi and Kylix where "NOT PACKED" records are aligned.
> 
> The fact is, that FPC compiler on intel based Mac OS X builds up
> application which contains records "packed" by 4 bytes by default.
> 
> I need to get the same behavior in intel based mac os x as I have in
> other platforms.
> 
> What should I do to build FPC compiler which will behave the same on
> all platforms.
> 
> TRoland;
> 
> <<< 27.4.2009 17:04 - dmitry boyarintsev "skalogryz.li...@gmail.com" >>>
> db> use:
> db>   TYPE TMyOne = packed record
> db>   First:integer;
> db>   Second:extended;
> db> END;
> db> to be sure about 20 bytes boundary.
> 
> db> thanks,
> db> dmitry
> 
> 
> db> Hello All,
> db>
> db> I have found some new information about this problem:
> db>
> db> 1.
> db>
> db> TYPE TMyOne =record
> db>First:integer;
> db>Second:integer;
> db>  end;
> db>
> db> ... then the size of this object is 2*4 bytes.
> db>
> db> 2.
> db>
> db> TYPE TMyOne =record
> db>First:integer;
> db>Second:double;
> db>  END;
> db>
> db> ... where I would expect 4 + 8 bytes = 12 bytes
> db> ... but the size of this object is 16!
> db>
> db>
> db> 3.
> db>
> db> TYPE TMyOne =record
> db>First:integer;
> db>Second:extended;
> db>  END;
> db>
> db> ... where I would expect 4 + 16 bytes = 20 bytes
> db> ... but the size of this object is 32!
> db>
> db>
> db> So this proves me, that compiler tries to align the data structure to
> db> multiplied size of biggest element to which fit all elements.
> db>
> db> I have understood this behavior, but this happens me in these cases:
> db>
> db> 1. Delphi 7
> db> 2. Kylix 3
> db> 3. Lazarus on Ubuntu
> db> 4. Lazarus on PowerPC Mac OS X 10.5
> db>
> db> but on Intel Based Mac OS X 10.5 Mini with Intel Duo 2 Core it
> db> DOESN'T. Therefore I have problems with parsing of binaries back to
> db> memory.
> db>
> db> I don't expect CPU specific problem, otherwise it would not work
> db> active projects, therefore I think it must be compiler specific
> db> problem.
> db>
> db> Do you have any idea?
> db>
> db> Thanks in advance.
> db>
> db> Greetings, TRoland;
> db>
> db>
> db> <<< 25.4.2009 9:43 - Roland Turcan "k...@rotursoft.sk" >>>
> RT>> Hello Diettrich,
> db>
> RT>> To tell the truth this code and style I got from previous developer
> RT>> and I really don't know why he decided to get the size of header from
> RT>> the binary instead of getting its size. The fact is, that this
> RT>> "optimistic variant" of coding is on many places. :-|
> db>
> RT>> TRoland;
> db>
> RT>> <<< 24.4.2009 19:56 - Hans-Peter Diettrich "drdiettri...@aol.com" >>>
> HPD>>> Roland Turcan schrieb:
> db>
> BB> How is HeaderLen declared ?
>
> Stream.Read (HeaderLen, SIZEOF (HeaderLen));
>
> where information header's length is stored into binary.
> db>
> HPD>>> The you should verify that HeaderLen <= SizeOf(FHeader), before
> HPD>>>Stream.Read (FHeader, HeaderLen);
> db>
> HPD>>> Otherwise this statement will overwrite the following FItem data, with
> HPD>>> the fatal consequences you already experienced.
> db>
> HPD>>> When a header will ever change in size (or structure), it's wise to 
> HPD>>> store a version number in the data files. Then you can read the stored
> HPD>>> header data into the exactly applicable header type (record), and 
> HPD>>> convert that record into the current THeader definition, field by 
> field.
> db>
> HPD>>> DoDi
> 
> 
> 

Check docs. Also http://wiki.freepascal.org/Mode_MacPas  and
http://bugs.freepascal.org/view.php?id=13187

Cannot help further, because don't know Mac OS.

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EXC_BAD_ACCESS, Could not access memory

2009-04-27 Thread Bogusław Brandys
Roland Turcan wrote:
> Hello All,
> 
> I have found some new information about this problem:
> 
> 1.
> 
> TYPE TMyOne =record
>First:integer;
>Second:integer;
>  end;
> 
> ... then the size of this object is 2*4 bytes.
> 
> 2.
> 
> TYPE TMyOne =record
>First:integer;
>Second:double;
>  END;
> 
> ... where I would expect 4 + 8 bytes = 12 bytes
> ... but the size of this object is 16!
> 
> 
> 3.
> 
> TYPE TMyOne =record
>First:integer;
>Second:extended;
>  END;
> 
> ... where I would expect 4 + 16 bytes = 20 bytes
> ... but the size of this object is 32!
> 
> 
> So this proves me, that compiler tries to align the data structure to
> multiplied size of biggest element to which fit all elements.
> 
> I have understood this behavior, but this happens me in these cases:
> 
> 1. Delphi 7
> 2. Kylix 3
> 3. Lazarus on Ubuntu
> 4. Lazarus on PowerPC Mac OS X 10.5
> 
> but on Intel Based Mac OS X 10.5 Mini with Intel Duo 2 Core it
> DOESN'T. Therefore I have problems with parsing of binaries back to
> memory.
> 
> I don't expect CPU specific problem, otherwise it would not work
> active projects, therefore I think it must be compiler specific
> problem.
> 
> Do you have any idea?
> 
> Thanks in advance.
> 
> Greetings, TRoland;

Have you checked packed records ?


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EXC_BAD_ACCESS, Could not access memory

2009-04-24 Thread Bogusław Brandys
Roland Turcan pisze:
> Hello Dmitry,
> 
> <<< 24.4.2009 16:17 - dmitry boyarintsev "skalogryz.li...@gmail.com" >>>
>>> Stream.Read (HeaderLen, SIZEOF (HeaderLen));
>>>
>>> where information header's length is stored into binary.
> 
> db> HeaderLen is integer, right?
> db> have you checked HeaderLen being large that sizeof(TSomeHeader)
> 
> Of course, that I know now that the problem is, that the binary which
> is parsed contains bigger size that size if Header is.
> 
> db> it's possible, especiialy for Mac files, because of PowerPC and some
> db> structures may use Big-endian byte order, rather than Intel
> db> (little-endian)
> 
> This I know, but are there other differences? I mean sizes of
> datatypes between Win&Linux and Mac (intel/ppc)?
> 

hmm,I smell somthing related to not packed records and different size of 
record in different platforms ..


you should really check what is written to the file and what is read 
from stream.

Not sure, maybe it could be related ? : http://www.freepascal.org/port.var

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EXC_BAD_ACCESS, Could not access memory

2009-04-24 Thread Bogusław Brandys
Roland Turcan pisze:
> Hello Bart and others,
> 
> Thanks for your kindness to test my test case, which works fine in my
> case too, but I have found something what maybe more explain my
> problem.
> 
> TYPE TSomeItem = RECORD
>First :single;
>Second:Single;
>Third :integer;
> 
> TYPE TSomethingArr = ARRAY OF TSomeItem;
> 
> TYPE TSomeHeader   =RECORD
>   ...
> end;
> 
> TYPE TMyObject =class
>  private
>FHeader:TSomeHeader;
>FItems :TSomethingArr;
> 
> ...
> 
> FUNCTION TMyObject.LoadFromStream (Stream:TStream):BOOLEAN;
> ...
>   SetLength (FItems, 0); //!! for testing only -- this line works fine
>   Stream.Read (FHeader, HeaderLen);
>   SetLength (FItems, 0); //!! for testing only -- this line raises an 
> exception
> END;
> 
> 
> If you see the declaration of TMyObject you will find that FHeader
> declaration is followed by FItems and the length of read memory block
> goes over size of FHeader and it affects FItems.
> 
> Hm?
> 
> TRoland;


How is HeaderLen declared ?

Boguslaw


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


Re: [Lazarus] New Lazarus IDE/LCL features since ...?

2009-04-21 Thread Bogusław Brandys
Antonio Sanguigni pisze:
> 
> 
> 2009/4/21 Bee mailto:bee.ogra...@gmail.com>>
> 
>  > http://wiki.lazarus.freepascal.org/New_IDE_features_since
>  > http://wiki.lazarus.freepascal.org/New_LCL_features_since
> 
> Nice, Graeme! :)
> 
> 
> I love that man :)
> 
> Antonio
> 

Awesome! very professionally looking "features page" , even if not 
finished...


Best regards
Boguslaw

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


Re: [Lazarus] lNet and several threads

2009-04-18 Thread Bogusław Brandys
User pisze:
> Which is the simplest method?


You can use synapse.It will be good for a multithreaded server if fpc 
thread support is stable and for just a few clients. It depends on what 
you want to archieve.


Boguslaw

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


Re: [Lazarus] [?? Probable Spam] Re: function StabBackTraceStr(addr:Pointer):shortstring; - problem with subsequent back traces

2009-04-16 Thread Bogusław Brandys
Sergei Gorelkin pisze:
> Bogusław Brandys пишет:
>> There is a problem with this function. To avoid recursion there is a 
>> hack there to  point BackTraceStrFunc to system implementation (which 
>> only shows addresses in hex).Long back trace which mostly ends with 
>> incorrect frame address as I suppose (OpenStabs is returning false for 
>> nil address) - thus function pointer is not returned back to lineinfo 
>> stabs processing method and next back trace contains only addresses .
>>
> Right you are. However, many backtraces *start* with an invalid frame: 
> e.g. when you call a virtual method of an object that is already 
> destroyed, you'll likely end up at a random address.

I attached my proposition of patch here : 
http://bugs.freepascal.org/view.php?id=13518

and here (only windows) for external debug files (.dbg) :

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

Do you have testcases for testing such invalid frames like in example 
above and for testing recursion ?

Would be great if someone looked at proposed solution and checked under 
unix,win64 and other supported systems.

> 
>> This problem is minor if program crashes with exception and stack trace 
>> but in other cases , like in bigger program (any Lazarus ones) , ONLY 
>> first back trace has useful information (source,line number) attached to it.
>> That eliminates any useful logging like multilog for example.
>> And nobody really is able to know correct stack frames length before 
>> calling any of such functions to obtain back trace (that would resolve 
>> problem).
>>
>> How we could fix it ? Is this recursion still a subject here ?
>>
> I fixed one of the causes recently (see exeinfo.pp, rev.12802), but that 
> wasn't enough. In general, code of lineinfo, lnfodwrf and exeinfo has to 
> be checked very carefully to make sure it would not crash at any 
> circumstances. Including possibly unknown/corrupted state of the RTL in 
> case when backtrace is called due to a crash.
> 
>> I have one idea, probably not perfect.
>>
>>
>> How about  a function to initialize
>>   BackTraceStrFunc  : TBackTraceStrFunc;
>>
>>
>> The only way now is to set :
>>
>> BackTraceStrFunc := @SysBackTraceStr; (displays only hex of addresses)
>>
>> Something generic is needed, able to set to StabBackTraceStr if lineinfo 
>> unit (option -gl) is used and only to  SysBackTraceStr in other case.
>> It might be used also to set to user defined function.
>>
>> That way in any such functions in lcl 
>> (DumpExceptionBackTrace,GetStackTrace) or external package (like 
>> multilog), we could initialize BackTraceStrFunc to point again to 
>> correct function before obtaining stack trace.
>>
> For me, it looks simpler and better to restore BackTraceStrFunc 
> unconditionally at the end of StabsBackTraceFunc/DwarfBackTraceFunc.
> Or even better, have it set to stub only for calling GetLineInfo.
> 
> Regards,
> Sergei

That's what I did among other changes.

Regards
Bogusław
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] function StabBackTraceStr(addr:Pointer):shortstring; - problem with subsequent back traces

2009-04-15 Thread Bogusław Brandys
There is a problem with this function. To avoid recursion there is a 
hack there to  point BackTraceStrFunc to system implementation (which 
only shows addresses in hex).Long back trace which mostly ends with 
incorrect frame address as I suppose (OpenStabs is returning false for 
nil address) - thus function pointer is not returned back to lineinfo 
stabs processing method and next back trace contains only addresses .


This problem is minor if program crashes with exception and stack trace 
but in other cases , like in bigger program (any Lazarus ones) , ONLY 
first back trace has useful information (source,line number) attached to it.
That eliminates any useful logging like multilog for example.
And nobody really is able to know correct stack frames length before 
calling any of such functions to obtain back trace (that would resolve 
problem).

How we could fix it ? Is this recursion still a subject here ?

I have one idea, probably not perfect.


How about  a function to initialize
  BackTraceStrFunc  : TBackTraceStrFunc;


The only way now is to set :

BackTraceStrFunc := @SysBackTraceStr; (displays only hex of addresses)

Something generic is needed, able to set to StabBackTraceStr if lineinfo 
unit (option -gl) is used and only to  SysBackTraceStr in other case.
It might be used also to set to user defined function.

That way in any such functions in lcl 
(DumpExceptionBackTrace,GetStackTrace) or external package (like 
multilog), we could initialize BackTraceStrFunc to point again to 
correct function before obtaining stack trace.



Boguslaw Brandys
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multilog exception tracing

2009-04-14 Thread Bogusław Brandys
Bogusław Brandys pisze:
> Hi,
> 
> I found a bug in multilog code used by SendException. Exception was no 
> correctly send with stack trace (no source line informations)
> The problem in my case may be due to encoding,I used example attached to 
> multilog package (encoding UTF8) while multilog using is at CP1250 in my 
> case.
> 
> Anyway,changing AStream.Write into AStream.WriteBuffer resolved problem
> 
> 
> Look at code below:
> 
> procedure TLogger.SendBuffer(AMsgType: Integer; const AText: String;
>var Buffer; Count: LongWord);
> var
>AStream: TStream;
> begin
>if Count > 0 then
>begin
>  AStream:=TMemoryStream.Create;
>  AStream.WriteBuffer(Buffer,Count);
> //AStream.Write(Buffer,Count);
>end
>else
>  AStream:=nil;
>//SendStream free AStream
>SendStream(AMsgType,AText,AStream);
> end;
> 
> 
> Best regards
> Boguslaw
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

I see that problem is deeper. It has a source in problem of avoiding 
infinite recursion while generating stack trace.
The nasty result is that you cannot generate more then one stack trace 
per program execution ! I mean stack trace with full source/line 
information :-(

Problem lies inside lineinfo unit.

Any clues ?

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


[Lazarus] Multilog exception tracing

2009-04-14 Thread Bogusław Brandys
Hi,

I found a bug in multilog code used by SendException. Exception was no 
correctly send with stack trace (no source line informations)
The problem in my case may be due to encoding,I used example attached to 
multilog package (encoding UTF8) while multilog using is at CP1250 in my 
case.

Anyway,changing AStream.Write into AStream.WriteBuffer resolved problem


Look at code below:

procedure TLogger.SendBuffer(AMsgType: Integer; const AText: String;
   var Buffer; Count: LongWord);
var
   AStream: TStream;
begin
   if Count > 0 then
   begin
 AStream:=TMemoryStream.Create;
 AStream.WriteBuffer(Buffer,Count);
//AStream.Write(Buffer,Count);
   end
   else
 AStream:=nil;
   //SendStream free AStream
   SendStream(AMsgType,AText,AStream);
end;


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


Re: [Lazarus] [?? Probable Spam] Re: Packages / Visual Form Inheritance / ComponentsConnection

2009-04-14 Thread Bogusław Brandys
Leonardo M. Ramé pisze:
> If you are referring to .bpl packages, the answer is No, because 
> FPC/Lazarus doesn't use packages.
> 
> But if you create your datamodule inside a .dll or .so library, it's 
> perfectly possible.
> 
> Leonardo M. Ramé
> Griensu S.A. - Medical IT Córdoba
> Tel.: 0351 - 4247979
> 


Are you sure ? Any problems ?

Regards
Boguslaw

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


[Lazarus] [Fwd: Help with external dbg file and lineinfo]

2009-04-14 Thread Bogusław Brandys


 Wiadomość oryginalna 
Temat: Help with external dbg file and lineinfo
Data: Tue, 14 Apr 2009 08:38:37 +0200
Nadawca: Bogusław Brandys 
Adresat: FPC developers' list 

Hi,

Please help me fix this bug: http://bugs.freepascal.org/view.php?id=13499

According to my little knowledge string table immediately follows symbol
table so computation of string table in case of coff symbols is probably
wrong by 4 bytes offset. Yet I don't understand why thos +4 was added here.
There is of course not a complete fix, because I have no access to 64
bit windows.


Boguslaw

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


Re: [Lazarus] BoxRect

2009-04-10 Thread Bogusław Brandys
Doug Chamberlin pisze:
> Carlos German Tejero wrote:
>> I use the fxds in a real application made in delphi 7 and work fine. The 
>> Delphi version of Desicion cube can only used with BDE TDataSet 
>> descendants, the fxds can be used with any TDataSet descendant.
> 
> That's good to hear! I'm very interested in porting to Delphi 2009 but 
> it looks like that is out of the question. Looks like the whole project 
> was abandoned in 2004. I would hope the author would realize there will 
> be no revenue forthcoming and open source the remainder of the code.
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

I have sources of fxds from sourceforge compile and install into 
lazarus. I'm not sure about them however, they contain a few units with 
Borland license header.
At least I proved fxds can be installed in lazarus ide. From quick look 
much changes are needed for chart support and decision change panel.

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Large program size - 1.8 MB for empty GUI project

2009-04-09 Thread Bogusław Brandys
Paul Ishenin wrote:
> Bogusław Brandys wrote:
>> There is another question, which is debug info.I think it's precious to 
>> have correct unit/line information in case of application crash in 
>> customer computer. That means huge above 33MB applications.
>> I would be glad if debug info could be dumped into separate file AND 
>> used by lineinfo and heaptrc in case of exception to show stack trace.Of 
>> course as an optional way of distributing application.
>>   
> Debug info can be placed in a separate file - you need to use -Xg option 
> for that. I have no idea though whether heaptrc or lineinfo units can 
> work with it but gdb can.
> 
> Best regards,
> Paul Ishenin.

Well,they do not work with debug info placed into separate file.It is 
probably minor problem, I've found that .stabs and .stabstr sections are 
not found by function which do it flawlessly when working with original 
executable with debug sections.

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Large program size - 1.8 MB for empty GUI project

2009-04-08 Thread Bogusław Brandys
Paul Ishenin wrote:
> Bogusław Brandys wrote:
>> That's great! Maybe it could be changed so if debug info filename is not 
>> found in debug section of executable then it tries to open a separate 
>> debug file generated by fpc (which can be of the same name as executable 
>> but different extension)
> What for? If you want a separate debug info file (-Xg) then your 
> executable will contain a section with that file name. As result you 
> have a small executable. If you distribute that executable without debug 
> file it will work fine but without line info. If you distribute with 
> debug file then you will have lineinfo. What do you need more?
> 
> Best regards,
> Paul Ishenin.
> ___

Wow,this is exactly what I want.Thank you.Is that really working ? I 
remember having problems with it - no source line info in stack trace 
output in case of external debug file.

Does stabs need to be loaded at program startup ? I would like it to 
work without need to loading debug info from this separate file at 
program start because this is a huge slowdown especially when antivirus 
is scanning file.Ideally it should load stabs only in case of exception 
or stack trace request.

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Large program size - 1.8 MB for empty GUI project

2009-04-08 Thread Bogusław Brandys
Sergei Gorelkin wrote:
> Mattias Gaertner wrote:
> 
>>> Btw a little different question : what is needed to allow lineinfo 
>>> reading stack trace from external file (in case of exception) for 
>>> example of the name corresponding to exe name but with different 
>>> extension. FPC can now dump debug info into such separate file. Such 
>>> feature would be very useful as compilation option for example.
>> Write a lineinfo unit that supports the external file.
>>
> Isn't it already written? It looks like exeinfo.pp (unit shared by 
> lineinfo and lnfodwrf) supports this feature. Didn't test it though.
> However, it gets the name of debug info file from the debug section of 
> the executable, so the executable shouln't be stripped in this case.
> 
> Regards,
> Sergei

That's great! Maybe it could be changed so if debug info filename is not 
found in debug section of executable then it tries to open a separate 
debug file generated by fpc (which can be of the same name as executable 
but different extension).

I must investigate this option.

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


Re: [Lazarus] Large program size - 1.8 MB for empty GUI project

2009-04-07 Thread Bogusław Brandys
Marc Weustink wrote:
> Graeme Geldenhuys wrote:
>> 2009/4/7 Mattias Gärtner :
>>> Uses sections in implementation sections are buggy as long as I know fpc. 
>>> The
>>> problems are known but apparently too hard to track and fix. The bugs 
>>> appear at
>>> random and with various degrees depending on platform and fpc version. In 
>>> some
>>> years you think the bugs are fixed, and then they come back.
>>> You have been warned: Don't use the imp sections.
>>>
>>> I thought this was known:
>>> http://wiki.lazarus.freepascal.org/DesignGuidelines
>> This is the first I here of this. I was always taught to limit the
>> usage of the Interface section's uses clause, so you can prevent
>> circular unit issues. So is FPC the opposite of Delphi in this
>> regards?
> 
> No, but the problem is caused by the way fpc stores info in the .ppu
> Somehow it is possible that the checksum of the interface part stored in 
> the .ppu is affected by the implementation section.
> When editing sources this can lead to strange results, the compiler 
> might think in some cases an interface is changed or not.
> When Lazarus started we put a lot in the uses section of the 
> implementation part. When some source was changed, sometimes a 3 or 
> fourtime compile attempt was needed to compile the while LCL, since 
> everytime the compiler thought a unit was changed whil it was not. 
> Restarting compilation (and keeping the existing units) in most cases 
> resulted in a compiled LCL.
> To avoid this and to make the LCL usabole as "library", most unit cirles 
> were removed. One way to ensure that is by putting all uses in the 
> interface section.
> 
>> I have used FPC since 2.0.2 under Linux and Windows and haven't had
>> any issues. I limit the usage of interface uses clause as much as
>> possible. I believed that is why the smartlinking works so well with
>> fpGUI - I can create a GUI application that is only 340KB in size.
> 
> It might depend on how you compile fpGUI.
> 
> Anyway, back to the subject, I cannot imagine why FPC when smartlinking 
> makes a difference between interface and implementation uses. Especially 
> if you use an external linker, like on linux.
> 
> Marc
> 

Doesn't it require anyway recompilation of all lcl units with -CX option 
(smart linkable) ?

Btw a little different question : what is needed to allow lineinfo 
reading stack trace from external file (in case of exception) for 
example of the name corresponding to exe name but with different 
extension. FPC can now dump debug info into such separate file. Such 
feature would be very useful as compilation option for example.


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to compile lazarus from its SVN source in WinXP?

2009-04-06 Thread Bogusław Brandys
Popeye Spinach wrote:
> 
> I have checked out latest lazarus from SVN using TortoiseSVN. I have 
> also downloaded FPC 2.2.2 installer and fpcbuild2.2.2.
>  
> What then now? I coudn't follow the instructions in http://wiki.lazarus. 
> freepascal.org/Getting_ Lazarusi 
> . The information 
> for compiling under WinXP seems has outdated. Please somebody here tell 
> me how to do that?
> 

Huh ? Install fpc , make sure it can be called from shell. In shell 
(cmd.exe window) in lazarus sources folder do something like :

make clean
make all (or make bigide)


Make sure you have fpc sources somewhere on disk also.

What is fpcbuild ???


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Posible TCustomGrid bug

2009-04-05 Thread Bogusław Brandys
Carlos German Tejero wrote:
> Hi to all!!
> I have an error in my port of fxds in TCustomGrid, maybe is realated 
> with the recent BoxRect implementation.
> I attach a backtrace
> Any hint are welcome
> 
> -- 
> Carlos Germán Tejero
> 
> 
> 
> 
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

BTW, could you explain the purpose of RCS functio in fxds sources ?
I managed to install fxds in lazarus without having any delphi decision 
cube components, but with commenting some functions I cannot find anywhere.

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Large program size - 1.8 MB for empty GUI project

2009-04-03 Thread Bogusław Brandys
Henry Vermaak wrote:
> 2009/4/3 Graeme Geldenhuys :
>> On Fri, Apr 3, 2009 at 2:18 PM, Paul Ishenin  wrote:
>>> I think it will not grow to more than 2MB even after 2 years. Moreover I
>>> suspect size can go down when we start using native resources.
>> Well Paul, it is already way above 2MB!  Using Lazarus (trunk) r19175.
>>
>> LCL-fpGUI = 2,530,336 bytes
>> LCL-GTK1 = 2,700,452 bytes
>> LCL-GTK2 = 2,793,732 bytes
> 
> i get 1,803,196 bytes for lcl-gtk2 (manually compiled with smartlink
> and -O2).  lazarus trunk and fpc trunk.
> 
> henry
> 

There is another question, which is debug info.I think it's precious to 
have correct unit/line information in case of application crash in 
customer computer. That means huge above 33MB applications.
I would be glad if debug info could be dumped into separate file AND 
used by lineinfo and heaptrc in case of exception to show stack trace.Of 
course as an optional way of distributing application.

Btw, under windows antivirus like Kaspersky is scanning new exe files 
and in case of large file it can take a minute or more (when debug info 
is included in exe) ! Imagine a user installed your application and 
first running it, stuck with a problem and calling you that application 
is not working.


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] BoxRect

2009-03-30 Thread Bogusław Brandys
Carlos German Tejero wrote:
> fxds is the same has Delphi Decision Cube. The fxds is a release of the 
> original autor.

OCH! That's great! So is it really free ? Then I'm starting to port it 
too :-)


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] BoxRect

2009-03-30 Thread Bogusław Brandys
Carlos German Tejero wrote:
> Hi to all!!
> I trying to port the fxds (http://sourceforge.net/projects/fxds) package 
> (aka Decision Cube) fro delphi to lazarus.
> For this i need the BoxRect function, but is missing in the LCL.
> 
> The delphi 7 helps says:
> 
> Returns the screen coordinates of a specified set of cells.
> 
> Delphi syntax:
> 
> function BoxRect(ALeft, ATop, ARight, ABottom: Longint): TRect;
> 
> C++ syntax:
> 
> TRect __fastcall BoxRect(int ALeft, int ATop, int ARight, int ABottom);
> 
> Description
> 
> Call BoxRect to obtain the screen coordinates, in pixels, of the cells 
> that run from the column with index ALeft to the column with index 
> ARight and the row with index ATop to the row with index ABottom. The 
> coordinates of cells that are not visible onscreen are not included in 
> the final rectangle
> 
> Any hints to implement BoxRect are welcome.
> 

I'm sorry to disappoint you but seems that this fxds sources are heavily 
based on Borland original decision cube sources from delphi6.
Better check it before any serious usage.

Boguslaw

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


Re: [Lazarus] Share a port through lazarus-ccr

2009-03-30 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> On Mon, Mar 30, 2009 at 9:32 AM, Graeme Geldenhuys
>  wrote:
>> 2009/3/28 Bogusław Brandys :
>>> What is unique in log4delphi compared to multilog package ?
>> And how does both of these differ to the built-in logging support from
>> tiOPF?  I went to the log4delphi sourceforge website. It seems it's
>> usage and features are very similar to tiOPF's logging support, but it
>> still seems that tiOPF has more features and options.
> 
> Saying that, 'multilog' package seems very impressive, but the 3rd
> party component dependencies seem a bit high.  Even so, I might steal
> some ideas from the core code and implement them in tiOPF's logging.
> :-)
> 
> Regards,
>   - Graeme -
> 

How about adding abstract class support from tiOPF to multilog ? That 
way multilog will drop a check on initialization of logging functons. Am 
I correct ? I always thought it was a nice tiOPF logging facility.

Regards
Boguslaw


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


Re: [Lazarus] Share a port through lazarus-ccr

2009-03-28 Thread Bogusław Brandys
Carlos German Tejero wrote:
> The port can be used with delphi or fpc.


What is unique in log4delphi compared to multilog package ?

Boguslaw

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


Re: [Lazarus] Raw print error

2008-12-01 Thread Bogusław Brandys
OSPrinters in rawmodetest example is added to lpr file.
Check your project lpr.

Boguslaw

Diwakoe pisze:
> Dear all,
> 
> Today I try to create printing application using raw mode on win2003,
> sample printing program find at component folder compiled using 0.9.26
> with fpc 2.2.2 svn rev:16885 and run well. All printers show including
> network share printer can print text.
> 
> I try to create new project using code take from examples only one
> event which is show list of printers on Form Create even, compiled
> with no error but error when run (attached).
> 
> Is this code is not suitable with 0.9.26? but why on example folde can
> compile and running well when compiled with this version?
> 
> Any help is appreciated.
> 
> Regards,
> Diwa
> 
> Bellow is the code:
> 
> unit Unit_prt_raw;
> 
> {$mode objfpc}{$H+}
> 
> interface
> 
> uses
>   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
>   StdCtrls, Printers;
> 
> type
> 
>   { TForm1 }
> 
>   TForm1 = class(TForm)
>  ListBox1: TListBox;
>  procedure FormCreate(Sender: TObject);
>   private
> { private declarations }
>   public
> { public declarations }
>   end;
> 
> var
>   Form1: TForm1;
> 
> implementation
> 
> { TForm1 }
> 
> procedure TForm1.FormCreate(Sender: TObject);
> begin
>ListBox1.Items.Assign(Printer.Printers);
> end;
> 
> initialization
>   {$I unit_cetak.lrs}
> 
> end.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

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


Re: [Lazarus] Raw print error

2008-12-01 Thread Bogusław Brandys
"FAQ:
   Q: If I use Printers unit, the call of printer object generate an 
exception "Access Violation".
   A: Add in uses clause of your project, osPrinters."


Best regards
Boguslaw


Diwakoe pisze:
> Dear all,
> 
> Today I try to create printing application using raw mode on win2003,
> sample printing program find at component folder compiled using 0.9.26
> with fpc 2.2.2 svn rev:16885 and run well. All printers show including
> network share printer can print text.
> 
> I try to create new project using code take from examples only one
> event which is show list of printers on Form Create even, compiled
> with no error but error when run (attached).
> 
> Is this code is not suitable with 0.9.26? but why on example folde can
> compile and running well when compiled with this version?
> 
> Any help is appreciated.
> 
> Regards,
> Diwa
> 
> Bellow is the code:
> 
> unit Unit_prt_raw;
> 
> {$mode objfpc}{$H+}
> 
> interface
> 
> uses
>   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
>   StdCtrls, Printers;
> 
> type
> 
>   { TForm1 }
> 
>   TForm1 = class(TForm)
>  ListBox1: TListBox;
>  procedure FormCreate(Sender: TObject);
>   private
> { private declarations }
>   public
> { public declarations }
>   end;
> 
> var
>   Form1: TForm1;
> 
> implementation
> 
> { TForm1 }
> 
> procedure TForm1.FormCreate(Sender: TObject);
> begin
>ListBox1.Items.Assign(Printer.Printers);
> end;
> 
> initialization
>   {$I unit_cetak.lrs}
> 
> end.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

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


Re: [Lazarus] Turbopower's OnGuard or some licensing package

2008-11-14 Thread Bogusław Brandys
Graeme Geldenhuys pisze:
> On Fri, Nov 14, 2008 at 11:23 AM, Vincent Snijders
> <[EMAIL PROTECTED]> wrote:
>> I think for Lazarus 0.9.26 you need the SVN version from:
>> https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/onguard/
> 
> Thanks Vincent, I'll give that a try.
> 
> 
> Regards,
>   - Graeme -
> 
> 

I've ported it to Lazarus long time ago.It used to work fine in past, 
however I don't know if this is still true for current lazarus svn.
If you will find it usable please add a few fpcunit tests if you can ,so 
we will be sure for future that it works fine.


Boguslaw

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


Re: [Lazarus] KOL socketclient object

2008-11-12 Thread Bogusław Brandys
Aleš Katona pisze:
> lNetComponents is the "visual" lNet package and it tries to make a LCLEventer 
> which tries to integrate into LCL/widgetset main loop (see my callaction note 
> from before).
> 
> Obviously this will fail without LCL, although I'd expect a compile-time 
> error, not a runtime error.
> 
> If you get the time, can you give me a backtrace? lNetComponents uses the 
> lclnet unit which depends on LCL units so it shouldn't have compiled.
> 


Try to use synapse library  ported to KOL.


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] instantobjects and lazarus

2008-11-07 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> On Thu, Nov 6, 2008 at 5:05 PM, Alessandro F.Pileci
> <[EMAIL PROTECTED]> wrote:
>> Hi everyone, anyone using instantobjects with fpc/lazarus?
>> Any clue about installing instantobjects in lazarus under linux (ubuntu
>> 8.04)?
> 
> I remember reading months ago that somebody was attempting a to port
> IntstantObjects to FPC/Lazarus, but i have no idea if they actually
> completed it. I guess the IO mailing list might might be your best
> option.
> 
> Alternatively, you could try the tiOPF framework
> (http://www.tiopf.com). We stopped porting the tiOPF-aware components
> to LCL in exchange for a much better design. We use the
> Model-GUI-Mediator design pattern to make any standard components
> "object aware". I use it like that for the fpGUI toolkit, Michael van
> Canneyt uses it with LCL and a few others us it with Delphi's VCL. It
> is a very powerful and flexible design. All code and demos are
> available in the tiOPF repository.
> 
> For any further information regarding the tiOPF, please direct your
> questions to the tiOPF support newsgroup. [news://news.tiopf.com]
> 
> 
> Regards,
>   - Graeme -
> 

I'm working on InstantObjects, but the problem is that it's very 
incompatible with current LCl UTF8, many ansistrings functions, a lot of 
bugs, and nesteddatasets list is in heavy usage.The results are not good 
so far, however I was able to create new SQLDB connector for 
instantobjects and have most of GUI controls compilable, yet a lot of 
bugs prevent it to be usable.

It's not available in public, maybe later.

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Impossible to debug with Lazarus IDE

2008-11-03 Thread Bogusław Brandys
Marc Weustink pisze:
> Horacio Jamilis wrote:
>> Vincent Snijders escribió:
>>> Graeme Geldenhuys schreef:
>>>   
 On Fri, Oct 31, 2008 at 10:19 AM, Martin Schreiber <[EMAIL PROTECTED]> 
 wrote:
 
> Correct. MSEide can not access property values. Fortunately prepending the
> property name with 'F' usual works because of the naming convention.
>   
 That was a handy trick. I managed to debug my program in Lazarus IDE
 yesterday, using that method. Thanks.

 
> Calling a property getter function is dangerous because the function often
> does more than simply return the value.
>   
 I do not think that matters much. Properties are a fundamental
 language feature in Object Pascal and are used often, so the debugger
 must support it. Plus the code you are debugging doesn't care what's
 happing in the Getter method, it is only concerned with the result
 returned. So if the result return is not what you expected in that
 code location, then debug the Getter method or step into the Getter
 method. This worked for Delphi and Kylix from the start.
 
>>> Well, it can become tricky. Suppose you try to debug something in the 
>>> form creating and initial showing. If you inspect the MyForm.Handle, the 
>>> handle gets created. Now, the handle is created at another point in the 
>>> initialization sequence than at normal run time.
>>>   
>> This is a risk, the debugger user shoud be aware of, but viewing and 
>> setting property values must work in the debugger, as it does in Delphi.
> 
> If you can give me a nice way to undo the case vincent described, I'll 
> happily implement that.
> Note that Delphi doesn't handle this either. So evaluating properties 
> can modify the state of the debugee.
> 
>> I am with Graeme in this!
>> I also believe that the Object Pascal Internal Debugger is an important 
>> thing missing in this project, but I think I don´t have the skills to 
>> contribute on this :-(
> 
> Thats one thing, but what is more important is a fully generated debug 
> info. Without this info, a debugger can do nothing.
> At this moment properties cannot be evaluated using the stabs info. 
> period. When using dwarf it can be possible, however we might need a 
> extention to the dwarf spec to get complete support.
> 
> (FYI, stabs and dwarf are the formats fpc uses to write debug info)
> 
> Marc
> 

Isn't dwarf already implemented in fpc SVN version ?


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Impossible to debug with Lazarus IDE

2008-10-30 Thread Bogusław Brandys
Martin Schreiber pisze:
> On Thursday 30 October 2008 11.03:06 Graeme Geldenhuys wrote:
>> Hi,
>>
>> Has anybody actually noticed that it's impossible to debug an
>> application with Lazarus IDE. I normally use tiOPF's Log() methods to
>> debug code or writeln() statements, but today I had a tough problem
>> and wanted to step through a procedure. So I used breakpoints and the
>> Watch List window. Only local declared variables in that method was
>> watchable. Everything else gave errors like "No symbol ?? in current
>> context" or "Syntax error in expression". Also the tooltip
>> expression evaluation doesn't work either, except again only for local
>> variables.
>>
>> See the screenshot in the bug report.  Oh, and in my projects Compiler
>> Options, I had -g and -gl parameters enabled for GDB debugging. No
>> smart linking or optimization enabled.
>>
> Did you add -O- to compiler options? FPC optimizations disturb gdb.
> 
> [...]
> 
>> Anybody know if MSEide does any better? 
> 
> Try it out. ;-)
> 
> Martin
> ___


I can say that I have a lot of "this is not an aggregate" or something 
like that errors when trying to use watches window.

When we could test native Lazarus debugger ? ;-)

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Building Lazarus for win32

2008-10-30 Thread Bogusław Brandys
tommy pisze:
> Vincent Snijders skrev:
>> tommy schreef:
>>   
>>> Vincent Snijders skrev:
>>> Reading the wiki concerning errors of checksum and not finding 
>>> interface, it is stated that the checksum would occur if there are 
>>> several compiled units in the system och several fpc.cfg. I check and 
>>> there are no dubbel units or cfg. However testing the compiler options 
>>> in projektmenu I recieve a lot of warnings about duplicate units. When 
>>> looking at these directories there are no duplicates!
>>> 
>> What duplicate units did Lazarus say there were?
>>
>>   
>>> I have no clue to what is happening. I also whent through with regedit 
>>> to delete all references of lazarus and also deleting the directory in 
>>> documents and settings before doing each new installation.
>>>
>>> 
>> Did you install lazarus in an empty directory, i.e. not over an existing 
>> Lazarus installation?
>>
>>   
>>> The win32-installer version of lazarus with fpc works fine, as long as 
>>> not rebuilding lazarus.
>>> 
>> Vincent
>> ___
>>
>>   
> Good news, now the rebuilding of the ide and packages is working! But How?!?
> It could be that I deleted som entries in registry or after deleting the 
> lazarus svn version gott rid of the file disturbing. For the record, I 
> did install earlier both in a fresh directory and in the old one but 
> with deleting all subdirecories and files.
> 
> Still the compiler test give som warning about the fpc files being 
> duplicate. With the erlier rebuild stop, it was warnings of files in the 
> lazarus directories. Now when it is working the warning is as below from 
> both an empty project and a compiled project:
> 
> WARNING: relative unit path found in fpc cfg: 
> .\fpc\2.2.2\bin\i386-win32\ THIS is issued for all unit paths in fpc,
> 
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd20\httpd.ppu,
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd13\httpd.ppu
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd22\apr.ppu,
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd20\apr.ppu
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd22\apriconv.ppu,
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd20\apriconv.ppu
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd22\aprutil.ppu,
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd20\aprutil.ppu
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd22\httpd.ppu,
> C:\lazarus\fpc\2.2.2\units\i386-win32\httpd20\httpd.ppu
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\unzip\unzip.ppu,
> C:\lazarus\fpc\2.2.2\units\i386-win32\paszlib\unzip.ppu
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\fv\dialogs.ppu,
> C:\lazarus\lcl\units\i386-win32\dialogs.ppu
> WARNING: ppu exists twice: 
> C:\lazarus\fpc\2.2.2\units\i386-win32\fv\menus.ppu,
> C:\lazarus\lcl\units\i386-win32\menus.ppu
> 
> Thanks for taking the time to answer
> it help me to try again
> / Tom
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 


Checksum changed is related to compiler problem or a problem with 
interpretation of some command line switches, I'm not sure,but I had it 
too when using fpc svn version, then I switched back to official fpc 
2.2.2 and that resolved problems.

I have still one error about duplicated ppu but that's another problem 
and didn't cause checksum changed error. The temporarily fix was also to 
clean directories containing components and Lazarus itself from .o and 
.ppu files using clean wizard from Lazarus IDE, but again error was here 
once ppu are in place before compilation.


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Building Lazarus for win32

2008-10-29 Thread Bogusław Brandys
Vincent Snijders pisze:
> Raistware schreef:
>> I had same problem and solved adding this line to 
>> C:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg :
>> -Fuc:\lazarus\ideintf
>>
> 
> This is asking for more trouble. Generally, don't add the path to lazarus 
> sources in 
> a -Fu option, instead use the appropriate directory with compiled units, in 
> this 
> case c:\lazarus\ideintf\units\i386-win32. Otherwise you may have two sets 
> compiled 
> units for the ideintf package and you get errors like checksum changed, etc.
> 
> Better yet, is to add a requirement of the IDEIntf package to the package or 
> project 
> you are trying to compile.
> 
> Vincent
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

If you are using fpc SVN then try fpc 2.2.2

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Bugreport 0012403

2008-10-24 Thread Bogusław Brandys
Mattias Gaertner pisze:
> On Fri, 24 Oct 2008 10:13:09 +0200
> Bogusław Brandys <[EMAIL PROTECTED]> wrote:
> 
>> Hi,
>>
>> bugreport http://bugs.freepascal.org/view.php?id=12403
>>
>> In radiogroup.inc there is a method called procedure 
>> TCustomRadioGroup.UpdateItems;
>>
>> inside is created strange FHiddenButton of class TRadioButton.
>> It of course adds to the list of controls of TRadioGroup even if it's 
>> hidden for use usage. I don't know what it is, presumably some hack.
>>
>> Please explain what is the purpose of this hidden Tradiobutton ?
> 
> The purpose was to support ItemIndex=-1 on gtk1.
> You can remove the hidden button, when the gtk intf can live without.
> 
> Mattias
> 

Does it mean that under gtk1 always one button must be selected ? Is 
this a limitation of gtk1 ? If so, can you propose a way to create this 
hidden button only for gtk1 ? Maybe it could be moved  to widgetset 
level (with empty implementations for other platforms) or any simpler 
solution exists ?


Boguslaw



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


[Lazarus] Bugreport 0012403

2008-10-24 Thread Bogusław Brandys
Hi,

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

In radiogroup.inc there is a method called procedure 
TCustomRadioGroup.UpdateItems;

inside is created strange FHiddenButton of class TRadioButton.
It of course adds to the list of controls of TRadioGroup even if it's 
hidden for use usage. I don't know what it is, presumably some hack.

Please explain what is the purpose of this hidden Tradiobutton ?



Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [Fwd: Checksum changed problem]

2008-10-20 Thread Bogusław Brandys
Bogusław Brandys pisze:
> 
>  Wiadomość oryginalna 
> Temat: Checksum changed problem
> Data: Mon, 20 Oct 2008 09:11:59 +0200
> Nadawca: Bogusław Brandys <[EMAIL PROTECTED]>
> Adresat: [EMAIL PROTECTED]
> 
> Hi,
> 
> I'm struggling with a problem of rebuilding Lazarus IDE with quite a lot
> of interconnected packages. Each time this error occurs:
> 
> Recompiling InstantZeosDBOConnectionDefEdit, checksum changed for ExtCtrls
> InstantZeosDBOConnectionDefEdit.pas(77,12) Fatal: Can't find unit
> InstantZeosDBOConnectionDefEdit used by InstantZeosDBO
> 
> The way I can avoid is first attempt to rebuild IDE which fails then
> rebuild using lazbuild -B with packages rebuild first. That works but
> it's very cumbersome and time consuming.
> 
> What can I investigate to fix that problem ?
> 
> 
> Boguslaw
> 

Example of problem:
(...)
(SYNHIGHLIGHTERMULTI) Loading unit SYNHIGHLIGHTERMULTI
(SYNHIGHLIGHTERMULTI) PPU Name: 
E:\lazarus\components\synedit\units\i386-win32\synhighlightermulti.ppu
(SYNHIGHLIGHTERMULTI) PPU Time: 2008/10/20 16:22:22
(SYNHIGHLIGHTERMULTI) PPU Flags: 217216
(SYNHIGHLIGHTERMULTI) PPU Crc: 150D0E47
(SYNHIGHLIGHTERMULTI) PPU Crc: 148A0295 (intfc)
(SYNHIGHLIGHTERMULTI) Number of definitions: 191
(SYNHIGHLIGHTERMULTI) Number of symbols: 423
(SYNHIGHLIGHTERMULTI) PPU Source: synhighlightermulti.pas not found
(SYNHIGHLIGHTERMULTI) PPU Source: synedit.inc not found
(SYNHIGHLIGHTERMULTI) Load from SYNHIGHLIGHTERMULTI (interface) unit SYSTEM
(SYNHIGHLIGHTERMULTI) Add dependency of SYNHIGHLIGHTERMULTI to SYSTEM
(SYNHIGHLIGHTERMULTI) Load from SYNHIGHLIGHTERMULTI (interface) unit OBJPAS
(SYNHIGHLIGHTERMULTI) Add dependency of SYNHIGHLIGHTERMULTI to OBJPAS
(SYNHIGHLIGHTERMULTI) Load from SYNHIGHLIGHTERMULTI (interface) unit CLASSES
(SYNHIGHLIGHTERMULTI) Add dependency of SYNHIGHLIGHTERMULTI to CLASSES
(SYNHIGHLIGHTERMULTI) Load from SYNHIGHLIGHTERMULTI (interface) unit 
SYNEDITTYPES
(SYNHIGHLIGHTERMULTI) Add dependency of SYNHIGHLIGHTERMULTI to SYNEDITTYPES
(SYNHIGHLIGHTERMULTI) Load from SYNHIGHLIGHTERMULTI (interface) unit 
SYNEDITHIGHLIGHTER
(SYNHIGHLIGHTERMULTI) Add dependency of SYNHIGHLIGHTERMULTI to 
SYNEDITHIGHLIGHTER
(SYNHIGHLIGHTERMULTI) Load from SYNHIGHLIGHTERMULTI (implementation) 
unit SYNREGEXPR
(SYNHIGHLIGHTERMULTI) Add dependency of SYNHIGHLIGHTERMULTI to SYNREGEXPR
(SYNHIGHLIGHTERMULTI) Recompiling SynHighlighterMulti, checksum changed 
for SynRegExpr {impl}
PPU Loading 
E:\lazarus\components\synedit\units\i386-win32\synhighlightermulti.ppu
synhighlightermulti.pas(77,12) Fatal: Can't find unit 
SynHighlighterMulti used by RegisterSynEdit

Maybe it's related to fpc SVN revision I'm using ?
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] test

2008-10-20 Thread Bogusław Brandys

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


[Lazarus] [Fwd: Checksum changed problem]

2008-10-20 Thread Bogusław Brandys


 Wiadomość oryginalna 
Temat: Checksum changed problem
Data: Mon, 20 Oct 2008 09:11:59 +0200
Nadawca: Bogusław Brandys <[EMAIL PROTECTED]>
Adresat: [EMAIL PROTECTED]

Hi,

I'm struggling with a problem of rebuilding Lazarus IDE with quite a lot
of interconnected packages. Each time this error occurs:

Recompiling InstantZeosDBOConnectionDefEdit, checksum changed for ExtCtrls
InstantZeosDBOConnectionDefEdit.pas(77,12) Fatal: Can't find unit
InstantZeosDBOConnectionDefEdit used by InstantZeosDBO

The way I can avoid is first attempt to rebuild IDE which fails then
rebuild using lazbuild -B with packages rebuild first. That works but
it's very cumbersome and time consuming.

What can I investigate to fix that problem ?


Boguslaw

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


Re: [Lazarus] IDE exceptions: how to get stack trace on Windows?

2008-10-10 Thread Bogusław Brandys
Alexander Klenin pisze:
> On Fri, Oct 10, 2008 at 22:41, Alexander Klenin <[EMAIL PROTECTED]> wrote:
> 
>> Tried using GDB too, that of course works, but is very inconvenient.
> 
> For example, pressing F12 to show form designer leads to a SIGTRAP
> when lazarus is run under the gdb.
> Does anyone know why it does so and how to avoid it?
> 

Well,what gdb version are you using ? I hope not based on cygwin ?
Anyway using --debug-log or just --debug command line switch or rebuild 
with win32 console enabled is better choice.However gdb is very good in 
resolving strange but narrow described problems IMHO.
Running IDE under gdb may be unstable because gdb does not know all 
Object pascal structures.

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE exceptions: how to get stack trace on Windows?

2008-10-10 Thread Bogusław Brandys
Bogusław Brandys pisze:
> Alexander Klenin pisze:
>> When using Lazarus IDE, it sometimes fails with various exceptions.
>> In order to debug, or at least identify the source of the problems I
>> need additional info, such as stack trace.
>> Is there an easy method to get that on Windows?
>> The way I like best is to expand exception dialog with additional "Get
>> stack dump" button,
>> but maybe something like that is already implemented?
>>
> 
> Use command line switch like :
> lazarus.exe --debug-log=debug.log   (or other filename)
> 
> or rebuild lazarus IDe with console window enabled
> 
> or E:\projekty\flamenco\program\bin\flamenco.exe --debug-log=debug.log


Sorry.Incorrect paste.Should be :
http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB


> Plenty of options.
> 
> Additionally (guessing here ) there is possibility to add 
> TApplication.OnException handler into lazarus IDE lpr and catch most of 
> exceptions here.Nice idea.
> 
> Boguslaw
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

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


Re: [Lazarus] IDE exceptions: how to get stack trace on Windows?

2008-10-10 Thread Bogusław Brandys
Alexander Klenin pisze:
> When using Lazarus IDE, it sometimes fails with various exceptions.
> In order to debug, or at least identify the source of the problems I
> need additional info, such as stack trace.
> Is there an easy method to get that on Windows?
> The way I like best is to expand exception dialog with additional "Get
> stack dump" button,
> but maybe something like that is already implemented?
> 

Use command line switch like :
lazarus.exe --debug-log=debug.log   (or other filename)

or rebuild lazarus IDe with console window enabled

or E:\projekty\flamenco\program\bin\flamenco.exe --debug-log=debug.log

Plenty of options.

Additionally (guessing here ) there is possibility to add 
TApplication.OnException handler into lazarus IDE lpr and catch most of 
exceptions here.Nice idea.

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Enumerating resourcestring

2008-09-27 Thread Bogusław Brandys
Benito van der Zander pisze:
> Hi,
> Where are the strings like resourcestring a='bcd' stored?
> With
> for i:=0 to LazarusResources.Count-1do
>   ShowMessage(LazarusResources.Items[i].Name);
> they aren't showed.
> 
> Benito


UTF8 problem ?

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


Re: [Lazarus] [?? Probable Spam] Menu style under Vista doesn't look like a Vista menu even with the manifest

2008-09-24 Thread Bogusław Brandys
Kostas Michalopoulos pisze:
> Not a very serious issue, but it breaks consistency with most other 
> applications and you can do nothing about it (i think). Lazarus 
> programs' menu doesn't seem to use Vista's style (or any style at all) 
> and looks like a Windows 95 menu. Is this due to some sort of custom 
> drawing or something like that? Shouldn't this be optional only if 
> needed and use the default menu functionality when not needed (most cases)?
> 
> Here is a picture showing the problem by comparing a Lazarus and a Turbi 
> Delphi window:
> 
> http://gimme.badsectoracula.com/delphilazarusmenustyle.png
> 
> Anyone knows why this happens and how to fix it?
> 
> Kostas "Bad Sector" Michalopoulos
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

Ok.I found something which may be interesting and possible to include 
into LCL also.

http://www.theabsolute.net/sware/delphivista.html


Regards
Boguslaw Brandys
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [?? Probable Spam] Menu style under Vista doesn't look like a Vista menu even with the manifest

2008-09-24 Thread Bogusław Brandys
Kostas Michalopoulos pisze:
> Not a very serious issue, but it breaks consistency with most other 
> applications and you can do nothing about it (i think). Lazarus 
> programs' menu doesn't seem to use Vista's style (or any style at all) 
> and looks like a Windows 95 menu. Is this due to some sort of custom 
> drawing or something like that? Shouldn't this be optional only if 
> needed and use the default menu functionality when not needed (most cases)?
> 
> Here is a picture showing the problem by comparing a Lazarus and a Turbi 
> Delphi window:
> 
> http://gimme.badsectoracula.com/delphilazarusmenustyle.png
> 
> Anyone knows why this happens and how to fix it?
> 
> Kostas "Bad Sector" Michalopoulos
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

IMHO either new manifest is required or new classname or new parameters 
for TMainMenu creation.

I found this : http://www.scriptol.org/vistalook/vistalook.html
Maybe you could check it ?


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [?? Probable Spam] Re: Paintbox complete redraw

2008-09-23 Thread Bogusław Brandys
Howard Page-Clark pisze:
> Benito van der Zander wrote:
> 
> 
>> is there a way to change the whole paintbox in the OnPaint event?
>> For example, if I draw this in Onpaint:
>>  PaintBox1.Canvas.brush.Color:=rgb(random(255),random(255),random(255));
>>  PaintBox1.Canvas.Rectangle(0,0,100,100);
>> and move another window in XP over the paintbox it is striped instead of
>> being filled with a single color.
> 
> When the window covering PaintBox1 is removed, the operating system repaints 
> only the newly exposed region, which your code fills 
> with a (new) randomly generated colour. Unless by chance that new colour 
> happens to coincide with the previous Paintbox colour it 
> will look like exactly what you have coded for: a randomly coloured stripe.
> If you replace
> rgb(random(255),random(255),random(255))
> with
> rgb(100, 100, 100)
> you'll not notice the repainting because it will be painted in the same 
> indistinguishable colour as before (well, there might be 
> some flicker).
> 
> Howard 
> 
> 

What is the cause of flicker ? I see it is common problem in Lazarus for 
all controls under Windows ?
did you found the reason ?


Boguslaw



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


[Lazarus] Flickering problem

2008-09-22 Thread Bogusław Brandys
Hello,


There is large flickering problem now under win32  especially for 
TListView. If I good remember flickering was eliminated by 
DoubleBuffering but it seems not working now.

Is there a WWW page with marked SVN lazarus revisions or snapshots (if 
still available) where flickering doesn't occur ? I think such 
information will be crucial in future to eliminate regression problems.
Such idea may be also useful for other visual appearance problems.


Regards
Boguslaw

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


Re: [Lazarus] Landscape printing problem

2008-09-17 Thread Bogusław Brandys
Jesus Reyes pisze:
> 
> 
> --- El mié 17-sep-08, Jon Foster <[EMAIL PROTECTED]> escribió:
> 
>> De:: Jon Foster <[EMAIL PROTECTED]>
>> Asunto: [Lazarus] Landscape printing problem
>> A: "lazarus" <[EMAIL PROTECTED]>
>> Fecha: miércoles, 17 septiembre, 2008, 11:31 am
>> OK, I've brought this up here before and was told this
>> wasn't a Lazarus 
>> problem. I half way believe that. Half way because it
>> appears to be an 
>> incompatibility between Lazarus and something else.
>>
>> My problem is quite simple. I wrote a report that uses the
>> "printers" 
>> unit for output. I use TPrintDialog.execute to setup the
>> printer and 
>> then use printers.printer() to get a TPrinter object that I
>> then use to 
>> render my report. I'm printing this report landscape,
>> which is where my 
>> problem comes in. The first page is always portrait and
>> every page there 
>> after is landscape.
>>
>> The first thing I do is set the TPrinter's orientation
>> property to 
>> poLandscape. It should always be landscape. The weird thing
>> is this 
>> works on an old SuSE 9.0 install I keep around because its
>> the only 
>> thing that will run this report properly. I've tried it
>> on two other 
>> current versions of Linux: Debian 4.0 and Ubuntu 8.04. Both
>> of these 
>> exhibit the problem. I'm using the exact same compiled
>> binary on all 
>> distributions.
>>
>> My build environment is using FPC 2.2.0 and Lazarus 0.9.25
>> from SVN, an 
>> older version downloaded sometime around January 2008.
>> I'm running on 
>> Intel 32bit Linux on all the systems that I tried. Here are
>> hopefully 
>> relevant software versions for the three distros I've
>> tried it on:
>>
>> Distro   GS  CUPSHPIJS   Works?
>> Ubuntu 8.04  Artifex GPL 8.611.3.7   2.8.2   
>> Debian 4 ESP 815.03  1.2.7   2.6.10  
>> SuSE 9.0 ESP 7.071.1.19  2.1.4   Y
>>
>>
>> I've listed HPIJS because that is the print driver I
>> need to support my 
>> HP Business Inkjet 1200. In the SuSE version I built the
>> HPIJS myself. 
>> The other two I'm using what came with the distro.
>>
>> This is making me crazy. Any help would be appreciated.
>>
>> THX - Jon
>>
>> -- 
>> Jon Foster
>> JF Possibilities, Inc.
>> [EMAIL PROTECTED]
>> 541-410-2760
>> Making computers work for you!
>>
> 
> 
> 11 days ago, in revision 16443 a fix for landscape page orientation was 
> commited, please try that revision or newer and report back if it's fixed, if 
> not please submit a bug report and a sample project.
> 
> Jesus Reyes A.
> 

Well,additionally you could test using other printer and other printer 
driver on each of mentioned Linux distros.


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Showmodal trouble

2008-09-17 Thread Bogusław Brandys
Sebastian Kraft pisze:
> Am Mittwoch, 17. September 2008 14:30:54 schrieb Graeme Geldenhuys:
>> On 9/17/08, Sebastian Kraft <[EMAIL PROTECTED]> wrote:
>>>  But sometimes when I click on the Mainform behind Form1 Mainform comes
>>> to front and Form1 is hidden behind it I am using GTK2 widgetset from
>>> svn.
>> Under Linux, Modal forms and "stay on top" are simply requests to the
>> window manager. Not all windows managers are equal, and will not
>> always act on your request.
>>
>> You will find that in the case of Modal forms, you might be able to
>> click and bring focus to other non-modal forms, but you shouldn't be
>> able change anything in those forms.
>>
> exactly... all other forms are disabled. So if I loose focus on my modal form 
> it is quite difficult to bring it back because the modal form is not in 
> taskbar...
> ___

That recalls me similar bug under Windows (I suspect it is regression 
because long time ago when I coded OnMinimize/OnMaximize events it was 
working well) - if you show modally dialog or form and close it focus is 
not returned to previous one (even if it's main form), so working using 
keyboard is very difficult now.


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Problem working with Params in TSQLQuery

2008-08-19 Thread Bogusław Brandys
Eduardo Lopez pisze:
> 
> Yes!! It works now.!!
> 
> My challenge is now:
> 
> a) modify all my db structure or b) replace the sqldb components with zeos.
> 
> Thank you very much to all!!
> 
> Eduardo.


c) write padding function


:-)


> On Tue, 19 Aug 2008, Eduardo Lopez wrote:
> 
>  > I'm sorry. The table has a basic structure:
> 
> CREATE TABLE USUARIOS
> (
> CODUSU Char(12) NOT NULL,
> APENOMB Char(40) NOT NULL,
> PASSWOR Char(12) NOT NULL,
> CONSTRAINT PK_USUARIOS PRIMARY KEY (CODUSU)
> );
> 
> Aha.
> This is probably your problem. Try extending the parameter value
> so it has the declared length by padding it with spaces.
> 
> 
> The other way is to declare the table as
> CREATE TABLE USUARIOS
> (
> CODUSU VARChar(12) NOT NULL,
> APENOMB VarChar(40) NOT NULL,
> PASSWOR VarChar(12) NOT NULL,
> CONSTRAINT PK_USUARIOS PRIMARY KEY (CODUSU)
> );
> 
> Could you try this ?
> 
> Michael.
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org 
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
> 
> Yahoo! Cocina
> Recetas prácticas y comida saludable
> Visitá http://ar.mujer.yahoo.com/cocina/
> 
> 
> 
> 
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

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


Re: [Lazarus] TButton must now become a custom draw component

2008-08-06 Thread Bogusław Brandys
Graeme Geldenhuys pisze:
> Hi,
> 
> Yes I had to mention this, because it was one of the things I bitched
> about so often in the past!.
> 
> As per the Lazarus design guidelines (I don't really know where those
> are), Lazarus *must* be as compatible with VCL as possible.  So after
> watching the "What's new in VCL" which is going to be Delphi 2009
> (Tiburon), TButton can now take an image, do image padding and
> reposition the image. Only way for that to happen on all platforms, is
> to be a custom drawn button!!!  So basically TBitBtn can fall away, or
>  be renamed to TButton.  The old TBitBtn can then become an alias to
> TButton for backwards compatibility.
> 
> And seeing that TButton must now be custom drawn, we can finally get
> the long last feature. Changing the button background color (my
> original gripe) like CLX. :)
> 
> At this rate (although slow), all VCL components will one day be
> custom draw, which basically means VCL will be a fpGUI clone.  ;-)
> 
> If anybody else wants to what the video, here is the direct link:
>  
> http://video.codegear.com/Tiburon/WhatsNewInTheVCL_English/WhatsNewInTheVCL.flv
> 
> 
> Regards,
>   - Graeme -
> 
> 
> ___
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 


That would require a lot of improvement in repainting controls because 
such LCL I suppose would be deadly slow with all buttons custom drawn.
Just my two cents little opinion...



Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] WM_QUERYENDSESSION

2008-08-06 Thread Bogusław Brandys
Luca Olivetti pisze:
> En/na Luca Olivetti ha escrit:
>> En/na Luca Olivetti ha escrit:
>>> Hello,
>>> I see that in win32callback.inc, WM_QUERYENDSESSION filters by LParam=0.
>>> This allows me to block system shutdown or reboot (by setting 
>>> cancel:=true in  an ApplicationProperties OnQueryEndSession event) but 
>>> *not* intercept session closing (since LParam is <>0 in that case, see 
>>> http://msdn.microsoft.com/en-us/library/aa376890.aspx).
>>> Maybe the lcl should pass on the message even if LParam is <>0 (but it 
>>> should give a wey to differentiate cases).
>>> BTW, the same happens for WM_ENDSESSION, so the app isn't notified that 
>>> the session is being closed.
>> As a temporary solution, I just commented out the "and (LParam=0)" in 
>> win32callback.inc, both for WM_QUERYENDSESSION and for WM_ENDSESSION.
> 
> No opinions on this? Should I file a bug or this is the intented 
> behaviour. If the latter, what about catching session closing?
> 
> Bye


Feel free to modify it.Maybe add variable Reason with default value 
endShutdown (=0) defined as constant so older code would be unchanged to

Application.IntfQueryEndSession(CancelEndSession);


so


{--
   procedure TApplication.IntfQueryEndSession(var Cancel : Boolean);
--}

in application.inc may become :

{--
   procedure TApplication.IntfQueryEndSession(var Cancel : 
Boolean;Reason : Integer = endShutdown);
--}


?


Sorry,can't help much it was so long ago when I needed this message handler.

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Patch win32callback

2008-06-12 Thread Bogusław Brandys
JoshyFun wrote:
> Hello Paul,
> 
> Thursday, June 12, 2008, 2:02:50 PM, you wrote:
> 
>>> When the application is being activated StayOnTop flags are being
>>> restored and window application moved to top of ZOrder.
>>>   
> PI> Correct. Can you attach another patch in more usual format which 
> PI> tortoise svn or another svn tool do. I dont understand your format and
> PI> my tools too.
> 
> I had used the diff.exe present in lazarus bin folder. I can not use
> Tortoise because svn.lazarus is not rechable using my DSL, it is a
> common problem with some ISPs. One connect works and the next one will
> not and wait forever, the behavior is completly random. Since a week
> ago everything seens to work but I'll wait a few days to verify that
> everything is fine.
> 
> To manually apply the patch simply remove lines starting with "<" and
> replace them using lines marked with ">". I had attached the same diff
> using RCS format. Basically it simply check that
> WindowsInfo.StayOnTopList have something, if empty it does not apply
> the SetWindowPos.
> 
>>> I was unable to see any possible side effect of this patch as when
>>> StayOnTop windows are present behaviour changes to work as before the
>>> patch.
>>>   
> PI> This needs to be tested in application with StayOnTop forms.
> 
> I had tested it, but please do it too.
> 
> PI> This things needs to be rewriteen in more generic way since not only
> PI> win32 but other widgetsets should do the same clearing/restoring 
> PI> stayontop on activate/deactivate.
> 
> To my needs at least (I'm not using stayontop windows) this patch
> solves 80% of the problems, but there are other SetWindowPos which
> changes the ZOrder that I think that could be prevented (SWP_NOZORDER)
> without impact but as I do not know exaclty the purpose of that call I
> can not verify that everything works as before (apparently works as
> before).
> 
>>> PS: Is the remove of StayOnTop flags expected ? StayOnTop flags in
>>> windows is desktop wide, so a deactivated application with StayOnTop
>>> should keep its StayOnTop windows on top, or maybe I'm wrong ?
>>>   
> PI> Yes, it is expected. 1) Who needs another application windows when he
> PI> doesnot working with it? 2) This is delphi compatible 3) We have many
> PI> complains when we did not do so in bug-tracker.
> 
> 1) In the past I wrote a little application that uses StayOnTop system
> wide window as a drop target ;) Of couse it must be visible everytime.
> 2) Nothing to say :) That's important (never checked against Delphi).
> 3) he, he, he... sure :)
> 
> 


Quick question: is this related to problem with MessageDlg or 
ShowMessage called from form shown modally ? I see in latest Lazarus SVN 
that each time I'm doing it focus is not returned properly to the 
modally shown form (it looks like a lost focus)


regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Bug using Lazarus under KDE (minimizing)

2008-06-08 Thread Bogusław Brandys
Chris Kirkpatrick wrote:
> 
> Graeme Geldenhuys wrote:
>> Hi,
>>
>> Another issue when using Lazarus under KDE. This seems to be a Lazarus
>> issue, because my fpGUI based applications do not behave like this.
>> Every time I switch desktops and return to the desktop that is running
>> Lazarus, all the Lazarus windows are minimized. That's 5-7 windows I
>> have to restore one by one, every time!!
>>
>>   
> I have experienced this problem in KDE, too (using Lazarus with GTK2). 
> It's annoying, but you don't have to restore all the windows one at a 
> time: right-click on the Lazarus icon in the  taskbar at the bottom of 
> the screen and you are offered a number of options including 'Restore 
> all'. This does the trick!!
> 
> Regards - Chris

As we are talking about it I realized that sometimes the same problem 
occurs under windows, except only main window (that one with toolbar) is 
not shown and the solution is to click on taskbar button of Lazarus and 
use 'Restore' option.

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] External: SIGSEGV

2008-05-28 Thread Bogusław Brandys
[EMAIL PROTECTED] wrote:
> Thanks to All of You who have tried to help!.
> 
> 
> 
> I have located the problem and found a solution, but was not able to 
> reproduce it yet in a separate test app.
> 
> 
> 
> 
> 
> The structure of the code looked like this:
> 
> 
> 
> MyObj = class;
> 
> private
> 
>Obj1: TOtherObj;
> 
>Obj2: TOtherObj;
> 
> . . .
> 
> end;
> 
> 
> 
> procedure T_Main.Button1Click(Sender: TObject);
> 
> begin
> 
>with Obj1 do begin
> 
>SomeProcedure(Obj2);
> 
>end;
> 
> end;
> 
> 
> 
> The exception occurred while reading "Obj2";
> 
> 
> 
> The problem completely disappeared after removing the "with ..." block, 
> which was actually unnecessary junk code since no Obj1 property or method 
> was used in that block.
> 
> 
> 
> 
> 
> I am not sure, but Obj1 and Ojb2 being of the same type, and Obj1 not being 
> used may have had something to do with it. Just guessing. :)
> 
> 
> 
> I will try to make a bug report, when I will be able to reproduce the bug.
> 
> 
> 
> Thanks for your help again!
> 
> 
> 
>- Leslie -
> 
> 


Did you tried to compile program and run outside of the IDE ? Still 
crashing ?


Boguslaw

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


Re: [Lazarus] Postgres database again...

2008-05-28 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> 2008/5/28 Bogusław Brandys <[EMAIL PROTECTED]>:
> 
> Thanks for the information.
> 
> 
>> "As you are transforming your GUID, try to keep the least volatile bytes at
>> the front and the most volatile at the end.  Firebird uses prefix
>> compression in its indexes and the saving in space on the index pages
>> absolutely will improve performance on all but the most trivial data sets.
>>
>> Ann"
> 
> Sorry, but this might sound dumb... What what exactly does this mean?
> Am I supposed to change the GUID somehow?
> 
> 
> 
> Regards,
>  - Graeme -
> 

Sorry,I don't know details either , just found  a bunch of discussion 
from old times...

"Luke,

if you really have to use GUID's, than one possibillity would be to
reverse the GUID, so that the
equal parts are not in front of the GUID-string. This speeds up index
searches.
If you do not have to use GUID's, use Generators.

Uwe"


"straight GUIDs (e.g. generated by Delphi written application) has their
significant part at the end which does not provide for optimal indexing. Use
of the UDF generating UUID (reverse GUID) is said to improve performance
over the PK dramatically.
As for fieldtype - there are some suggestions here on the gourp as to what
datatype to use.
Here I quote a recent discussion with some pros and cons:

(read from the bottom perhaps)
It is a valid point, but you need to do the math for the specific problem
being resolved to decide how valid.  With small index column sizes you need
much more detail than I have at my fingertips to compute a real value, but
let's say that you go to a 4 byte integer key.  You lose 34 bytes from the
index entry footprint, giving 50-34=16 bytes per entry plus some overheads.
On an 8k page this gives you roughly 500 entries.  At two levels in the B+
tree you address 250,000 rows.  At three levels you can address 125,000,000
rows.

If you table space is expected to grow to 4,000,000 rows then you still have
to expand the index to three levels, but you can go a lot further on three
levels than you can with a larger key.

GUID's are ideal for distributed systems, but are not the most efficient way
of handling centralized systems.

It's a matter of the favorite hammer.  Sometimes you need a paintbrush, and
a hammer just won't do.   You can't let your (or my) favorite solution be
the only solution you know because it is not appropriate for every
situation."

> ___
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
> 
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

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


Re: [Lazarus] Postgres database again...

2008-05-28 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> Joao Morais wrote:
 nightmare. Knowing you have a guaranteed unique ID from the start is a 
 big plus.
>> Why? Btw you don't need to know the ID before store the objects since 
>> you are using a persistence framework.
> 
> As I said in a previous post, our business objects don't reference each 
> other via there OID, so no it's not important for me. And yes the OPF 
> frameworks takes care of the nitty gritty stuff.
> 
> For those not using the tools I use, might not be so luck. In example... 
> Using the standard DB components in Delphi or Lazarus and using 
> Master/Details grids and tables, you need to save the master record 
> first, find out the unique identifier of the master record, include that 
> in the SQL for the detail records.
> 
> In the this example you need a extra round trip to the database if your 
> application can't generate a unique identifier itself. GUID's make this 
> a no brainer. :)
> 
> 
> Regards,
>- Graeme -
> 


Graeme,

I'd like to point your attention to the fact mentioned long time ago on 
Firebird list by Ann Harrison:

"As you are transforming your GUID, try to keep the least volatile bytes at
the front and the most volatile at the end.  Firebird uses prefix
compression in its indexes and the saving in space on the index pages
absolutely will improve performance on all but the most trivial data sets.

Ann"

Simply using GUID's in VARCHAR or CHAR column slowdown queries much 
after 4 millions of rows approached due to ineffectively used indexes.


Regards
Boguslaw

> ___
> fpGUI - a cross-platform GUI toolkit using Free Pascal
> http://opensoft.homeip.net/fpgui/
> 
> 
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

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


Re: [Lazarus] What is 'Restriction Browser'?

2008-05-28 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> [ forward ]--
> 
> http://bugs.freepascal.org/view.php?id=1188
> 
> Reported By:Gory Bugs Department
> Assigned To:Vincent Snijders
> 
> .
> 
> --
>  (0019773) Vincent Snijders (manager) - 2008-05-28 09:07
>  http://bugs.freepascal.org/view.php?id=1188#c19773
> --
> TButton.Color cannot be changed with the win32 widgetset. This is an
> restriction of the win32 widgetset and this can be seen in the restriction
> browser.
> 
> [ end forward ]--
> 
> @Vincent
> What is a 'restriction browser'?  Where do I find it in Lazarus


It's here in IDE .It's new feature - a list of unsupported topics per OS 
inside Lazarus LCL and widgetset.
View->Restriction browser

Regards
Boguslaw


> 
> Note:
>   It's very annoying that you cannot post a note to a 'resolved' item
> in Mantis!!!  Is there any way to lift this restriction?
> 
> 
> Regards,
>  - Graeme -
> 
> 
> ___
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

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


Re: [Lazarus] Postgres database again...

2008-05-28 Thread Bogusław Brandys
Michael Van Canneyt wrote:
> 
> On Tue, 27 May 2008, Graeme Geldenhuys wrote:
> 
>> Michael Van Canneyt wrote:
 Cons:
   * Yes it's longer than an Integer type and uses more space, but with 
 today's hard drive sizes that is totally irrelevant.
>>> The size on disk is not relevant, but the size in memory is. Speed is an
>>> issue, and the smaller the data is, the more can be kept in memory, and the
>>> faster the engine can traverse it when doing queries.
>>>
>>> It's the very reason why I don't use GUIDs as primary keys.
>>>
>>> If you have a busy server, 8 CPU's, lots of memory, but 500 simultaneous
>>> connections, such seemingly unimportant details all of a sudden do become 
>>> important.
>> Memory is cheap too!  :)
> 
> Do you know a server that can handle memory to keep a 2Gb database 500 times
> in memory ? And the database is expected to grow in size considerably.
> I don't even mention backup and restore times :(
> 
> I understand and very much appreciate the technical advantages of a GUID, 
> but the database size at a certain point simply dwarfs the importance of 
> all other factors... 
> 
> I'm eagerly awaiting the Firebird 2.5 release, which should have proper
> SMP support in the superserver architecture. That should make it possible
> to keep the database in memory only once, instead of a copy per connection
> as in classical server. And then size suddenly will be much less of an
> issue. 
> 
> But until then: size matters - to paraphrase 90% of spam in my mailbox ;-)
> 
> Michael.

I think you are wrong about Firebird.It doesn't keep database in memory 
, only page buffers which is adjustable and should be really set to 
lower values then for Firebird Superserver.

GUID's are bad however because of indexing. They should be reversed or 
something , I don't know exactly to limit time required to search over 
indexed GUID field in Firebird database.



Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] External: SIGSEGV

2008-05-27 Thread Bogusław Brandys
Michael Van Canneyt wrote:
> 
> On Tue, 27 May 2008, Jon Foster wrote:
> 
>> SIGSEGV (otherwise known as a segfault) is a *nix signal indicating that the 
>> an illegal address was
>> accessed. Normally it can't be caught with a try...except. You have to muck 
>> about with signals to catch it
>> with try ... except.
> 
> This is not correct.
> The RTL catches this signal and converts this to an exception, if you use the 
> sysutils unit.
> 
> Michael.
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 

My advice: test program outside of the Lazarus IDE.If it crashes then 
it's not an IDE, but I suspect it's all about gdb.


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] External: SIGSEGV

2008-05-27 Thread Bogusław Brandys
[EMAIL PROTECTED] wrote:
> 
> 
> Hi,
> 
>  
> 
>  
> 
> I have tried to google for "External: SIGSEGV" exception, but nothing 
> what came up helped.
> 

It's from gdb debugger . Search for "SIGSEV gdb" and I'm sure you will 
find much more.


> 
> Is there any detailed explanation about when this exception occurs?
> 
>  
> 
> In my program it  pops up when reading an unassigned (nil) object property:
> 
>  
> 
>   MyObject2_Var:= MyObject1.MyObject2;   (MyObject1.MyObject2 is nil)
> 
>  
> 
> The strange thing is that the assignment is in a try ... except block, 
> and the debugger does not stop at the breakpoints in the exception
> handling part.


It may be a bug in gdb ..I don't know, but if debugger is trying to 
access some memory which MyObject2_Var is pointing to and it's not 
accessible then



>  
> 
> I am totally clueless.
> 
Me too sometimes. Debugging with Lazarus under windows really need a 
total rebuild with native debugger, but it looks like hopeless wish now...

Regards
Boguslaw

> 
> Thanks for reading
> 
>  
> 
>   - Leslie -
> 
>  
> 
> 
> 
> 
> ___
> Lazarus mailing list
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

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


Re: [Lazarus] Lazarus Multicast support

2008-05-23 Thread Bogusław Brandys
ik wrote:
> As far as I know, it's a raw socket issue, so you can implement it
> yourself using the sockets api.
> 
> Ido
> 

Check Synapse for Delphi/Lazarus.

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] embedding fomrs into forms

2008-05-17 Thread Bogusław Brandys
Marc Santhoff wrote:
> Am Samstag, den 17.05.2008, 14:15 +0200 schrieb Marc Santhoff:
>> Hi,
>>
>> is it possible to use a TForm inside a TForm?
>>
>> Imagine a program consisting of a frame and some plug-ins. The plug-ins
>> should get designed using lazarus, each having it own form. When loaded
>> those forms would be embedded into the main applications form as a
>> frame, e.g. each on a tab of a notebook or similar.
> 
> Testing showed it does not work, if done like this:
> 
> procedure TForm1.FormCreate(Sender: TObject);
> var
>   f2: TForm;
> begin
>   f2 := TForm2.Create(Panel2);
>   f2.show;
> end;
> 
> the secomd form is shown seperately and managed by the window manager.
> Using MDI didn't do it either.
> 
>> If it is not possible, what alternative ways of designing something like
>> that should I consider?
> 
> The last possibilities I see are streaming parts of the form myself or
> using the dock manager thingy. Can someone explain how docking would be
> done (or point me to the docs), please?
> 
> Marc


  procedure TForm1.FormCreate(Sender: TObject);
  var
f2: TForm;
  begin
f2 := TForm2.Create(Panel2);
f2.Parent := Panel2;
f2.show;
  end;


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


Re: [Lazarus] Fonts Advise between Windows & Linux

2008-04-14 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> Marco van de Voort wrote:
>> And also Windows has a "large fonts" options (see display options). Elderly
>> people frequently have "large fonts" enabled.
> 
> Or when you mistakenly bought a laptop with a 15.1" display with 
> resolution of 1920x1600. At 96 dpi things are *very* small. :-) But 
> changing Windows to 120 dpi cause many applications to be unusable, 
> because they hard-coded co-ordinates and sizes to 96 dpi. A very 
> frustrating experience! Nvida and ATI display control panels are big 
> culprits!!
> 
> 
> Regards,
>- Graeme -
> 

Oh! So we should have also an advise how to code dialogs in Lazarus to 
be properly adjusted when DPI changed :-(
Comments, thoughts ?


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus+GDB=app slow start

2008-03-30 Thread Bogusław Brandys
Marc Weustink wrote:
> Denis Golovan wrote:
>> Hi, all
>>
>>   I think everybody noticed slow application start under Lazarus and GDB as 
>> debugger. On my Athlon 1200, starting of 3 form application (15Mb size 
>> including gdb debug info) costs about 7-8 seconds. Without debugger, main 
>> form pops up almost immediately. 
>>   Console output shows that debugger tries to load debug info for all units 
>> in project before letting program go. Some googling also shows the same 
>> problems with other languages. 
>>   So that's the question :) - is it possible to reduce gdb starting time by 
>> loading debug info on-demand? Maybe some FAQ already exists?
>>   
>>   AFAIU, the more project - the more time it will take debugger to load all 
>> (obviously not needed) debug symbols.
> 
> Unfortunately I think hat is how gdb works. Even if I look at my own 
> debugger, it must load/parse all info before it knows what symbols are used.
> 
> This is one of the reasons why Lazarus keeps the debugger running. If 
> you want to debug multiple sessions without compiling a new exe (see 
> compiler options, last tab, uncheck compile on run), GDB doesn't have to 
> load the exe again. So you get faster start times.
> 
> Marc


Also I found KAsperky Antivirus slowing debbuging a lot.I have to 
temporarily turn off on access scan and it's going to be much more faster...

Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Conditional breakpoints

2008-03-15 Thread Bogusław Brandys
Marc Weustink wrote:
> zaher dirkey wrote:
>> After 10 year work on Delphi, i have not used "conditional breakpoints" 
>> at all, Just Break Point and Watch variables is enough for me.
> 
> For some cases I use conditional breakpoints (in case where some 
> variable is true or false)
> 
>> But  one think i like to have Watch variables inside Objects like
>>
>> AObject.X
> 
> unfortunately, gdb does not support properties.
> 
> Marc
> 

So,when we can test new native debugger with all Pascal language 
supported  ?  ;-)


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE/LCL

2008-03-10 Thread Bogusław Brandys
ik wrote:
> On Mon, Mar 10, 2008 at 4:12 PM, Paul Ishenin <[EMAIL PROTECTED]> wrote:
>> Leonardo M. Ramé wrote:
>>  >> Sorry, we dont have telepathy abilities...
>>  >>
>>  >
>>  > Can you add telepathy abilities to the next Lazarus version?
>>  >
>>  > That would be great!
>>  >
>>  This is for Mattias - he is our innovation manager.
> 
> I he forgotten to bind the libraries again... libtelepathy2
> 

Please,don't forget creating a wiki page> I would like to learn how to 
use it.


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus IDE expert

2008-03-06 Thread Bogusław Brandys
Mattias Gaertner wrote:
> On Wed, 05 Mar 2008 20:29:39 +0100
> Bogusław Brandys <[EMAIL PROTECTED]> wrote:
> 
>> [...]
>> For example I have to find a project file lpr
> 
> See here
> http://wiki.lazarus.freepascal.org/Extending_the_IDE#The_.lpr.2C_.lpi_and_.lps_file_of_a_project
> 
> 
>> and add or update resource there.
> 
> and here
> http://wiki.lazarus.freepascal.org/Extending_the_IDE#Adding_a_resource_directive_to_a_file
> 
> 
> Mattias
> 


Thank you.Please explain also how to detect if unit source was changed 
in editor, assuming that I have only a unit filename for example.
How can I register a hook called when project is changed (new project is 
opened) ? I need to update an IDE expert dialog contents when new 
project is opened...


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus IDE expert

2008-03-05 Thread Bogusław Brandys
Mattias Gaertner wrote:
> On Wed, 05 Mar 2008 11:14:08 +0100
> Bogusław Brandys <[EMAIL PROTECTED]> wrote:
> 
>> Hi,
>>
>> Please provide information of URL to learn how to build Lazarus
>> expert. I have a Delphi expert which parses and modifies units of
>> currently opened project and I want to port it into Lazarus.
>>
>> I must have know how to list project sources (units), how to find 
>> project lpr file to add resource by expert.
> 
> There is a rudimentary start here
> http://wiki.lazarus.freepascal.org/Extending_the_IDE
> 
> There were some articles in the german toolbox about various topics.
> 
> I guess this is a good chance to document some parts in the wiki and
> fpdoc.
> 
> 
> Mattias
> 


I cannot find important information :
when looping through TSourceEditorWindowInterface.Items
how can I check if unit belongs to currently opened project ?


how can I loop through all project files, not just open units in source 
editor ? For example I have to find a project file lpr and add or update 
resource there.

A workaround ?

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] SessionProperties limited size problem

2008-03-05 Thread Bogusław Brandys
Paulo Malheiros wrote:
> Hello Mattias,
> 
> I made a test Application in Linux - SVN 14419
> Added 23 TEdit to Form1 and its SessionProperties
> 
>TForm1 = class(TForm)
>  Edit1: TEdit;
>  Edit10: TEdit;
>  Edit11: TEdit;
>  Edit12: TEdit;
>  Edit13: TEdit;
>  Edit14: TEdit;
>  Edit15: TEdit;
>  Edit16: TEdit;
>  Edit17: TEdit;
>  Edit18: TEdit;
>  Edit19: TEdit;
>  Edit2: TEdit;
>  Edit20: TEdit;
>  Edit21: TEdit;
>  Edit22: TEdit;
>  Edit23: TEdit;
>  Edit3: TEdit;
>  Edit4: TEdit;
>  Edit5: TEdit;
>  Edit6: TEdit;
>  Edit7: TEdit;
>  Edit8: TEdit;
>  Edit9: TEdit;
>  IniPropStorage: TIniPropStorage;
>  procedure FormCreate(Sender: TObject);
>private
>  { private declarations }
>public
>  { public declarations }
>end;
> 
> All were saved correctly. Closing Lazarus and checking "unit1.lfm" I got
> 
>SessionProperties =
> 'Edit1.Text;Edit10.Text;Edit11.Text;Edit12.Text;Edit13.Text;Edit14.Text;Edit15.Text;Edit16.Text;Edit17.Text;Edit18.Text;Edit19.Text;Edit2.Text;Edit20.Text;Edit3.Text;Edit4.Text;Edit5.Text;Edit6.Text;Edit7.Text;Edit8.Text;Edit9.Text;Edit21.Text;Edit22.Text;Edit23.Text'
> 
> After reopening Lazarus and opening SessionProperties Dialog one  
> property was missing.
> After saving and exiting Lazarus reopened "unit1.lfm" I got
> 
>SessionProperties =
> ';Edit1.Text;Edit10.Text;Edit11.Text;Edit12.Text;Edit13.Text;Edit14.Text;Edit15.Text;Edit16.Text;Edit17.Text;Edit18.Text;Edit19.Text;Edit2.Text;Edit20.Text;Edit21.Text;Edit22.Text;Edit3.Text;Edit4.Text;Edit5.Text;Edit6.Text;Edit7.Text;Edit8.Text;Edit9.Text'
> 
> Edit23.Text is missing.
> 
> Finally, If I change TStringPropertyEditor.GetEditLimit in  
> PropEdits.pp, from 255 to a
> bigger value all works fine.
> 
> function TStringPropertyEditor.GetEditLimit: Integer;
> begin
>if GetPropType^.Kind = tkString then
>  Result := GetTypeData(GetPropType)^.MaxLength else
>  //Result := 255;
>  Result := 1023;
> end;
> 
> Is it possible to make SessionProperties without limit?
> 
> Regards,
> Paulo
> 

I think you should fill a bugreport. Apparently additional property to 
set this limit is needed.

Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Lazarus IDE expert

2008-03-05 Thread Bogusław Brandys
Hi,

Please provide information of URL to learn how to build Lazarus expert.
I have a Delphi expert which parses and modifies units of currently 
opened project and I want to port it into Lazarus.

I must have know how to list project sources (units), how to find 
project lpr file to add resource by expert.


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Visual form inheritance and importing Delphi forms ???

2008-03-04 Thread Bogusław Brandys
Mattias Gaertner wrote:
> On Tue, 04 Mar 2008 20:13:13 +0100
> Bogusław Brandys <[EMAIL PROTECTED]> wrote:
> 
>> Hello,
>>
>> How is VFI working in lazarus SVN ? Any documentation ?
>>
>> I have a problem converting forms from delphi. A base form is:
>>
>> type
>>TInstantEditForm = class(TForm)
>> [...]
>> the inherited form just adds a lot of components to base form.
>> Now when I try to import such Delphi forms both looks exactly the
>> same as a base one in other words : all controls from inherited form
>> is lost.
>>
>>
>> What can I do to fix it ?
>>
>>
>> Here is the inherited form declaration (quite big so I placed it at
>> the end of this email) :
>>
>>   TInstantAttributeEditorForm = class(TInstantEditForm)
>> [...]
> 
> Maybe the inherited form was converted before the ancestor form. Then
> the IDE did not found an ancestor.lfm file.
> Just close both designer forms and reopen them again.
> 
> 
> Mattias
> 

There was because I used older Lazarus SVN version and VFI was not good 
enough.Now all is fine.Thank you.


Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Visual form inheritance and importing Delphi forms ???

2008-03-04 Thread Bogusław Brandys
Hello,

How is VFI working in lazarus SVN ? Any documentation ?

I have a problem converting forms from delphi. A base form is:

type
   TInstantEditForm = class(TForm)
 SubjectExposer: TInstantExposer;
 SubjectSource: TDataSource;
 EditPanel: TPanel;
 BottomPanel: TPanel;
 ButtonPanel: TPanel;
 OkButton: TButton;
 CancelButton: TButton;
 procedure CancelButtonClick(Sender: TObject);
 procedure OkButtonClick(Sender: TObject);
 procedure FormCreate(Sender: TObject);
   private
 function GetSubject: TObject;
 procedure SetSubject(const Value: TObject);
   protected
 procedure LoadData; virtual;
 procedure SaveData; virtual;
 procedure SubjectChanged; virtual;
   public
 property Subject: TObject read GetSubject write SetSubject;
   end;



the inherited form just adds a lot of components to base form.
Now when I try to import such Delphi forms both looks exactly the same 
as a base one in other words : all controls from inherited form is lost.


What can I do to fix it ?


Here is the inherited form declaration (quite big so I placed it at the 
end of this email) :

  TInstantAttributeEditorForm = class(TInstantEditForm)
 AccessSheet: TTabSheet;
 DefinitionSheet: TTabSheet;
 DisplayWidthEdit: TDBEdit;
 DisplayWidthLabel: TLabel;
 EditMaskEdit: TDBEdit;
 EdtMaskLabel: TLabel;
 MethodAddCheckBox: TCheckBox;
 MethodClearCheckBox: TCheckBox;
 MethodDeleteCheckBox: TCheckBox;
 MethodIndexOfCheckBox: TCheckBox;
 MethodInsertCheckBox: TCheckBox;
 MethodRemoveCheckBox: TCheckBox;
 MethodsGroupBox: TGroupBox;
 NameEdit: TDBEdit;
 NameLabel: TLabel;
 ObjectClassEdit: TDBComboBox;
 ObjectClassLabel: TLabel;
 OptionDefaultCheckBox: TCheckBox;
 OptionIndexedCheckBox: TCheckBox;
 OptionReadOnlyCheckBox: TCheckBox;
 OptionRequiredCheckBox: TCheckBox;
 OptionsGroupBox: TGroupBox;
 PageControl: TPageControl;
 PresentationSheet: TTabSheet;
 SingularNameEdit: TDBEdit;
 SingularNameLabel: TLabel;
 SizeEdit: TDBEdit;
 SizeLabel: TLabel;
 StorageNameEdit: TDBEdit;
 StorageNameLabel: TLabel;
 TypeEdit: TDBComboBox;
 TypeLabel: TLabel;
 ValidCharsEdit: TDBEdit;
 ValidCharsLabel: TLabel;
 VisibilityEdit: TDBComboBox;
 VisibilityLabel: TLabel;
 DefaultValueLabel: TLabel;
 DefaultValueEdit: TDBEdit;
 ExternalStorageNameEdit: TDBEdit;
 ExternalStorageNameLabel: TLabel;
 StorageKindEdit: TDBComboBox;
 StorageKindLabel: TLabel;
 AutoExternalStorageNameCheckBox: TCheckBox;
 procedure NameEditKeyPress(Sender: TObject; var Key: Char);
 procedure FormCreate(Sender: TObject);
 procedure NameEditChange(Sender: TObject);
 procedure NumericFieldGetText(Sender: TField; var Text: string;
   Display: Boolean);
 procedure ObjectClassEditChange(Sender: TObject);
 procedure ObjectClassEditEnter(Sender: TObject);
 procedure OkButtonClick(Sender: TObject);
 procedure SubjectExposerInitField(Sender: TObject; Field: TField);
 procedure SubjectExposerTranslate(Sender: TObject; Field: TField;
   var Value: Variant; Write: Boolean);
 procedure TypeEditClick(Sender: TObject);
 procedure StorageKindEditChange(Sender: TObject);
 procedure ExternalStorageNameEditChange(Sender: TObject);
 procedure AutoExternalStorageNameCheckBoxClick(Sender: TObject);
 procedure StorageNameEditChange(Sender: TObject);
   private
 FBaseClassStorageName: string;
 FLimited: Boolean;
 FMMUninitializedNewAttribute: Boolean;
 FModel: TInstantCodeModel;
 FOnIsClassPersistent: TInstantBooleanEvent;
 FOnLoadClasses: TInstantStringsEvent;
 FValidator: TInstantAttributeValidator;
 function GetSubject: TInstantCodeAttribute;
 procedure SetSubject(const Value: TInstantCodeAttribute);
 procedure SetLimited(Value: Boolean);
 procedure SetModel(const Value: TInstantCodeModel);
 procedure SetValidator(const Value: TInstantAttributeValidator);
   protected
 procedure LoadClasses;
 procedure LoadData; override;
 procedure LoadEnums(TypeInfo: PTypeInfo; Items: TStrings;
   Values: Pointer);
 procedure LoadTypes;
 procedure LoadVisibilities;
 procedure LoadStorageKind;
 procedure PopulateClasses;
 procedure SaveData; override;
 procedure SubjectChanged; override;
 procedure UpdateControls;
 procedure ComputeExternalStorageName;
 function IsClassPersistent(const AClassName: String): Boolean;
   public
 property BaseClassStorageName: string read FBaseClassStorageName write
   FBaseClassStorageName;
 property Limited: Boolean read FLimited write SetLimited;
 property Model: TInstantCodeModel read FModel write SetModel;
 property OnIsClassPersistent: TInstantBooleanEvent read 
FOnIsClassPersistent
 write FOnIsClassPersistent;
 property OnLoadClasses: TInstantStringsEvent read FOn

Re: [Lazarus] TSimpleIPC documentation

2008-03-02 Thread Bogusław Brandys
Graeme Geldenhuys wrote:
> On 19/02/2008, Mattias Gärtner <[EMAIL PROTECTED]> wrote:
>> Yes, and I already started something. The problem is, that Lazarus and FPC 
>> comes
>> with more than 130.000 identifiers (linux fpc 2.2.1) and that searching takes
> 
> Yikes!
> 
>> some time. The search time is mostly limited by the harddisk speed, so the
>> first time the search can take a minute on slow systems. Of course the second
>> time the codetools finds the identifier in a second on recent systems.
>> So, I was thinking about this:
>> When the find declaration fails the IDE pops up a progress dialog with a 
>> cancel
>> button, running the code browsing to locate candidates.
> 
> So the first attempt uses the uses clause?  Second attempt will do the search.
> 
> I'm sure others will complain, but heres another though. :) What if
> you do the search at Lazarus startup. After Lazarus started and loaded
> it's first project, fire off a background thread (low priority) doing
> the searching. While the developers starts finding his feet and starts
> coding, Lazarus is collecting the lookup table (or whatever it needs)
> in memory in the background.  Realistically, by the time the developer
> is looking for help on something, everything is already loaded.  That
> cache information could maybe even be saved to the hard drive so at
> the next Lazarus startup the cache can be loaded from the hard drive
> first, making the lookup loading even quicker.
> 
> I guess some people would prefer to have the background search thread
> as a toggle option in Environment dialog.
> 
> Regards,
>   - Graeme -
> 
> 

Very good idea, maybe sqlite3 database could be used with index ? It 
will be very very fast solution but one additional library is needed :-( 
(sqlite3.dll under windows).Anyway any flat database could be useful 
with fast indexing.


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Test

2008-02-15 Thread Bogusław Brandys
Damien Gerard wrote:
> I want to play too !
> 
> Fom France, Paris ! :)
> 
> 

ping from Poland


Regards
Boguslaw
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus