[fpc-pascal] FPC on GSoC

2008-03-12 Thread Musan Antal
Could you please tell me more about this issue:

Musan Antal schreef:
> Was you ever considering to get involved in the Google Summer of Code?
> There are lot of Open-Source projects in it, I think it would also be in
> the benefit of FPC to get some developers.
>
> But what do you think about this?

It is a good idea. FPC applied twice and was rejected twice. Maybe you can
inform
with Google Summer of Code, what needs to be done, so FPC won't be rejected
a third
time (of course that can be prevent by not applied for a third time).

Vincent


Who and what was trying to do on GSoC and failed?
I'd like to make a project on GSoC so that FPC should have an function to
play AVI or some video format like that.

What if I'll administer this for GSoC?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] GSoC

2008-03-12 Thread Musan Antal
Hello Felipe,

I think it would be really important to make a new submission to the GSoC.
I also have some ideas on what else to include, in order to make the
application more convincing.

Please let me know if you want, or other, to administer the application, or
if I should make it.
I can also contribute in promoting the event amongst students.
Unfortunatelly the deadline is on March 12th at noon PDT. So time is really
short.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Jonas Maebe


On 12 Mar 2008, at 01:41, Felipe Monteiro de Carvalho wrote:


I'd just like to confirm. Considering the following class method:

{$mode delphi}

interface

type

 TMyController = class(NSObject)
 public
   class function
applicationShouldTerminateAfterLastWindowClosed(param1: objc.id;
param2: SEL; theApplication: objc.id): cbool; cdecl;
 end;

---
Does it have the exact same layout as the procedure bellow? i.e.
without hidden Self parameter.

function  applicationShouldTerminateAfterLastWindowClosed(param1:  
objc.id;

param2: SEL; theApplication: objc.id): cbool; cdecl;


Unlikely (afaik there is a hidden VMT pointer), and even if it did, it  
would not be guaranteed to remain that way. To be able to interface  
Objective-C code in an OOP way in FPC, support for some kind of  
Objective Pascal dialect has to be added to the compiler. Everything  
will probably break at one time or another.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] problem with interface (OOP not widget)

2008-03-12 Thread Jonas Maebe


On 12 Mar 2008, at 05:41, Bee wrote:


http://bugs.freepascal.org/view.php?id=10684


Hints? TIA.


I'm currently using a not too elegant workaround to solve this  
problem. With some IFDEFs because the workaround is for FPC only.


There is no support for passing nil as a constant to a "procedure of  
object" parameter of a cdecl procedure at this time. You can work  
around it by using two overloads (one with a tnotify parameter, one  
without). That should work both in FPC and in Delphi.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Hmm 64 bit instructions for visual studio 2008 slower than doubles too ?

2008-03-12 Thread Vinzent Hoefler
On Monday 10 March 2008 21:02, Skybuck Flying wrote:

> Also when I set it to release, something strange happens and it only
> take 7 ticks or so... while normally it takes 5 million ticks ?

It's called "optimizing". Obviously it calculates the final result at 
compile time already.


Vinzent.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] problem with interface (OOP not widget)

2008-03-12 Thread Jonas Maebe


On 12 Mar 2008, at 11:02, Jonas Maebe wrote:


On 12 Mar 2008, at 05:41, Bee wrote:


http://bugs.freepascal.org/view.php?id=10684


Hints? TIA.


I'm currently using a not too elegant workaround to solve this  
problem. With some IFDEFs because the workaround is for FPC only.


There is no support for passing nil as a constant to a "procedure of  
object" parameter of a cdecl procedure at this time. You can work  
around it by using two overloads (one with a tnotify parameter, one  
without). That should work both in FPC and in Delphi.


Actually, this is more or less the same as what JoshyFun suggested  
earlier.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Vandalism

2008-03-12 Thread Flávio Etrusco
Stopbadware.org (actaully Firefox 3 "phishing protection") reports the
links as from an "attack site".
Maybe the pages should be taken offline until they're fixed?

Best regards,
Flávio


On Tue, Mar 11, 2008 at 8:11 PM, C Western <[EMAIL PROTECTED]> wrote:
> There seems to be some vandalism on the following page:
>  http://community.freepascal.org:1/docs-html/fpctoc.html
>  the Documentation table of contents (with
>   comments).
>  and clicking through indicates the same person has been active for a
>  while.
>  Colin
>  ___
>  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>  http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Felipe Monteiro de Carvalho
On Wed, Mar 12, 2008 at 6:10 AM, Jonas Maebe <[EMAIL PROTECTED]> wrote:
>  To be able to interface
>  Objective-C code in an OOP way in FPC, support for some kind of
>  Objective Pascal dialect has to be added to the compiler. Everything
>  will probably break at one time or another.

Ummm ... I'd like to keep compiler and sintax changes to absolute
minimal. Ideally zero like now =P and I'm very close of having a fully
object-oriented interface to objective-c.

Alternatively maybe an extra method modifier could be easier to
implement then a new dialect. One that guarantees that no hidden VTM
parameter is on the method ... but I'm almost sure there is already
some way of achieving that ...

Another idea is having a objcclass type of class, which can handle
automatically some of the work currently done on the bindings, but I'd
rather avoid that as it's hard for me to develop it.

thanks,
-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Jonas Maebe


On 12 Mar 2008, at 18:44, Felipe Monteiro de Carvalho wrote:

On Wed, Mar 12, 2008 at 6:10 AM, Jonas Maebe <[EMAIL PROTECTED] 
> wrote:

To be able to interface
Objective-C code in an OOP way in FPC, support for some kind of
Objective Pascal dialect has to be added to the compiler. Everything
will probably break at one time or another.


Ummm ... I'd like to keep compiler and sintax changes to absolute
minimal. Ideally zero like now =P and I'm very close of having a fully
object-oriented interface to objective-c.

Alternatively maybe an extra method modifier could be easier to
implement then a new dialect. One that guarantees that no hidden VTM
parameter is on the method ... but I'm almost sure there is already
some way of achieving that ...


In theory, declaring a class method as static should do that (as  
mentioned before either here or on fpc-devel), but it doesn't at this  
time. Feel free to file a bug.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Jonas Maebe


On 12 Mar 2008, at 18:44, Felipe Monteiro de Carvalho wrote:


Ummm ... I'd like to keep compiler and sintax changes to absolute
minimal. Ideally zero like now =P and I'm very close of having a fully
object-oriented interface to objective-c.


Aren't you going to have problems with memory leaks with these wrapper  
instances? Suppose you create an instance in Pascal code, then pass  
the (wrapped) Objective-C class instance to an Objective-C method  
which releases it -> how will the Pascal wrapper instance ever be  
released? (and if the programmer frees it himself, how can you avoid  
sending a release message to the already released instance?)



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Felipe Monteiro de Carvalho
On Wed, Mar 12, 2008 at 3:56 PM, Jonas Maebe <[EMAIL PROTECTED]> wrote:
>  Aren't you going to have problems with memory leaks with these wrapper
>  instances? Suppose you create an instance in Pascal code, then pass
>  the (wrapped) Objective-C class instance to an Objective-C method
>  which releases it -> how will the Pascal wrapper instance ever be
>  released?

I don't know any example of a method in Cocoa which may or not release
the class depending on something. If it surely frees the class, then
you can set MyObject.Handle to nil before freeing it. Else there
exists no problem.

I'm building a nice way to create Cocoa apps in Pascal, not a generic
object-oriented objective-c bridge.

The main aim is creating a Lazarus-Cocoa widgetset, and maybe adding
some Cocoa to the LCL-Carbon widgetset to get TTrayIcon implemented.

I personally consider my bindings good enougth to be used to create
pure Cocoa applications, but I have no need to develop Cocoa specific
applications.

-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Felipe Monteiro de Carvalho
On Wed, Mar 12, 2008 at 3:43 PM, Jonas Maebe <[EMAIL PROTECTED]> wrote:
>  In theory, declaring a class method as static should do that (as
>  mentioned before either here or on fpc-devel), but it doesn't at this
>  time. Feel free to file a bug.

What is the syntax of a class method on FPC?

I did a search and the syntax on delphi seams to be this:

class procedure SetClassProperty(Value: Integer); static;

But my FPC 2.2.0 doesn't recognize the "static" at the end of the
declaration. I read the other thread, but there is nothing there that
makes the syntax clear.

Maybe isn't of having wrongly implemented static methods, fpc simply
doesn't have them yet?

thanks,
-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Michael Van Canneyt


On Wed, 12 Mar 2008, Felipe Monteiro de Carvalho wrote:

> On Wed, Mar 12, 2008 at 3:43 PM, Jonas Maebe <[EMAIL PROTECTED]> wrote:
> >  In theory, declaring a class method as static should do that (as
> >  mentioned before either here or on fpc-devel), but it doesn't at this
> >  time. Feel free to file a bug.
> 
> What is the syntax of a class method on FPC?
> 
> I did a search and the syntax on delphi seams to be this:
> 
> class procedure SetClassProperty(Value: Integer); static;

No. 
You must not specify the static. Where did you get that from ?

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Felipe Monteiro de Carvalho
On Wed, Mar 12, 2008 at 7:01 PM, Michael Van Canneyt
<[EMAIL PROTECTED]> wrote:
>  No.

What is the syntax of a static class method then?

>  You must not specify the static. Where did you get that from ?

The first link here:

http://www.google.com/search?hl=en&safe=active&client=firefox-a&rls=org.mozilla:pt-BR:official&hs=J3Y&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=static+class+method+syntax+delphi&spell=1

thanks,
-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Jonas Maebe


On 12 Mar 2008, at 22:56, Felipe Monteiro de Carvalho wrote:

On Wed, Mar 12, 2008 at 3:43 PM, Jonas Maebe <[EMAIL PROTECTED] 
> wrote:

In theory, declaring a class method as static should do that (as
mentioned before either here or on fpc-devel), but it doesn't at this
time. Feel free to file a bug.


What is the syntax of a class method on FPC?

I did a search and the syntax on delphi seams to be this:

class procedure SetClassProperty(Value: Integer); static;

But my FPC 2.2.0 doesn't recognize the "static" at the end of the
declaration. I read the other thread, but there is nothing there that
makes the syntax clear.


You have to use the -St command line option for the "static" keyword  
to be recognised.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Jonas Maebe


On 12 Mar 2008, at 23:08, Michael Van Canneyt wrote:


On Wed, 12 Mar 2008, Felipe Monteiro de Carvalho wrote:


On Wed, Mar 12, 2008 at 7:01 PM, Michael Van Canneyt
<[EMAIL PROTECTED]> wrote:

No.


What is the syntax of a static class method then?


What is a 'static' class method ? D7 does not know them.


A class method without a vmt pointer.


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Felipe Monteiro de Carvalho
On Wed, Mar 12, 2008 at 7:08 PM, Michael Van Canneyt
<[EMAIL PROTECTED]> wrote:
>  What is a 'static' class method ? D7 does not know them.

I think it was introduced after D7. C# also seams to have this
concept, so I think it's somehow related to .NET on the delphi
implementation, but it's also available for delphi-win32 and now I'm
giving it a completely new use =) (objc interfacing)

-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Layout of class method

2008-03-12 Thread Michael Van Canneyt


On Wed, 12 Mar 2008, Felipe Monteiro de Carvalho wrote:

> On Wed, Mar 12, 2008 at 7:01 PM, Michael Van Canneyt
> <[EMAIL PROTECTED]> wrote:
> >  No.
> 
> What is the syntax of a static class method then?

What is a 'static' class method ? D7 does not know them.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] FPC and Profiling software

2008-03-12 Thread Graeme Geldenhuys
Hi,

Does anybody know of any profiling software I can use with FPC? I'm
mainly developing under Linux, but have a virtual Win2000 session as
well, so Windows or Linux software will do.

I'm trying to detect where bottlenecks occur in my code.

Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal