> On Nov 12, 2016, at 3:22 AM, Jonas Maebe wrote:
>
> You're passing a class, not an object. Passing a class that implements an
> interface to a method that expects that interface should work fine.
> Converting a class instance to an interface that it implements is trivial and
> always works,
On 11/11/16 16:28, Ryan Joseph wrote:
On Nov 11, 2016, at 8:54 PM, Tony Whyman wrote:
If you go back to the FPC documentation, in the User Guide it says "Objects are
stored in memory just as ordinary records with an extra field: a pointer to the Virtual
Method Table (VMT)."
That text is abo
> On Nov 11, 2016, at 8:54 PM, Tony Whyman
> wrote:
>
> If you go back to the FPC documentation, in the User Guide it says "Objects
> are stored in memory just as ordinary records with an extra field: a pointer
> to the Virtual Method Table (VMT)." My understanding is that an interface is
>
Am 11.11.2016 15:16 schrieb "Graeme Geldenhuys" <
mailingli...@geldenhuys.co.uk>:
>
> On 2016-11-11 10:52, Tony Whyman wrote:
> > Someone else may correct me, but with CORBA, I believe you have to
> > explicitly add a function to the interface such as
> >
> > function GetObject: TMyObject;
>
>
> I
On 2016-11-11 10:52, Tony Whyman wrote:
> Someone else may correct me, but with CORBA, I believe you have to
> explicitly add a function to the interface such as
>
> function GetObject: TMyObject;
I may be wrong too, but I thought, for reliable results, you had to do
that for COM and CORBA styl
Isn’t MyObject2 still pointing to MyObject1?
If you go back to the FPC documentation, in the User Guide it says
"Objects are stored in memory just as ordinary records with an extra
field: a pointer to the Virtual Method Table (VMT)." My understanding is
that an interface is stored similarly,
On Friday 11 November 2016 12:08:26 Graeme Geldenhuys wrote:
> On 2016-11-11 09:46, Ryan Joseph wrote:
> > The string lookup absolutely murders performance (I was using “cobra”
> > interfaces) so it can’t be used in some situations.
>
> If you are talking about the GUID, I'm not sure if you know, b
On 11/11/16 10:59, Ryan Joseph wrote:
What does memory management even mean for interfaces? I never allocate an
interface I just implement it in a class so what’s there to be freed? All these
crashes I’m getting suggest memory is being trashed by the compiler at some
point without my knowledge
The subject says it allready:
Is there a reason that the Windows API function FindFirstFileNameW
is not defined in the Windows unit?
I had to define it myself to use it but I think it should be available directly.
___
fpc-pascal maillist - fpc-pascal@
> On Nov 11, 2016, at 5:52 PM, Tony Whyman
> wrote:
>
> Someone else may correct me, but with CORBA, I believe you have to explicitly
> add a function to the interface such as
>
> function GetObject: TMyObject;
>
> and implement as
>
> function TMyObject.GetObject: TMyObject;
> begin
> Res
> On Nov 11, 2016, at 5:44 PM, Tony Whyman
> wrote:
>
> With CORBA you are responsible for freeing the objects that provide an
> interface in the same way that you are always responsible for freeing the
> objects that you create. If you free an object before you finish using it
> then it's a
> On Nov 11, 2016, at 6:08 PM, Graeme Geldenhuys
> wrote:
>
> If you are talking about the GUID, I'm not sure if you know, but when
> using FPC's CORBA interfaces, you can use a MUCH shorter string which
> gives better performance. MSEide even has built-in support to do just
> that (generate sm
On 2016-11-11 09:46, Ryan Joseph wrote:
> The string lookup absolutely murders performance (I was using “cobra”
> interfaces) so it can’t be used in some situations.
If you are talking about the GUID, I'm not sure if you know, but when
using FPC's CORBA interfaces, you can use a MUCH shorter strin
On 11/11/16 10:08, Ryan Joseph wrote:
I’m trying your code example now and I get "Class or COM interface type
expected, but got “IMyInterface”” when I try to cast with “as”. I was using
{$interfaces corba} so maybe that’s the problem?
Ooops, as you may guess, I typically work with COM interfac
On 11/11/16 10:25, Ryan Joseph wrote:
On Nov 11, 2016, at 4:56 PM, Tony Whyman wrote:
3. To get an object back from an interface you must use the "as" operator.
Another point to do with CORBA. The manual says they are not reference counted
and programmer needs to do book keeping. The crash I
> On Nov 11, 2016, at 4:56 PM, Tony Whyman
> wrote:
>
> 3. To get an object back from an interface you must use the "as" operator.
This step I was not doing and the “as” operator from an earlier showed it uses
a string lookup anyways so it defeated the purpose in some cases (but better
than
> On Nov 11, 2016, at 4:56 PM, Tony Whyman
> wrote:
>
> 3. To get an object back from an interface you must use the "as" operator.
Another point to do with CORBA. The manual says they are not reference counted
and programmer needs to do book keeping. The crash I was getting was in line
with
On 11/11/16 09:46, Ryan Joseph wrote:
I just don’t plain get it. The examples given seem to be a redundant property
that could be replaced with a reference the interface itself.
Interface delegation is really just an optimisation and is equivalent to
defining a set of methods to support the int
On 11/11/16 09:46, Ryan Joseph wrote:
Just as I got this message I’m running into some inexplicable memory related
crashes casting from interfaces to objects and calling methods. Are you sure
you can just cast these around like that? The compiler seems to get confused
and lose track of what t
> On Nov 11, 2016, at 4:31 PM, Tony Whyman
> wrote:
>
> You'll find a couple threads earlier this year in heated debate about
> interface delegation and how it is implemented. My conclusion was to avoid
> interface delegation - there are just too many traps for the unwary.
I just don’t plain
Ryan,
You'll find a couple threads earlier this year in heated debate about
interface delegation and how it is implemented. My conclusion was to
avoid interface delegation - there are just too many traps for the unwary.
There is also another thread bemoaning some odd features about the
"supp
I did some experimenting this morning and found out I could pass references to
the interface and call methods directly without using Supports and incurring
the string compare penalty. There’s also interface delegation I read about and
using “implements” keyword but I couldn’t understand what the
22 matches
Mail list logo