Another member of the list was kind enough to send me some info that,
well, I guess it sorta explained what was happening, but I can now
explain the process in clear and simple language.  At least I think
I can. If someone out there wants to correct me, please do.

Just to recap, here's what I found:

  FrmGetActiveForm() and FrmGetActiveFormID() were returning null while
  in a custom list drawing function.  With experimentation I found that
  both functions did return a valid form any other time I tested, 
  including the initial tap on a trigger that caused the list to be drawn.

Information that I recieved today went into detail about how certain
event get put into the queue, and (here's the key) how a form isn't
active until it's drawn.

I knew my form had been drawn.. in fact it could have already received
input at the time the user tapped on the trigger, and during the list
draw function the functions would *still* return null.  So at first
the new info didn't seem to help much.

But what I believe is happening is fairly simple.  A form is only active
if it is the window currently receiving input.  When the user taps on
a trigger and brings up a list, we now suddenly have a new window that
we are inside, and that we are drawing into.  So our selected form isn't
active, and in my case that caused the FrmGetActive.. functions to fail.
When the user makes a selection and the pop-up closes, our form is again
active and the FrmGetActive.. functions again return a valid form.

Now that makes sense, but I think it's a bug.  A list pop-up is a part
of a form, albeit one that is fleeting, and I see no reason to call a
list pop-up a different window and have the functions in question fail.
At the very least it should be well documented.  While I can't find
any compatibility info for 3.2 -> 3.3 (and it may not exist), the
info for 3.1 -> 3.2 doesn't mention any changes that might have caused
this, nor does the 3.2 -> 3.5 mention anything.  And the problem simply
doesn't exist in 3.1.

Sean.

---
Sean L. Gilley                     Holding to the ground as the ground keeps
614-860-0247 (h), 614-860-2336 (w) shifting, trying to keep sane as the rules
[EMAIL PROTECTED]             keep changing, keeping up my head as my
                                   heart falls out of sight...


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

Reply via email to