Re: Question about map sources.

On Thu, May 17, 2012 at 10:53 AM, Robert Park <rbpark exolucere ca> wrote:
> On Thu, May 17, 2012 at 8:26 AM, Jiří Techet <techet gmail com> wrote:
>> Or you can completely skip the factory and put the sources into python
>> list or dict and iterate over it.
> Well, I also have bound the map-source property to a GSettings key,
> and that depends upon calling source_get_id() whenever the map-source
> property changes (to store the id in GSettings) and then also calling
> factory_create_cached_source(id) whenever the gsettings key changes
> (ie, at app launch, so it always remembers the last used source). So
> I'll need to register() the custom source in order for that to keep
> working.

Just playing with this now finally, if I understand correctly the
procedure to register with the factory looks like this:

1. make a MapSourceDesc
2. pass that to factory.register()
3. then factory.create_cached_source() will create it by id on demand?

Well champlain_map_source_desc_new_full doesn't seem to be
introspected properly because I can't call it, and if I try to just
instantiate the class directly (ie, desc = Champlain.MapSourceDesc(id,
name, etc...)) it says __init__ takes 0 arguments, 9 given.

Can you confirm? Or am I just doing something wrong?


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