Using "real(" Functions

Moderator: tr1p1ea

Andy_J
Calc Master
Posts: 1110
Joined: Mon 20 Dec, 2004 10:01 pm
Location: In the state of Roo Fearing
Contact:

Post 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/
ImageImage
Image
User avatar
JoostinOnline
Regular Member
Posts: 133
Joined: Wed 11 Jul, 2007 10:42 pm
Location: Behind You

Post 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.
merthsoft
Extreme Poster
Posts: 496
Joined: Tue 21 Dec, 2004 6:49 am
Location: WI

Post 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...
Shaun
User avatar
JoostinOnline
Regular Member
Posts: 133
Joined: Wed 11 Jul, 2007 10:42 pm
Location: Behind You

Post 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
magicdanw
New Member
Posts: 30
Joined: Mon 16 Jul, 2007 7:02 am

Post 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.
Andy_J
Calc Master
Posts: 1110
Joined: Mon 20 Dec, 2004 10:01 pm
Location: In the state of Roo Fearing
Contact:

Post 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.
Last edited by Andy_J on Tue 17 Jul, 2007 4:59 am, edited 1 time in total.
ImageImage
Image
magicdanw
New Member
Posts: 30
Joined: Mon 16 Jul, 2007 7:02 am

Post 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.
Andy_J
Calc Master
Posts: 1110
Joined: Mon 20 Dec, 2004 10:01 pm
Location: In the state of Roo Fearing
Contact:

Post 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:).
ImageImage
Image
magicdanw
New Member
Posts: 30
Joined: Mon 16 Jul, 2007 7:02 am

Post 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.
Andy_J
Calc Master
Posts: 1110
Joined: Mon 20 Dec, 2004 10:01 pm
Location: In the state of Roo Fearing
Contact:

Post 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. :)
ImageImage
Image
Post Reply