Re: [Planner Dev] Windows version



On ons, 2004-07-28 at 10:29 +0300, Jani tiainen wrote:

> I solved this in following way:
> 
> GType
> planner_gantt_model_get_type (void)
> {
>      static GType type = 0;
> 
>      type = g_type_from_name("PlannerGanttModel"); // <-- New.
> 
> 
>      (...conditionally if type == NULL register it first time)
> }
> 
> And to be exact, that "static" could be removed because value of 
> variable is overridden every time call happens.
> 
> I think that is "proper" way of doing things... Now where I can set 
> initial value of project-start, because that is what gives problems now...

I don't think this is feasible really, since it would have to be done
for all the types that are defined in the view.

There are three solutions as I see it:

1. Use GTypeModule
2. Compile all views into the executable
3. Compile the shared parts into a small lib and link to it from
gantt/task views
 
1) and 2) would be a bit of coding work, and 3) should be a five minute
makefile hack.

I suggest 3). It would be great if you could try that and see if it
works.

> (And saving and loading, but that's another thing...)

If you can get a backtrace from a debugger, it would be a lot easier to
find :) Likewise for the project-start thing.

/Richard

-- 
Imendio HB, http://www.imendio.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]