Re: [Lazarus] [LAZARUS] Minilib (was : Any Free/Cheap Async Serial Port Component)

2014-05-10 Thread Zaher Dirkey
What functions?

I added the missed file, and you can use the bug tracker.
Try again

Thank you


On Thu, May 8, 2014 at 10:37 PM, Koenraad Lelong
lazar...@de-brouwerij.bewrote:

 op 06-05-14 21:08, Zaher Dirkey schreef:

 Try
 https://sourceforge.net/p/minilib

 https://sourceforge.net/p/minilib/code/HEAD/tree/trunk/comm/

  Hi,

 Out of curiosity I looked into this, and I downloaded the source from
 sourceforge.
 Trying to install I found problems :
 minicommons never compiled for fpc/lazarus ? Because some function
 declarations are different from the forward declarations. Solved this for
 now by making them identical.
 More problematic : minilib lacks HTMLKeywords.inc.

 There I'm stuck.
 I would like to try the pos-library.

 Koenraad.

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




-- 
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3

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


Re: [Lazarus] TCoolBar improvements

2014-05-10 Thread Juha Manninen
I move a note from issue #26096 here.


Vojtech Cihak:
 ... LCL triggers 6-12 AlignControls on one CalculateAndAlign (just uncomment 
 DebugLn() in these methods).

Naturally AlignControls and Resize are called often because you call
CalculateAndAlign and Invalidate from around your code.
CalculateAndAlign even calls ReAlign.
I have a feeling you did not study my original component design
enough. It was very much based on AlignControls and
CalculatePreferredSize.
After that no hacks were needed for the positioning. No ReAlign, no
Invalidate (except for few special places)...
It followed the design of LCL and the intended usage of those functions.
I also implemented BiDiMode after lots of trial and error and
scratching my head. Your version does not support it at all.

I tried to change the code to use AlignControls and
CalculatePreferredSize better but it requires many changes now. I will
look at it later again (unless you do it).

On the other hand, the Drag'n'Drop and images in your version are
_cool_ features, so the component is getting to hold up to its name.
:)


 I already observed TControlBar in Delphi7. It has no (published) bands. 
 Components can be in multiple rows
 and height of higher controls is always rounded to integer-multiple of the 
 first row. Control are movable at design time.

 I think it is not so hard task. I try to move common code of TCoolBar and 
 TControlBar to some TCustomBar
 (or TBaseBar - if there'll be some abstract methods) - as you wrote on ML.

Yes. I don't know how much code can be shared. Having bands and not
having bands is a big difference after all.

Juha

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


Re: [Lazarus] [LAZARUS] Minilib (was : Any Free/Cheap Async Serial Port Component)

2014-05-10 Thread Koenraad Lelong

op 10-05-14 16:44, Zaher Dirkey schreef:

What functions?

I added the missed file, and you can use the bug tracker.
Try again

Thank you

Never mind those functions. I later read that I needed to use release, 
in stead of trunk. There all was OK.

I will try again ASAP.

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


Re: [Lazarus] [LAZARUS] Minilib (was : Any Free/Cheap Async Serial Port Component)

2014-05-10 Thread Koenraad Lelong

op 10-05-14 18:23, Koenraad Lelong schreef:

op 10-05-14 16:44, Zaher Dirkey schreef:

What functions?

I added the missed file, and you can use the bug tracker.
Try again

Thank you

Never mind those functions. I later read that I needed to use release, 
in stead of trunk. There all was OK.

I will try again ASAP.

Koenraad.
I spoke a bit too soon. I downloaded release (download snapshot). Then I 
tried to compile lib/minicommons. I get the same errors I had before :

/lib/mnFields.pas(750,20) Error: Calling convention doesn't match forward
/lib/mnFields.pas(213,14) Hint: Found declaration: 
TmnFields.QueryInterface(constref TGuid,out Formal type):LongInt; CDecl;

/lib/mnFields.pas(798,20) Error: Calling convention doesn't match forward
/lib/mnFields.pas(205,14) Hint: Found declaration: 
TmnFields._AddRef:LongInt; CDecl;

/lib/mnFields.pas(803,20) Error: Calling convention doesn't match forward
/lib/mnFields.pas(206,14) Hint: Found declaration: 
TmnFields._Release:LongInt; CDecl;


After fixing those I get :
/lib/mnUtils.pas(121,18) Error: Identifier not found CharInSet
/lib/mnUtils.pas(251,51) Error: Identifier not found CharInSet
/lib/mnUtils.pas(259,108) Error: Identifier not found CharInSet
/lib/mnUtils.pas(261,50) Error: Identifier not found CharInSet
/lib/mnUtils.pas(509,17) Error: Identifier not found CharInSet

Here I'm stuck.
P.S. I do it this way because I don't see how I can use the bug-tracker 
of sourceforge. I will have to search more.


Koenraad.

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


Re: [Lazarus] [LAZARUS] Minilib (was : Any Free/Cheap Async Serial Port Component)

2014-05-10 Thread Marco van de Voort
On Sat, May 10, 2014 at 06:49:36PM +0200, Koenraad Lelong wrote:
 Here I'm stuck.
 P.S. I do it this way because I don't see how I can use the bug-tracker 
 of sourceforge. I will have to search more.

charinset is a D2009+ function that is roughly the same as (c in
tsyscharset), where c is an expression of type char. It is mostly a
workaround for unicodestrings.

FPC/trunk supports it.

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


[Lazarus] int64 assignment fails

2014-05-10 Thread Tom Lisjac
fpc-2.6.4-1.x86_64. says Argument can't be assigned to when trying to
compile the following:

type
  TickType = Int64;

  TimebaseData = record
TicksFrequency: TickType;
  end;

  TEpikTimer= class(TComponent)
private
  FHWTicks:TimeBaseData;
Public
  property HWTimebase: TimeBaseData read FHWTicks write FHWTicks;

  TForm1 = class(TForm);
public
  ET:TEpikTimer;

  procedure TForm1.Button8CLICK(Sender: TObject);
   begin
  ET.HWTimebase.TicksFrequency:=10; // Fails

This used to compile and seems like a straightforward int64 assignment. Has
something changed where this is no longer allowed?

Thanks,

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


[Lazarus] How to program with time in milliseconds?

2014-05-10 Thread Junior

Lazarus 1.3 r44997M FPC 2.6.4 i386-linux-gtk 2 - Ubuntu 14.04
--

I need to develop a game for all possible Operating Systems.

It will be based on time. I will use hundreds of time.

I wanted some tips with low-level routines to improve performance.

I'll be using multimedia features (sound and images) and access to the 
server using any internet protocol.


I plan on using compiler directives for each operating system to use API 
to improve performance.



Thanks


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


Re: [Lazarus] int64 assignment fails

2014-05-10 Thread Flávio Etrusco
On Sat, May 10, 2014 at 8:40 PM, Tom Lisjac zikon...@gmail.com wrote:
 fpc-2.6.4-1.x86_64. says Argument can't be assigned to when trying to
 compile the following:

 type
   TickType = Int64;

   TimebaseData = record
 TicksFrequency: TickType;
   end;

   TEpikTimer= class(TComponent)
 private
   FHWTicks:TimeBaseData;
 Public
   property HWTimebase: TimeBaseData read FHWTicks write FHWTicks;

   TForm1 = class(TForm);
 public
   ET:TEpikTimer;

   procedure TForm1.Button8CLICK(Sender: TObject);
begin
   ET.HWTimebase.TicksFrequency:=10; // Fails

 This used to compile and seems like a straightforward int64 assignment. Has
 something changed where this is no longer allowed?

 Thanks,

 -Tom

Yes, this used to compile, but was changed/fixed in FPC 2.2 or
something - I guess because of the property contract: code shouldn't
break if you change your property to have a getter instead of direct
field access.

Best regards,
Flávio

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


Re: [Lazarus] int64 assignment fails

2014-05-10 Thread leledumbo
http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-int64-assignment-fails-tp4036884p4036887.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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