GetObjectPtr( blah ); is a function that is present in lots of
the sample source code.  It's proper use is to get the pointer 
of an object, like a control or something, and not a form, from
an objectID.  FrmGetObjectPtr is the proper way of getting a 
form pointer, also, FrmGetActiveForm( ) will get you the active
form's pointer as well.

-Rus


>>Hi everybody,
>>    Just look to this simple code.
>>
>>/*************A simple function for setting the ****************
>>**************maximum value in scroll bar  ******************/
>>
>>void SetMaxScrollBar(short setVal)
>>{
>> short val=0,minVal=0,maxVal=0,pageSize=0;
>> ScrollBarPtr 
>sclPtr=(ScrollBarPtr)GetObjectPtr(Resource2SkillScrollBar);
>
>What is GetObjectPtr()??  In the PalmOS API there is a 
>FrmGetObjectPtr(),
>but that requires a form pointer and an object index.
>
>Now, assuming that your GetObjectPtr() wraps the overhead of
>getting the current form pointer, the next problem is that you need
>the object -index-.  I am assuming that "Resource2SkillScrollBar"
>is actually a resource id for the scroll bar.  You would neet to be
>calling FrmGetObjectIndex() to obtain the proper value to pass to
>FrmGetObjectPtr() ... again, that could be part of what you've got
>wrapped up in GetObjectPtr() ... but w/o seeing that code we
>are really shooting in the dark here...
>

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to