MorphOS Developer
Posts: 1520 from 2003/2/24
From: Finland
Quote:
ciVic wrote:
Hi all,
I'm trying to layout some buttons on a map (for the next twittAmiga). I can set this attribute so that my hook is called, but the data transfered via registers seems to be corrupt. Here is the hook definition:
HOOKPROTO(LayoutFunc, ULONG, Object *obj, struct MUI_LayoutMsg *lm)
{
...
}
I use the sdi_hook.c. This works for example with the HTMLView class, but here lm does not contain meaningfull data. E.g. lm->lm_Type should be the type of the call (0 or 1), but is something >2000 and couting up. I have it from the Layout example from MUI 3.8, but I miss this example on MorphOS. Can somebody help me?
I dont know. Maybe sdi_hook.c is buggy because layout hook certainly works correctly. You can find examples from Ambient code.
1 + 1 = 3 with very large values of 1