Diwakoe | 1 Dec 04:43
Picon

Raw print error

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;
(Continue reading)

Eric March | 1 Dec 07:15
Picon

Re: MYSQL setup

Tom Lisjac wrote:
Hi Eric,
I have followed source advice but can't connect. Can anyone help and/or is there a manual?
Error: invalid compiler: file There must be something in my source looking for a compiler in the wrong place :-(
The errors you're getting in the tutorial example are from some hard coded paths in the database_try.lpi project file. It's not a problem with your system. Since Lazarus has changed since the example was written, it might be easier to start your project with the sqldb components. To install sqldb, go to "Package->Open package file", select and install the lazarus/components/sqldb/sqldblaz.lpk package. After Lazarus recompiles, you should see a "SQLdb" tab. Drop a Mysql50 (TMySQL50Connection) on a new form. In the object inspector for this component, enter the hostname (probably localhost), a database (test or mysql as an example or a database you've already created) and the username and password for the database or the "root" you set when installing mysql. At this point, establishing a successful mysql connection is being able to set the Connected property to true without an error.
Thanks heaps for the help.  I Get this far and changing "Connected" to "True"
gives the error
"Cannot load MySQL library "libmysqlclient.so. Please check your installation."

The SQLdb Tab is there with 9 Icons including postgreSQL & Firebird!

Eric March

 

The next step is to add TSQLTransaction and TSQLQuery (a TDataset descendent) to your form and point them to TMySQL50Connection. TSQLQuery is used to pass DDL or DML sql statements to the database and return DML result sets. Put your sql statements in the SQL stringlist and use the ExecSQL method to execute DDL statements or the open method to return a DML result set. Adding a TDatasource to the form and pointing it at the TSQLQuery will allow you to use the data aware components to display the query results. Marco Cantu has posted a pdf extract from "Essential Delphi" that provides a good sql overview: http://www.marcocantu.com/edelphi/EssentialSQL_md6.pdf Hopefully this will get you started. There books and examples on the net about using TDatasets and the data aware components. -Tom _______________________________________________ Lazarus mailing list Lazarus <at> lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Paul Zammit | 1 Dec 08:39
Picon

Re: [joke] Explanation about the Lazarus logo

On Saturday 29 November 2008 16:48:55 Henry Vermaak wrote:
> it's probably a leopard cub, not a cheetah.

Maybe a bobcat - short tail? They're found in North America AFAIK.
--

-- 
Paul

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Luca Olivetti | 1 Dec 09:08
Picon
Gravatar

Re: Where does Lazarus store/look for global settings/options?

En/na Mattias Gaertner ha escrit:

>> http://news.gmane.org/find-root.php?message_id=%3c48F836DE.2080402%40wetron.es%3e
> 
> Well, yes and no.
> It is not a bug, because to use two different settings the --pcp option
> exists (See my answer to the above mail).
> And yes, lazbuild does not have an option to override the lazarus
> source directory.
> The same is true for many other options.
> 
> Sharing a lazarus config directory by two different lazarus versions
> can give trouble. Better use two different lazarus config directories.
> I'm not sure what settings you want to share.

I don't really want to share them, I just want to build lazarus with my 
selection of components, regardless of the lazarus version I'm using.
Suppose I use svn and 0.9.26, suppose also that, as you suggest, I use 
--pcp to keep the configuration different.
Now, suppose that while I'm using the svn version, I install a component 
bundled with lazarus, say, rx.
What I want is, when I rebuild 0.9.26, it also has rx installed, but 
obviously compiling it from the 0.9.26 source directory, and without 
having to manually install it in the ide.
Most important, when I update to 0.9.28 I also want to rebuild it and 
have rx included.
Of course, it wouldn't be an issue if you only have a couple of 
components installed, but it is when you have 10 or 20.
As of now, the only way to do it is to copy the configuration files from 
one version to the other and manually edit the paths of the components 
that are under the lazarus source directory.

Bye
--

-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Bogusław Brandys | 1 Dec 09:35
Picon
Favicon

Re: Raw print error

"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 <at> lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Bogusław Brandys | 1 Dec 09:37
Picon
Favicon

Re: Raw print error

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 <at> lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Mattias Gaertner | 1 Dec 10:10
Picon
Favicon

Re: Where does Lazarus store/look for global settings/options?

On Mon, 01 Dec 2008 09:08:19 +0100
Luca Olivetti <luca <at> wetron.es> wrote:

> En/na Mattias Gaertner ha escrit:
> 
> >> http://news.gmane.org/find-root.php?message_id=%3c48F836DE.2080402%40wetron.es%3e
> > 
> > Well, yes and no.
> > It is not a bug, because to use two different settings the --pcp
> > option exists (See my answer to the above mail).
> > And yes, lazbuild does not have an option to override the lazarus
> > source directory.
> > The same is true for many other options.
> > 
> > Sharing a lazarus config directory by two different lazarus versions
> > can give trouble. Better use two different lazarus config
> > directories. I'm not sure what settings you want to share.
> 
> I don't really want to share them, I just want to build lazarus with
> my selection of components, regardless of the lazarus version I'm
> using. Suppose I use svn and 0.9.26, suppose also that, as you
> suggest, I use --pcp to keep the configuration different.
> Now, suppose that while I'm using the svn version, I install a
> component bundled with lazarus, say, rx.
> What I want is, when I rebuild 0.9.26, it also has rx installed, but 
> obviously compiling it from the 0.9.26 source directory, and without 
> having to manually install it in the ide.
> Most important, when I update to 0.9.28 I also want to rebuild it and 
> have rx included.
> Of course, it wouldn't be an issue if you only have a couple of 
> components installed, but it is when you have 10 or 20.
> As of now, the only way to do it is to copy the configuration files
> from one version to the other and manually edit the paths of the
> components that are under the lazarus source directory.

Well, the important point is:
"without having to manually install it in the ide."

If you don't want to use the IDE, then yes, you have to
manually edit the config files.
What you need is a (command line) tool to copy some part of the config
directory to another config directory (here: the list of installed
package names and the paths that are not in the lazarus directory).
The IDE allows to save the list of installed package names and load
them (Packages / congfigure installed packages / import,export). If this
list is extended with the paths then you have a tool. But you have to
start the IDE for that. At the moment you have to manually open each
new package once.

Keep in mind that sharing one config with two different lazarus versions
is not supported. A newer lazarus can read the older configs. But the
other way does not work always, so you can loose some settings.

Mattias
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Diwakoe | 1 Dec 11:18
Picon

Re: Raw print error

On Mon, Dec 1, 2008 at 3:37 PM, Bogusław Brandys <brandys <at> o2.pl> wrote:
> OSPrinters in rawmodetest example is added to lpr file.
> Check your project lpr.
>
> Boguslaw
>

Hi Boguslaw,

It's working now, listbox now fill with printers.

Thanks,
Diwa
--

-- 
Semua rasa ada disini
http://www.teoteblung.co.cc

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Luca Olivetti | 1 Dec 11:34
Picon
Gravatar

Re: Where does Lazarus store/look for global settings/options?

En/na Mattias Gaertner ha escrit:
> On Mon, 01 Dec 2008 09:08:19 +0100
> Luca Olivetti <luca <at> wetron.es> wrote:
> 
>> En/na Mattias Gaertner ha escrit:
>>
>>>> http://news.gmane.org/find-root.php?message_id=%3c48F836DE.2080402%40wetron.es%3e
>>> Well, yes and no.
>>> It is not a bug, because to use two different settings the --pcp
>>> option exists (See my answer to the above mail).
>>> And yes, lazbuild does not have an option to override the lazarus
>>> source directory.
>>> The same is true for many other options.
>>>
>>> Sharing a lazarus config directory by two different lazarus versions
>>> can give trouble. Better use two different lazarus config
>>> directories. I'm not sure what settings you want to share.
>> I don't really want to share them, I just want to build lazarus with
>> my selection of components, regardless of the lazarus version I'm
>> using. Suppose I use svn and 0.9.26, suppose also that, as you
>> suggest, I use --pcp to keep the configuration different.
>> Now, suppose that while I'm using the svn version, I install a
>> component bundled with lazarus, say, rx.
>> What I want is, when I rebuild 0.9.26, it also has rx installed, but 
>> obviously compiling it from the 0.9.26 source directory, and without 
>> having to manually install it in the ide.
>> Most important, when I update to 0.9.28 I also want to rebuild it and 
>> have rx included.
>> Of course, it wouldn't be an issue if you only have a couple of 
>> components installed, but it is when you have 10 or 20.
>> As of now, the only way to do it is to copy the configuration files
>> from one version to the other and manually edit the paths of the
>> components that are under the lazarus source directory.
> 
> Well, the important point is:
> "without having to manually install it in the ide."

Actually, without having to *re* install it in the ide. I'm perfectly 
fine with the ide for the first time I install a new package. After that 
I simply want to use make to rebuild lazarus.

> If you don't want to use the IDE, then yes, you have to
> manually edit the config files.
> What you need is a (command line) tool to copy some part of the config
> directory to another config directory (here: the list of installed
> package names and the paths that are not in the lazarus directory).

Actually, the paths that *are* in the lazarus directory, adjusting them 
for the *different* lazarus directory. Components outside of the lazarus 
tree are no problem.
Maybe the solution could be to simply use relative paths if they are 
under the lazarus directory.

> The IDE allows to save the list of installed package names and load
> them (Packages / congfigure installed packages / import,export). If this
> list is extended with the paths then you have a tool.

If it is extended with the path it would probably have the same problem: 
components outside the lazarus directory will be fine, components in the 
lazarus directory will point to the old one once imported.
Again, maybe the solution could be the use of relative paths.

Bye
--

-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Picon
Gravatar

Re: MYSQL setup

Op maandag 01-12-2008 om 16:45 uur [tijdzone +1030], schreef Eric March:
> Tom Lisjac wrote: 
> > Hi Eric,
> > 
> >   
> > > I have followed source advice but can't connect.
> > > Can anyone help and/or is there a manual?
> > >     
> > 
> >   
> > > Error: invalid compiler: file
> > > There must be something in my source looking for a compiler in the wrong
> > > place :-(
> > >     
> > 
> > The errors you're getting in the tutorial example are from some hard
> > coded paths in the database_try.lpi project file. It's not a problem
> > with your system. Since Lazarus has changed since the example was
> > written, it might be easier to start your project with the sqldb
> > components.
> > 
> > To install sqldb, go to "Package->Open package file", select and
> > install the lazarus/components/sqldb/sqldblaz.lpk package. After
> > Lazarus recompiles, you should see a "SQLdb" tab. Drop a Mysql50
> > (TMySQL50Connection) on a new form. In the object inspector for this
> > component, enter the hostname (probably localhost), a database (test
> > or mysql as an example or a database you've already created) and the
> > username and password for the database or the "root" you set when
> > installing mysql. At this point, establishing a successful mysql
> > connection is being able to set the Connected property to true without
> > an error.
> > 
> >   
> Thanks heaps for the help.  I Get this far and changing "Connected" to
> "True" 
> gives the error
> "Cannot load MySQL library "libmysqlclient.so. Please check your
> installation."

Maybe we have to improve that error-message even further. You have to
install MySQL to be able to work with it.

So install the mysql-client before you can use it.

On linux it could be that you also have to install the '-dev' package.

Joost

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Gmane