[Lazarus] How to use RTTICtrls

2016-01-19 Thread Dennis
I now how to use TIPropertyGrid but I don't know how to use RTTICtrls 
e.g. TTIEdit.
In TIPropertyGrid, there is a property called TIObject to which I just 
assigned my object reference and everything is working.


For TTIEdit, there isn't such a property.

I want to use RTTICtrls to let end users edit some properties of my object.

I searched the net but found nothing useful.

Pls help.

Dennis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to use RTTICtrls

2016-01-19 Thread Mattias Gaertner
On Tue, 19 Jan 2016 19:33:46 +0800
Dennis  wrote:

> I now how to use TIPropertyGrid but I don't know how to use RTTICtrls 
> e.g. TTIEdit.
> In TIPropertyGrid, there is a property called TIObject to which I just 
> assigned my object reference and everything is working.
> 
> For TTIEdit, there isn't such a property.
> 
> I want to use RTTICtrls to let end users edit some properties of my object.
> 
> I searched the net but found nothing useful.

See the 'Link' property.

Mattias

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


Re: [Lazarus] FileExistsUTF8 and long paths

2016-01-19 Thread Bart
On 1/19/16, Jürgen Hestermann  wrote:

>  > If I understood you correctly you would want to have
>  > function FileXXXUtf8(Fn) do:
>  > begin
>  > if (Length(Fn) > MaxPath) and (not StartsWith('\\?\',Fn) then
>  >   FileXXXUtf8('\\?\' + Fn)
>  > else
>  >   OriginalImplementationOfFileXXXUtf8()
>  > end;
>  > (With the exception of ExpandFilenameUtf8)
>
> Yes, more or less.
> Slashes should be converted to backslashes too.
>
> Also, expanding (relative or incomplete) paths can be done
> by Lazarus internally so that this would even work with long paths.

Again you fail to see the problem.
There is no way of telling wether e.g.
C:\longpath\..\..\..\..\longpath/foo/bar is meant as a extended long
path or not.
Only the programmer of that particular program may know.
If we guess wrong, the program will do something it is not supposed to do.

But now I'm only repeating arguments, so I'll stop contributing to this thread.

Bart

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


[Lazarus] SVN Server Problems?

2016-01-19 Thread Anthony Walter
I am having a problem on multiple machines with the free pascal SVN server.
When executing a full checkout with a revision number the SVN connection is
failing after an arbitrary amount of time.

svn: E000104: Error retrieving REPORT: Connection reset by peer

What's the deal? Is anyone else able to do full checkouts with a revision
number right now?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] FileExistsUTF8 and long paths

2016-01-19 Thread Jürgen Hestermann

Am 2016-01-17 um 18:12 schrieb Bart:
> On 1/17/16, Jürgen Hestermann  wrote:
>> 2. without forward slashes and
> But then the function would not act on \\?\C:\maxpathchars\foo/bar if
> you omitted the \\?\, which seems to be the intention of your
> proposal?

I don't understand.
If the file path is already prepended by \\?\ then
forward slashes would not be resolved by the Win API anyway.
From 
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx

"Note:  File I/O functions in the Windows API convert "/" to "\" as part of 
converting the
name to an NT-style name, except when using the "\\?\" prefix as detailed in the 
following sections."

Nevertheless, we can also simply replace all / by \ before handing it over
to the Win API function.


> If I understood you correctly you would want to have
> function FileXXXUtf8(Fn) do:
> begin
> if (Length(Fn) > MaxPath) and (not StartsWith('\\?\',Fn) then
>   FileXXXUtf8('\\?\' + Fn)
> else
>   OriginalImplementationOfFileXXXUtf8()
> end;
> (With the exception of ExpandFilenameUtf8)

Yes, more or less.
Slashes should be converted to backslashes too.

Also, expanding (relative or incomplete) paths can be done
by Lazarus internally so that this would even work with long paths.

> To me, the better solution would be that a program that must be able
> to handle this should prepend the prefix itself (and taking care of
> all relevant issues like expanding, allowing/replacing '/' with '\'
> etc. beforehand) and then call the FileXXXUtf8 functions on the
> resulting string.

IMO this is just the wrong approach.
If Lazarus offers functions like FileExists then they should be rock solid.
Otherwise (if I have to find out the glory details anyway) I would
write my own FileExist (which I did now).
I have abandanded already many of these LCL functions because in
the end they did not help me avoiding any work.
There were always side effects that I had to overcome
with self written functions anyway.
So of what use are they?
Not only am I forced to know about all the OS specific details
I also need to find out what and how it has been implemented
in the Lazarus functions.
If I already know everything I can write my own
function that fits my needs much better.


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


[Lazarus] TOracleConnector connect as SYSDBA

2016-01-19 Thread Leonardo M . Ramé
Hi, does anyone know how to connect to Oracle as SYSDBA?, I'm getting 
"ORA-01017: invalid username/password; logon denied" when I set these 
params:


Hostname: 127.0.0.1
Database: MYDB
User: sys as SYSDBA
Pass: MYPASSWORD
Role: SYSDBA (this field is not taken into account -apparently-)

If, instead of using "sys as SYSDBA" I use "sys" alone, I get 
"ORA-28009: connection as SYS should be as SYSDBA or SYSOPER".



Regards,
--
Leonardo M. Ramé
http://leonardorame.blogspot.com

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


Re: [Lazarus] SVN Server Problems?

2016-01-19 Thread Maciej Izak
2016-01-19 23:36 GMT+01:00 Anthony Walter :

> I am having a problem on multiple machines with the free pascal SVN
> server. When executing a full checkout with a revision number the SVN
> connection is failing after an arbitrary amount of time.
>
> svn: E000104: Error retrieving REPORT: Connection reset by peer
>
> What's the deal? Is anyone else able to do full checkouts with a revision
> number right now?
>

Open %APPDATA%\Subversion\servers in a text editor, find section
[global] and add the line

http-bulk-updates = yes

-- 
Best regards,
Maciej Izak
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] SVN Server Problems?

2016-01-19 Thread Graeme Geldenhuys
On 2016-01-19 22:36, Anthony Walter wrote:
> I am having a problem on multiple machines with the free pascal SVN server.

I just tried and managed to checkout a fresh copy of FPC Trunk. So it
seems to be working fine.

As an alternative, you are welcome to use the Git mirrors on Github.
They are synced every 15 minutes.

  https://github.com/graemeg/freepascal
  https://github.com/graemeg/lazarus/

The git mirrors only track the 'trunk' branch of the respective SVN
repositories though.


Regards,
  - Graeme -

My public PGP key:  http://tinyurl.com/graeme-pgp

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


Re: [Lazarus] SVN Server Problems?

2016-01-19 Thread Anthony Walter
Maciej, that fixed it. Thank you :)
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus