Lee Jenkins | 1 May 02:54

Retrieving Parent.color property


I am writing a component and need to get the parent.color property of the 
container that my component is sited on.

1. What is the best event to use in order to retrieve this value?

2. What method is the best method to use to retrieve this value?  In other 
words, the safest cast to use?

Thanks for suggestions,

--

-- 

Warm Regards,

Lee

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

Lee Jenkins | 1 May 03:00

Printing in Text mode on Windows?

On Linux, I would think printing to CUPS in text mode to be easy, but Windows 
I'm not sure.  I have a unit that I use in Delphi to do this, but tried to port 
it over to Laz/FPC without success so far.

I did happen upon the rawmodetest example in /components/printing, but it 
doesn't seem to work.  I tried it on Windows using an Epson 220 dot matrix 
receipt printer installed with the Generic Text Drive without success.

Any pointers?

Thanks,

--

-- 

Warm Regards,

Lee

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

Graeme Geldenhuys | 1 May 13:30
Picon
Gravatar

Re: Handy script for Firebird users

2008/4/30 mramirez <lazarus.mramirez@******.com>:
>
>  Not everyone has the time to a SQL query in each table & verify that all
> values, for an integer field are either 0 o 1, or varchar(1) with "f" and
> "t".

Just for interest sake and completeness....  You don't have to do such
checks, the database does those for you....

CREATE DOMAIN D_BOOLEAN AS SMALLINT CHECK (VALUE IN (0, 1));

or if you prefer text boolean types.

CREATE DOMAIN D_BOOLEAN AS CHAR(1) CHECK (VALUE IN ('T', 'F'));

Now create a table with a field of type D_BOOLEAN

I use tiOPF for object persistence. My business objects all use native
object pascal types (Boolean being one of them) and the database
persistences layer does the conversion to whatever I setup in the
database. Boolean as T/F or Boolean as 1/0 in the database.

Just my 2c response. :-)

Regards,
 - Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
(Continue reading)

Lee Jenkins | 1 May 15:59

Register Package Help

Hi all,

I'm trying to create a package to that contains a unit which defines a TShape 
descendant component following this example:

http://wiki.lazarus.freepascal.org/Lazarus_Packages#Adding_existing_components_to_a_Package

The problem that I'm having is that package overwrites the .pas file that I 
include with:

{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
  }

unit pos_button;

interface

uses
   pos_button, LazarusPackageIntf;

implementation

procedure Register;
begin
   RegisterUnit( 'pos_button',@pos_button.Register) ;
end;

initialization
   RegisterPackage( 'pos_button',@Register) ;
(Continue reading)

cyberpython | 1 May 16:28
Picon
Gravatar

RE : Register Package Help

Try renaming (saving) your package to TPos_button.

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

Lee Jenkins | 1 May 17:29

Re: RE : Register Package Help

cyberpython wrote:
> Try renaming (saving) your package to TPos_button.
> 

Thanks, that got me a bit further, but now when I try to compile the package I 
get error saying that Graphics unit cannot be found located in my component's 
.pas file.  Yet, if I compile the unit without the package, it compile fine (For 
instance, if I add it to an existing package).

--

-- 

Warm Regards,

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

Lee Jenkins | 1 May 17:36

Re: RE : Register Package Help

Lee Jenkins wrote:
> cyberpython wrote:
>> Try renaming (saving) your package to TPos_button.
>>
> 
> Thanks, that got me a bit further, but now when I try to compile the package I 
> get error saying that Graphics unit cannot be found located in my component's 
> .pas file.  Yet, if I compile the unit without the package, it compile fine (For 
> instance, if I add it to an existing package).
> 

Never mind, I thought LCL was implicitly added as a requirement.

Thanks,

--

-- 

Warm Regards,

Lee

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

Lee Jenkins | 1 May 19:00

Setting String Properties of Custom Component = AV


Hi all, I have a custom component that I've created and I get an AV anytime I 
try to change/set a string property within the IDE.  Setting these properties at 
runtime doesn't produce the AV.

Also, the message that I get is simply "Access Violation".  No more information 
other than that.

I'm using Lazarus 0.9.24.

Thanks,

--

-- 

Warm Regards,

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

Lee Jenkins | 1 May 19:19

Re: Setting String Properties of Custom Component = AV

Lee Jenkins wrote:
> Hi all, I have a custom component that I've created and I get an AV anytime I 
> try to change/set a string property within the IDE.  Setting these properties at 
> runtime doesn't produce the AV.
> 
> Also, the message that I get is simply "Access Violation".  No more information 
> other than that.
> 
> I'm using Lazarus 0.9.24.
> 
> Thanks,
> 

Also, I'm having another problem with this component.  It's a TShape descendant 
and I have hooked up mousedown and mouseup events to change Pen.color and 
Brush.Color properties to different values in order to indicate visual feedback.

If I create the component at runtime, the values work.  IE: If I mouse down on 
the component the colors changes as expected.  If I create the component at 
design time, then there is no change.

I suspect there are some subtle difference in streaming or something between the 
way Delphi does it and Lazarus, but am at a loss as to what those could be.

Thanks again,

--

-- 

Warm Regards,

(Continue reading)

Lee Jenkins | 1 May 20:31

Re: Setting String Properties of Custom Component = AV

Lee Jenkins wrote:
> Lee Jenkins wrote:
>> Hi all, I have a custom component that I've created and I get an AV anytime I 
>> try to change/set a string property within the IDE.  Setting these properties at 
>> runtime doesn't produce the AV.
>>
>> Also, the message that I get is simply "Access Violation".  No more information 
>> other than that.
>>
>> I'm using Lazarus 0.9.24.
>>
>> Thanks,
>>
> 
> Also, I'm having another problem with this component.  It's a TShape descendant 
> and I have hooked up mousedown and mouseup events to change Pen.color and 
> Brush.Color properties to different values in order to indicate visual feedback.
> 
> If I create the component at runtime, the values work.  IE: If I mouse down on 
> the component the colors changes as expected.  If I create the component at 
> design time, then there is no change.
> 
> I suspect there are some subtle difference in streaming or something between the 
> way Delphi does it and Lazarus, but am at a loss as to what those could be.
> 
> Thanks again,
> 

Setting Mode to Delphi fixed it, but I'm curious as to how to get this to work 
in FPC mode.
(Continue reading)


Gmane