Re: [ Programming object in C ] Problem with the static DiaObject myObject_create(...) function
- From: Lars Clausen <lars raeder dk>
- To: discussions about usage and development of dia <dia-list gnome org>
- Subject: Re: [ Programming object in C ] Problem with the static DiaObject myObject_create(...) function
- Date: Wed, 28 Sep 2005 06:31:44 +0200
On Tue, 2005-09-27 at 12:15 +0200, Jonathan CHABOISSIER wrote:
Hello world. I am new on this mail list. I am currently a trainee and
my mission is to program new objects for DIA.
Good luck! Feel free to document your findings on the Wiki.
I have red all the documents I found and I understand now how to
create my own object. However, I have some problems.
Today's one is this :
In my function static DiaObject myObject_create(...) called when my
object is created by DIA in order to allocate memory, all the
properties are not
initialised like I want. I also found in object/standard/box.c the
same problem :
There's a trick to the initialization that's probably not explained as
well as it should be in the docs. The defaults (other than color, line
width, line style and arrow style) are copied (using *_copy) from a
default object which is stored in defaults.dia. If you remove
defaults.dia, you will see the defaults in _create being used.
P.S. : I apologize for my english mystake, I come from France and I do
the best I can.
Don't worry, your English is pretty damn good (yet another example that
those who apologize for their bad English are never the worst ones).
Hope this helps, otherwise let me know what other snags you hit.
-Lars
--
Lars Clausen <lars raeder dk>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]