Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Sven Barth
On 17.07.2015 18:32, Michael Van Canneyt wrote: I'm working in a new lib and I'm having several problems to keep compatibility betten FPC and Delphi, so I'm using a lot of IFDEFs, even using mode delphi. To improve this situation I advocate NOT yet to spend effort on new language modes, but fir

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, silvioprog wrote: On Fri, Jul 17, 2015 at 11:24 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: On 2015-07-17 15:08, silvioprog wrote: Using the generics I could do a generic DAO that could be used by any class, avoiding TPersonDAO, TProductDAO, TOtherMyEn

Re: [fpc-pascal] How can I get a typeinfo by address?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 11:33 AM, Michael Van Canneyt < mich...@freepascal.org> wrote: > > > On Fri, 17 Jul 2015, silvioprog wrote: > > Hello, >> I need to call a method dynamically by its name over string and pass some >> parameters to it. OK, I don't know if it is possibly in the current version

Re: [fpc-pascal] How can I get a typeinfo by address?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 11:30 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2015-07-17 15:13, silvioprog wrote: > > I need to call a method dynamically by its name over string and pass some > > parameters to it. > > You mean like what FPCUnit, DUnit or FPTest unit testing fram

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 11:24 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2015-07-17 15:08, silvioprog wrote: > > Using the generics I could do a generic > > DAO that could be used by any class, avoiding TPersonDAO, TProductDAO, > > TOtherMyEntityDAO and providing a simple a

Re: [fpc-pascal] How can I get a typeinfo by address?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, silvioprog wrote: Hello, I need to call a method dynamically by its name over string and pass some parameters to it. OK, I don't know if it is possibly in the current version of the compiler, but I'm trying to do something like this: TMethodInvoker.Invoke(VMyObj, ['Para

Re: [fpc-pascal] How can I get a typeinfo by address?

2015-07-17 Thread Graeme Geldenhuys
On 2015-07-17 15:13, silvioprog wrote: > I need to call a method dynamically by its name over string and pass some > parameters to it. You mean like what FPCUnit, DUnit or FPTest unit testing frameworks do? If so, just take a look at any of them to see how they call the test methods. Regards, -

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Graeme Geldenhuys
On 2015-07-17 15:08, silvioprog wrote: > Using the generics I could do a generic > DAO that could be used by any class, avoiding TPersonDAO, TProductDAO, > TOtherMyEntityDAO and providing a simple and useful CRUD layer: just I fully appreciate that there could be some uses, but I don't agree it m

[fpc-pascal] How can I get a typeinfo by address?

2015-07-17 Thread silvioprog
Hello, I need to call a method dynamically by its name over string and pass some parameters to it. OK, I don't know if it is possibly in the current version of the compiler, but I'm trying to do something like this: TMethodInvoker.Invoke(VMyObj, ['Param 1', 'Param 2', 1, True]); I already get so

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 3:06 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2015-07-17 03:34, silvioprog wrote: > > TPersonDao = class(TObject) > > public > > procedure Save(APerson: TObject); > > end; > > Simply change that to the following: > > TPersonDao = class(TObject) >

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 3:09 AM, Sven Barth wrote: > Am 17.07.2015 08:06 schrieb "Graeme Geldenhuys" < > mailingli...@geldenhuys.co.uk>: > > > > On 2015-07-17 03:34, silvioprog wrote: > > > TPersonDao = class(TObject) > > > public > > > procedure Save(APerson: TObject); > > > end; > > > > Simpl

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Jonas Maebe
Sven Barth wrote: Am 17.07.2015 11:06 schrieb "Nikolay Nikolov" mailto:nick...@gmail.com>>: > Btw, just an idea: why not make the generic syntax a {$modeswitch}? > This way people will be able to switch on the delphi generics syntax in > objfpc mode. That's on my ToDo list for quite some time

Re: [fpc-pascal] Please trim your quotes

2015-07-17 Thread Jonas Maebe
Graeme Geldenhuys wrote: I'm not the list admin, And hence please send such remarks to the list admin, rather than to the list. Thank you. Jonas One of the fpc mailing list admins (contact address: fpc-pascal-ow...@lists.freepascal.org) ___ fp

[fpc-pascal] Please trim your quotes

2015-07-17 Thread Graeme Geldenhuys
Hi Everybody, I'm not the list admin, but please be considerate and trim some quotes before you reply. Most email client support the ability to select a piece of text, then click the Reply button, instantly trimming your quotes. Also, just about all email clients support a hierarchy of conversati

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Marcos Douglas
On Fri, Jul 17, 2015 at 7:00 AM, Sven Barth wrote: > Am 17.07.2015 11:06 schrieb "Nikolay Nikolov" : >> >> >> >> On 07/16/2015 11:29 PM, Sven Barth wrote: >>> >>> On 16.07.2015 21:04, Marco van de Voort wrote: In our previous episode, Sven Barth said: >> >> sadly - no, only in De

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, Sven Barth wrote: Am 17.07.2015 08:12 schrieb "ulrich" : > > Dne 15.7.2015 v 10:16 Michael Van Canneyt napsal(a): > >> >> >> On Tue, 14 Jul 2015, ulrich wrote: >> >>> Hi, >>> >>> I have this unit, but when I compile it, I get this error: >>> >>> Illegal unit name XXX_Pars

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Sven Barth
Am 17.07.2015 11:06 schrieb "Nikolay Nikolov" : > > > > On 07/16/2015 11:29 PM, Sven Barth wrote: >> >> On 16.07.2015 21:04, Marco van de Voort wrote: >>> >>> In our previous episode, Sven Barth said: > > sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. >

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-17 Thread Sven Barth
Am 17.07.2015 08:12 schrieb "ulrich" : > > Dne 15.7.2015 v 10:16 Michael Van Canneyt napsal(a): > >> >> >> On Tue, 14 Jul 2015, ulrich wrote: >> >>> Hi, >>> >>> I have this unit, but when I compile it, I get this error: >>> >>> Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas.

Re: [fpc-pascal] XML from a site

2015-07-17 Thread Sven Barth
Am 17.07.2015 08:11 schrieb "Chris Moody" : > > Hi all, > > Currently working on an app which needs to be able to read an XML from a website. Looking at the page at http://wiki.freepascal.org/XML_Tutorial it appears there is no way to get XML directly from a URL. > > Do I need to pull the page down

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, Nikolay Nikolov wrote: On 07/16/2015 11:29 PM, Sven Barth wrote: On 16.07.2015 21:04, Marco van de Voort wrote: In our previous episode, Sven Barth said: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. Then let me tell you that generic m

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Nikolay Nikolov
On 07/16/2015 11:29 PM, Sven Barth wrote: On 16.07.2015 21:04, Marco van de Voort wrote: In our previous episode, Sven Barth said: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. Then let me tell you that generic methods will arrive in mode ObjFPC (and thus its

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Graeme Geldenhuys
On 2015-07-17 08:24, Michael Van Canneyt wrote: > > And this is why I firmly believe we need more libraries to actually > do things, instead of more changes to the language. Exactly. And why I love the concept of FCL so much. There are tons of useful stuff in there. I'm not saying all libraries s

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, Graeme Geldenhuys wrote: On 2015-07-17 07:57, Michael Van Canneyt wrote: Simple: there is a bigger community, and more ready-to-use code floating on internet. The language itself has absolutely nothing to do with it. +1 Well said. I know this is a huge generalisation

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Graeme Geldenhuys
On 2015-07-17 07:57, Michael Van Canneyt wrote: > Simple: there is a bigger community, and more ready-to-use code > floating on internet. The language itself has absolutely nothing to > do with it. +1 Well said. I know this is a huge generalisation (normally not a good thing), but most web (JS)