Re: [lazarus] FPC compiler for virtual machines?

2008-02-07 Thread Marco Alvarado
I've been investigating, and came to the conclussion that the best
compiler I can do IS NOT a compiler, BUT an specialiced translator. I
could use customizable templates to transform Pascal code into each
VM's natural language, then take advantage of the command-line
compilers for those VMs. There are open-source compilers that will fit
perfectly on this project. At least MTASC, is a much faster and
optimal compiler than the actual Macromedia/Adobe Flash compiler.

Crappy and cheaty, maybe, but will output the best optimal code
possible, and also will save myself from the HUGE task of creating
real compilers, since I must keep focused on my game engine. If we
remove pointers, goto's (...what else?), there is almost a one-on-one
correspondence between Object Pascal and ECMA's scripts (javascript
and actionscript), Java and .NET. But will require some cheating with
the class frameworks (thinking on FPC's RTL and the LCL), like
converting TBitmap into MovieClip, as an example. As said it's a
language mutilation, but it's something a programmer can live with if
he/she wants to target those virtual platforms, Delphi .NET shows that
as you mentioned.

-Marco

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


Re: [lazarus] FPC compiler for virtual machines?

2008-02-07 Thread Marco Alvarado
 The guys at mhccorp, did the same:

 http://www.mhccorp.com/java.shtml

 But, its a closed source project.

 In their pages, they said, they made an Object Pascal To Java translator,
 and later a Object Pascal to JVM assembler translator.

Yes the idea is having it Open Source, and for at least three VM's:
J2ME, Actionscript2, .NET

Whoever needs another platform can add the templates, and an
implementation of the Virtual Machine Library.

I'll take it to the point when I can display bitmaps and play sounds.
Then I'll drop the project, so I can work porting my engine on top of
it using the {$IFDEF} machete! :D

Regards!
-Marco

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


Re: [lazarus] FPC compiler for virtual machines?

2008-02-07 Thread Marco Alvarado
 But, how knows ? Maybe the games you want to migrate to JVM-based
 phones, can be fun and even profit !!! ;-)

Many games can be migrated to VM's that don't need a lot of processing
power, think about the best selling Tetris ;D

Also, what happens if a compiler maker or chipset builder finds out
that developers are using Pascal on mobile devices... they might get
interested since there is a visible market. They could make a real
compiler or even better a chip with a Pascal Virtual Machine!! If
there is a market, there is always a chance for these things to
happen, if no one migrates applications the possibility is just zero.

-Marco

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


Re: [lazarus] FPC compiler for virtual machines?

2008-02-07 Thread Marco Alvarado
I'm building right now a translator of Object Pascal to ECMAscript. I
just need a common run-time library, which I'm building on top of
FPC's RTL and the LCL. If someone wants to have a portable
application, they just have to use the classes of the Virtual Machine
Library (VML, not to confuse with VCL).

Later, the translator will just change the syntax from Object Pascal
to the VM's natural language using a template, then compile the
application with an open-source or SDK's compiler, and integrate
everything with a version of the VML for the target platform.

From the programmer's point of view, it work exactly as an optimal
Pascal command line compiler.

That's my strategy.

-Marco

2008/2/7, mramirez [EMAIL PROTECTED]:
 Quoting Felipe Monteiro de Carvalho [EMAIL PROTECTED]:

  My experience with Symbian makes me think I should have instead
  started a Java port. The Symbian is such a mess that a Java port would

 I read somewhere that Symbian was rebuilding its OS from scratch,
 because of the mess.

  There is even a Java assembler out there. I'm not 100% convinced that
  it can't be abstracted just like if it was just another platform.

 There is a JVM assembler:

 http://en.wikipedia.org/wiki/Jasmin_%28Java_assembler%29

 But, the main problem with the Java ENVIROMENT/FRAMEWORK (Virtual
 Machine + Standard Library + Programming Language + else), is that is
 100% CLASS/OBJECT oriented.

 Even the JVM assembler works with objects and classes, you can't work
 with global functions, records, or variables like many of the LCL
 functions does.

 As mentioned in other replies, you'll have to mutilate the object
 pascal version of the language to make it run in a JVM. Trying to
 migrate the Free Pascal Compiler (FPC) used by the Lazarus could be
 possible, but with weird, unexpected, poor performance results...

 Borland/CodeGear make an experimental Pascal for JVM compiler, and
 both this version and its .NET compiler had pitfalls.

 Anyway, virtual machines are slow, don't matter how much optimization
 they have, and require more resources. And mobile devices don't have
 as many resources that a P.C. does.

 I suggest you should go for the native development, whether is
 FPC+Lazarus or other development set of tools.

 Just my 2 cents...
 mramirez

 _
  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] FPC compiler for virtual machines?

2008-02-07 Thread Marco Alvarado
2008/2/7, Felipe Monteiro de Carvalho [EMAIL PROTECTED]:
 Unfortunately I don't have time to build that, but I would try to help
 if someone starts such a project.

I'm doing it now!! Once I get a hello-world translated, I'll start
releasing the source code.

Regards!
-Marco

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


Re: [lazarus] FPC compiler for virtual machines?

2008-02-07 Thread Marco Alvarado
2008/2/7, Sam Liddicott [EMAIL PROTECTED]:
 Can I suggest you also look at the Alma project on freshmeat.net

 Sam

Yes, but it's not only about language translation, indeed this is the
easiest part. The real problem is creating a virtual machine library
that is common between the different platforms.

-Marco

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


Re: [lazarus] Linux Journal Poll: Pascal does not exist

2008-02-07 Thread Marco Alvarado
Nice shirt heheh :D

2008/2/7, mramirez [EMAIL PROTECTED]:
 Quoting Alexsander Rosa [EMAIL PROTECTED]:

  http://www.linuxjournal.com/node/1006101
 
  18. What is your favorite programming language?

 OBJECT Pascal. Not your parents' pascal ;-)

 Cheers.
 mramirez

 _
  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] Linux Journal Poll: Pascal does not exist

2008-02-06 Thread Marco Alvarado
Working with an underground language gives a cool feeling :D

-Marco


2008/2/6, Felipe Monteiro de Carvalho [EMAIL PROTECTED]:
 Complain with whoever made the pool.

 Althougth that doesn't mean anything anyway.

 --
 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


[lazarus] FPC compiler for virtual machines?

2008-02-06 Thread Marco Alvarado
Is there a Pascal compiler for these virtual machines?

Java
Flash 8 (actionscript 2)
Flash 9 (actionscript 3)

Is the answer is no, can I build one? :-D I think it's a cool project
I'd love to work on, just to have Pascal applications on mobile
devices.

Regards!
-Marco

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


Re: [lazarus] FPC compiler for virtual machines?

2008-02-06 Thread Marco Alvarado
But that would be .NET... what about Java and Flash?

-Marco

2008/2/6, Marco van de Voort [EMAIL PROTECTED]:
 On Wed, Feb 06, 2008 at 03:26:48PM -0600, Marco Alvarado wrote:
  Is there a Pascal compiler for these virtual machines?
 
  Java
  Flash 8 (actionscript 2)
  Flash 9 (actionscript 3)
 
  Is the answer is no, can I build one? :-D I think it's a cool project
  I'd love to work on, just to have Pascal applications on mobile
  devices.

 There already is FPC on mobile devices.


 For the rest, the FAQ mostly applies:
 http://www.hu.freepascal.org/faq.var#dotnet

 _
  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] FPC compiler for virtual machines?

2008-02-06 Thread Marco Alvarado
These problems are pretty much similar for the Java (bytecode) too.
One has to mutilate the language, and rewrite the libraries from
scratch on the base libraries of the target (Java/.NET). Such an
attempt would have little synergy with the FPC project as it is today.

Hmmm, it's just a pessimistic paragraph, what about it? :D

2008/2/6, Marco van de Voort [EMAIL PROTECTED]:
 On Wed, Feb 06, 2008 at 03:49:23PM -0600, Marco Alvarado wrote:
  But that would be .NET... what about Java and Flash?

 Read the last paragraph.

 _
  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] FPC compiler for virtual machines?

2008-02-06 Thread Marco Alvarado
If it doesn't exist already, I would like to make an un-perfect,
simplistic, full of missing features, Pascal compiler that allows me
to write Pascal programs for those virtual machines that have
penetrated interesting platforms like web embedded applications,
mobile devices, PSP, Wii, etc.

I have made two little games in J2ME that run on my cellphone, but I'm
not happy if I can't program in my loved language Pascal. The compiler
will be crappy, but it will have one difference, will be open source,
so anyone can continue my work once I drop it, when I get to the point
where I'm able to create simple games with it (game engine not
included).

What do you think?

-Marco

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


Re: [lazarus] FPC compiler for virtual machines?

2008-02-06 Thread Marco Alvarado
2008/2/6, Wanderlan Santos dos Anjos [EMAIL PROTECTED]:
 Options for a Pascal compiler which targets Java:

 1. http://www.mhccorp.com/pasjvm.shtml
 2. http://en.wikipedia.org/wiki/MIDletPascal. Dead product?
 Download: http://www.softlookup.com/display.asp?id=157709

I know MIDletPascal, and it's a perfect example. It suffers the same
problem that Delphi has now, it's not Open Source. You have to wait
for it's development team to fix bugs, and the most important is that
if the team takes a different path (or vanishes), you will have to
jump to another compiler to keep on track, maybe a compiler for
another language as it is the case with Pascal.

I'd rather give my engine support for an unperfect compiler that
anyone can continue developing (reminds me of Lazarus), than a
compiler that can die unexpectedly.

Thanks for the links, anyway. :D

-Marco

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


Re: [lazarus] Something like SetThreadAffinityMask for Unix/Linux?

2008-02-04 Thread Marco Alvarado
Sorry for asking, what is FPC's tmt1 ?

-Marco

2008/2/4, Mark Morgan Lloyd [EMAIL PROTECTED]:
 I wonder whether it would be possible to patch affinity support into the
 underlying TThread object? OTOH I'm currently looking at FPC's tmt1 running
 under Linux on a 14-processor system and I can see it being spread fairly
 evenly, so this is getting pretty specialist.

 Micha Nelissen wrote:
  Marco Alvarado wrote:
  I'm using SetThreadAffinityMask() on Windows to set the processor for
  a given TThread object. What can I use on Linux?
 
  On linux you could use sched_setaffinity, but I don't think fpc has
  wrapped that yet. Linux man page says it's linux specific.

 --
 Mark Morgan Lloyd
 markMLl .AT. telemetry.co .DOT. uk

 [Opinions above are the author's, not those of his employers or colleagues]

 _
  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


[lazarus] Threads and OpenGLContext

2008-02-04 Thread Marco Alvarado
I'm having problems to make OpenGLContext work with threads. I have a
game loop inside a thread, and it is wrapped with a Synchronize(). I
know it's not an efficient way, but as a test this solved the weird
problems in Delphi (no keyboard response, exceptions, etc). Now in
Lazarus it doesn't work. I know I'm using OpenGLContext correctly,
since the single-thread setup shows all the 3D graphics. In the
multi-threaded version, the window goes black (as it should), but no
graphics are displayed. I supposed synchronization should work too,
since TOpenGLContext is an LCL component. Maybe I'm just doing
something too weird, but I would appreciate any clue you could give
me.

Thanks!
-Marco

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


[lazarus] Something like SetThreadAffinityMask for Unix/Linux?

2008-02-02 Thread Marco Alvarado
I'm using SetThreadAffinityMask() on Windows to set the processor for
a given TThread object. What can I use on Linux?

Thanks!
-Marco

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


[lazarus] Is GetAsyncKeyState exclusive of Windows?

2008-02-01 Thread Marco Alvarado
I want to read virtual keys with this function, but when trying to
compile my code in Ubuntu, I can't find the unit where it is defined
(if any) on Linux.

Had the idea it was available in both platforms, indeed in read it in
a forum. Also virtual key constants are defined in LCLType.pp.

Otherwise, is there another similar function?

Thanks!
-Marco

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


[lazarus] Runtime error 232, when creating TThread in Ubuntu

2008-02-01 Thread Marco Alvarado
I have this class that inherits TThread. I compile and execute
successfully an application that instantiates it with Delphi and
Lazarus, on Windows. But when I execute the same Lazarus project in
Ubuntu, I get the following error dialog:

Project raised exception class 'RunError(232)'.

When I click [OK] i get another dialog:

Execution paused
Address: $08067027
Procedure: SYSTEM_NOTHREADERROR
File:

Another dialog, and the IDE stops at the first line of the thread
constructor that simply looks like this:

//..
constructor cm_cHilo.Crea(
  Suspendido,
  Libre: Boolean
  );
begin
  Create(Suspendido);

  FreeOnTerminate := Libre;
  cm_TomaProcesadores(_CuentaProcesadores, _MascaraProcesadores);
end;


How can I enable threads for Linux?

Thanks!
-Marco

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


Re: Runtime error 232, when creating TThread in Ubuntu

2008-02-01 Thread Marco Alvarado
Oh, never mind, cthreads was missing :P

Found at http://bugs.freepascal.org/view.php?id=9597

Well, I'm happy! :D

2008/2/1, Marco Alvarado [EMAIL PROTECTED]:
 I have this class that inherits TThread. I compile and execute
 successfully an application that instantiates it with Delphi and
 Lazarus, on Windows. But when I execute the same Lazarus project in
 Ubuntu, I get the following error dialog:

 Project raised exception class 'RunError(232)'.

 When I click [OK] i get another dialog:

 Execution paused
 Address: $08067027
 Procedure: SYSTEM_NOTHREADERROR
 File:

 Another dialog, and the IDE stops at the first line of the thread
 constructor that simply looks like this:

 //..
 constructor cm_cHilo.Crea(
   Suspendido,
   Libre: Boolean
   );
 begin
   Create(Suspendido);

   FreeOnTerminate := Libre;
   cm_TomaProcesadores(_CuentaProcesadores, _MascaraProcesadores);
 end;


 How can I enable threads for Linux?

 Thanks!
 -Marco


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


Re: [lazarus] Runtime error 232, when creating TThread in Ubuntu

2008-02-01 Thread Marco Alvarado
Thanks! Just a note on that, I added cthreads as first in the unit
that defines my TThread descendant and works!

-Marco

2008/2/1, Vincent Snijders [EMAIL PROTECTED]:
 Marco Alvarado schreef:
  I have this class that inherits TThread. I compile and execute
  successfully an application that instantiates it with Delphi and
  Lazarus, on Windows. But when I execute the same Lazarus project in
  Ubuntu, I get the following error dialog:
 
  Project raised exception class 'RunError(232)'.
 
  When I click [OK] i get another dialog:
 
  Execution paused
  Address: $08067027
  Procedure: SYSTEM_NOTHREADERROR
  File:
 
 

 See FAQ:
 http://wiki.lazarus.freepascal.org/Lazarus_Faq#When_I_run_a_program_with_threads_I_get_runtime_error_232

 Vincent

 _
  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] may I get a demo?

2008-01-31 Thread Marco Alvarado
I just told a friend that has been programming in Turbo Pascal, about
Lazarus. We simply downloaded the latest version, installed, and just
took few seconds to show him how forms work, and how to create a
console application. :D

Regards!
-Marco


2008/1/31, Brad Campbell [EMAIL PROTECTED]:
 Bee wrote:
  I really want to know the performance of this lazarus,
 
  Download, install, compile the examples, see for yourself.
 
  may be there is someone here willing to give me a little application
  demo which compile to run on linux?
 
  They're all in examples folder.

 I'd have to say lazarus itself is the best demo currently available :)

 Brad
 --
 Human beings, who are almost unique in having the ability
 to learn from the experience of others, are also remarkable
 for their apparent disinclination to do so. -- Douglas Adams

 _
  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] I have a dream

2008-01-30 Thread Marco Alvarado
Isn't it lot easier to create an include file with all the defines,
and include it everywhere you need it? If you need several sets of
defines, just create higher level symbols that enable/disable those
sets.

Regards!
-Marco


2008/1/30, Graeme Geldenhuys [EMAIL PROTECTED]:
 On 29/01/2008, Giuliano Colla [EMAIL PROTECTED] wrote:
  So my question is still open. There's a way to make the IDE/compiler
  aware of the change of conditionals? I'm the only one with this requirement?

 I have also noticed that issue, mostly with my IFDEF DEBUG lines. I
 used to use application wide defines passing in -dwhatever.  This
 caused lots of problems, like you described. I now instead use defines
 per unit. Below the compiler mode (top of unit) I place a new line
 {$Define DEBUG} to enable debuging per unit. If I want to disable such
 debugging, comment that line as follows:  {.$Define DEBUG}

 Obviously this works for me, because that's the only IFDEF's I have in
 fpGUI.  Others usage may vary. My 2c worth.


 Regards,
   - Graeme -


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

 _
  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] Production quality crosss platform applications

2008-01-28 Thread Marco Alvarado
I have a 2D/3D game engine that I've tested in Windows, Linux and DOS.
It works right, and probably will work right in other platforms as
well (i.e. Mac OS X). I'm not using the Lazarus form designer, but the
LCL works great from code.

Saludos!
-Marco


2008/1/28, Sergio Samayoa [EMAIL PROTECTED]:
 Hi.

 Has someone already put into production lazarus applications which are cross
 platform?

 Regards.

 _
  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] How many lazarus / FPC exists?

2008-01-28 Thread Marco Alvarado
I'm using it :D That's 1

2008/1/28, Sergio Samayoa [EMAIL PROTECTED]:
 Hi.

 I'm coming back to lazarus (again) because MacOSX and Linux raising and
 wondering how many users (developers) are using lazarus / FPC.

 Is some statistic somewhere?

 Regards.

 _
  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] How many lazarus / FPC exists?

2008-01-28 Thread Marco Alvarado
I first learned about Lazarus at http://www.pascalgamedevelopment.com/

-Marco

2008/1/28, Marius [EMAIL PROTECTED]:
 This is not the only lazarus meeting point. There are a couple of
 odinary forums (via http://www.lazarus.freepascal.org) and there is also
 a french (and a russian?) forum.

 The whole discussions about fpc, lazarus and other related sources are
 scattered troughout the internet with different methods. This mailing
 list is the easiest as its delivered right into youre mailbox.

 Greetings,
 Marius



 Sergio Samayoa wrote:
  Interesting.
 
  What puzzles me is the very low traffic on forums and this list: Very few
  active posters.
 
  Regards.

 _
  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] How to load aRGBA data from a bitmap file using TLazIntfImage

2008-01-24 Thread Marco Alvarado
You could try using TLazIntfImage.GetDataLineStart() instead.

I think you can modify your code this way:

...
for y := 0 to IntfImg.DataDescription.Height-1 do
DumpMem(PCardinal(IntfImg.GetDataLineStart(y)), IntfImg.DataDescription.Width);
...

Regards!
-Marco


2008/1/24, Luiz Americo Pereira Camara [EMAIL PROTECTED]:
 I need to load the data of bitmap files into a buffer in the RGBA
 format, but i'm somewhat lost.

 Reading the wiki and the source i got to the following code:

 procedure DumpMem(Data: PCardinal; Size: Integer);
 var
   i: Integer;
   Color: TRGBA;
 begin
   for i := 0 to Size - 1 do
   begin
 Color := TRGBA(Data[i]);
 WriteLn('Red: ', Color.R, ' Green: ', Color.G,
   ' Blue: ',Color.B, ' Alpha: ', Color.A);
   end;
 end;

 var
   ImgReader: TLazReaderBMP;
   IntfImg: TLazIntfImage;
 begin
   ImgReader := TLazReaderBMP.Create;
   IntfImg := TLazIntfImage.Create(0,0);
   IntfImg.DataDescription.Init_BPP32_B8G8R8A8_M1_BIO_TTB(0, 0);
   IntfImg.LoadFromFile('red.bmp', ImgReader);

   DumpMem(PCardinal(IntfImg.PixelData), IntfImg.DataDescription.Height *
 IntfImg.DataDescription.Width);

   ImgReader.Destroy;
   IntfImg.Destroy;
 end;

 red.bmp is a 2x2 bmp file filled with red. (attached)

 the DumpMem leads to different results if the program is run in IDE or
 outside it (Probably PixelData is not pointing to the data).

 What's wrong with this code? Should i pass the width, height when init
 datadescription?

 Luiz







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


[lazarus] Reading keyboard releases with hardware interrupt

2008-01-19 Thread Marco Alvarado
Hello!

There is an example on reading the keyboard hardware interrupt in the
FPC's GO32 unit reference:

http://www.math.uni-hamburg.de/it/software/fpk/units/node5.html#SECTION005212000

I tried to compile it, but throws so many errors, maybe it's not
updated for the new compiler. Does anyone has similar an example that
compiles with FPC 2.0.4 for DOS?

Indeed what I want to do is mapping the keyboard states in an array,
so I can detect when keys are pressed and released. The CRT can read
when keys are pressed, but not released.

Thanks!
-Marco

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


[lazarus] DOS platform conditional defines

2008-01-17 Thread Marco Alvarado
Hello! In Free Pascal Compiler 2.0.4, is there a conditional define I
could check for DOS platform? I was looking around Google, but no
luck. If anyone can give me a link for the whole list of conditional
that will be even more appreciated!

Thanks!
-Marco

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


Re: [lazarus] Sound in Lazarus applications

2008-01-16 Thread Marco Alvarado
Their wiki is being attacked :P
http://acs.ullihome.de/acs/index.php/Talk:Main_Page

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


[lazarus] Transparent and TransparentColor for TLazIntfImage?

2007-12-21 Thread Marco Alvarado
Which are the equivalents of TBitmap.Transparent and
TBitmap.TransparentColor for TLazIntfImage?

Thanks!
-Marco

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


Re: [lazarus] Transparent and TransparentColor for TLazIntfImage?

2007-12-21 Thread Marco Alvarado
Oh, ok. Thanks!
-Marco

2007/12/21, Marc Weustink [EMAIL PROTECTED]:
 Marco Alvarado wrote:
  Which are the equivalents of TBitmap.Transparent and
  TBitmap.TransparentColor for TLazIntfImage?

 There is none.
 The mask for TBitmap.TransparentColor is created during loading in
 TLazReaderBMP, or when set on a loaded image, pixel by pixel.

 Marc

 _
  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] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-12-01 Thread Marco Alvarado
It's a Win32 API function:

http://msdn2.microsoft.com/en-us/library/aa363362.aspx

Outputs a string to the debugger. Lazarus is able to catch those
messages, although the output in Lazarus is pretty dirty, and is
somehow difficult to read. I supposed DebugLn would work the same way,
but no :( Hope someday DebugLn will be connected to the debbuger.

Regards!

2007/11/30, Mattias Gaertner [EMAIL PROTECTED]:
 On Fri, 30 Nov 2007 10:27:43 -0600
 Marco Alvarado [EMAIL PROTECTED] wrote:

I saw the backtraces for the first time when testing the
application from GDB. And now that makes me remember something I
wanted to ask: I activate the Debug output window, but it
doesn't show the lines generated by DebugLn().
  
   Nope, debugger output is the internal logging of the lazarus
   debugger.
  
But when I ran the application from GDB, the
output of DebugLn() was shown.
  
   Consoleoutput is not (yet?) shown.
   What you can do is start lazarus from a xterm. Then all is logged in
   that terminal.
 
  I'm not sure if that's completely right, because OutputDebugString()
  works, but DebugLn() doesn't work. How is that possible?

 What is OutputDebugString?


 Mattias

 _
  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] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-12-01 Thread Marco Alvarado
So, is there any other option appart from DebugLn(), that works?

Regards!
-Marco


2007/12/1, Marc Weustink [EMAIL PROTECTED]:
 Marco Alvarado wrote:
  It's a Win32 API function:
 
  http://msdn2.microsoft.com/en-us/library/aa363362.aspx
 
  Outputs a string to the debugger. Lazarus is able to catch those
  messages, although the output in Lazarus is pretty dirty, and is
  somehow difficult to read.

 Correction, lazarus does not catch that output. It's gdb which does.
 Lazarus doesn't intrepret these mesages, so you will find them among
 other debugger output. I don't call this support, it just happens to be
 there.

  I supposed DebugLn would work the same way,

 Nope, it is a replacement for writeln, for cases where there is no stdout.

  but no :( Hope someday DebugLn will be connected to the debbuger.

 It won't.

 And since I cannot destinct gdb output from console output, there is no
 way to show the output on the console (like debugln output).


 Marc


 _
  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] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-11-30 Thread Marco Alvarado
  I saw the backtraces for the first time when testing the application
  from GDB. And now that makes me remember something I wanted to ask: I
  activate the Debug output window, but it doesn't show the lines
  generated by DebugLn().

 Nope, debugger output is the internal logging of the lazarus debugger.

  But when I ran the application from GDB, the
  output of DebugLn() was shown.

 Consoleoutput is not (yet?) shown.
 What you can do is start lazarus from a xterm. Then all is logged in
 that terminal.

I'm not sure if that's completely right, because OutputDebugString()
works, but DebugLn() doesn't work. How is that possible?

Thanks!
-Marco

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


Re: [lazarus] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-11-30 Thread Marco Alvarado
When I got the errors in Linux I never saw backtraces in the debugger.
I saw the backtraces for the first time when testing the application
from GDB. And now that makes me remember something I wanted to ask: I
activate the Debug output window, but it doesn't show the lines
generated by DebugLn(). But when I ran the application from GDB, the
output of DebugLn() was shown.

Regards!


2007/11/30, Marc Weustink [EMAIL PROTECTED]:
 Marco Alvarado wrote:
  So we don't need GDB?

 At this moment the lazarus debugger uses GDB.

 I'm lost, what do you mean by:
   throwing backtraces from the Lazarus debugger

 Marc


 
 
  2007/11/30, Marc Weustink [EMAIL PROTECTED]:
  Marco Alvarado wrote:
  GDB is just wonderful!!! It just helped me to solve the last errors in
  my application and got the engine finally running in both Windows and
  Linux :_D
 
  Thanks a lot!!!
 
  PS. Have you ever thought about throwing backtraces from the Lazarus
  debugger? Having such feature integrated would be really helpful. :)
  You mean view callstack ?
 
  Marc
 
  _
   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


Re: [lazarus] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-11-30 Thread Marco Alvarado
So we don't need GDB?


2007/11/30, Marc Weustink [EMAIL PROTECTED]:
 Marco Alvarado wrote:
  GDB is just wonderful!!! It just helped me to solve the last errors in
  my application and got the engine finally running in both Windows and
  Linux :_D
 
  Thanks a lot!!!
 
  PS. Have you ever thought about throwing backtraces from the Lazarus
  debugger? Having such feature integrated would be really helpful. :)

 You mean view callstack ?

 Marc

 _
  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] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-11-29 Thread Marco Alvarado
I'm getting a SIGSEV too in Linux, exactly when the application
creates the TForm instance. The same application works ok in Windows.
I'm looking for a way around this problem.

Regards!


2007/11/29, Igor Zakhrebetkov [EMAIL PROTECTED]:
 Vincent Snijders пишет:
  Is this when you run the application in the IDE or from the command line?

 in the IDE
 Sorry, have not tried from the command line
 --
 Igor Zakhrebetkov

 _
  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] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-11-29 Thread Marco Alvarado
I'll once I get home to my linux box. Thanks!

2007/11/29, Mattias Gaertner [EMAIL PROTECTED]:
 On Thu, 29 Nov 2007 09:30:12 -0600
 Marco Alvarado [EMAIL PROTECTED] wrote:

  I'm getting a SIGSEV too in Linux, exactly when the application
  creates the TForm instance. The same application works ok in Windows.
  I'm looking for a way around this problem.

 Can you create a backtrace?
 http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB


 Mattias

 _
  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] Re: Lazarus-0.9.24: SIGSEGV in TOpenDialog

2007-11-29 Thread Marco Alvarado
GDB is just wonderful!!! It just helped me to solve the last errors in
my application and got the engine finally running in both Windows and
Linux :_D

Thanks a lot!!!

PS. Have you ever thought about throwing backtraces from the Lazarus
debugger? Having such feature integrated would be really helpful. :)



2007/11/29, Marco Alvarado [EMAIL PROTECTED]:
 I'll once I get home to my linux box. Thanks!

 2007/11/29, Mattias Gaertner [EMAIL PROTECTED]:
  On Thu, 29 Nov 2007 09:30:12 -0600
  Marco Alvarado [EMAIL PROTECTED] wrote:
 
   I'm getting a SIGSEV too in Linux, exactly when the application
   creates the TForm instance. The same application works ok in Windows.
   I'm looking for a way around this problem.
 
  Can you create a backtrace?
  http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB
 
 
  Mattias
 
  _
   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] Contribution?

2007-11-28 Thread Marco Alvarado
I have my implementation of the Introsort, don't know if that helps :S


2007/11/28, Roberto Padovani [EMAIL PROTECTED]:
 Recently, there has been a discussion on possible copyright
 infringement and the need of rewriting clean sorting algorithms...if
 you are clean from delphi and/or kylix sources, have a look at those
 messages and see.

 R#

 2007/11/27, Marco Alvarado [EMAIL PROTECTED]:
  That's what I was looking for, thanks! :D
 
 
  2007/11/27, Vincent Snijders [EMAIL PROTECTED]:
   Marco Alvarado schreef:
The Lazarus project is really cool, and I'd like to contribute. Is
there any area that needs help?
  
   There are a lot of areas. Did you read
   http://wiki.lazarus.freepascal.org/How_To_Help_Developing_Lazarus ?
  
   Vincent
  
   _
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
 


 --
 --
  Ing. Roberto Padovani

  via Mandrioli, 1
  40061 Minerbio (BO)
  Italy

  mail: [EMAIL PROTECTED]
  cell: 340-3428685
 -

 _
  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] some questions

2007-11-28 Thread Marco Alvarado
Hello!

1) I have solved all of my unit not found problems by adding all the
Path templates. Just go to the main menu  Project  Compiler Options,
and click the right [...] button for Other Unit Files and for Other
Sources. At the bottom of the dialog, you will see the Path templates,
just add all of them.

2) I have never worked with databases, maybe someone else can help you
on this :)

Regards!
-Marco

2007/11/28, el stamatakos [EMAIL PROTECTED]:

  Hi All,
   I would like to start by saying Lazarus seems like the answer I have
 been looking for, for a long time. I love Delphi and have finally found
 something similar for Linux.
   I have a few questions, first I registered to the forums but never
 received an e-mail back with password so I cannot log in.
   I have two questions that pertain to the Linux version of Lazarus

  1) I use a form and then I click in the OnCreate Event Handler in the
 object inspector and it returns an error Unable to find method. Plz fix the
 error shown in the message window.. I look at the message window and the
 error is Error:unit not found:Forms. I take the same code into windows and
 do not have this problem. Any ideas.

  2) I would like to use MySQL with Lazarus. I have no idea where to start. I
 placed a MySQL50conn module. I then tried to connect to the database using
 the HostName, DatabaseName, userName, password. Is there a field for port?
 Is there a simple example to retrieve data from a MySQL. I have a form that
 essentially has some combobox and they are to be filled with info from the
 MySQL database. Please help. Thanks

  I look forward to joining the forums and receiving help. Thanks in advance.

  Lefti


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


[lazarus] Contribution?

2007-11-27 Thread Marco Alvarado
The Lazarus project is really cool, and I'd like to contribute. Is
there any area that needs help?

Thanks!
-Marco

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


Re: [lazarus] Contribution?

2007-11-27 Thread Marco Alvarado
That's what I was looking for, thanks! :D


2007/11/27, Vincent Snijders [EMAIL PROTECTED]:
 Marco Alvarado schreef:
  The Lazarus project is really cool, and I'd like to contribute. Is
  there any area that needs help?

 There are a lot of areas. Did you read
 http://wiki.lazarus.freepascal.org/How_To_Help_Developing_Lazarus ?

 Vincent

 _
  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


[lazarus] OpenGLContext doesn't recognize the widgetset

2007-11-27 Thread Marco Alvarado
I get the error at the bottom of this test in the OpenGLContext component:

unit OpenGLContext;

{$mode objfpc}{$H+}

{$IFDEF LCLGTK}
  {$DEFINE UseGtkGLX}
  {$DEFINE OpenGLTargetDefined}
{$ENDIF}
{$IFDEF LCLGTK2}
  {$DEFINE UseGtk2GLX}
  {$DEFINE OpenGLTargetDefined}
{$ENDIF}
{$IFDEF LCLCarbon}
  {$DEFINE UseCarbonAGL}
  {$DEFINE OpenGLTargetDefined}
{$ENDIF}
{$IFDEF LCLWin32}
  {$DEFINE UseWin32WGL}
  {$DEFINE OpenGLTargetDefined}
{$ENDIF}
{$IFNDEF OpenGLTargetDefined}
  {$ERROR this target is not yet supported}
{$ENDIF}

I'm creating the component dynamically. The example that comes with
this component works for me, but I can't make it compile in my
application.

Do you know where the LCL is defined? Maybe I have to include another unit.

Thanks!

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


Re: [lazarus] OpenGLContext doesn't recognize the widgetset

2007-11-27 Thread Marco Alvarado
Hmm, there doesn't seem to exist an LCL unit, but there are several
LCL units. I'm using win32 at the moment. Thanks :)

2007/11/27, Mattias Gaertner [EMAIL PROTECTED]:
 On Tue, 27 Nov 2007 11:42:32 -0600
 Marco Alvarado [EMAIL PROTECTED] wrote:

  I get the error at the bottom of this test in the OpenGLContext
  component:
 
  unit OpenGLContext;
 
  {$mode objfpc}{$H+}
 
  {$IFDEF LCLGTK}
{$DEFINE UseGtkGLX}
{$DEFINE OpenGLTargetDefined}
  {$ENDIF}
  {$IFDEF LCLGTK2}
{$DEFINE UseGtk2GLX}
{$DEFINE OpenGLTargetDefined}
  {$ENDIF}
  {$IFDEF LCLCarbon}
{$DEFINE UseCarbonAGL}
{$DEFINE OpenGLTargetDefined}
  {$ENDIF}
  {$IFDEF LCLWin32}
{$DEFINE UseWin32WGL}
{$DEFINE OpenGLTargetDefined}
  {$ENDIF}
  {$IFNDEF OpenGLTargetDefined}
{$ERROR this target is not yet supported}
  {$ENDIF}
 
  I'm creating the component dynamically. The example that comes with
  this component works for me, but I can't make it compile in my
  application.
 
  Do you know where the LCL is defined? Maybe I have to include
  another unit.

 The define comes from the LCL package.
 What target platform do you use?


 Mattias

 _
  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] OpenGLContext doesn't recognize the widgetset

2007-11-27 Thread Marco Alvarado
I just added all the template paths in the Compiler Options, and now
it works :D Thanks!


2007/11/27, Vincent Snijders [EMAIL PROTECTED]:
 Marco Alvarado schreef:
  Hmm, there doesn't seem to exist an LCL unit, but there are several
  LCL units. I'm using win32 at the moment. Thanks :)
 
  2007/11/27, Mattias Gaertner [EMAIL PROTECTED]:
  On Tue, 27 Nov 2007 11:42:32 -0600
  Marco Alvarado [EMAIL PROTECTED] wrote:
 
  I'm creating the component dynamically. The example that comes with
  this component works for me, but I can't make it compile in my
  application.
 
  Do you know where the LCL is defined? Maybe I have to include
  another unit.
  The define comes from the LCL package.
  What target platform do you use?

 I can compile the package on win32 and I can add the package as a
 requirement to an application and compile that.

 Does your application has the LCL as requirement? Do you compile in the
 Lazarus IDE or from the command line?

 Vincent

 _
  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] OpenGLContext doesn't recognize the widgetset

2007-11-27 Thread Marco Alvarado
Go to Project  Compiler Options  Paths

Click on any [...] button (right hand of the path fields). There is a
Path templates list, you can select the ones you need, it's really
helpful.

In the future I'll remember to add all of them :D

Lazarus rocks!


2007/11/27, Vincent Snijders [EMAIL PROTECTED]:
 Marco Alvarado schreef:
  I just added all the template paths in the Compiler Options, and now
  it works :D Thanks!
 
 

 Huh, template paths? What are those?

 I opened the project inspector to edit the required packages.

 Vincent

 _
  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


[lazarus] cannot find -lGL (OpenGLContext application)

2007-11-27 Thread Marco Alvarado
The application is running correctly in Windows, now I want to compile
it in Linux. I get just one error while linking:

/usr/bin/ld: cannot find -lGL
pruebabasicalinux.lpr(97,1) Error: Error while linking
pruebabasicalinux.lpr(97,1) Fatal: There were 1 errors compiling
module, stopping

I created this test from the new Application wizard, and added all the
paths. The application uses GL, GLU and OpenGLContext. What could be
missing?

Thanks a lot for all your help, I have got very far on this project.

-Marco

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


Re: cannot find -lGL (OpenGLContext application)

2007-11-27 Thread Marco Alvarado
Oh look, I got the same error when compiling the TOpenGLContext example:

Compiling package LazOpenGLContext 0.0 completed
/usr/bin/ld: cannot find -lGL
testopenglcontext1.lpr(14,1) Error: Error while linking
testopenglcontext1.lpr(14,1) Fatal: There were 1 errors compiling
module, stopping

What needs to be configured in order to get these applications running?

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


[lazarus] Any unit like ScktComp?

2007-11-26 Thread Marco Alvarado
Is there a unit like ScktComp in Lazarus, with a class like
TClientSocket for simple TCP communication? I think Indy is way too
big and complex for what I need.

Thanks!
-Marco

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


Re: [lazarus] Any unit like ScktComp?

2007-11-26 Thread Marco Alvarado
I just don't want to add a bunch more of units to my project. The same
happened to me in Delphi, I tried Indy but I better stayed with
TClientSocket that does just what I need. So I'll give lNet a try,
thanks for the tip.

-Marco

2007/11/26, Marco van de Voort [EMAIL PROTECTED]:
 On Mon, Nov 26, 2007 at 09:33:23AM -0600, Marco Alvarado wrote:
  Is there a unit like ScktComp in Lazarus, with a class like
  TClientSocket for simple TCP communication? I think Indy is way too
  big and complex for what I need.

 Simple TCP Communication is not more difficult in Indy than in other suites.

 _
  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


[lazarus] Creating TForms dynamically (works in Delphi, not Lazarus)

2007-11-26 Thread Marco Alvarado
I need to create my forms dynamically. In Delphi I just remove the
designed form from the main program, so it looks like this:

...
begin
  Application.Initialize;
  Application.Run;
end.

Later on, I just create new instances of my forms and assign it's
properties, i.e.:

...
  AForm := TMyForm.Create(Application);
  AForm.Caption := 'This is my form';
  AForm.Left := X;
  AForm.Top := Y;
  AForm.Width := Width;
  AForm.Height := Height;
  AForm.Show;
...

In Delphi that's all I need, and it works. But must be missing
something in Lazarus, because the program runs and executes without
exceptions, but there is no form shown. I included Forms and
Interfaces in the uses clause.

Any ideas? Thanks!
-Marco

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


Re: [lazarus] Creating TForms dynamically (works in Delphi, not Lazarus)

2007-11-26 Thread Marco Alvarado
Oh, forgot to tell, this part:

 ...
 begin
   Application.Initialize;
   Application.Run;
 end.

is inside an unit's initilization section. So the main program still
runs, creating the form. :D

2007/11/26, Vincent Snijders [EMAIL PROTECTED]:
 Marco Alvarado schreef:
  I need to create my forms dynamically. In Delphi I just remove the
  designed form from the main program, so it looks like this:
 
  ...
  begin
Application.Initialize;
Application.Run;
  end.
 
  Later on, I just create new instances of my forms and assign it's
  properties, i.e.:
 
  ...
AForm := TMyForm.Create(Application);
AForm.Caption := 'This is my form';
AForm.Left := X;
AForm.Top := Y;
AForm.Width := Width;
AForm.Height := Height;
AForm.Show;
  ...
 

 How is this code entered? I cannot imagine Application.Initialize or
 Application.Run; do that.

 Vincent

 _
  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] Creating TForms dynamically (works in Delphi, not Lazarus)

2007-11-26 Thread Marco Alvarado
Sorry, this is the part that is inside the initialization section:

 Application.Initialize;
 Application.Run;

Not in the main begin..end, so it should execute before the main
program creates the window.

Anyway, maybe the way the widgetset works is not the same as the way
VCL works. Maybe I should use some event of TApplication to make sure
the code executes in the right order. :)

2007/11/26, Mattias Gaertner [EMAIL PROTECTED]:
 On Mon, 26 Nov 2007 12:05:27 -0600
 Marco Alvarado [EMAIL PROTECTED] wrote:

  Oh, forgot to tell, this part:
 
   ...
   begin
 Application.Initialize;
 Application.Run;
   end.
 
  is inside an unit's initilization section. So the main program still
  runs, creating the form. :D

 The 'begin..end.' of the program is executed after all initialization
 sections. This means Application.Initialize is called after the
 below code (AForm.Show).
 Under Lazarus the Application.Initialize inits the widgetset.


  2007/11/26, Vincent Snijders [EMAIL PROTECTED]:
   Marco Alvarado schreef:
I need to create my forms dynamically. In Delphi I just remove the
designed form from the main program, so it looks like this:
   
...
begin
  Application.Initialize;
  Application.Run;
end.
   
Later on, I just create new instances of my forms and assign it's
properties, i.e.:
   
...
  AForm := TMyForm.Create(Application);
  AForm.Caption := 'This is my form';
  AForm.Left := X;
  AForm.Top := Y;
  AForm.Width := Width;
  AForm.Height := Height;
  AForm.Show;
...
   
  
   How is this code entered? I cannot imagine Application.Initialize or
   Application.Run; do that.


 Mattias

 _
  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] TOpenGLContext (Author: Mattias Gaertner)

2007-11-25 Thread Marco Alvarado
Oh, that's great. Thanks!

2007/11/25, Lord Satan [EMAIL PROTECTED]:
 On Sun, 25 Nov 2007 08:17:46 -0600
 Marco Alvarado [EMAIL PROTECTED] wrote:

  Hello guys!
 
  I found this component, TOpenGLContext, and it seems to be what I'm
  looking for. The problem is I got it from the personal files of
  somebody:
 
  http://is.muni.cz/th/139855/fi_b/lazarus/components/opengl/openglcontext.pas?lang=en
 
  I wanted to know is there is an official site for this component,
  where I can get the latest version.

 It is part of Lazarus. Look in $LazarusDir/components/opengl and install the 
 package.

 _
  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