On Mon, May 28, 2007 at 03:40:01PM +0000, Mirar @ Pike developers forum wrote:
Well, you need to add the real indices to magic before you return it with _indices, or you can't access ISO or Gregorian instead...
no. those appear to be added automaticly:
write("%-76#s", sort(indices(Calendar))*"\n");
Austrian Ruleset default_rules Badi Second dwim_day Bahai Stardate dwim_time Calendar SuperTimeRange format_day_iso Coptic Swedish format_day_iso_short Day TZnames format_iso Discordian Time format_iso_short Event TimeRange format_iso_tod Events TimeRanges language Fraction TimeofDay mkrules Gregorian Timezone module Hour Week now II YMD nulltimerange ISO YMD_Time parse ISO_UTC Year ruleset Islamic _sprintf set_language Julian calendar_name set_ruleset Language calendar_object set_timezone Minute datetime timezone Month datetime_name Rule datetime_short_name (11) Result: 1301
that's what i get despite _intices only returning the contents of magic;
return ((array)magic)+::_indices();
maybe?
module.pmod does not inherit anything.
at something like: return (array)magic|indices(defcal||master()->resolv("Calendar")[default_calendar]);
however `[]() contains the line: if ( !magic[what] || (stage && what!="default_rules")) return UNDEFINED; which seems to block access to anything that is not in magic anyways.
btw, this part is totally confusing me: if (!defcal) { if (!iso_utc) `[]("ISO_UTC"); stage++; defcal=master()->resolv("Calendar")[default_calendar]; stage--; }
is master()->resolv("Calendar") not this? i.e. module.pmod? if no, what is it? if yes, how does it resolve default_calendar? that does not seem to exist.
seems wierd...
greetings, martin.