[lazarus] Reading an ascii value from a keypress

2007-02-25 Thread Dave Coventry

Hi,

I'm using a Tmemo onKeyUp event to catch keyboard input (I need to catch 
function keys as well).


Is there a simple way to get the ascii value of a key pressed using this 
event?


For example, if the user types a '(', then key=57 which is ascii for '9'.

I know that I can test the shift variable to tell if the shift key is 
pressed and process the input from that, but it's a bit of a pain and 
I'm worried about different keyboard layouts.


--
Dave Coventry
Tel   (home):  +27(0)31 3092301
Tel (office):  +27(0)31 3092301

Cell: +27(0)82 3685983

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


Re: [lazarus] Reading an ascii value from a keypress

2007-02-25 Thread Gerald Pöttler

Not sure what you are trying to achieve, but there is not always a ASCII
code for every key: try the following on a form with a memo field:
you will see that pressing 'A' and shift + 'A'  will give you two different
character codes, but the same key code, whereas F1 will not give you a
character code. Escape however does gives you the same keycode and character
code, whereas the tilde (~) gives you two very different codes. Hope this
helps.

procedure TForm1.FormCreate(Sender: TObject);
begin
 KeyPreview:=true;
end;

procedure TForm1.FormKeyPress(Sender: TObject; var Key: char);
begin
 memo1.lines.add('Read Character '+inttostr(ord(key)));
end;

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift:
TShiftState);
begin
 memo1.lines.add('Read KEY CODE '+inttostr(key));
end;



On 2/25/07, Dave Coventry <[EMAIL PROTECTED]> wrote:


Hi,

I'm using a Tmemo onKeyUp event to catch keyboard input (I need to catch
function keys as well).

Is there a simple way to get the ascii value of a key pressed using this
event?

For example, if the user types a '(', then key=57 which is ascii for '9'.

I know that I can test the shift variable to tell if the shift key is
pressed and process the input from that, but it's a bit of a pain and
I'm worried about different keyboard layouts.

--
Dave Coventry
Tel   (home):  +27(0)31 3092301
Tel (office):  +27(0)31 3092301

Cell: +27(0)82 3685983

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





--
Gerald Pöttler

[EMAIL PROTECTED]


Re: [lazarus] Patch: debugger breakpoints

2007-02-25 Thread Marc Weustink
Yury Sidorov wrote:
> Hi,
> 
> Here is a patch:
> 
> * Set debugger breakpoint on main/entry point using decimal number. It
> fixes executing application without debug info under gdb. I encountered
> problems at least with gdb 6.0 for win32 bundled with Lazarus. It dont
> accept pascal hexadecimal string $ as address for breakpoint even if
> language is set to Pascal. It seems like bug in gdb, but this patch
> workarounds this bug.

Applied, r10679

Thanks.

Marc

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


Re: [lazarus] Patch: Clearing listview selection

2007-02-25 Thread Marc Weustink
Yury Sidorov wrote:
> From: "Marc Weustink" <[EMAIL PROTECTED]>
>> Yury Sidorov wrote:
>>> Hello,
>>>
>>> Here is a patch which clears listview selection when assigning nil to
>>> Selected:
>>> ListView1.Selected:=nil;
>>>
>>> It is Delphi compatible. Currently AV is thrown in this case.
>>
>> Thanks applied, r10678
> 
> Thanks. What about my debugger patch?

Good that you mention :)

I had applied it, but for the test I needed the recompile all, that took
a while, I got something else to do and forgot about why I was waiting :)

Marc


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


[lazarus] Carbon interface: Wiki for cooperation on implementation

2007-02-25 Thread Tom Gregorovic

Hi,
I have added roadmap, bugs and compatibility issues concerning Carbon 
interface implementation to Wiki page 
http://wiki.lazarus.freepascal.org/Carbon_interface_internals.
Feel free to add your notes and write down on what are you working on 
Carbon interface.


Tom Gregorovic

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


[lazarus] Ideas to implement AllocateHwnd

2007-02-25 Thread Felipe Monteiro de Carvalho

Hello,

I was looking at how to implement AllocateHwnd on Lazarus. In theory
this function should allocate a invisible window that can receive and
process messages.

One idea I had is to simply create a empty, invisible form, but the
function should return a native handle, and not a object, so I will
have trouble to free the form later.

Another way to implement this would be adding a new function to
LCLIntf, and then implement on each widgetset differently.

Any ideas?

thanks,
--
Felipe Monteiro de Carvalho

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


Re: [lazarus] [patch] IDE and Designer

2007-02-25 Thread Marc Weustink
Graeme Geldenhuys wrote:
> Hi,
> 
> Attached is a archive containing two patches. One for the IDE
> directory and one for the Designer directory.
> 
> Changes:
> ---
> [designer.patch]
> *  Fixed the button order and size of the aligncompsdlg unit
> 
> [ide.patch]
> *  Fixes the anchor property of one of the buttons in the Help Manager
> dialog.
> *  LazDoc Editor window never saved it's size or position. This is now
> fixed.
> *  LazDoc Editor window now also appear in the list of IDE Windows in
> the Environment Options dialog so Custom Position can be applied.
> *  clipboardhistory.pas unit now uses the same methods (coding style)
> as the other ide windows for applying it's position and size.
> 
> 
> Lazarus reordered some of the properties in the .lfm files so the
> patches are bigger than needs to be.  Both patches need to be applied
> from the root Lazarus directory.

Thanks, applied in r10680

Marc

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


Re: [lazarus] Reading an ascii value from a keypress

2007-02-25 Thread Dave Coventry

Many thanks; yes that's exactly what I want.

So I use the Form1.FormKeyPress to get the ascii values of the Keypress 
and the FormKeyUp to catch the other values from the F-Keys, etc?


Gerald Pöttler wrote:
Not sure what you are trying to achieve, but there is not always a 
ASCII code for every key: try the following on a form with a memo field:
you will see that pressing 'A' and shift + 'A'  will give you two 
different character codes, but the same key code, whereas F1 will not 
give you a character code. Escape however does gives you the same 
keycode and character code, whereas the tilde (~) gives you two very 
different codes. Hope this helps.


procedure TForm1.FormCreate(Sender: TObject);
begin
  KeyPreview:=true;
end;

procedure TForm1.FormKeyPress(Sender: TObject; var Key: char);
begin
  memo1.lines.add('Read Character '+inttostr(ord(key)));
end;

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: 
TShiftState);

begin
  memo1.lines.add('Read KEY CODE '+inttostr(key));
end;



On 2/25/07, *Dave Coventry* <[EMAIL PROTECTED] 
> wrote:


Hi,

I'm using a Tmemo onKeyUp event to catch keyboard input (I need to
catch
function keys as well).

Is there a simple way to get the ascii value of a key pressed
using this
event?

For example, if the user types a '(', then key=57 which is ascii
for '9'.

I know that I can test the shift variable to tell if the shift key is
pressed and process the input from that, but it's a bit of a pain and
I'm worried about different keyboard layouts.

--
Dave Coventry
Tel   (home):  +27(0)31 3092301
Tel (office):  +27(0)31 3092301

Cell: +27(0)82 3685983

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




--
Gerald Pöttler

[EMAIL PROTECTED]  



--
Dave Coventry
Tel   (home):  +27(0)31 3092301
Tel (office):  +27(0)31 3092301

Cell: +27(0)82 3685983

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


Re: [lazarus] Patch for TDBImage and TDBMemo

2007-02-25 Thread Marc Weustink
Joost van der Sluis wrote:
> Hi all,
> 
> The attached patch actually implements TDBImage and solves a problem
> with TDBMemo when a dataset is closed.
> 
> Beware, it'll only work with sqldb from fpc 2.1.1, or maybe wit
> ZEOS/tDbf. The patch solves bugs 1739 and 1477.

thanks, applied, r10681

Marc

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


Re: [lazarus] Patch for TDBImage and TDBMemo

2007-02-25 Thread Marc Weustink
Marc Weustink wrote:
> Joost van der Sluis wrote:
>> Hi all,
>>
>> The attached patch actually implements TDBImage and solves a problem
>> with TDBMemo when a dataset is closed.
>>
>> Beware, it'll only work with sqldb from fpc 2.1.1, or maybe wit
>> ZEOS/tDbf. The patch solves bugs 1739 and 1477.

PS, can you resolve the issues ?

> 
> thanks, applied, r10681
> 

Marc

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


Re: [lazarus] Ideas to implement AllocateHwnd

2007-02-25 Thread ik

Hi,

Both X and Windows support such actions.
On X you can create a window that it's entire porpose is to have events.
And as you mentioned, Windows also support such thing.

On Windows there is a usage of AllocateHwnd in order to have events
for things such as System Tray. But my X programming skills are not
that good to know for what I should use
XCreateWindow function (XCreateWindowSimple is not what you are
looking afaik) without visible needs.

Ido

On 2/25/07, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:

Hello,

I was looking at how to implement AllocateHwnd on Lazarus. In theory
this function should allocate a invisible window that can receive and
process messages.

One idea I had is to simply create a empty, invisible form, but the
function should return a native handle, and not a object, so I will
have trouble to free the form later.

Another way to implement this would be adding a new function to
LCLIntf, and then implement on each widgetset differently.

Any ideas?

thanks,
--
Felipe Monteiro de Carvalho

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




--
http://ik.homelinux.org/

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Felipe Monteiro de Carvalho

I started implementing this on LCLIntf, but I am having a lot of
trouble with type declarations. AllocateHWnd needs a parameter of type
TWndProc = procedure (var Message: TLMessage) of object;

But TWndProc is declared on controls, and no basic lcl unit uses
controls, and if i add controls on lclintf or other units, I get
circular references.

Further i tryed to declare another equal type with a different name,
but then I need the LMessages unit, and if I add it, I get more
circular references any ideas?

The only way I could make it work is to declare a TLCLWndProc type in
*both* lclintf and interfacebase. Quite ugly ...

thanks,
--
Felipe Monteiro de Carvalho

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Felipe Monteiro de Carvalho

I decided to attach a patch so others can better understand what I am
talking about. No need to apply it.

--
Felipe Monteiro de Carvalho


allocatehwnd.patch
Description: Binary data


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Al Boldi
Felipe Monteiro de Carvalho wrote:
> I started implementing this on LCLIntf, but I am having a lot of
> trouble with type declarations. AllocateHWnd needs a parameter of type
> TWndProc = procedure (var Message: TLMessage) of object;
>
> But TWndProc is declared on controls, and no basic lcl unit uses
> controls, and if i add controls on lclintf or other units, I get
> circular references.

The usual way to break circular references, is to add them to the uses clause 
of the implementation section.

Did you try that?


Thanks!

--
Al

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Vincent Snijders

Felipe Monteiro de Carvalho schreef:

I decided to attach a patch so others can better understand what I am
talking about. No need to apply it.



I think you can fix this, by declaring TWndProc in LCLType and have in 
controls just


uses
  LCLType; // add if necessary, probably is already there

type
  TWndProc = LCLType.WndProc; // for compatible reasons


Vincent

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Felipe Monteiro de Carvalho

On 2/25/07, Al Boldi <[EMAIL PROTECTED]> wrote:

The usual way to break circular references, is to add them to the uses clause
of the implementation section.


Here it won't work because I use that type on the interface.

Latter I will try vincent´s idea ... now going out to eat a Doner
Kebap =) There is good turkisch food in germany

--
Felipe Monteiro de Carvalho

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


RE: [lazarus] WikiHelp

2007-02-25 Thread Pieter Valentijn
I tried to compile with Lazarus 0.9.20 B but i get

uMain.pas(447,71) Error: identifier idents no member "TextContent"

I cant see this property in the XML node. What version do you use?
I downloaded synapse to het the HTTP part working.

>From analizing the source I can see it's a language problem.
The first is this line in the scan button

  http.HTTPMethod('GET',eWikiPage.Text+'Spezial:Allpages');

Mine is 

http://www.osfinancials.org/mediawiki/index.php/Speciaal:Allpages

I would suggest we move this over to a ini file or something like that.
As this is the case with all language specific wiki's.
I see some code that looks if its english or German.

Maby even handel anny language setups that are in a folder.





Met vriendelijke groet, 
Pieter Valentijn
 
Delphidreams
http://www.delphidreams.nl
 


-Oorspronkelijk bericht-
Van: Christian Ulrich [mailto:[EMAIL PROTECTED] 
Verzonden: vrijdag 23 februari 2007 18:35
Aan: lazarus@miraclec.com
Onderwerp: Re: [lazarus] WikiHelp


>I like you tool but I cant get it to work on this wiki of osFinancials.
>
> http://www.osfinancials.org/mediawiki/index.php/
>
> Was this created in Lazarus?

OK, i have uploaded the Sourcecode to my Site.
And also maked an english description page.

So You can see whats going wrong with the osFinancials Wiki maybe i will

take a look also
at this at Weekend.

Christian 

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

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Florian Klaempfl

Felipe Monteiro de Carvalho schrieb:

On 2/25/07, Al Boldi <[EMAIL PROTECTED]> wrote:
The usual way to break circular references, is to add them to the uses 
clause

of the implementation section.


Here it won't work because I use that type on the interface.

Latter I will try vincent´s idea ... now going out to eat a Doner
Kebap =) There is good turkisch food in germany



Actually, Doner is something invented in Germany by turkish emmigrants, 
so no real turkish food :)


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


RE: [lazarus] Delphi for PHP

2007-02-25 Thread Pieter Valentijn
Me to I hate PHP as I cant program in it like in Delphi.
I link osFinancials with OSCommerce and Vtiger now so it would be great
to be able to create addons in PHP without missing my code inside :-)

I would love to get my hands on a trail version to.

Met vriendelijke groet, 
Pieter Valentijn
 
Delphidreams
http://www.delphidreams.nl
 


-Oorspronkelijk bericht-
Van: Sergio Samayoa [mailto:[EMAIL PROTECTED] 
Verzonden: woensdag 21 februari 2007 23:01
Aan: lazarus@miraclec.com
Onderwerp: RE: [lazarus] Delphi for PHP


Me too.



-Mensaje original-
De: Felipe Monteiro de Carvalho
[mailto:[EMAIL PROTECTED] 
Enviado el: Miércoles, 21 de Febrero de 2007 03:54 p.m.
Para: lazarus@miraclec.com
Asunto: Re: [lazarus] Delphi for PHP

I find it a very good idea, and will certainly give it a try if there is
a test version or so.

-- 
Felipe Monteiro de Carvalho

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

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

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


RE: [lazarus] StrToDate error

2007-02-25 Thread Pieter Valentijn
Should be easy.

Function MyStrToDate(Astr : String) : TDateTime ;
Begin
 Astr := StringReplace(Astr,'-',DateSeparator,[rfReplaceAll]);
 Astr := StringReplace(Astr,'/',DateSeparator,[rfReplaceAll]);
 result := StrTodate(Astr);
End;

This should work on anny string with anny format.


>> StrTodate('04/11/1955');
>>
>> I have even tried setting the ShortDateFormat to 'm/d/y/' and 
>> 'mm/dd/'.
>
> If you're running on linux, try setting
>
> DateSeparator:='/';


Met vriendelijke groet, 
Pieter Valentijn
 
Delphidreams
http://www.delphidreams.nl
 


-Oorspronkelijk bericht-
Van: Jeff Steinkamp [mailto:[EMAIL PROTECTED] 
Verzonden: zaterdag 24 februari 2007 23:23
Aan: lazarus@miraclec.com
Onderwerp: Re: [lazarus] StrToDate error


That is the fix, thanks.  Now I have to rewrite the routine to make sure
I can 
parse either a '-' or a '/' and set the date separator correctly.

Jeff

- Original Message - 
From: "Michael Van Canneyt" <[EMAIL PROTECTED]>
To: "Lazarus Mailing List" 
Sent: Saturday, February 24, 2007 08:32
Subject: Re: [lazarus] StrToDate error


>
>
> On Fri, 23 Feb 2007, Jeff Steinkamp wrote:
>
>> Can someone tell me why the following is producing an Econvert 
>> Exception?
>>
>> StrTodate('04/11/1955');
>>
>> I have even tried setting the ShortDateFormat to 'm/d/y/' and 
>> 'mm/dd/'.
>
> If you're running on linux, try setting
>
> DateSeparator:='/';
>
> because by default it is set to '-'. After doing that it works fine 
> here.
>
> Michael.
>
> _
> To unsubscribe: mail [EMAIL PROTECTED] with
>"unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>
> 


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

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


RE: [lazarus] StrToDate error

2007-02-25 Thread Michael Van Canneyt


On Sun, 25 Feb 2007, Pieter Valentijn wrote:

> Should be easy.
> 
> Function MyStrToDate(Astr : String) : TDateTime ;
> Begin
>  Astr := StringReplace(Astr,'-',DateSeparator,[rfReplaceAll]);
>  Astr := StringReplace(Astr,'/',DateSeparator,[rfReplaceAll]);
>  result := StrTodate(Astr);
> End;
> 
> This should work on anny string with anny format.

Except in Belgium, where the official date separator is a space, 
so I'd get a string like '2007 02 27'. 

You should always simply set the date separator char to the correct value.

Michael.

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


Re: [lazarus] WikiHelp

2007-02-25 Thread Christian Ulrich

I tried to compile with Lazarus 0.9.20 B but i get

uMain.pas(447,71) Error: identifier idents no member "TextContent"
I cant see this property in the XML node. What version do you use?


I use 0.9.21 most dayly actual svn and an own build fpc 2.1.1 mostly not 
older than an month ...
Is there in 0.9.20 another property that holds the content of 
This content the TextContent Property gives

if you find an property in 0.9.20 that gives these content we can change it.


I downloaded synapse to het the HTTP part working.



From analizing the source I can see it's a language problem.

The first is this line in the scan button
 http.HTTPMethod('GET',eWikiPage.Text+'Spezial:Allpages');
Mine is
http://www.osfinancials.org/mediawiki/index.php/Speciaal:Allpages


OK, i will make an property of this thats stored in the xml property file


I would suggest we move this over to a ini file or something like that.


the propertys you can set are already stored in an xml file so we can store 
it there ...



As this is the case with all language specific wiki's.
I see some code that looks if its english or German.


right


Maby even handel anny language setups that are in a folder.


I think an simple option schould be enougth this schould be the only option 
we have to take care of  ...


by the way i will make an folder in the lazarus ccr svn repositore so anyone 
can simply make and send patches with svn ...


best regards
Christian Ulrich 


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


Re: [lazarus] MPL and Lazarus

2007-02-25 Thread Graeme Geldenhuys

As far as I know, the MPL and GPL is not compatible.  Not sure how MPL
compares against LGPL or Modified LGPL.  A dual license will be needed
to make it compatible with Lazarus.

Graeme.


On 2/24/07, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:

Hello,

I read on a old thread that MPL only projects are license incompatible
with Lazarus, and thus cannot be used as designtime package. Is that
correct?

What would be needed to make it compatible? A MPL / GPL license? Or a
MPL / modifyedLGPL license?

The interrest is that I am looking again at porting graphics32 to Lazarus.

thanks,
--
Felipe Monteiro de Carvalho

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




--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Sönmez Kartal

Hi,

As I know, European people didn't know Döner and/or similar foods until 
Turkish people move there.


Regards

Florian Klaempfl wrote:

Felipe Monteiro de Carvalho schrieb:

On 2/25/07, Al Boldi <[EMAIL PROTECTED]> wrote:
The usual way to break circular references, is to add them to the 
uses clause

of the implementation section.


Here it won't work because I use that type on the interface.

Latter I will try vincent´s idea ... now going out to eat a Doner
Kebap =) There is good turkisch food in germany



Actually, Doner is something invented in Germany by turkish emmigrants, 
so no real turkish food :)


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



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


RE: [lazarus] StrToDate error

2007-02-25 Thread Pieter Valentijn
:-0 
Is it?
I never know.
I think it should come from the system locale.
In that case this routine still works.
I gess the hardest part is the MM-DD- against DD-MM-.
I have seen that theres anly 3 combinations posible in Delphi. 
DD-MM-
MM-DD-
And
-MM-DD

Where - is anny date seperator.

I tried once to set it to something like DD--MM.
In Windows this worked(display time etc) but Delphi StrToDate choked on
it.

Now I know no one will use this format it was just for me to see what
format was used.
As in a Terminal server enviroment the defaul settings of the system
sometimes was set in a user session (I still don't know why) and as the
server is usaly English and the masks are all in Dutch this happened
sometimes. When we where still deling with The bde and oracle this error
made the date insert of oracle go wrong and it inserted absurd dates. I
logged a call at Oracle complaining about the strange data insert. They
said it was not there problem. They don't check the dates for validity.
So I neede to write a trigger that would atleast check for this strange
data.

So you are warned if you need the dateformat on a terminal server it can
act verry strange.


Met vriendelijke groet, 
Pieter Valentijn
 
Delphidreams
http://www.delphidreams.nl
 


-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Michael
Van Canneyt
Verzonden: zondag 25 februari 2007 21:30
Aan: lazarus@miraclec.com
Onderwerp: RE: [lazarus] StrToDate error




On Sun, 25 Feb 2007, Pieter Valentijn wrote:

> Should be easy.
> 
> Function MyStrToDate(Astr : String) : TDateTime ;
> Begin
>  Astr := StringReplace(Astr,'-',DateSeparator,[rfReplaceAll]);
>  Astr := StringReplace(Astr,'/',DateSeparator,[rfReplaceAll]);
>  result := StrTodate(Astr);
> End;
> 
> This should work on anny string with anny format.

Except in Belgium, where the official date separator is a space, 
so I'd get a string like '2007 02 27'. 

You should always simply set the date separator char to the correct
value.

Michael.

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

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Felipe Monteiro de Carvalho

On 2/25/07, Vincent Snijders <[EMAIL PROTECTED]> wrote:

I think you can fix this, by declaring TWndProc in LCLType and have in
controls just


Ummm ... almost.

Then I cannot make the declaration on LCLType, because it doesn´t have
LMessages on the uses clause, and it can´t have because LMessages
already uses LCLType on the interface.

--
Felipe Monteiro de Carvalho

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


RE: [lazarus] WikiHelp

2007-02-25 Thread Pieter Valentijn
I tried iNode.NodeValue but its not what I need.
I will have to get up to speed on the SVN pulling of Laz.
Im working hard on the new interface for Stock items in OSF si I can get
rid of this ttable components and speed up thing. Some people have
1+ items and are now waiting to long for the data to load.
 
If I find some time to kill I will investigate the SVN so I can be in
sync with you.



Met vriendelijke groet, 
Pieter Valentijn
 
Delphidreams
http://www.delphidreams.nl
 


-Oorspronkelijk bericht-
Van: Christian Ulrich [mailto:[EMAIL PROTECTED] 
Verzonden: zondag 25 februari 2007 21:30
Aan: lazarus@miraclec.com
Onderwerp: Re: [lazarus] WikiHelp


>I tried to compile with Lazarus 0.9.20 B but i get
>
> uMain.pas(447,71) Error: identifier idents no member "TextContent" I 
> cant see this property in the XML node. What version do you use?

I use 0.9.21 most dayly actual svn and an own build fpc 2.1.1 mostly not

older than an month ...
Is there in 0.9.20 another property that holds the content of 
This content the TextContent Property gives if
you find an property in 0.9.20 that gives these content we can change
it.

> I downloaded synapse to het the HTTP part working.

>>From analizing the source I can see it's a language problem.
> The first is this line in the scan button  
> http.HTTPMethod('GET',eWikiPage.Text+'Spezial:Allpages');
> Mine is 
> http://www.osfinancials.org/mediawiki/index.php/Speciaal:Allpages

OK, i will make an property of this thats stored in the xml property
file

> I would suggest we move this over to a ini file or something like 
> that.

the propertys you can set are already stored in an xml file so we can
store 
it there ...

> As this is the case with all language specific wiki's.
> I see some code that looks if its english or German.

right

> Maby even handel anny language setups that are in a folder.

I think an simple option schould be enougth this schould be the only
option 
we have to take care of  ...

by the way i will make an folder in the lazarus ccr svn repositore so
anyone 
can simply make and send patches with svn ...

best regards
Christian Ulrich 

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

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


RE: [lazarus] StrToDate error

2007-02-25 Thread Michael Van Canneyt


On Sun, 25 Feb 2007, Pieter Valentijn wrote:

> :-0 
> Is it?
> I never know.
> I think it should come from the system locale.

It should, yes.

> In that case this routine still works.

Normally, yes.

> I gess the hardest part is the MM-DD- against DD-MM-.
> I have seen that theres anly 3 combinations posible in Delphi. 
> DD-MM-
> MM-DD-
> And
> -MM-DD
> 
> Where - is anny date seperator.
> 
> I tried once to set it to something like DD--MM.
> In Windows this worked(display time etc) but Delphi StrToDate choked on
> it.
> 
> Now I know no one will use this format it was just for me to see what
> format was used.
> As in a Terminal server enviroment the defaul settings of the system
> sometimes was set in a user session (I still don't know why) and as the
> server is usaly English and the masks are all in Dutch this happened
> sometimes. When we where still deling with The bde and oracle this error
> made the date insert of oracle go wrong and it inserted absurd dates. I
> logged a call at Oracle complaining about the strange data insert. They
> said it was not there problem. They don't check the dates for validity.

Sounds like sqlite which also doesn't check validity of the data you feed
it. Nice going for a multi-billion-dollar company. :-)

Michael.

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


Re: [lazarus] StrToDate error

2007-02-25 Thread Jeff Steinkamp
And thus is the problem with trying to internationalize a software product where 
data, in text format, can be passed back and forth easily.


The space character for a date separator is not part of the enumerated set.  It is 
'-' or '/' for the short date format.


With international correspondence, the official date format is usually DD MMM  
when using English.  But the short date format is one of the following:


DD-MM-
MM-DD-
YYYD-MM-DD

where the separator is a '-' or '/'.

To eliminate this problem in Windows and Delphi I normally read the DateSeperator 
and ShortDateFormat and save them to a temporary variable, Change the separator to 
a '/' and set the short date format to mm-dd-.  Once the program exits, I 
restore the DateSeperator and ShortDateFormat globals.



Jeff Steinkamp - N7YG
Tucson, AZ
SCUD Missile Coordinates
N32-13-55.01 W110-50-51.91
http://n7yg.net
http://home.earthlink.net/~jksteinkamp
Linux User #420428
Skype : jeff.steinkamp
___

Beware the man who can't be bothered with details.




- Original Message - 
From: "Michael Van Canneyt" <[EMAIL PROTECTED]>

To: 
Sent: Sunday, February 25, 2007 13:30
Subject: RE: [lazarus] StrToDate error




Except in Belgium, where the official date separator is a space,
so I'd get a string like '2007 02 27'.

You should always simply set the date separator char to the correct value.

Michael.

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





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


Re: [lazarus] StrToDate error

2007-02-25 Thread Michael Van Canneyt


On Sun, 25 Feb 2007, Jeff Steinkamp wrote:

> And thus is the problem with trying to internationalize a software product
> where data, in text format, can be passed back and forth easily.
> 
> The space character for a date separator is not part of the enumerated set.
> It is '-' or '/' for the short date format.
> 
> With international correspondence, the official date format is usually DD MMM
>  when using English.  But the short date format is one of the following:
> 
> DD-MM-
> MM-DD-
> YYYD-MM-DD
> 
> where the separator is a '-' or '/'.
> 
> To eliminate this problem in Windows and Delphi I normally read the
> DateSeperator and ShortDateFormat and save them to a temporary variable,
> Change the separator to a '/' and set the short date format to mm-dd-.
> Once the program exits, I restore the DateSeperator and ShortDateFormat
> globals.

Delphi as of D7 has most routines in such a way that you can pass
a set of internationalization settings which it should use.
(TFormatSettings or so, I think it's called). FPC has the same
in Subversion.

Michael.

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


Re: Ideas to implement AllocateHwnd

2007-02-25 Thread Felipe Monteiro de Carvalho

The best I managed to get so far, is only declaring TLCLWndMethod on
InterfaceBase, and then using this same type on LCLIntf.

--
Felipe Monteiro de Carvalho

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


RE: [lazarus] Delphi for PHP

2007-02-25 Thread nataraj narayan

Hi

I use webERP for my organisation. This is in PHP. Is this project sort of 
embedding PHP code in Lazarus? I would prefer to code in Lazarus only, but 
sadly i need to jump to and fro now.

regards

Nataraj


-- Original Message --
From: "Pieter Valentijn" <[EMAIL PROTECTED]>


Reply-To: lazarus@miraclec.com
Date:  Sun, 25 Feb 2007 20:53:31 +0100

>Me to I hate PHP as I cant program in it like in Delphi.
>I link osFinancials with OSCommerce and Vtiger now so it would be great
>to be able to create addons in PHP without missing my code inside :-)
>
>I would love to get my hands on a trail version to.
>
>Met vriendelijke groet, 
>Pieter Valentijn
> 
>Delphidreams
>http://www.delphidreams.nl
> 
>
>
>-Oorspronkelijk bericht-
>Van: Sergio Samayoa [mailto:[EMAIL PROTECTED] 
>Verzonden: woensdag 21 februari 2007 23:01
>Aan: lazarus@miraclec.com
>Onderwerp: RE: [lazarus] Delphi for PHP
>
>
>Me too.
>
>
>
>-Mensaje original-
>De: Felipe Monteiro de Carvalho
>[mailto:[EMAIL PROTECTED] 
>Enviado el: Miércoles, 21 de Febrero de 2007 03:54 p.m.
>Para: lazarus@miraclec.com
>Asunto: Re: [lazarus] Delphi for PHP
>
>I find it a very good idea, and will certainly give it a try if there is
>a test version or so.
>
>-- 
>Felipe Monteiro de Carvalho
>
>_
> To unsubscribe: mail [EMAIL PROTECTED] with
>"unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>
>_
> To unsubscribe: mail [EMAIL PROTECTED] with
>"unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>
>_
> To unsubscribe: mail [EMAIL PROTECTED] with
>"unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>
 





Sent via the WebMail system at gsis.ac.in


 
   

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


[lazarus] OT: Döner was Re: Ideas to implemen t AllocateHwnd

2007-02-25 Thread Florian Klaempfl
Sönmez Kartal schrieb:
> Hi,
> 
> As I know, European people didn't know Döner and/or similar foods until
> Turkish people move there.

>From http://en.wikipedia.org/wiki/D%C3%B6ner_kebab

"Today, döner kebab is typically served as a kind of sandwich in pita
(flat bread). This type of döner kebab has been available in Istanbul
since about 1960. The döner kebab with salad and sauce served in pita,
which is predominant in Germany and the rest of the world, was invented
in Berlin-Kreuzberg in 1971, because the original preparation was not
appealing enough to the German taste. The döner has been the most
popular fast food dish in Germany since the 1980s."

> 
> Regards
> 
> Florian Klaempfl wrote:
>> Felipe Monteiro de Carvalho schrieb:
>>> On 2/25/07, Al Boldi <[EMAIL PROTECTED]> wrote:
 The usual way to break circular references, is to add them to the
 uses clause
 of the implementation section.
>>>
>>> Here it won't work because I use that type on the interface.
>>>
>>> Latter I will try vincent´s idea ... now going out to eat a Doner
>>> Kebap =) There is good turkisch food in germany
>>>
>>
>> Actually, Doner is something invented in Germany by turkish
>> emmigrants, so no real turkish food :)
>>
>> _
>> To unsubscribe: mail [EMAIL PROTECTED] with
>>"unsubscribe" as the Subject
>>   archives at http://www.lazarus.freepascal.org/mailarchives
>>
> 
> _
> To unsubscribe: mail [EMAIL PROTECTED] with
>"unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives

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


Re: [lazarus] OT: Döner was Re: Ideas to implement AllocateHwnd

2007-02-25 Thread ali
Hi Döner and Lazarus People,
Döner part of iskender and brand name http://www.kebapciiskender.com.tr/
in year 1867.

M.Ali VARDAR



> Sönmez Kartal schrieb:
>> Hi,
>>
>> As I know, European people didn't know Döner and/or similar foods until
>> Turkish people move there.
>
>>From http://en.wikipedia.org/wiki/D%C3%B6ner_kebab
>
> "Today, döner kebab is typically served as a kind of sandwich in pita
> (flat bread). This type of döner kebab has been available in Istanbul
> since about 1960. The döner kebab with salad and sauce served in pita,
> which is predominant in Germany and the rest of the world, was invented
> in Berlin-Kreuzberg in 1971, because the original preparation was not
> appealing enough to the German taste. The döner has been the most
> popular fast food dish in Germany since the 1980s."
>
>>
>> Regards
>>
>> Florian Klaempfl wrote:
>>> Felipe Monteiro de Carvalho schrieb:
 On 2/25/07, Al Boldi <[EMAIL PROTECTED]> wrote:
> The usual way to break circular references, is to add them to the
> uses clause
> of the implementation section.

 Here it won't work because I use that type on the interface.

 Latter I will try vincent´s idea ... now going out to eat a Doner
 Kebap =) There is good turkisch food in germany

>>>
>>> Actually, Doner is something invented in Germany by turkish
>>> emmigrants, so no real turkish food :)
>>>
>>> _
>>> To unsubscribe: mail [EMAIL PROTECTED] with
>>>"unsubscribe" as the Subject
>>>   archives at http://www.lazarus.freepascal.org/mailarchives
>>>
>>
>> _
>> To unsubscribe: mail [EMAIL PROTECTED] with
>>"unsubscribe" as the Subject
>>   archives at http://www.lazarus.freepascal.org/mailarchives
>
> _
>  To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
>archives at http://www.lazarus.freepascal.org/mailarchives
>

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