Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Martin Schreiber
On Wednesday 11 April 2012 21:42:13 Sieghard wrote:
> Hallo Martin,
>
> Du schriebst am Wed, 11 Apr 2012 10:40:40 +0200:
> > All indexes in FPC dynamic arrays are null-based, TList indexes are null
> > based, direct data access in tmsebufdataset is null-based. BTW, do you
>
> Which are direct take-overs from C.
>
> > I assume one-based recno is a relict from Borland-BDE-Dbase times. The
>
> Could well be - records are usually sequenced by counting, which
> traditionally begins at "one" (1).
>
> > MSEgui datasets have a null-based recno already
> > (controller.recnonullbased).
>
> Your tribute to C, I guess.

I think indexing null or one based should be consistent in a programming 
environment. In tmsebufdataset the record data can be addressed as array with 
null based index so there should be a null based record number too. Delphi 
datasets don't provide direct data access without scrolling the dataset 
AFAIK.
I don't like the one based Pascal string indexes either, null based addressing 
is faster.
Often one needs the next character in a string after a starting sequence of 
given length, null based index is more convenient here too.
I'll probably add a "recindex" property to the datasets.

Martin

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] dbstringgrid

2012-04-11 Thread Martin Schreiber
On Thursday 12 April 2012 03:16:43 Patrick Goupell wrote:
> In a dbstringgrid widget I can adjusted (during design) the column
> widths by placing the cursor at the separator between 2 columns,
> pressing and holding the mouse button and dragging the column to make it
> wider or narrower.
>
> Are there options that can be set to allow the user to do the same thing
> at run time?
>
Activate .optionsgrid og_colsizing.

Martin

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


[MSEide-MSEgui-talk] dbstringgrid

2012-04-11 Thread Patrick Goupell
In a dbstringgrid widget I can adjusted (during design) the column 
widths by placing the cursor at the separator between 2 columns, 
pressing and holding the mouse button and dragging the column to make it 
wider or narrower.

Are there options that can be set to allow the user to do the same thing 
at run time?

Thank you.

-- 
Patrick Goupell

Income taxes?  See this http://www.truthattack.org or this 
http://www.whatistaxed.com


--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Sieghard
Hallo Martin,

Du schriebst am Wed, 11 Apr 2012 09:09:42 +0200:

> BTW, I don't like the one-based FPC recno, I think it should be
> zero-based. What do you think?

That's the distinction between _counting_ and _numbering_.
Do you count "0, 1, 2..."? Probabely not.
How do you number things?
Doesn't matter at all, because here, the numbers are just labels. Odered
labels, usually, but just labels. You could use any other set of symbols
having an oder relation, like letters of the alphabet, or the number names
("One, two, three...").
There's even a mathematical concept for each of these:
counting numbers are called "cardinal", while numbering numbers (;) are
called "ordinal".
Calculating is only defined for cardinal numbers, you can add, subtract or
multiply them (division is a special case here, because division cannot be
defined wholly within the cardinal number's space).
With ordinal numbers, you only have distance between them.
Usually, this isn't recognized, as one doesn't commonly attempt to multiply,
e.g., record numbers or array indices, or even add them together.
Subtracting two ordinal numbers produces _not_ an ordinal, but a cardinal,
giving the distance between the two. Distance can be positive or negative,
because ordinals are ordered - you can always tell whether one comes
"before" the other, is "smaller" by means of the ordering relation.
An implementation of ordinal data are Pascal's enumerations, a "typical"
use are array indices - which, in Pascal, are implemented such that there
is a starting value and a sequence defined, where the starting value can be
anything allowable for the index value. You can also use enumerations as
indices.

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
---
Mit freundlichen Grüßen, S. Schicktanz
---


--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Sieghard
Hallo Julio,

Du schriebst am Wed, 11 Apr 2012 10:23:37 +0200:

> Array concept zero-based? not in objectpascal.

Right. Array indeices are based on whatever value the implementor decides
on.

> I know there are lots of arguments about starting in 0 or 1 or whatever

As is always the case when the property used is completely arbitrary.

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
---
Mit freundlichen Grüßen, S. Schicktanz
---


--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Sieghard
Hallo Martin,

Du schriebst am Wed, 11 Apr 2012 10:40:40 +0200:

> All indexes in FPC dynamic arrays are null-based, TList indexes are null 
> based, direct data access in tmsebufdataset is null-based. BTW, do you

Which are direct take-overs from C.

> I assume one-based recno is a relict from Borland-BDE-Dbase times. The

Could well be - records are usually sequenced by counting, which
traditionally begins at "one" (1).

> MSEgui datasets have a null-based recno already
> (controller.recnonullbased).

Your tribute to C, I guess.

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
---
Mit freundlichen Grüßen, S. Schicktanz
---


--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Julio Jiménez
I have found this link where there is a talk about it.

http://www.mail-archive.com/lazarus@miraclec.com/msg06970.html

2012/4/11 Graeme Geldenhuys 

> On 11 April 2012 10:40, Martin Schreiber  wrote:
> >
> > All indexes in FPC dynamic arrays are null-based, TList indexes are null
> > based, direct data access in tmsebufdataset is null-based. BTW, do you
> know
> > tmsebufdataset.currentas* property?.
> > I assume one-based recno is a relict from Borland-BDE-Dbase times. The
> MSEgui
> > datasets have a null-based recno already (controller.recnonullbased).
>
>
> Maybe you should raise this question in the fpc-pascal mailing list
> too. Find out why it was 1-based before you make the change - or maybe
> the change could be done in FPC itself if all agree.
>
>
> --
> Regards,
>   - Graeme -
>
>
> ___
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://fpgui.sourceforge.net
>
>
> --
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> ___
> mseide-msegui-talk mailing list
> mseide-msegui-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
>



-- 
Julio Jiménez Borreguero
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Graeme Geldenhuys
On 11 April 2012 10:40, Martin Schreiber  wrote:
>
> All indexes in FPC dynamic arrays are null-based, TList indexes are null
> based, direct data access in tmsebufdataset is null-based. BTW, do you know
> tmsebufdataset.currentas* property?.
> I assume one-based recno is a relict from Borland-BDE-Dbase times. The MSEgui
> datasets have a null-based recno already (controller.recnonullbased).


Maybe you should raise this question in the fpc-pascal mailing list
too. Find out why it was 1-based before you make the change - or maybe
the change could be done in FPC itself if all agree.


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Julio Jiménez
Probably there is a mix of concepts.

When I read recno I understand item so first item is 1, second is 2..

Another thing is offset, in this case first element has offset 0, second
1

That's the main reason I understand for recno first element=1
If you rename it as recoffset then it's ok starting in 0.

I'm not sure the one-based recno is a relict from Borland-BDE. Objectpascal
does not enforce you to start an array index in 0, 1 or whatever. C
language does it.

Of course this is only my point of view.


Cheers.

2012/4/11 Martin Schreiber 

> On Wednesday 11 April 2012 10:23:37 Julio Jiménez wrote:
> > Hi.
> >
> > Array concept zero-based? not in objectpascal.
> >
> > Why the first element must be 0? You usually think first=1, second=2
> > first=0?
> >
> All indexes in FPC dynamic arrays are null-based, TList indexes are null
> based, direct data access in tmsebufdataset is null-based. BTW, do you know
> tmsebufdataset.currentas* property?.
> I assume one-based recno is a relict from Borland-BDE-Dbase times. The
> MSEgui
> datasets have a null-based recno already (controller.recnonullbased).
>
> Martin
>
>
> --
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> ___
> mseide-msegui-talk mailing list
> mseide-msegui-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
>



-- 
Julio Jiménez Borreguero
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Martin Schreiber
On Wednesday 11 April 2012 10:23:37 Julio Jiménez wrote:
> Hi.
>
> Array concept zero-based? not in objectpascal.
>
> Why the first element must be 0? You usually think first=1, second=2
> first=0?
>
All indexes in FPC dynamic arrays are null-based, TList indexes are null 
based, direct data access in tmsebufdataset is null-based. BTW, do you know 
tmsebufdataset.currentas* property?.
I assume one-based recno is a relict from Borland-BDE-Dbase times. The MSEgui 
datasets have a null-based recno already (controller.recnonullbased).

Martin

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Julio Jiménez
Hi.

Array concept zero-based? not in objectpascal.

Why the first element must be 0? You usually think first=1, second=2
first=0?

I know there are lots of arguments about starting in 0 or 1 or whatever and
I don't want to start a 'war' because it.. My point of view is to follow
fpc/fcl direction.


Cheers

2012/4/11 wahono sri 

> > Changed in git master e8f1d49de2fc18b898d662cd19a4b2cf3ada3a1e, thanks.
> > BTW, I don't like the one-based FPC recno, I think it should be
> zero-based.
> > What do you think?
> >
> I think zero-based is OK such as array concept.
>
>
> --
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> ___
> mseide-msegui-talk mailing list
> mseide-msegui-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
>



-- 
Julio Jiménez Borreguero
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread wahono sri
> Changed in git master e8f1d49de2fc18b898d662cd19a4b2cf3ada3a1e, thanks.
> BTW, I don't like the one-based FPC recno, I think it should be zero-based.
> What do you think?
>
I think zero-based is OK such as array concept.

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Bug in msebufdataset.pas

2012-04-11 Thread Martin Schreiber
On Wednesday 11 April 2012 08:54:18 wahono sri wrote:
> At line 5432 :
>
> if int1 > 0 then begin
>
> it should be :
>
> if int1 >= 0 then begin
>
> Because it always ignore first row.
>
Changed in git master e8f1d49de2fc18b898d662cd19a4b2cf3ada3a1e, thanks.
BTW, I don't like the one-based FPC recno, I think it should be zero-based. 
What do you think?

Martin

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk