On 1/16/06 1:40 PM, David Catmull didst favor us with:
> On Jan 16, 2006, at 10:07 AM, Rick Mann <rmann@late...> wrote:
>> Finally, I decided instead to temporarily build an HIImageView
>> embedded in a ScrollView in IB, then hack the objects.xib file to
>> change the embedded HIImageView back to an HIView with the
>> appropriate settings for my custom view in PPx. This seems to be
>> working. (Note, you need the PPx from CW Pro 10, because the previous
>> versions don't have PPx::ScrollView).
> I tried something like that one time, and it got me crashes.
Indeed. I would not rely on hacking the objects.xib file like this. Even
those its contents are readable, what IBCarbonRuntime does with them is not
documented and can change from release to release of the OS. The "it seems
to work" justification isn't really worth much as the thing that seems to
work can stop working at any time and Apple's response would simply be "you
shouldn't be doing that."
I remember a thread a few years ago in which someone was having a problem
with his menu item indenting. He was setting the indent to -1 to move items
to the left and it had work when he started using it. But then these items
started disappearing from his menu after a particular release of the OS.
Well, SetMenuItemIndent takes a UInt32 for the indent, and the system
started treated the value *as* an unsigned value in that OS release,
breaking the old behavior. Eric's response at the time was basically, "Don't
do that." ;-)
> My solution was to make a custom view and set its class to
> com.apple.HIScrollView, and put my own custom view inside it. I think there
> was more I had to do to get it to work, but I'm having trouble digging it up
> at the moment. In my nib, the scroll view also has an 'attr' parameter with a
> UInt32 value of 7, which I'm pretty sure was for setting the scroll view
> options (both scroll bars and room for grow box).