I mean, they're simply not there. The values are "undefined in context" in
the debugger, and referencing them in the code causes run-time errors, as in
referencing unallocated memory.

I have (already) precisely duplicated the published (ie example code)
examples, and still have the problem. While the example I posted did not
declare my function as static, I have also tried it as static w/out any
improvement in result. I do not have this problem in every application. I am
not redefining DmComparF. I have been programming professionally for 27
years, and I could be wrong, but I don't think I've overlooked anything
obvious. (I say this, fully confident that it will induce somebody to point
out the obvious mistake I am overlooking, and solve the problem.) Please
refer to my original msg to see, verbatim, my declaration.

Curiously, the Rhodes & McKeehan book, p 147, codes three of these as "Int
unusedInt, SortRecordInfoPtr unused1, SortRecordInfoPtr unused2," which I at
first took to mean that R & M weren't using them, but now I'm not so sure...

Thanks, and please keep trying.

Brandon Wallace <[EMAIL PROTECTED]> wrote in message
news:8023@palm-dev-forum...
>
> When you say you are not getting the other 4 arguments, what do
> you mean by that?  Are they coming in with a value of 0?
> Random values?  (I assume you have declared your function to
> take 6 arguments).
>
> Worst comes to worst, find some sample code that does some sorting
> and be sure you are declaring your function exactly the same
> way as the sample code.
>
> Brandon
>
>
> ----- Original Message -----
> From: Michael Needlman <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: Palm Developer Forum <[EMAIL PROTECTED]>
> Sent: Wednesday, April 12, 2000 5:35 AM
> Subject: Re: DmComparF functions missing parameters
>
>
> > Thanks for trying, but I must be missing your point. I am running OS
3.1,
> > and, as far as this question goes, always have been. There is no legacy
> code
> > involved. I read what it said in the manual. I understand that to mean
> that
> > I should be getting six parameters. I am only seeing two. I would like
to
> be
> > seeing the others. Why am I not able to reference the others, view them
in
> > the CW debugger, etc.? Let me try to be clear. I am not observing the
> > pre-version-2 behavior of three arguments - nor would I expect to, since
> > nothing involved is pre version 2. I am not observing the later behavior
> of
> > six arguments. I am seeing TWO arguments, a situation uncontemplated by
> the
> > documentation. It is true that nothing is blowing up because of
> insufficient
> > arguments, but neither am I able to make my NEW code sort on some of the
> > record-header attributes which are supposed to be present, because they,
> > apparently, aren't.
> > I hope this explains my perceived problem more clearly and that somebody
> > will respond to my actual question, which is: ==> where are the other
> > arguments, how do I get at them, or, why isn't the OS sorting routine
> > passing them to my callback function? If I am doing something wrong,
what
> > should I do instead? If the OS has a bug, is it gonna get fixed?
> > Ps. I really have read all the manuals very thoroughly, and have failed
to
> > find anything illuminating on this subject.
> >
> > Danny Epstein <[EMAIL PROTECTED]> wrote in message
> > news:7956@palm-dev-forum...
> > >
> > > "Michael Needlman" <[EMAIL PROTECTED]> wrote in message
> > > news:7953@palm-dev-forum...
> > > > As I understand the OS 3.1 documentation and datamgr.h, DmQuickSort
> and
> > > > DMInsertionSort are supposed to be passing six parameters to an
> > > app-defined
> > > > compare function. However, when I run my function with DmQuickSort
> > <snip>
> > > > the only parameters available to CompareOrders are rec1 and rec2. I
am
> > > > running OS 3.1. Do any of you know what happened to the other
> > parameters?
> > >
> > > The Palm OS reference manual sez...
> > >
> > > The DmComparF prototype changed in Palm OS version 2.0. Previously,
the
> > > prototype only defined the first three parameters.
> > >
> > > As a rule, the change in the number of arguments from three to six
> doesn't
> > > cause problems when a 1.0 application is run on a 2.0 device because
the
> > > system only pulls the arguments from the stack that are there.
> > >
> > > Keep in mind, however, that some optimized applications built with
tools
> > > other than Metrowerks CodeWarrior for Palm OS may have problems as a
> > result
> > > of the change in arguments when running on a 2.0 or later device.
> > > --
> > > Danny Epstein
> > > OS Engineer, Palm Inc.
> > >
> > >
> > >
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palm.com/devzone/mailinglists.html
> >
> >
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to