Re: [fpc-pascal] how to directly access field/record value of TBufDataSet?

2013-10-01 Thread Michael Van Canneyt



On Tue, 1 Oct 2013, Dennis Poon wrote:

Since TBufDataSet is in-memory, to speed things up, how can I directly access 
the N'th record and M'th field's value as Variant?


Simply said: You cannot.



Can any one suggest an in-memory dataset in fpc/lazarus that allows direct 
access?


Does TMemDataset allow it?


No. The architecture of TDataset does not allow this.

The buffer mechanism is quite complicated, and there are quite some layers to 
go through.

T(Mem)Dataset is not just an array of records. The records can be at wildly 
different locations,
the values may or may not be computed. Blobs are stored entirely in different 
locations etc.

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


Re: [fpc-pascal] how to directly access field/record value of TBufDataSet?

2013-10-01 Thread Michael Van Canneyt



On Mon, 30 Sep 2013, Marcos Douglas wrote:


On Mon, Sep 30, 2013 at 8:09 AM, Dennis Poon den...@avidsoft.com.hk wrote:

Since TBufDataSet is in-memory, to speed things up, how can I directly
access the N'th record and M'th field's value as Variant?
[...]


You can use buf.RecNo and buf.FieldByName('field_name') OR buf.Fields[i].


This is not direct memory access.

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


Re: [fpc-pascal] how to directly access field/record value of TBufDataSet?

2013-10-01 Thread LacaK

Dennis Poon  wrote / napísal(a):


Also, how do I use the procedure LoadFromStream(AStream : 
TStream; Format: TDataPacketFormat = dfAny)?

Especially, I don't understand the TDataPacketFormat parameter.
Using Format parameter you can signal to DatapacketReader in which 
format expect data (dfBinary, dfXML etc)
It is not required , when not set there is procedure which tests 
incoming data using RecognizeStream method and select those 
DatapacketReader, which is able handle incoming data.
In other words each registered DataPacketReader is able say if is 
able handle data in stream or not.

(examines begining of stream and looks for own format identification)
-Laco.

Let me clarify.  How do I SaveToStream from another TDataset 
descendant and LoadFromStream in TBufdataSet?


I am trying to call SaveToStream from some Delphi TDataset Descendent 
to to be loaded by FPC's TBufdataSet.LoadFromStream.  How should I do it?

Can you try SaveToStream(..., dfXML) ?
Because Binary formats are not compatible between Delphi and FPC
But in XML should be situation better ;-)
If you encounter any incompatibility please let us know ... (and attach 
XML saved by Delphi + if possible any test application)

-Laco.

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

Re: [fpc-pascal] read cells contents from .xls file

2013-10-01 Thread Felipe Monteiro de Carvalho
The source code of fpspreadsheet is open ... just copy/paste/modifiy
it for your needs:

https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/xlsbiff8.pas#l50

But BIFF8 is not a simple format, there is no simple answer to your
question. It is encapsulated in a OLE Document storage system to start
with, which is something pretty complex.

BIFF2 till BIFF5 (Excel 5.0) were simple formats, but that's not the
format you are looking for from your question.

Felipe

On Mon, Sep 30, 2013 at 9:45 PM, John Lee johnel...@gmail.com wrote:
 Thanks - that looks excellent, but the 'uses' list for this, for non lazarus
 users, has, I guess, lots of things in it.

 The problem is also that I'm trying to implement this hack in an old version
 of pascal, v2.2.2 for which I only have the compiler  basic rtl stuff -
 that's why I'd just like some info for a quick hack eg some bullets or some
 idea what I need to do eg to read the no or string in eg cell x23 of sheet
 jim in fred.xls.

 John






 On 30 September 2013 16:38, Felipe Monteiro de Carvalho
 felipemonteiro.carva...@gmail.com wrote:

 You mean like this library does? http://wiki.freepascal.org/FPSpreadsheet

 Felipe Monteiro de Carvalho

 On Mon, Sep 30, 2013 at 5:33 PM, John Lee johnel...@gmail.com wrote:
  File produced by excel 2003. Can anyone tell me the basic ideas,
  formats,
  pitfalls - I'd just like to write a short routine  don't want to fight
  with
  the complexities of the lazarus based stuff. Prepared to experiment...
 
  TIA John
 
 
 
  ___
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal



 --
 Felipe Monteiro de Carvalho
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal



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



-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] how to directly access field/record value of TBufDataSet?

2013-10-01 Thread Dennis Poon



Michael Van Canneyt wrote:



On Tue, 1 Oct 2013, Dennis Poon wrote:

Since TBufDataSet is in-memory, to speed things up, how can I 
directly access the N'th record and M'th field's value as Variant?


Simply said: You cannot.



Can any one suggest an in-memory dataset in fpc/lazarus that allows 
direct access?


Does TMemDataset allow it?


No. The architecture of TDataset does not allow this.

The buffer mechanism is quite complicated, and there are quite some 
layers to go through.


T(Mem)Dataset is not just an array of records. The records can be at 
wildly different locations,
the values may or may not be computed. Blobs are stored entirely in 
different locations etc.


Michael.



That is too bad. I used to use TdxMemData from DevExpress and it 
allows such direct access.


The benefit is record can be accessed without CHANGING the current 
record pointer which will trigger updating of all linked DB controls 
(that could be time consuming or even confusing to the user).

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


Re: [fpc-pascal] how to speed up lazarus compilation and debugging

2013-10-01 Thread Michael Schnell

On 09/30/2013 06:33 PM, m...@rpzdesign.com wrote:

 especially an SSD solid state disk drive.


Really ?

I don't suppose all necessary files will exceed the cache of a decently 
equipped Linux PC.


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


Re: [fpc-pascal] how to speed up lazarus compilation and debugging

2013-10-01 Thread Mattias Gaertner
On Tue, 01 Oct 2013 10:01:55 +0200
Michael Schnell mschn...@lumino.de wrote:

 On 09/30/2013 05:38 PM, Dennis Poon wrote:
  It is faster on Linux but still way slower than Delphi 5 on windows.
 
 Allowing for multi-Arch, multi-OS, multi-GUI-infrastructure, 
 cross-development etc does not come completely for free

Multi-GUI has nothing to do with the compiler.

You can add multi-syntax modes. FPC can eat more than Delphi. :)

You can speed up compilation by cleaning up your uses clauses.
Lazarus has a tool for this:
Source / Refactoring / Unused units

And you can find out what units add most to the executable. See here:
http://wiki.freepascal.org/Cody#PPU_files_of_project

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


Re: [fpc-pascal] how to speed up lazarus compilation and debugging

2013-10-01 Thread Michael Schnell

On 10/01/2013 11:16 AM, Mattias Gaertner wrote:

Multi-GUI has nothing to do with the compiler.
But with project compile and link time, as the LCL (including the unit 
interface sections) is more complex because of that.


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


Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Graeme Geldenhuys
On 29/09/13 23:33, Patrick wrote:
 BTW, Would it be correct to compare LCL to WxWidgets ? In the sense that 
 it is a meta-widget toolkit?

Yes, that would be an accurate comparison. LCL and WxWidgets are a
common front-end toolkit to other underlying GUI toolkits. This
obviously has its pros and cons, because not all GUI toolkits have the
same functionality. So you meta-widget toolkit, as you call it, often
only uses functionality that all GUI toolkits have in common. Also if
the underlying GUI toolkit has a bug, it is out of your control to fix
it, so instead you need to find a way to work around it.

A 100% custom drawn toolkit like fpGUI or MSEgui are probably more work
to develop initially, but you gain much greater flexibility and
consistency. All functionality works identical on all platforms, and you
have full control over everything (like fixing a toolkit bug etc).


Regards,
  Graeme

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


Re: [fpc-pascal] how to speed up lazarus compilation and debugging

2013-10-01 Thread Graeme Geldenhuys
On 30/09/13 17:33, m...@rpzdesign.com wrote:
 Linux Fedora 14 x64 fully boots from power on in 30 seconds.

Umm, my Ubuntu 12.04 used to boot in around 8 seconds from power on. I
used a 450MB/s read/write SSD drive with an i7 CPU. :)

These days boot times don't mean much to me, as my FreeBSD system [my
development machine] runs 24/7.

As for Delphi vs FPC compiling speed. The newer Delphi compilers are
slower than D5  D7... Why? Because those old Delphi compilers only
targeted one platform, and they could optimise the crap out of it
because they hand no cross-platform worries.

FPC is written with easy maintenance and extensibility in mind. So
obviously you will take a small performance hit. I think that is a
reasonable trade-off.

Either way, I still don't think FPC is slow - compared to other
compilers like GCC, Java etc. Also, 90% of the time FPC only needs to
compile the actual units that changed - while you are developing your
project. So in such cases, I think compile time is nice and fast.

Just my 2¢ worth.

Regards,
  Graeme



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


Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Michael Schnell

On 09/30/2013 12:25 PM, Graeme Geldenhuys wrote:

All functionality works identical on all platforms,
Which, regarding look and feel,  does have pros and cons, depending on 
the users targeted.


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


Re: [fpc-pascal] how to directly access field/record value of TBufDataSet?

2013-10-01 Thread Michael Van Canneyt



On Tue, 1 Oct 2013, Dennis Poon wrote:




Michael Van Canneyt wrote:



On Tue, 1 Oct 2013, Dennis Poon wrote:

Since TBufDataSet is in-memory, to speed things up, how can I directly 
access the N'th record and M'th field's value as Variant?


Simply said: You cannot.



Can any one suggest an in-memory dataset in fpc/lazarus that allows direct 
access?


Does TMemDataset allow it?


No. The architecture of TDataset does not allow this.

The buffer mechanism is quite complicated, and there are quite some layers 
to go through.


T(Mem)Dataset is not just an array of records. The records can be at wildly 
different locations,
the values may or may not be computed. Blobs are stored entirely in 
different locations etc.


Michael.



That is too bad. I used to use TdxMemData from DevExpress and it allows 
such direct access.


Yes, it is possible to construct such a descendent. 
But in the general case it is not possible to provide this mechanism.


Maybe bufdataset can be extended to deliver this, but I would not hold my 
breath waiting for this.

I also used TdxMemData, but didn't see such mechanism. 
Of course, I never looked for it :)


The benefit is record can be accessed without CHANGING the current record 
pointer which will trigger updating of all linked DB controls (that could be 
time consuming or even confusing to the user).


I understand the benefits.

But if you need such access, then I think that TDataset is not for you.

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


Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Ben Smith
On Tue, Oct 1, 2013 at 10:48 AM, Michael Schnell mschn...@lumino.de wrote:

 On 09/30/2013 12:25 PM, Graeme Geldenhuys wrote:

 All functionality works identical on all platforms,

 Which, regarding look and feel,  does have pros and cons, depending on the
 users targeted.


Sometimes company branding in products are more important that the look of
the OS. Many products use different looks and feel to stand out above a
saturated market.

But I guess you can't please everybody. ;-)



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

Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Henry Vermaak
On Mon, Sep 30, 2013 at 11:25:34AM +0100, Graeme Geldenhuys wrote:
 On 29/09/13 23:33, Patrick wrote:
  BTW, Would it be correct to compare LCL to WxWidgets ? In the sense that 
  it is a meta-widget toolkit?
 
 Yes, that would be an accurate comparison. LCL and WxWidgets are a
 common front-end toolkit to other underlying GUI toolkits. This
 obviously has its pros and cons, because not all GUI toolkits have the
 same functionality. So you meta-widget toolkit, as you call it, often
 only uses functionality that all GUI toolkits have in common. Also if
 the underlying GUI toolkit has a bug, it is out of your control to fix
 it, so instead you need to find a way to work around it.
 
 A 100% custom drawn toolkit like fpGUI or MSEgui are probably more work
 to develop initially, but you gain much greater flexibility and
 consistency. All functionality works identical on all platforms, and you
 have full control over everything (like fixing a toolkit bug etc).

With the obvious drawback that it doesn't respond to theme/accessibility
changes.  If a user with impaired vision, for example, changes the GNOME
theme to high contrast with bigger default fonts, the custom drawn
toolkit doesn't know/respond, while an application that uses the GNOME
toolkit automatically adjusts itself.  The LCL, however, didn't respond
to font changes last time I checked.

This functionality can probably be built into the custom drawn toolkit.
Can fpgui pick up theme related changes from other widgetsets?

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


Re: [fpc-pascal] read cells contents from .xls file

2013-10-01 Thread John Lee
Thanks - as you say (with nice irony) it isn't a simple format, and I don't
pretend to understand it, indeed it is 'doing my head in'  -  but I don't
want to write .xls or do charts etc, just read some cells (only in in excel
2003, seems to be v11 according to help) - maybe my hope of a few lines,
with one or two units 'used', isn't possible but there seem to be millions
of lines here. Is there an example of reading cells from named spread that
you could point to?

John


On 1 October 2013 08:44, Felipe Monteiro de Carvalho 
felipemonteiro.carva...@gmail.com wrote:

 The source code of fpspreadsheet is open ... just copy/paste/modifiy
 it for your needs:


 https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/xlsbiff8.pas#l50

 But BIFF8 is not a simple format, there is no simple answer to your
 question. It is encapsulated in a OLE Document storage system to start
 with, which is something pretty complex.

 BIFF2 till BIFF5 (Excel 5.0) were simple formats, but that's not the
 format you are looking for from your question.

 Felipe

 On Mon, Sep 30, 2013 at 9:45 PM, John Lee johnel...@gmail.com wrote:
  Thanks - that looks excellent, but the 'uses' list for this, for non
 lazarus
  users, has, I guess, lots of things in it.
 
  The problem is also that I'm trying to implement this hack in an old
 version
  of pascal, v2.2.2 for which I only have the compiler  basic rtl stuff -
  that's why I'd just like some info for a quick hack eg some bullets or
 some
  idea what I need to do eg to read the no or string in eg cell x23 of
 sheet
  jim in fred.xls.
 
  John
 
 
 
 
 
 
  On 30 September 2013 16:38, Felipe Monteiro de Carvalho
  felipemonteiro.carva...@gmail.com wrote:
 
  You mean like this library does?
 http://wiki.freepascal.org/FPSpreadsheet
 
  Felipe Monteiro de Carvalho
 
  On Mon, Sep 30, 2013 at 5:33 PM, John Lee johnel...@gmail.com wrote:
   File produced by excel 2003. Can anyone tell me the basic ideas,
   formats,
   pitfalls - I'd just like to write a short routine  don't want to
 fight
   with
   the complexities of the lazarus based stuff. Prepared to experiment...
  
   TIA John
  
  
  
   ___
   fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
   http://lists.freepascal.org/mailman/listinfo/fpc-pascal
 
 
 
  --
  Felipe Monteiro de Carvalho
  ___
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal
 
 
 
  ___
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal



 --
 Felipe Monteiro de Carvalho
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

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

[fpc-pascal] Re: read cells contents from .xls file

2013-10-01 Thread Reinier Olislagers
On 01/10/2013 13:15, John Lee wrote:
 Thanks - as you say (with nice irony) it isn't a simple format, and I
 don't pretend to understand it, indeed it is 'doing my head in'  -  but
 I don't want to write .xls or do charts etc, just read some cells (only
 in in excel 2003, seems to be v11 according to help) - maybe my hope of
 a few lines, with one or two units 'used', isn't possible but there seem
 to be millions of lines here. Is there an example of reading cells from
 named spread that you could point to?

In case you hadn't found it: examples here
http://wiki.lazarus.freepascal.org/FPSpreadsheet

Excel 2003 .xls format is AFAIU BIFF8 as well.

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


Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Patrick

Hi Fred

Yes ! I am evaluating both Lazarus and fpGUI.

At the moment I am steering towards fpGUI.

I like FLTK but I don't like C++ and the FLTK bindings are not so great.

Understanding GTK or QT under the hood is a massive undertaking. So 
far fpGUI reminds me of FLTK(but it prettier) I can imagine, without 
heroic effort, that people would be able to look inside it and see 
what's going on.


It looks to be 173K lines, while FLTK is about 100K(I forgot the exact 
number). However I am betting it will be much easier to read then C++ 
and of course I don't even have to read the source to understand it! 
It's just nice to know that it is possible for me.


Being able to fix bugs yourself is important to me. A small readable 
codebase means autonomy, projects do get abandoned and/or people can get 
sick and are unable to maintain them. fpGUI seems like a really good 
project.


Nice work Graeme.

-Patrick




On 09/30/2013 03:33 PM, Fred van Stappen wrote:



Have you try fpGUI ?

https://github.com/graemeg/fpGUI/tree/develop


Date: Mon, 30 Sep 2013 01:07:56 -0500
Subject: Re: [fpc-pascal] GUI confusion
From: michal.wall...@gmail.com
To: fpc-pascal@lists.freepascal.org


On Sep 29, 2013 8:24 AM, Patrick patr...@spellingbeewinnars.org 
mailto:patr...@spellingbeewinnars.org wrote:


 I don't really like IDEs. I used gvim and I suppose it could almost 
be called an IDE as well but I mean I would rather use the shellr then 
clicking on a build button.


For what its worth, I use free pascal practically every day, but 
rarely open Lazarus.


I write most of my code in emacs, running inside a tmux session: 
http://tangentstorm.imgur.com/all/


But if I were going to make a GUI app, it would be crazy of me to 
ignore Lazarus. :)


I also use it when I want to browse and navigate through other 
people's source code. You can ctrl-click on identifiers as id they 
were hyperlinks.


Also if part of what bothers you is all the floating panels, you can 
enable the anchor docking extension and put everything into one 
window. That made a tremendous difference for me.



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



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


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

[fpc-pascal] How to use tilog from tiopf2?

2013-10-01 Thread Graeme Geldenhuys
Hi Felipe,

On Mon, Aug 1, 2011 at 2:56 PM, Felipe Monteiro de Carvalho
felipemonteiro.carva...@gmail.com wrote:
Does anyone know how to use this?

I tryed googling, but didn't have much luck ...


Rather late than never. ;-)

In your .lpr file, add the tiLog unit to the uses clause, and also the
unit representing the logging method you want to use. For this example,
lets say you want to log to a file, then include the tiLogToFile unit in
the uses clause too.

eg:
  uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Classes
,tiLog
,tiLogToFile
;

Log ago that would have been enough, and the class would have registered
itself. But we have since changed the design so the end-user can
specific which logging method they want (if multiple logging options are
enabled), and the developer can decide where for example a log file must
be created. Anyway, now register the log to file class.

The most basic one is...

  gLog.RegisterLog(TtiLogToFile);

Or a more complex one could be...

  gLog.RegisterLog(TtiLogToFile.CreateWithFileName('.',
ExtractFileName(ParamStr(0))+'.log', True));


Now your application is all set. Oh, if you compile your project under
Linux or FreeBSD, remember to enable threading support, because the
tiOPF log functionality uses threads.

Now to output log message, the tiLog unit must be in a uses clause, then
simply call:

  Log('Some cool message', lsDebug);

or

  LogError('Some big error occured', False);

Please see the various LogXXX methods in the tiLog unit. The parameter
names will describe what each parameter does.



Here is a more useful example that I use in my desktop applications. The
end-user can control what logging style they want. Multiple logging
styles can be enabled at the same time too. eg: Log to File and Log To GUI.

[ project1.lpr ]-
uses
  Classes,
  SysUtils,
  // tiOPF
  tiLog,
  tiLogToFile,
  tiLogToConsole,
  tiLogToGUI,
  tiLogToDebugSvr,
  ...other project units here...
  ;

begin
   {$I initialize.inc}

   ... other application startup code here ...
end.
---[ end ]-


--[ initialize.inc ]-
  // I like the ISO 8601 international date format in my apps
  FormatSettings.ShortDateFormat := '-mm-dd';

  // You can decide what log severity you actually want to log. This
  // is like a verbosity setting.
  gLog.SevToLog :=  [
lsNormal
,lsUserInfo
//,lsObjCreation
,lsVisitor
//,lsConnectionPool
,lsAcceptVisitor
//,lsQueryTiming
,lsDebug
,lsWarning
,lsError
,lsSQL
];

  { Do all parameter processing }
  // Help
  if gCommandLineParams.IsParam(['help', 'h', '?']) then
  begin
if IsConsole then
begin
writeln(Format(cAppNameFormatStr, [ApplicationName,
cMajorVersion, cMinorVersion, uiVersionBuild, cBuildVersion]));
writeln('Compiled on ' + cCompileDateTime);
writeln('');
writeln('The following parameters are available:');
writeln('');
writeln('   h, help, ?   Shows this help');
writeln('   lc   Logs debug information to the
console');
writeln('   lv   Logs debug information to a visual
screen');
writeln('   ls   Logs debug information to debug
server');
writeln('   lLogs debug information to a file');
writeln('   styleApplies a custom style to the
application. Available');
writeln('options are: ''M2'', ''Win2000'',
''Motif''');
writeln('');
Exit;
end
else
begin
  tiShowString(
  Format(cAppNameFormatStr, [cTAdminAppName, cMajorVersion,
cMinorVersion, uiVersionBuild, cBuildVersion])
  + LineEnding + 'Compiled on ' + cCompileDateTime
  + LineEnding + ''
  + LineEnding + 'The following parameters are available:'
  + LineEnding + ''
  + LineEnding + '   h, help, ?   Shows this help'
  + LineEnding + '   lc   Logs debug information to the
console'
  + LineEnding + '   lv   Logs debug information to a
visual screen'
  + LineEnding + '   ls   Logs debug information to
debug server'
  + LineEnding + '   lLogs debug information to a file'
  + LineEnding + '   styleApplies a custom style to the
application. Available'
  + LineEnding + 'options are: ''M2'',
''Win2000'', ''Motif'''
  , 'Quick Help');
  fpgApplication.Run;
  Exit;
end;
  end;

  // Logging
  if gCommandLineParams.IsParam(csLogConsole) then
gLog.RegisterLog(TtiLogToConsole);
  if gCommandLineParams.IsParam(csLog) then

gLog.RegisterLog(TtiLogToFile.CreateWithFileName('.',fpgExtractFileName(ParamStr(0))+'.log',
True));
  if gCommandLineParams.IsParam(csLogVisual) then
gLog.RegisterLog(TtiLogToGUI);
  if gCommandLineParams.IsParam(csLogDebugSvr) then

Re: [fpc-pascal] GUI confusion

2013-10-01 Thread Graeme Geldenhuys
On 01/10/13 11:07, Henry Vermaak wrote:
 
 With the obvious drawback that it doesn't respond to theme/accessibility
 changes.

Audio accessibility is possible. I just recently had a developer
implement that in his applications. He requested one or two small
changes to fpGUI to accomplish that.


  If a user with impaired vision, for example, changes the GNOME
 theme to high contrast with bigger default fonts,

This is already on my todo list, to add a high contrast theme as one of
the standard themes in fpGUI. Obviously developers can already implement
there own themes if they want to - it's dead simple.


 the custom drawn toolkit doesn't know/respond

From the research I have done, it will not be hard to detect such a
change from the OS. After all, other toolkits like Qt (which is also a
custom drawn toolkit at heart) works just fine in that regard.


 Can fpgui pick up theme related changes from other widgetsets?

Not yet, but already on my todo list. Windows is very easy. Gnome and
KDE are a bit harder - I had to peak at the Qt source code to see what
was required. But yes, definitely possible.


Anyway my point was that LCL, MSEgui and fpGUI have their pros and
cons. You just can't please every user out there. So choose the right
toolkit for the job. :)

Regards,
  Graeme

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


Re: [fpc-pascal] read cells contents from .xls file

2013-10-01 Thread John Lee
Thanks for all suggestions. IMO fpspread...pas is too complex for  I'd
need to hack thro' thousands of lines - maybe a simple program to read xls
into csv, as in b) below could be added?.

Here, fyi, In looking around I came up with these 2 :

a) googled 'read xls'

http://exceldatareader.codeplex.com/

Unfortunately I don't use c# but the mechanisms for reading spread look
simple in the referenced page ie 1 line!

Guess one could try to use the excel.dll in te reference in fpc  then
access it from fpc

b) using a 10 line vbs program referenced here to create a csv file then
getting the data from that

http://stackoverflow.com/questions/1858195/convert-xls-to-csv-on-command-line

This is the way I'm doing it, running the vbs file from cmd using exec etc,
simple if crude!.

john




On 1 October 2013 12:15, John Lee johnel...@gmail.com wrote:

 Thanks - as you say (with nice irony) it isn't a simple format, and I
 don't pretend to understand it, indeed it is 'doing my head in'  -  but I
 don't want to write .xls or do charts etc, just read some cells (only in in
 excel 2003, seems to be v11 according to help) - maybe my hope of a few
 lines, with one or two units 'used', isn't possible but there seem to be
 millions of lines here. Is there an example of reading cells from named
 spread that you could point to?

 John


 On 1 October 2013 08:44, Felipe Monteiro de Carvalho 
 felipemonteiro.carva...@gmail.com wrote:

 The source code of fpspreadsheet is open ... just copy/paste/modifiy
 it for your needs:


 https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/xlsbiff8.pas#l50

 But BIFF8 is not a simple format, there is no simple answer to your
 question. It is encapsulated in a OLE Document storage system to start
 with, which is something pretty complex.

 BIFF2 till BIFF5 (Excel 5.0) were simple formats, but that's not the
 format you are looking for from your question.

 Felipe

 On Mon, Sep 30, 2013 at 9:45 PM, John Lee johnel...@gmail.com wrote:
  Thanks - that looks excellent, but the 'uses' list for this, for non
 lazarus
  users, has, I guess, lots of things in it.
 
  The problem is also that I'm trying to implement this hack in an old
 version
  of pascal, v2.2.2 for which I only have the compiler  basic rtl stuff -
  that's why I'd just like some info for a quick hack eg some bullets or
 some
  idea what I need to do eg to read the no or string in eg cell x23 of
 sheet
  jim in fred.xls.
 
  John
 
 
 
 
 
 
  On 30 September 2013 16:38, Felipe Monteiro de Carvalho
  felipemonteiro.carva...@gmail.com wrote:
 
  You mean like this library does?
 http://wiki.freepascal.org/FPSpreadsheet
 
  Felipe Monteiro de Carvalho
 
  On Mon, Sep 30, 2013 at 5:33 PM, John Lee johnel...@gmail.com wrote:
   File produced by excel 2003. Can anyone tell me the basic ideas,
   formats,
   pitfalls - I'd just like to write a short routine  don't want to
 fight
   with
   the complexities of the lazarus based stuff. Prepared to
 experiment...
  
   TIA John
  
  
  
   ___
   fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
   http://lists.freepascal.org/mailman/listinfo/fpc-pascal
 
 
 
  --
  Felipe Monteiro de Carvalho
  ___
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal
 
 
 
  ___
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal



 --
 Felipe Monteiro de Carvalho
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal



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

[fpc-pascal] fpGUI documentation

2013-10-01 Thread Patrick
Apologies if this is a double post, I sent this, this morning but it 
does not seem to have made it to the list:




Hi Graeme

I am really impressed with fpGUI. Judging from the examples and the 
comments of others, this is exactly what I need.


The examples will go a long way in helping me understand it but I seem 
to be hitting a number of roadblocks with the documentation.


The class index on the site appears to be a dead link:
http://fpgui.sourceforge.net/apidocs/index.html

In the documentation folder this file is German only:
layouting_de.html
(I can try Google translate or Learn German!)

I don't seem to be able to figure out how to generate the documentation 
in the folder, I tried running all three build scripts:




:bash build_html.sh
FPDoc - Free Pascal Documentation Tool
Version 2.6.2 [2013/03/17]
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org

exception at 00483246:
Unable to open file xml/corelib/fpg_cmdlineparams.xml.



bash build_ipf.sh
FPDoc - Free Pascal Documentation Tool
Version 2.6.2 [2013/03/17]
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org

exception at 00483246:
Unable to open file xml/corelib/fpg_cmdlineparams.xml.


bash build_rtf.sh
FPDoc - Free Pascal Documentation Tool
Version 2.6.2 [2013/03/17]
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org

exception at 00483246:
Unable to open file xml/corelib/fpg_cmdlineparams.xml.


I found this PDF online:
http://geldenhuys.co.uk/articles/fpgui.pdf

It's from 2008 and it sound like you have done a lot of work since then, 
is this document still valid?


Once I know what I am doing maybe I can help with the documentation a bit?

Have a great day-Patrick



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


RE: [fpc-pascal] fpGUI documentation

2013-10-01 Thread Fred van Stappen

Hello

Here the forum-site of fpGUI :

http://opensoft.homeip.net/webnews/webnews.cgi?user=username;group=fpgui.support

 Date: Tue, 1 Oct 2013 16:26:56 -0400
 From: patr...@spellingbeewinnars.org
 To: fpc-pascal@lists.freepascal.org
 Subject: [fpc-pascal] fpGUI documentation
 
 Apologies if this is a double post, I sent this, this morning but it 
 does not seem to have made it to the list:
 
 
 
 Hi Graeme
 
 I am really impressed with fpGUI. Judging from the examples and the 
 comments of others, this is exactly what I need.
 
 The examples will go a long way in helping me understand it but I seem 
 to be hitting a number of roadblocks with the documentation.
 
 The class index on the site appears to be a dead link:
 http://fpgui.sourceforge.net/apidocs/index.html
 
 In the documentation folder this file is German only:
 layouting_de.html
 (I can try Google translate or Learn German!)
 
 I don't seem to be able to figure out how to generate the documentation 
 in the folder, I tried running all three build scripts:
 
 
 
 :bash build_html.sh
 FPDoc - Free Pascal Documentation Tool
 Version 2.6.2 [2013/03/17]
 (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org
 
 exception at 00483246:
 Unable to open file xml/corelib/fpg_cmdlineparams.xml.
 
 
 
 bash build_ipf.sh
 FPDoc - Free Pascal Documentation Tool
 Version 2.6.2 [2013/03/17]
 (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org
 
 exception at 00483246:
 Unable to open file xml/corelib/fpg_cmdlineparams.xml.
 
 
 bash build_rtf.sh
 FPDoc - Free Pascal Documentation Tool
 Version 2.6.2 [2013/03/17]
 (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org
 
 exception at 00483246:
 Unable to open file xml/corelib/fpg_cmdlineparams.xml.
 
 
 I found this PDF online:
 http://geldenhuys.co.uk/articles/fpgui.pdf
 
 It's from 2008 and it sound like you have done a lot of work since then, 
 is this document still valid?
 
 Once I know what I am doing maybe I can help with the documentation a bit?
 
 Have a great day-Patrick
 
 
 
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

RE: [fpc-pascal] fpGUI documentation

2013-10-01 Thread Fred van Stappen
Ooops, seems to be wrong link in earlier topic.

Here link to fpGui-forum (working, i hope) :

http://opensoft.homeip.net/webnews/webnews.cgi?user=username;group=fpgui.support


 Date: Tue, 1 Oct 2013 16:26:56 -0400
 From: patr...@spellingbeewinnars.org
 To: fpc-pascal@lists.freepascal.org
 Subject: [fpc-pascal] fpGUI documentation
 
 Apologies if this is a double post, I sent this, this morning but it 
 does not seem to have made it to the list:
 
 
 
 Hi Graeme
 
 I am really impressed with fpGUI. Judging from the examples and the 
 comments of others, this is exactly what I need.
 
 The examples will go a long way in helping me understand it but I seem 
 to be hitting a number of roadblocks with the documentation.
 
 The class index on the site appears to be a dead link:
 http://fpgui.sourceforge.net/apidocs/index.html
 
 In the documentation folder this file is German only:
 layouting_de.html
 (I can try Google translate or Learn German!)
 
 I don't seem to be able to figure out how to generate the documentation 
 in the folder, I tried running all three build scripts:
 
 
 
 :bash build_html.sh
 FPDoc - Free Pascal Documentation Tool
 Version 2.6.2 [2013/03/17]
 (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org
 
 exception at 00483246:
 Unable to open file xml/corelib/fpg_cmdlineparams.xml.
 
 
 
 bash build_ipf.sh
 FPDoc - Free Pascal Documentation Tool
 Version 2.6.2 [2013/03/17]
 (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org
 
 exception at 00483246:
 Unable to open file xml/corelib/fpg_cmdlineparams.xml.
 
 
 bash build_rtf.sh
 FPDoc - Free Pascal Documentation Tool
 Version 2.6.2 [2013/03/17]
 (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, s...@freepascal.org
 
 exception at 00483246:
 Unable to open file xml/corelib/fpg_cmdlineparams.xml.
 
 
 I found this PDF online:
 http://geldenhuys.co.uk/articles/fpgui.pdf
 
 It's from 2008 and it sound like you have done a lot of work since then, 
 is this document still valid?
 
 Once I know what I am doing maybe I can help with the documentation a bit?
 
 Have a great day-Patrick
 
 
 
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal