Hi,
If I compile the code snippet shown below in 'mode delphi' it works fine.
If I try and compile it with 'mode objfpc' it fails with a compiler error
as shown here:
/home/graemeg/programming/personal/fpginstall/src/rttihelpers.pas(156,43)
Error: Illegal type conversion: "LongInt" to "TObject"
I've written some XML classes which expose themselves as interfaces.
Usage goes something like this:
procedure SaveSettings(const Settings: string);
var
Document: IDocument;
Filer: IFiler;
begin
Document := CreateDocument;
Filer := Document.ForceRoot('test') as IFiler;
Filer.WriteTime('t
i dont like this way of working with XML files...
im creating my own model using an Class factory and RTTI properties.
you register your classes in the class factory and the XML loader uses
a class function to select wich one to create for a given node. This
lets you have a lot more control over
>> SetWindowLong(Wnd, GWL_USERDATA, Integer(BaseWindow));
>
> Not 64-bits safe. An integer is not a long. Ptruint probably.
Ah well, there is a new API to fix this in 64 bit Windows. Use
SetWindowLongPtr/GetWindowLongPtr instead.
___
fpc-pascal mail
In our previous episode, Anthony Walter said:
> BaseWindow := CreationWindow;
> BaseWindow.FHandle := Wnd;
> SetWindowLong(Wnd, GWL_USERDATA, Integer(BaseWindow));
Not 64-bits safe. An integer is not a long. Ptruint probably.
___
fpc-pascal
As Michael Van Canneyt says, you cannot use a method as a window message
handler. This assumed implicit Self variable will most likely break the
return pointer on the stack.
Here is my code for a user defined window class. Note, window messages are
processed through TObject.Dispatch
threadvar
I use a similar approach in a systems integration product for a hospital, it
communicates different systems by XML files. The app receives an XML with data
related to an radiology study, then parses the file and convert it to an
object, do some checkings and transformations, and store the object
ׁHello List,
I've uploaded a very initial version of my TConnectionList manager for
Database to github:
http://github.com/ik5/TConnectionList
Please note that the code is in it's very early stages and I have not even
wrote a single testing line for it, and I'm going to rename the class to
TDBConn
On Wed, 27 Jan 2010, Daniel Gilbert wrote:
Hi there,
this is my first posting to the fpc-mailinglist, so please don't slap me if I
do anything wrong. :)
I'm currently re-writing a program I've written in Delphi some months ago.
Due to the now missing free version, I've decided to switch ov
Hi there,
this is my first posting to the fpc-mailinglist, so please don't slap me
if I do anything wrong. :)
I'm currently re-writing a program I've written in Delphi some months
ago. Due to the now missing free version, I've decided to switch over to
Freepascal. But now, I'm somehow stuck.
Michael Van Canneyt wrote:
>
> Yes.
> I use DOM to read the file, and then translate the found TDOMElement nodes to
> the actual business classes.
Thanks for the quick response. I'm glad I am on the right track and my idea
is not totally dumb founded. :)
Regards,
- Graeme -
--
fpGUI Toolki
On Wed, 27 Jan 2010, Graeme Geldenhuys wrote:
Hi,
The small project I am working on requires reading a XML file and using
that data for various things, including building a GUI interface.
Most of my projects are database driven and uses the tiOPF framework to do
my load/saving work (plus a l
Hi,
The small project I am working on requires reading a XML file and using
that data for various things, including building a GUI interface.
Most of my projects are database driven and uses the tiOPF framework to do
my load/saving work (plus a lot of other things).
As the title says, all my app
13 matches
Mail list logo