Search Scope

cwright's picture

In ~/Library/Preferences/com.apple.QuartzComposer.editor.plist, there's a key called 'patcheratorSearchScope' which controls how the patch search works. The default is 0, which means only match names.

On intel machines, bit 0 means search Description, and bit 1 means search Category. therefore, 3 means search categories and descriptions (and names) -- just like Tiger.

On ppc's though, it seems to be different? I'm not sure of RosettaLeopard isn't reliable, or if QC really handles the value differently on a different arch.

Can any ppc-leopard users play with this and note their discoveries?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

yanomano's picture
On PPC/leopard

on PPC : patcheratorSearchScope 0 (Patch Name) patcheratorSearchScope 1 (Patch Description) patcheratorSearchScope 2 (Patch Category ) patcheratorSearchScope 3 (ALL)

yanomano

cwright's picture
cool, thanks

Thanks :) [now the hard part: why doesn't it work for me... are there known correctness/stability issues with rosetta-Leopard?]

[edit: With more inspection, it's an objective-c runtime bug: object_setInstanceVariable(id, name, value); cannot set individual bytes, only 32-bit words (no idea how this works on 64bit... sigh) whee.....]

yanomano's picture
Bit Twiddling Hacks

cwright's picture
Thanks :)

That looks like an exhaustive list :)

I think I've got it under control, hopefully I'll get a beta up tomorrow (holy crap holy crap holy crap...)

[ this was my concoction:

object_getInstanceVariable(object,"_performAutocomplete",&data);
data = CFSwapInt32HostToBig(data);
data = (data & 0xff000000) | (SearchWithName << 16) |
   (SearchWithDescription << 8) | (SearchWithCategories);
data = CFSwapInt32BigToHost(data);
object_setInstanceVariable(object,"_performAutocomplete",data);

]