Marc Santhoff | 1 Dec 01:27
Picon
Favicon

Re: running preprocessor from lazarus

Am Donnerstag, den 30.11.2006, 23:20 +0100 schrieb Michael Van Canneyt:
> 
> On Thu, 30 Nov 2006, Marc Santhoff wrote:
> 
> > Hi,
> > 
> > I know this is a question regarding fpc and lazarus, but I decided to
> > post to this list:
> > 
> > If one would want to run the complete sources of a project through a
> > preprocessor transparently when compiling in the lazarus IDE, would this
> > be possible with fpc and lazarus as they are now?
> 
> Well. I thought about this issue frequently.
> 
> FPC has no support for this currently. 
> It has only limited macro support, I'm sure you are aware of it, it's documented.

Yes, I tried to achive it with macros, without success.

> > Or will it take implementing some pipeline hooks or the like in one or
> > both of them?
> > 
> > The goal in doing so would be using a specialized macro processor
> > replacing tags in the source code before feeding through fpc.
> 
> The issue is not so easy. My first thought would be that this is 
> something for the IDE, as it 'knows' which files should be 
> preprocessed and which not, but actually doing so would require
> a lot of filename juggling, as the files must exist on disk with
(Continue reading)

lazarus.mramirez | 1 Dec 02:08

Re: running preprocessor from lazarus

Quoting Marc Santhoff <M.Santhoff <at> t-online.de>:

> The goal in doing so would be using a specialized macro processor

I'm surprise for your question, because I started been interested in  
language/compiler design because I wanted a preprocessor for Turbo  
Pascal,
like Turbo C++ ;-)

Let me understand, you already have the preprocessor to transform your  
"Pascal with Tags" into a "Pascal without tags" source code file ?

Something like:

-------------

program PreprocessorExample;

#define Pi 5

begin
   Write('Pi value is ', Pi);
end.

-------------

Into something like :

-------------

(Continue reading)

Marc Santhoff | 1 Dec 02:11
Picon
Favicon

Re: running preprocessor from lazarus

Am Donnerstag, den 30.11.2006, 23:44 +0100 schrieb Vincent Snijders:
> Marc Santhoff schreef:
> > Hi,
> > 
> > I know this is a question regarding fpc and lazarus, but I decided to
> > post to this list:
> > 
> > If one would want to run the complete sources of a project through a
> > preprocessor transparently when compiling in the lazarus IDE, would this
> > be possible with fpc and lazarus as they are now?
> > 
> > Or will it take implementing some pipeline hooks or the like in one or
> > both of them?
> > 
> > The goal in doing so would be using a specialized macro processor
> > replacing tags in the source code before feeding through fpc.
> > 
> 
> You could call the preprocessor in a before compilation command, see 
> Project -> Compiler Options -> compilation tab.

Ah, yes, I remember. My first thought was to replace fpc with a batch
file, but I didn't try.

> The complete sources thing will be the tricky part. The compiler knows 
> what the complete sources are and the IDE knows what is part of a 
> project. But your preprocessor doesn't know (or maybe it does, if you 
> pass it the lpi file).

So, as I wrote, if the preprocessing is located in the compiler it
(Continue reading)

Picon

Re: running preprocessor from lazarus

On 11/30/06, Marc Santhoff <M.Santhoff <at> t-online.de> wrote:
> Ah, yes, I remember. My first thought was to replace fpc with a batch
> file, but I didn't try.

Doesn´t need to be a batch file. Can be an executable. And you can
change the path to fpc executable on Lazarus IDE to point to your
bat/exe, so you don´t have to really replace fpc.

This could be a easy solution.

your preprocessor could check if the file being compiled has .tpp
extension, and if so preprocess it and send to fpc. If not, send
directly to fpc.

No changes necessary on fpc or lazarus =)
--

-- 
Felipe Monteiro de Carvalho

Christian Iversen | 1 Dec 03:42
Picon

Re: running preprocessor from lazarus

On Friday 01 December 2006 02:08, lazarus.mramirez <at> star-dev.com wrote:
> Quoting Marc Santhoff <M.Santhoff <at> t-online.de>:
> > The goal in doing so would be using a specialized macro processor
>
> I'm surprise for your question, because I started been interested in
> language/compiler design because I wanted a preprocessor for Turbo
> Pascal,
> like Turbo C++ ;-)
>
> Let me understand, you already have the preprocessor to transform your
> "Pascal with Tags" into a "Pascal without tags" source code file ?
>
> Something like:
>
> -------------
>
> program PreprocessorExample;
>
> #define Pi 5
>
> begin
>    Write('Pi value is ', Pi);
> end.
>
> -------------
>
> Into something like :
>
> -------------
>
(Continue reading)

tanila | 1 Dec 03:46
Picon

Taction and TTranslateString (String properties)

Hi all, 

i played arround with some Run-Time Translation of Conmpnents, because I
want to have such a feature in my apps. 
I found, that you have done some work on such things. the TCaption
properties can be scannde by using RTTI, very nice Smile. 
But I as I tried to use this functionality on TActionLists, I found,
that the Caption and Hint Properties of TContainedAction are of type
String. 
As I added some Lines in the ActionList unit: 

                                 Code:

                                 type 

                     TTranslateString = type String; 
                      TCaption = TTranslateString; 

To Avoid Circular references by with the Controls unit. 
After That i changed the String Properties of TContainded action to
TCaption. 
Now everything is fine for me. 

Now my questions: 
1. Is there a reason why this String-Properties aren't replaced ? 
2. Could my modification or some similar solution added to the units to
have the TTranslateString - Feature in Actions ? 

Thanks for all the work everyone has done here, great job 
:)
(Continue reading)

Graeme Geldenhuys | 1 Dec 09:15
Picon
Gravatar

Re: TTabControl and OnChange event

Ok, I found a work-around for now - though not ideal!  I have to get
the ComponentState as the first thing, so that when I destroy the
form, the 'other stuff' doesn't get executed.

procedure TLearnerListForm.IndexTabControlChange(Sender: TObject);
begin
  if csDestroying in ComponentState then
    exit; //==>
  <.... do other stuff...>
end;

Regards,
  - Graeme -

On 11/30/06, Graeme Geldenhuys <graemeg.lists <at> gmail.com> wrote:
> Hi,
>
> After quite some time debugging my code, I found a very weird bug (I
> believe) in the LCL's TTabControl.
>
> Could someone confirm this.  If so, I'll add it to Mantis. See attached project.
>
> I have a TTabControl with 4 Tabs and a OnChange event that writes to
> the console to say that the event fired.
>
> Test 1:
>   Run the app and exit, without clicking any tabs.  The OnChange event
> fires when it shouldn't!   Delphi doesn't fire any OnChange event.
>
> Test 2;
(Continue reading)

George Birbilis | 1 Dec 14:12
Picon
Favicon

RE: Gambas

> > Maybe Lazarus can copy some stuff from that project?
>
> There are hundreds of other open source IDEs, we are all
> already aware of that.
>
> If you have some specific need Lazarus does not attend, or
> something that it could attend better, and Ganbas does it,
> then we can talk about this specific feature. And even then,
> consulting how several other projects solve the problem would
> be better then looking at only one other project.

The page I found it mentioned was one that was speaking of Visual
Development on Linux (compared to VB on Windows) and didn't mention Lazarus
at all (only some replies to that topic mentioned it, but they forgot to
post a URL). From the image they had there about Gambas it looked more
appealing than Lazarus (for example when you launch Lazarus [if you don't
tell it to open something], is there option to autostart with the File/New
dialog? [that should be the default option and have checkbox to not show
that at start again]).

What I mean is that Pascal is almost as easy as Basic to use (apart from
VB's With and Case which are better in my opinion, or ForEach which is
missing), and isn't case-sensitive as C/C++/Java/C#/etc. and is
natural-language friendly (not have to learn some strange symbols and how to
put them together to author a program as in some well-known scripting
languages), so it's either that Lazarus is missing some IDE touches to make
it more appealing to newcomers, or that it needs more/better PR (e.g. try to
post nice screenshots of it to such net discussions that newbies [esp.
interested in university students] may come across while searching for what
IDE to use)
(Continue reading)

Pieter Valentijn | 1 Dec 14:52
Picon

RE: Gambas

So you say its all about marketing?
I run a opensource Accounting project and I have the same problem try to
attract as manny new user as you can meens you need to market it for
that user group. I gess writing to all universities we can get a email
adres from is a start but calling someone in your local area is probably
the most effective. On call to the right person can set things in
motion. I think Lazarus is the best choice for students. But we will
need to reache the tutors for that to happen so they can point to the
right directions (the Lazarus site :-).

Met vriendelijke groet, 
Pieter Valentijn

Delphidreams
http://www.delphidreams.nl

-----Oorspronkelijk bericht-----
Van: George Birbilis [mailto:birbilis <at> kagi.com] 
Verzonden: vrijdag 1 december 2006 14:13
Aan: lazarus <at> miraclec.com
Onderwerp: RE: [lazarus] Gambas

> > Maybe Lazarus can copy some stuff from that project?
>
> There are hundreds of other open source IDEs, we are all already aware

> of that.
>
> If you have some specific need Lazarus does not attend, or something 
> that it could attend better, and Ganbas does it, then we can talk 
(Continue reading)

Al Boldi | 1 Dec 15:07

Re: Gambas

Michael Van Canneyt wrote:
> On Fri, 1 Dec 2006, George Birbilis wrote:
> > > > http://gambas.sourceforge.net/
> > > >
> > > > Maybe Lazarus can copy some stuff from that project?
> > >
> > > Why would we want to do that ? It'd have to be rewritten from
> > > scratch anyway.
> >
> > When I say copy, I also mean ideas, GUI design, etc. whatever people see
> > useful in that one
>
> I see what you mean.
> Well, I haven't actually used it, but judging from the articles I read
> about it (2 to be exact), Lazarus has more to offer. I can of course be
> wrong.

I tried it. Don't waste your time, we are way ahead...

Thanks!

--
Al


Gmane