[F-Script-talk] Intercepting variable access
Brought to you by:
pmougin
From: Bryan W. <woo...@gm...> - 2006-06-19 23:15:45
|
I'm using F-script as the “underlying computation engine” for a application I’m working on. I've been able to make slight modifications to F-script’s behavior using Categories and poseAsClass: until now and I need some guidance. I need to intercept F-script’s variable lookup mechanism to catch whenever my special “range syntax” is used. That is, whenever variable a1_a12 is referenced I need to catch the lookup and invoke special code (that returns an array of variables a1 -> a10) because a1_a10 doesn't actually exist and is being used as a shorthand for this kind of behavior. I originally attempted to override -[FSinterpreter objectForIdentifier:found:] only to discover that the interpreter doesn't use that method internally. I then downloaded the source and found the existence of the SymbolTable class. Which brings me to my question: What SymbolTable method(s) should I override to do what I’m trying to accomplish? So far F-script’s integration with Cocoa/Objc has made making these kind of customizations a dream. I’m hoping that my luck continues. Thanks, Bryan |