View Single Post
Old 05-05-2012, 06:00 AM   #3703
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
@Mark:

In this posting you gave me an answer on how to hook code after an existing function:

Code:
Core.hook.hookAfter(..context to be found.. pageSizeOverlayModel, "initSizeMenu", myInitSizeMenu  );
I was not able to manage it, because it's unclear to me how to find the right line for 'context'.

In case of the function above I tried various statements, for example:

Spoiler:
Core.hook.hookAfter(kbook.model.container.sandbox. SIZE_OVERLAY_GROUP.sandbox.pageSizeOverlayModel, "initSizeMenu", myInitSizeMenu );
Core.hook.hookAfter(kbook.model.container.sandbox. pageSizeOverlayModel, "initSizeMenu", myInitSizeMenu );
Core.hook.hookAfter(kbook.model.container.pageSize OverlayModel, "initSizeMenu", myInitSizeMenu );
Core.hook.hookAfter(kbook.model.container.sandbox. SIZE_OVERLAY_GROUP.sandbox, "initSizeMenu", myInitSizeMenu);
Core.hook.hookAfter(kbook.model.container.sandbox. SIZE_OVERLAY_GROUP, "initSizeMenu", myInitSizeMenu);
Core.hook.hookAfter(kbook.model.container.sandbox. SIZE_OVERLAY_GROUP.sandbox.VIEW.sandbox.SIZE_OVERL AY.sandbox, "initSizeMenu", myInitSizeMenu);
Core.hook.hookAfter(kbook.model.container.sandbox. SIZE_OVERLAY_GROUP.sandbox.SIZE_OVERLAY, "initSizeMenu", myInitSizeMenu);
Core.hook.hookAfter(kbook.model.container.sandbox. SIZE_OVERLAY_GROUP.sandbox.SIZE_OVERLAY.sandbox, "initSizeMenu", myInitSizeMenu);
Core.hook.hookAfter(pageSizeOverlayModel.openCurre ntOverlay, "initSizeMenu", myInitSizeMenu);


No success. I tried to find out this part with an XML-editor, with guessing, looking into comparable code, ...

Open questions are:
  • When do I have to use the keyword 'sandbox'?
  • How do I find out the right XML-path?
  • What, simple asked, is 'the right context'?

Maybe you could give me a hint to one or the other question. I know I'm inconvenient ;-)

A

PS:

You will find my functions here

Last edited by Analogus; 05-05-2012 at 06:13 AM.
Analogus is offline   Reply With Quote