Hi,
It is a button object. but I have recently commented out the code that gets the
button object and now the program dies in the forms event loop.
case frmOpenEvent:
RecordFormInit();
frmP = FrmGetActiveForm();
FrmDrawForm ( frmP); <---------------- Dies right here..
handled = true;
break;
So this little annoying problem has nothing to do with the control I think. This
for just does not react kindly to be pointed at! I can't seem to get a valid
pointer to it... ugh.
day 3 and I still have no clue where to begin. I could completely recreate this
form.. *but* it has a lot of work in it and I'd rather not.
Thanks again,
Philip J.
Dave Lippincott wrote:
> What kind of control are you passing to FrmGetObjectIndex ? I had a similar
> problem because I was attempting to get the index of an object that did not
> work with this function.
>
> -----Original Message-----
> From: Philip J. Matheson <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Sunday, May 09, 1999 2:58 PM
> Subject: FormPtr problems STILL! Please Help.
>
> >Hi,
> >Ok as I said in my previous messages.. One of my forms will not work. This
> >is very frustrating. When I do the API calls mentioned below the program
> >crashes the first time I try to use the variable frmP. That is in
> >FrmGetObjectIndex.. When I step through with the metroworks debugger I end
> >up looking at a bunch of assembly code. When the program finnaly crashes so
> >that I can no longer debug, the function call is (0x4 or 0x8 Unknown) and I
> >can see in the debug window a messages that says "invalid opcode". Now the
> >code that is causing this works for all other forms, just not this form.
> >I've looked at all the values of frmP after the FrmGetActiveForm(); call.
> >Everything seems to be OK. and objectID is also correct. I'm lost here, I
> >don't know where to start. Maybe someone could just give me a little hint
> as
> >to how I could go about attacking this problem? :)
> >
> >I'm thinking there is something in the forms resource definition that is
> >screwy.. but I don't see how, b/c I didn't write that.. :)
> >
> >Thank you,
> >Philip J. Matheson.
> >
> >"Philip J. Matheson" wrote:
> >
> >> When ever I try to use FrmGetActiveForm(); and I'm in a particular
> >> form... it does not work.. I get a bad pointer error.
> >>
> >> This just started happening in code that was working... ugh. I thught I
> >> may have hosed my ROM but I got a new rom for the POSE.
> >>
> >> if I do something like:
> >>
> >> FormPtr frmP = FrmGetActiveForm();
> >>
> >> and then..
> >>
> >> FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, objectID)
> >>
> >> the application crashes..
> >>
> >> Now this is only when a particular form is the current form.. other
> >> forms in my application work fine. What could possibly be wrong with the
> >> form? The resource seem to be fine when I look at it in constructor.
> >>
> >> Thanks,
> >>
> >> Philip J. Matheson
> >
> >
> >