Page 2 of 2

Posted: Mon 16 Jul, 2007 9:37 pm
by Andy_J
As I said earlier, YES it would still conflict in its current state. They use the same real( numbers. However, if xLIB would use, say, int(, then HookMan WOULD make them work together.

http://code.google.com/p/hookman/

Posted: Mon 16 Jul, 2007 10:01 pm
by JoostinOnline
If I recall, xLIB did chain properly with Omnicalc, and the problem was just that it used the same function numbers as Symbolic.
It uses the same numbers as Omnicalc as well.

Posted: Mon 16 Jul, 2007 10:15 pm
by merthsoft
So, then, I like magicdanw's suggestion of making an option for "old" xLIB and "new" xLIB (ie. real( xLIB and imag( xLIB). I wouldn't make it int, that's used too much, hell, imag( and real( have some pretty practical uses sometimes too...

Posted: Mon 16 Jul, 2007 10:30 pm
by JoostinOnline
Merthsoft wrote:So, then, I like magicdanw's suggestion of making an option for "old" xLIB and "new" xLIB (ie. real( xLIB and imag( xLIB). I wouldn't make it int, that's used too much, hell, imag( and real( have some pretty practical uses sometimes too...
Yes, I like his idea too, but as for using "int(" it would be ignored by xlib unless a comma followed the number.
Ex: int(01,12

Posted: Tue 17 Jul, 2007 2:46 am
by magicdanw
I don't think much information has been released about the hook manager yet, but when it is released it will probably be at Detached Solutions. I'd assume that it will call each hook in succession with the same keypress or function or whatever, so it should let xLIB work with Omnicalc. Of course, xLIB won't ever work with Symbolic since the numbers conflict, unless someone writes special code to deal with that problem by re-mapping the functions.

Posted: Tue 17 Jul, 2007 3:27 am
by Andy_J
... you realize I'm writing it, and that isn't really how it works. It works on the raw OS hooks, not abstractions like that. It can chain Omnicalc and, say, Unit Op's key hooks (which show the menus), and in a completely separate fashion chain the parser hooks (which allow each to do most of their functions).

It will be posted on Detached Solutions I believe, plus binaries on Google Code Hosting and ticalc.org.

Posted: Tue 17 Jul, 2007 4:09 am
by magicdanw
Sorry if I didn't make myself clear, but that's what I meant. When I said it calls each hook, I meant it calls each application's ________ hook. It calls each application through the hook, passing the same data in the registers, simulating the OS's call, so that way each app has a chance to do what it needs to with that data. Or does it stop once an app returns with zero reset? Because otherwise, apps that operate on the same input data might conflict...

Anyway, I'll stop posting my theories and let the authors of Omnicalc, Symbolic, xLIB, Hook Manager, etc. explain if they want.

Posted: Tue 17 Jul, 2007 4:58 am
by Andy_J
Currently it runs through the entire chain even if one of the hooks says to ignore the event. I probably should change that so it aborts the chain or re-loads the values it got from the OS for the rest of the hooks. However that would need special-casing for each of the 23 different hooks as they have different abort conditions.

Multiple hooks will not really act on the same input. The output of the first is the input to the second, and so on. For example, I could have a hook swap change the 1 key into the 2 key, and another hook change the 2 key into the 1 key. Pressing 1 would yield 1, as the first hook changed it to 2 and the second hook changed it back to 1 (as a side effect, you no longer have a way to press 2 :twisted:).

Posted: Tue 17 Jul, 2007 5:10 am
by magicdanw
Well, that's once example of how the hooks can interact improperly if they all act on the same input. However, I guess it won't be such a big deal if users are smart enough to not use completely conflicting apps. Also, sorry for the post about your project. I just realized what happened. I was replying to the last post on page one, and didn't notice there was a second page. I see how it seems out of place where it is.

Posted: Tue 17 Jul, 2007 5:14 pm
by Andy_J
Yeah, I would like to include some sort of "incompatibilities list" if I have time. For the time being, though, it will be up to the user to not completely screw up. :)