re: Negative Numbers in Numeric Fields - a Solution

2006-08-03 Thread Laurie Davis
I thought that this was a great solution, but I now find an unfortunate side 
effect. When users use the popup keyboard to enter numbers into a numeric 
field, they cannot enter the minus sign. Since the field is set to numeric, the 
Palm OS blocks the minus sign, and in this case I do not have the option of 
trapping the key input because I no longer get the keyDownEvent.

After all of these years, why does Palm still not realize that some numbers are 
negative !!!

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


re: How can I build a simple prc for weight calculations in the jet I fly?

2006-03-09 Thread Laurie Davis
I have created a flight planning application that does these weight and balance 
calculations - http://lauriedavis9.tripod.com/copilot/

The trial version is fully functional.

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


re: Switching forms smoothly

2006-01-28 Thread Laurie Davis
I usually put a WinLock before the FrmGotoForm, and a WinUnlock after the 
FrmDrawForm.

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


Negative Numbers in Numeric Fields - a Solution

2005-12-25 Thread Laurie Davis
I have been searching for an elegant solution to allow negative number input 
into fields and tables. I initially simply set these fields to text fields. 
That was an acceptable workaround until the availability of keyboard based 
devices such as the Treo. With this workaround, the numeric input shift is not 
automatically selected when the user selects one of these fields (or table 
cells). I finally found a reasonable solution and I wanted to document it here 
in case there were others that were still struggling with the problem.

First, set the field attributes to numeric. For tables this is done using 
FldGetAttributes & FldSetAttributes in the load procedurre that you specified 
with TblSetLoadDataProcedure (this is where I also set the editable, underlined 
and autoShift attributes).

Next, provide a keyDownEvent handler that looks for a minus sign and simply 
pastes it into the field using FldInsert. I also check that the field in focus 
(FrmGetFocus) is the desired field, and that FldGetInsPtPos returns 0. For 
tables, the object in focus is the table, so I further check the row and/or 
column (TblGetSelection & TblGetCurrentField).

I actually wrapped all of this up into a function (called from the keyDownEvent 
handler) that checks a range of fields and/or table columns.

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


Strange Field Behaviour

2005-07-06 Thread Laurie Davis
I have seen some strange field behaviour on the E2 simulator. I have not 
seen
the same behavious on OS4. I have not yet tried other OS versions to isolate
when it started happening.

The behaviour only happens on fields with autoshift disabled.

When you tap in the middle of the text in a field, you expect the cursor to 
be
placed where you tapped. This works ok for fields with autoshift enabled, 
but
on fields where autoshift is disabled, the cursor hops to the end of the 
text. A
subsequent tap in the same field will position the cursor properly.

I tried this even on forms where I do not do any processing of field events, 
so
I do not believe that it is a problem within my application. I tried other
applications on the E2 simulator, and while they do not exhibit exactly the
same behaviour, they all do something weird on fields that have autoshift
disabled.

What is going on? 



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


Palm Developer Program

2005-01-16 Thread Laurie Davis
I am also having trouble accessing the PalmSource Developer site. I
get a message saying that the email address is not registered. I have
tried sending an email to the webmaster, but I have not received any
response.

Laurie



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


Development on Macintosh

2005-01-11 Thread Laurie Davis
I am currently using Codewarrior on Windows. I also use both Constructor and
PilRC.
I am contemplating scrapping my Windows machine and buying a Macintosh. It
is not
clear what my options would be for Palm development.

One potential option is to use VirtualPC and continue using Codewarrior.
Does
anyone have experience with this option?

Is there any other option that anyone can suggest.


Laurie



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


Exchange Manager Problems on Cobalt

2004-07-31 Thread Laurie Davis
My application uses the exchange manager to transfer text

files to the MemoPad application. On Cobalt it causes the

simulator to crash (after I have tapped the OK button to

accept the data into MemoPad). I have reduced the transfer

code down to a bare miniumum to see what is wrong, but it

still fails all the time:

ExgSocketType exgSocket;

MemSet(&exgSocket, sizeof(exgSocket), 0);

exgSocket.noStatus = 1;

exgSocket.noGoTo = 1;

exgSocket.localMode = 1;

exgSocket.description = "Testing";

exgSocket.target = sysFileCMemo;

exgSocket.name = "Memos.txt";

Char *textBuf= "** Testing **";

Err error = ExgPut(&exgSocket);

if (error == 0)

{

ExgSend(&exgSocket, textBuf, StrLen(textBuf) + 1, &error);

ExgDisconnect(&exgSocket, error);

}

This works reliably on everything except the Cobalt

simulator. Any ideas?



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


Re: Problem with BmpCreate and WinCreateBitmapWindow

2004-06-28 Thread Laurie Davis
Did you ever find a resolution to the problem of the "boxy" bitmaps? I have a similar 
problem and have not yet found a solution.

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


Re: Basic 68K UI not working on Cobalt Simulator

2004-03-29 Thread Laurie Davis
I would like to add my vote that this is a bug that needs to be
fixed.

I also allow the user to switch between a set of initialized forms
while retaining the values on the form. Of course it would be
possible to rewrite the application to treat each form
individually and maintain a shadow database entry for each
form, but it would be a significant amount of work, and the
performance on older devices would suffer.

Laurie

"Oleg Kibirev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Ben,
>
> First of all thanks for your time and reply. Please count my vote that
> this is a critical issue to patch rather than just document. The
> database-bound form library I am working on gets and caches pointers to
> every object on forms supplied by the user. At runtime, it needs to
> rapidly switch between these forms while retaining the values displayed. I
> would need to re-write a lot of code and the performance would likely
> suffer.
>
> This is different from other changes that involved mostly undocumented
> features, like MemSemaphoreReserve and UI data structure internals. For
> example, PalmOS 5 SDK docs do not contain any warnings about FrmInitForm.
> If this kind of things do not work, it would be more fair to say "It's
> possible for a specially written program to run both under Cobalt and
> legacy devices" than "Cobalt is backward compatible" :-)
>
> Thanks!
> Oleg
>
> On Fri, 26 Mar 2004 23:29:23 -0600, Ben Combee <[EMAIL PROTECTED]>
wrote:
>
> > At 08:29 PM 3/26/2004, you wrote:
> >> The following 68K program only shows a blank screen when run on Cobalt
> >> simulator. If I only initialize one form, it is displayed correctly
> >> (when
> >> EvtGetEvent is first called). Any suggestions?
> >>
> >>
> >> UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
> >> {
> >> if (cmd != sysAppLaunchCmdNormalLaunch) return 0;
> >> FormType *frmP = FrmInitForm(MainForm);
> >> FormType *otrP = FrmInitForm(AboutForm);
> >> FrmSetEventHandler(frmP, MainFormHandleEvent);
> >> FrmSetEventHandler(otrP, MainFormHandleEvent);
> >> FrmSetActiveForm(frmP);
> >> FrmDrawForm(frmP); // Doesn't matter if this line is present or
> >> not
> >> EventType event;
> >> do {
> >> EvtGetEvent(&event, evtWaitForever);
> >> if (! SysHandleEvent(&event))
> >> FrmDispatchEvent(&event);
> >> } while (event.eType != appStopEvent);
> >> return 0;
> >> }
> >
> > Palm OS Cobalt does not seem to support having multiple top-level forms
> > initialized at the same time.  I've seen other people post with similar
> > issues.  Can you go back to a standard program flow where a form isn't
> > initialized until its ready to be displayed?  Doing the init before the
> > frmOpenEvent is in the queue also causes problems for the PalmOne Treo
> > 600; it doesn't initialize it's five-way navigation system correctly
> > when that happens.
> >
> > This is something I'm investigating... when I get good answers, I'll get
> > a KB article posted on the topic.
> >
> > -- Ben Combee, senior DTS engineer, PalmSource, Inc.
> > Read "Combee on Palm OS" at http://palmos.combee.net/
> >
> >
> >
>
>



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


VFSFileDBGetRecord on Cobalt

2004-03-25 Thread Laurie Davis
I am seeing a performance problem with VFSFileDBGetRecord
on Cobalt. It is significantly slower than it is on OS4. For example,
a search function that took a few seconds on the OS4 simulator
took HOURS on the Cobalt simulator (or it would have if I had
the patience to let it run to completion!).

Any ideas?

Laurie



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


Re: Unreliable nilEvents on Cobalt

2004-03-23 Thread Laurie Davis
Good idea, I will change to this method.

Laurie


"David Fedor" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >In my case I am not using nilEvents for timing, just for background
> >processing. I ask for another nilEvent as soon as I have finished
> >processing one. The intent is to process as quickly as possible in
> >the background, but keep the door open for other events (such as a
> >"Cancel" button).
>
> The normal way to do this is to set a very small timeout as the
> parameter when you call EvtGetEvent.  It'll either give you a "real"
> event like a button tap, or if there aren't any ready within the time
> period specified, it'll give you a nilEvent.
>
> For example, have a global variable which is initialized to 1
> (meaning 1 millisecond) while you've background work to do, and pass
> that in your EvtGetEvent call.  When you're done with whatever you
> need to accomplish in the background, set that variable to 0 so as to
> not waste battery getting millions of nilEvents once your processing
> is done.
>
> This is much better than using the old "null event tick" pseudo-API,
> and should work on any OS version.
>
> -David Fedor
> PalmSource, Inc.
>



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


Re: Unreliable nilEvents on Cobalt

2004-03-23 Thread Laurie Davis
In my case I am not using nilEvents for timing, just for background
processing.
I ask for another nilEvent as soon as I have finished processing one. The
intent
is to process as quickly as possible in the background, but keep the door
open for other events (such as a "Cancel" button). If I use any other method
for posting an event, it goes to the head of the queue and blocks the other
events I am waiting for.

Laurie




"Dave Lippincott" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The docs I downloaded in Feb still have the first definition.  If changes
> have been made, it should be in the KB.
> Anyhow, I don't use the function.  I use EvtGetEvent and set the nilEvent
> timeout to at least 2x the periodic event I desire.  No issues at least
> through OS5.2
>
> - Original Message - 
> From: "Laurie Davis" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Monday, March 22, 2004 2:24 PM
> Subject: Re: Unreliable nilEvents on Cobalt
>
>
> > The "latest document" that I was referring to is the reference
> > document from the Garnet SDK.
> >
> > Laurie
> >
> >
> > "Dave Lippincott" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > I OS 5 SDK docs still indicate min ticks until next nilEvent.  Either
> docs
> > > weren't changed or it was changed for Cobalt. I haven't read the
Cobalt
> > docs
> > > yet.  Ben, any clarification or reason why the Knowledgebase doesn't
> > > indicate why EvtSetNullEventTick is documented wrong?
> > > Past post I can dig up from helpful PalmSource employees indicate that
> > > EvtSetNullEventTick sets the period for nilEvents not an absolute time
> to
> > > generate one by.  Then again, I've been wrong before.
> > >
> > > - Original Message - 
> > > From: "Laurie Davis" <[EMAIL PROTECTED]>
> > > Newsgroups: palm-dev-forum
> > > To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> > > Sent: Monday, March 22, 2004 12:21 PM
> > > Subject: Re: Unreliable nilEvents on Cobalt
> > >
> > >
> > > > There has been a lot of discussion regarding EvtSetNullEventTick,
and
> I
> > > > thought that the conclusion was that the earlier documentation was
> > wrong.
> > > > The latest document says that the parameter is "The time, in ticks,
> > since
> > > > the
> > > > last reset by which a nilEvent is to be added to the queue." This is
> the
> > > > way that it seems to be working - by setting the parameter to
> > TimGetTicks,
> > > > I get another nilEvent immediately. The only problem is that with
> Cobalt
> > > > sometimes a nilEvent does not get generated.
> > > >
> > > > Laurie
> > > >
> > > >
> > > > "Dave Lippincott" <[EMAIL PROTECTED]> wrote in message
> > > > news:[EMAIL PROTECTED]
> > > > > Unless I'm reading your problem incorrectly, you may have
> > misinterpreted
> > > > the
> > > > > functionality of EvtSetNullEventTick.  The number you pass to
> > > > > EvtSetNullEventTick is the max number of ticks the OS will allow
to
> > pass
> > > > > before it will post a nilEvent.  If you pass TimGetTicks(), the OS
> > will
> > > > > *wait* TimGetTicks not post at TimGetTicks.  If you need to post a
> > > > nilEvent
> > > > > immediately, either use EvtSetNullEventTick(0) or post the event
> > > yourself.
> > > > > i.e. if TimGetTicks returns 1234, you could end up waiting 20
> minutes
> > > for
> > > > > the nilEvent.
> > > > > Try passing a smaller number or have the OS post nilEvents more
> > > frequently
> > > > > and just check the number of ticks or the actual time to see if
you
> > are
> > > > done
> > > > > (or should do something).  There have been a number of post with
> > example
> > > > > code on how to effectively use nilEvents to create a timing loop.
> > > > >
> > > > > - Original Message - 
> > > > > From: "Laurie Davis" <[EMAIL PROTECTED]>
> > > > > Newsgroups: palm-dev-forum
> > > > > To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> > > > > Sent: Monday, March 22, 2

Re: Unreliable nilEvents on Cobalt

2004-03-22 Thread Laurie Davis
The "latest document" that I was referring to is the reference
document from the Garnet SDK.

Laurie


"Dave Lippincott" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I OS 5 SDK docs still indicate min ticks until next nilEvent.  Either docs
> weren't changed or it was changed for Cobalt. I haven't read the Cobalt
docs
> yet.  Ben, any clarification or reason why the Knowledgebase doesn't
> indicate why EvtSetNullEventTick is documented wrong?
> Past post I can dig up from helpful PalmSource employees indicate that
> EvtSetNullEventTick sets the period for nilEvents not an absolute time to
> generate one by.  Then again, I've been wrong before.
>
> - Original Message - 
> From: "Laurie Davis" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Monday, March 22, 2004 12:21 PM
> Subject: Re: Unreliable nilEvents on Cobalt
>
>
> > There has been a lot of discussion regarding EvtSetNullEventTick, and I
> > thought that the conclusion was that the earlier documentation was
wrong.
> > The latest document says that the parameter is "The time, in ticks,
since
> > the
> > last reset by which a nilEvent is to be added to the queue." This is the
> > way that it seems to be working - by setting the parameter to
TimGetTicks,
> > I get another nilEvent immediately. The only problem is that with Cobalt
> > sometimes a nilEvent does not get generated.
> >
> > Laurie
> >
> >
> > "Dave Lippincott" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Unless I'm reading your problem incorrectly, you may have
misinterpreted
> > the
> > > functionality of EvtSetNullEventTick.  The number you pass to
> > > EvtSetNullEventTick is the max number of ticks the OS will allow to
pass
> > > before it will post a nilEvent.  If you pass TimGetTicks(), the OS
will
> > > *wait* TimGetTicks not post at TimGetTicks.  If you need to post a
> > nilEvent
> > > immediately, either use EvtSetNullEventTick(0) or post the event
> yourself.
> > > i.e. if TimGetTicks returns 1234, you could end up waiting 20 minutes
> for
> > > the nilEvent.
> > > Try passing a smaller number or have the OS post nilEvents more
> frequently
> > > and just check the number of ticks or the actual time to see if you
are
> > done
> > > (or should do something).  There have been a number of post with
example
> > > code on how to effectively use nilEvents to create a timing loop.
> > >
> > > - Original Message - 
> > > From: "Laurie Davis" <[EMAIL PROTECTED]>
> > > Newsgroups: palm-dev-forum
> > > To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> > > Sent: Monday, March 22, 2004 10:44 AM
> > > Subject: Unreliable nilEvents on Cobalt
> > >
> > >
> > > > I use nilEvents to do some background processing in my application.
> > > > This has worked ok so far, but is not reliable on Cobalt. After
> > > > processing the nilEvent, I immediately generate another nilEvent
> using:
> > > >
> > > > EvtSetNullEventTick(TimGetTicks());
> > > >
> > > > I do this repetitively until the processing is complete.
> > > >
> > > > On Cobalt, I regularly miss nilEvents. I can reduce the problem
> > > > by adding a delay:
> > > >
> > > > EvtSetNullEventTick(TimGetTicks() + delayTicks);
> > > >
> > > > By increasing delayTicks I can reduce the likelyhood of missing
> > > > nilEvents, but this obviously slows down the background processing.
> > > >
> > > > Is this a bug in Cobalt?
> > > >
> > > > Laurie
> > > >
> > > >
> > > >
> > > > -- 
> > > > For information on using the Palm Developer Forums, or to
unsubscribe,
> > > please see http://www.palmos.com/dev/support/forums/
> > > >
> > >
> > >
> > >
> >
> >
> >
> > -- 
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
>
>
>



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


Re: Unreliable nilEvents on Cobalt

2004-03-22 Thread Laurie Davis
There has been a lot of discussion regarding EvtSetNullEventTick, and I
thought that the conclusion was that the earlier documentation was wrong.
The latest document says that the parameter is "The time, in ticks, since
the
last reset by which a nilEvent is to be added to the queue." This is the
way that it seems to be working - by setting the parameter to TimGetTicks,
I get another nilEvent immediately. The only problem is that with Cobalt
sometimes a nilEvent does not get generated.

Laurie


"Dave Lippincott" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Unless I'm reading your problem incorrectly, you may have misinterpreted
the
> functionality of EvtSetNullEventTick.  The number you pass to
> EvtSetNullEventTick is the max number of ticks the OS will allow to pass
> before it will post a nilEvent.  If you pass TimGetTicks(), the OS will
> *wait* TimGetTicks not post at TimGetTicks.  If you need to post a
nilEvent
> immediately, either use EvtSetNullEventTick(0) or post the event yourself.
> i.e. if TimGetTicks returns 1234, you could end up waiting 20 minutes for
> the nilEvent.
> Try passing a smaller number or have the OS post nilEvents more frequently
> and just check the number of ticks or the actual time to see if you are
done
> (or should do something).  There have been a number of post with example
> code on how to effectively use nilEvents to create a timing loop.
>
> - Original Message - 
> From: "Laurie Davis" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Monday, March 22, 2004 10:44 AM
> Subject: Unreliable nilEvents on Cobalt
>
>
> > I use nilEvents to do some background processing in my application.
> > This has worked ok so far, but is not reliable on Cobalt. After
> > processing the nilEvent, I immediately generate another nilEvent using:
> >
> > EvtSetNullEventTick(TimGetTicks());
> >
> > I do this repetitively until the processing is complete.
> >
> > On Cobalt, I regularly miss nilEvents. I can reduce the problem
> > by adding a delay:
> >
> > EvtSetNullEventTick(TimGetTicks() + delayTicks);
> >
> > By increasing delayTicks I can reduce the likelyhood of missing
> > nilEvents, but this obviously slows down the background processing.
> >
> > Is this a bug in Cobalt?
> >
> > Laurie
> >
> >
> >
> > -- 
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
>
>
>



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


Unreliable nilEvents on Cobalt

2004-03-22 Thread Laurie Davis
I use nilEvents to do some background processing in my application.
This has worked ok so far, but is not reliable on Cobalt. After
processing the nilEvent, I immediately generate another nilEvent using:

EvtSetNullEventTick(TimGetTicks());

I do this repetitively until the processing is complete.

On Cobalt, I regularly miss nilEvents. I can reduce the problem
by adding a delay:

EvtSetNullEventTick(TimGetTicks() + delayTicks);

By increasing delayTicks I can reduce the likelyhood of missing
nilEvents, but this obviously slows down the background processing.

Is this a bug in Cobalt?

Laurie



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


Form Drawing on Cobalt

2004-03-15 Thread Laurie Davis
I did not get any responses to my problem with form
drawing on Cobalt. It definitely seems that the
FrmDraw routine does not work if there is
another form initialized.

Does anyone have any suggestions of where I
could start to look for some answers, or someone
that I could contact within PalmSource?

Thanks,

Laurie

"Laurie Davis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have implemented a tabbed database edit screen
> for may application. It has worked properly since
> OS version 2.0, but it no longer works on Cobalt.
>
> The user launches the database edit screen(s)
> via a menu item. In the frmOpenEvent handler I
> initialize the other forms using FrmInitForm. I
> also update the fields on all forms at this time.
>
> When the user taps one of the tab buttons, I
> display the required form by using
> FrmSetActiveForm and FrmDrawForm. When the OK
> button on any of the forms is tapped, I write all
> of the data from all of the forms to the database
> file and then close all of the forms by calling
> FrmEraseForm and FrmDeleteForm.
>
> On Cobalt, none of the forms appear.
>
> Cobalt appears to handle form drawing quite
> differently. On earlier versions of the OS, the
> form is drawn as soon as FrmDrawForm is called in
> the frmOpenEvent handler. On Cobalt, the form is
> not drawn until the next call to EvtGetEvent. It
> appears that if other forms are initialized
> (via FrmInitForm) in the frmOpenEvent handler,
> nothing is drawn.
>
> Any Suggestions?
>
>
> Laurie
>
>
>



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


Form Problems on Cobalt

2004-03-10 Thread Laurie Davis
I have implemented a tabbed database edit screen
for may application. It has worked properly since
OS version 2.0, but it no longer works on Cobalt.

The user launches the database edit screen(s)
via a menu item. In the frmOpenEvent handler I
initialize the other forms using FrmInitForm. I
also update the fields on all forms at this time.

When the user taps one of the tab buttons, I
display the required form by using
FrmSetActiveForm and FrmDrawForm. When the OK
button on any of the forms is tapped, I write all
of the data from all of the forms to the database
file and then close all of the forms by calling
FrmEraseForm and FrmDeleteForm.

On Cobalt, none of the forms appear.

Cobalt appears to handle form drawing quite
differently. On earlier versions of the OS, the
form is drawn as soon as FrmDrawForm is called in
the frmOpenEvent handler. On Cobalt, the form is
not drawn until the next call to EvtGetEvent. It
appears that if other forms are initialized
(via FrmInitForm) in the frmOpenEvent handler,
nothing is drawn.

Any Suggestions?


Laurie



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


Re: ARM MathLib

2004-02-15 Thread Laurie Davis
I asked the same question a few months ago and received
the same response - nothing.

I believe that some of the newer ARM processors have
floating point units, so it would be nice if MathLib was smart
enough to use 68K code, ARM code, or use the FPU.

Actually I believe that it is time for MathLib to be included
as part of the OS.

Laurie


"desa" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there an ARM version of MathLIB?  I make heavy use of these math
> functions and I need all the speed I can get.
>
> Thanks.
>
>
>



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


Re: How to stop fields from writing over a menu?

2004-01-31 Thread Laurie Davis
I solved the problem in my application in the following way.

I use the nilEvent to update some fields dynamically. This was
causing a problem when the menu was opened on top of
the fields. I simply changed the code in the nilEvent to only
update the fields when the main form was the active form:

if (FormPtr(WinGetActiveWindow()) == frmPtr)
{
}


Laurie




"Luc Le Blanc" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Matt Graham a écrit :

> Jim White wrote:
> > I have noted that when I bring up a menu over some fields that are
> > being re-written at regular intervals, the data in the field
> > over-writes the menu.
> >
> > I have tried triggering on various things (like MenuOpenEvent to hide
> > the fields and MenuEvent to re-enable them) but I can't seem to get
> > consistency in the events (I get 3 MenuOpenEvents, followed by a
> > winExitEvent, followed by two MenuOpenEvents when I open the menu,
> > for example).
> >
> > Is there a clean and easy way to stop displayed fields, buttons, etc.
> > from overwriting an open menu?
>
> You could try hiding the offending fields when the menu opens and
> showing them again when it closes.

How do you know the menu closes? The API Reference states the menuCloseEvent
is
not implemented :(


--
Luc Le Blanc





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


Re: VFSFileRead and Simulator

2003-11-30 Thread Laurie Davis
I have resolved the problem, but I do not understand why the solution works.
I created the following simple example.

I basically open the file, write four bytes to the beginning of the file,
and then read the next 65500 bytes. I need to add a VFSFileSeed before the
read or the read fails.

error = 0;
UInt16 volRef;
UInt32 volIterator = vfsIteratorStart;
while (volIterator != vfsIteratorStop)
   error = VFSVolumeEnumerate(&volRef, &volIterator);

FileRef fileRef;
error = VFSFileOpen(volRef, LinksFullPath, vfsModeReadWrite, &fileRef);

error = VFSFileSeek(fileRef, vfsOriginBeginning, 0);

UInt32 newData = 1234;
error = VFSFileWrite(fileRef, sizeof(newData), &newData, NULL);

error = VFSFileSeek(fileRef, vfsOriginBeginning, sizeof(newData));   // why
???

MemHandle blockHandle = MemHandleNew(65500);
MemPtr blockPtr = MemHandleLock(blockHandle);
UInt32 number;
error = VFSFileRead(fileRef, 65500, blockPtr, &number);
MemHandleUnlock(blockHandle);
MemHandleFree(blockHandle);





"palmDev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> it works fine. it would help if you include some code
> that you are using.
>
> regards
>
> danny
> www.toysoft.ca
>
>
>
> - Original Message -
> From: "Laurie Davis" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Sunday, November 30, 2003 5:52 AM
> Subject: VFSFileRead and Simulator
>
>
> > I am having a problem with the VFSFileRead function on the Simulator.
> > Whenever
> > I try to read a file, the read stops after 4092 bytes. I get an error
code
> > of 7197.
> > I tried reading in smaller chunks, but again it stops after 4092 bytes
and
> > returns the
> > same error code for all subsequent reads. I do not know what this error
> > means, but
> > since it appears to be just above emuErrorClass, I assume that it is a
> > simulator
> > specific error. There is also the possibility that the VFSFileWrite did
> not
> > work
> > properly, but there were no error codes, and the file appears to be the
> > right size.
> >
> > Laurie
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
>
>
>



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


VFSFileRead and Simulator

2003-11-30 Thread Laurie Davis
I am having a problem with the VFSFileRead function on the Simulator.
Whenever
I try to read a file, the read stops after 4092 bytes. I get an error code
of 7197.
I tried reading in smaller chunks, but again it stops after 4092 bytes and
returns the
same error code for all subsequent reads. I do not know what this error
means, but
since it appears to be just above emuErrorClass, I assume that it is a
simulator
specific error. There is also the possibility that the VFSFileWrite did not
work
properly, but there were no error codes, and the file appears to be the
right size.

Laurie



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


Is there an Arm version of Mathlib?

2003-10-09 Thread Laurie Davis
I asked this question once before without a response, so I will try once
again. I was wondering
if there was a version of Mathlib that had been compiled for the Arm
processor. For applications
with a lot of floating point calculations I assume that a native version of
Mathlib would be
significantly faster.

Thanks,

Laurie



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


Problem Installing CW 9.2

2003-10-03 Thread Laurie Davis
I installed CW 9.2 and received the following errors

when attempting to rebuild the headers (Build All):

 the file 'Palm OS_Headers' cannot be found

I get 120 of these errors.

I completely removed my old copy of CodeWarrior before

starting. I then installed CW 9.0, did a restart,

installed CW 9.2, installed CW 9.2, installed SDK R3,

and then attempted to rebuild the headers.



Laurie



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


MathLib for Arm

2003-09-10 Thread Laurie Davis
Is there a version of MathLib available that has been compiled for the arm
processor?

Laurie



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


Re: FrmReturnToForm

2003-06-04 Thread Laurie Davis
If you call FrmUpdateForm before you return, a frmUpdateEvent will be
sent
to the returned form.

Laurie


"Chris Apers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi,
>
> Does FrmReturnToForm generate an event to the returned form ?
> I need to redraw a part of my main form after each call to another
> form.
>
> Thanks
> Chris
>
>



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


Re: Constructor 1.6.2 bug?

2002-03-19 Thread Laurie Davis

I also had a problem with bitmap corruption. I tracked the problem down to the new
version of PalmRezPostLinker that was installed with SDK4.0 Update 1. A new version of
PalmRezPostLinker has since been released that solves the problem. You can find the
new version on the Palm web site.

Laurie


"Evan Wise" <[EMAIL PROTECTED]> wrote in message news:80412@palm-dev-forum...
>
> hey all,
>
> been banging my head against a wall for a bit here, karma coming to get me
> for jumping projects to Java land ;)
>
> I have a Graphic Button (1 bit and 8 bit colour depth) and I am adding a
> bitmap family resource for the "selected" property of my graphic button.
> Now, when I put *any* colour besides white into the bitmap family the
> graphic button's image will appear shifted. Its as though there is an offset
> problem in the bitmap code of 1.6.2...?
> The thing that is *really* driving me up the wall is that I have done this
> with other buttons today with no ill effects!
>
> I just put an all black bitmap in for my selected image and at the bottom of
> the image there are pixels that are blue, red and yellow (ie. not black)
> when clicked.
>
> Before anyone asks, all the sizes are correct, all the bit depths are
> correct, all the images are in the proper colour palettes and the thing
> compiles with no complaints from CW.
>
> Please tell me this is a Constructor bug so I can sleep tonight. Also, can
> you post the versions of the dll's that you have for constructor, might be
> an out of sync issue...?
>
> Thanks.
> E/.
> 
> I'm working wirelessly are you?...Get Mobile at http://www.symmetrypro.com
>
> Evan Wise
> Sprite Herder
> infowave
> E: [EMAIL PROTECTED]
> T: 604 473 3779
> F: 604 473 3633
>
>
>
>



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



Re: Fast Database Search

2002-03-12 Thread Laurie Davis

I have used a binary search whenever it was possible. The search that I am currently 
trying to
perform is on data that cannot be sorted. I need to do a calculation on data that is 
in the
database to see if it meets the criteria. I cannot do any pre-calculations since I do 
not
know what the search criteria will be beforehand.

My suspicion is that I am stuck with the linear search, but I was hoping that someone
had come up with something clever. You could presumably bypass the database routines 
and
index through the database, but that would probably be extremely dangerous.

It would be very nice if the OS provided a routine to search the entire database for a 
match
based on a user defined callback routine (such as is done for the sorting routines).

Laurie



"Steve Mann" <[EMAIL PROTECTED]> wrote in message news:79606@palm-dev-forum...
>
> At 1:56 PM -0500 3/12/02, Laurie Davis wrote:
>
> >I have successfully used DmFindSortPosition when looking for data
> >that is sorted, but I
> >cannot think of any way to speed up the search for other data.
>
> Why not use a binary search instead of a sequential one?
>
> Regards,
> Steve Mann
>
>



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



Fast Database Search

2002-03-12 Thread Laurie Davis

Does anyone know of a fast way to search through a very large database (17000 records)?
I currently use the  the standard approach:

for (UInt16 recordNum = 0; recordNum < DmNumRecords(db); recordNum++)
{
 MemHandle dbRecordHandle = DmQueryRecord(db, recordNum);
 MemPtr dbRecordPtr = MemHandleLock(dbRecordHandle);
 ...  check if data matches search criterion
 MemHandleUnlock(dbRecordHandle);
}

This takes about 20 seconds.

I have successfully used DmFindSortPosition when looking for data that is sorted, but I
cannot think of any way to speed up the search for other data.

Any ideas?

Laurie



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



Re: Problems with SDK 4.0 Update 1

2002-02-26 Thread Laurie Davis

I went back and tried this with the new version of PalmRezPostLinker, but it did not 
solve my problem.

Laurie


"Mark A. Peters" <[EMAIL PROTECTED]> wrote in message news:78100@palm-dev-forum...
>
> I ran into this as well, but I fixed it by using the "Recolor With Current
> Table" feature in Constructor.
>
> Mark Peters
>
> "Laurie Davis" <[EMAIL PROTECTED]> wrote in message
> news:78068@palm-dev-forum...
> >
> > As I mentioned in an earlier post, I too have had bitmap corruptions since
> I installed this update.
> >
> > I resolved the problem by going back to the earlier version of
> PalmRezPostLinker.
> >
> >
> > Laurie
>
>
>
>



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



Re: Problems with SDK 4.0 Update 1

2002-02-26 Thread Laurie Davis

As I mentioned in an earlier post, I too have had bitmap corruptions since I installed 
this update.

I resolved the problem by going back to the earlier version of PalmRezPostLinker.


Laurie



"Regis St-Gelais" <[EMAIL PROTECTED]> wrote in message 
news:78043@palm-dev-forum...
>
> First, I would like to apologize for the attachement, but as they say, A
> picture wort 1000 words,
>
> Since I've installed the new SDK 4.0 Update 1, most of my bitmaps dont show
> properly.
>
> I'm using CW 8.1
>
> I use DrawBitmap(intX,intY,ToolBarRatingBitmapFamily) to draw the bitmap
> family.
>



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



SDK 4.0 Update 1 - Bitmap corruption

2002-02-21 Thread Laurie Davis

Since I installed update 1, two of the bitmaps in my project do not display properly. 
The bitmaps are
somewhat recognizable, but there are extraneous bits, and some of the existing bits 
have moved around.
This only happens to two particular bitmaps, all of the others seem ok.

I replaced the new version of PalmRezPostLinker with the previous version and the 
problem has gone
away.

Has anyone else seen a similiar problem.

Laurie



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



Solved: Using Palm OS Simulator

2002-02-10 Thread Laurie Davis

I found my problem. My firewall was blocking TCP/IP access to the IDE. I had not been 
using TCP/IP with the emulator, so it was
working just fine.

Laurie


"Terry Dennis" <[EMAIL PROTECTED]> wrote in message 
news:76219@palm-dev-forum...
>
> > Have you updated to the 7.1 patch?  This has some debugger changes.
>
> I also could not get the Simulator to function with MW 7.0, and I had
> already applied the 7.1 patch.
>
> However, I had updated to 7.1 prior to having the Palm 4.0 SDK installed.
> Since then, I have installed the 4.0 SDK.
>
> According to the 7.1 patch installation documentation, it will update the
> SDK only if 4.0 has been installed.  So, I reinstalled the 7.1 patch,
> followed the installation instructions, and Presto!  The Simulator now works
> from within MW 7.1.  I also have "Always launch Emulator set", and it works
> fine.
>
> Comments: I get three "Welcome to the Palm OS Pace Debugger" messages at
> Simulator startup that I have to reply "OK" to.  That's annoying.
>
> Regards,
>
> Terry
>
>
>
>



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



Using Palm OS Simulator

2002-02-09 Thread Laurie Davis

I still have not been successful in connecting to the Palm OS Simulator. I am using 
CodeWarrior 7.

My settings in the "Palm Connection Settings" panel are as follows:

Target: Palm OS Emulator

Always launch emulator - checked
Use TCP/IP sockets - checked
Emulator: 

Launch Parameters: none checked

Always download application to device: checked
Show Log Window: checked
Show Palm menu: checked

My palmsim.ini file is as follows:

[Settings]
ROM=C:\Documents and Settings\Laurie Davis\My Documents\CoPilot\PalmOS 
Simulator_dr6\enUS\NTFullDbg_enUS.rom
RAM=7680
Sound=0
StorageProtection=0
Zoom=2
BitDepth=8
DebugThroughTCP=1
AlwaysOnTop=0
UseHostBatteryInfo=1
WindowOriginX=829
WindowOriginY=262
RedirectNetLibCalls=0
AllowedScreenDepths=32907
LastSilkScreen=
AppCreator=
CradlePort=COM2
CradlePortType=Standard RS-232
InfraredPort=
InfraredPortType=None
68KDebuggerPort=localhost:2000
68KDebuggerPortType=TCP/IP
AdditionalPorts=
TraceTarget=tcp:localhost:25998
GremlinsFromValue=0
GremlinsToValue=0
GremlinsSwitchAfter=0
GremlinsSwitchAfterValue=0
GremlinsStopAfter=0
GremlinsStopAfterValue=0
GremlinsSelectedApps=
GremlinsFirstApp=
GremlinsAllowScreenUpdates=1
GremlinsWindowOriginX=0
GremlinsWindowOriginY=0
LogErrorMessages=0




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



Re: Using Palm OS Simulator

2002-02-08 Thread Laurie Davis

I did not sign up for anything special. I found it in the "Palm OS Development
Seeding Area" under "International Web Clipping Tools". I have no idea what
it has to do with web clipping tools, but ...

I have managed to get the simulator running, but I have not yet figured out how
to get the CodeWarrior debugger talking to it.

Laurie

"Richard M. Hartman" <[EMAIL PROTECTED]> wrote in message 
news:76152@palm-dev-forum...
>
> I don't see the OS Simulator on the dev seed page ... is there a
> page where you have to sign up w/ an OS 5 seeding program
> first before you can see it?
>
> --
> -Richard M. Hartman
> [EMAIL PROTECTED]
>
> 186,000 mi/sec: not just a good idea, it's the LAW!
>
> "Laurie Davis" <[EMAIL PROTECTED]> wrote in message
> news:76130@palm-dev-forum...
> >
> > I have downloaded the new Palm OS Simulator from the Palm website:
> >
> > http://www.palmos.com/alliance/resources.cgi/devseed/
> >
> > When I try launching my application in the simulator I get the message:
> >
> > "PalmSim.exe has generated erros and will be closed by Windows. You will
> need to restart the program. An error log is being
> > created."
> >
> > I cannot find the error log anywhere and I do not undertand how to connect
> the CodeWarrior debugger to the simulator. I am using
> > CodeWarrior version 7. The manual was not very helpful. It said "Palm OS
> Simulator is a debug target, just as an actual device or
> > Palm OS Emulator. You can use Palm Debugger, CodeWarrior Debugger, or any
> other debugger you are used to using with Palm PS
> > Emulator." The CodeWarrior Preferences allow you to select Target: Palm OS
> Emulator or Target: Palm OS Device. How do I select the
> > simulator as the target?
> >
> > Laurie
> >
> >
> >
> >
>
>
>
>



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



Re: Using Palm OS Simulator

2002-02-08 Thread Laurie Davis

I have tried that, I still get the following CodeWarrior log message:

CmdReadRemoteMem: error in SlkReceivePacket =
Serial Link timeout.
Trying to Read address 0x0



"Oliver Steinmeier" <[EMAIL PROTECTED]> wrote in message news:76141@palm-dev-forum...
>
> > How do I select the simulator as the target?
>
> In the IDE preferences, Debugger -> Palm Connection
> Settings, set
>
> Target: Palm OS Emulator
> Use TCP/IP Sockets: checked
> Emulator: enter your path/filename for your Simulator
>
> Oliver
>
>
> __
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
>
>



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



Using Palm OS Simulator

2002-02-08 Thread Laurie Davis

I have downloaded the new Palm OS Simulator from the Palm website:

http://www.palmos.com/alliance/resources.cgi/devseed/

When I try launching my application in the simulator I get the message:

"PalmSim.exe has generated erros and will be closed by Windows. You will need to 
restart the program. An error log is being
created."

I cannot find the error log anywhere and I do not undertand how to connect the 
CodeWarrior debugger to the simulator. I am using
CodeWarrior version 7. The manual was not very helpful. It said "Palm OS Simulator is 
a debug target, just as an actual device or
Palm OS Emulator. You can use Palm Debugger, CodeWarrior Debugger, or any other 
debugger you are used to using with Palm PS
Emulator." The CodeWarrior Preferences allow you to select Target: Palm OS Emulator or 
Target: Palm OS Device. How do I select the
simulator as the target?

Laurie



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



Re: Never Mind Re: Question about database backup bit

2002-02-01 Thread Laurie Davis

I don't think that you want that either. It will toggle the backup bit, but not 
necessarily force it to off,

Try iAttrib &= ! dmHdrAttrBackup;




"Mark Biek" <[EMAIL PROTECTED]> wrote in message news:75411@palm-dev-forum...
>
> Never mind.  I, of course, realized my mistake 30 seconds after posting.
> I was using & instead of ^.  Doh!
>
> "Mark Biek" <[EMAIL PROTECTED]> wrote in message
> news:75410@palm-dev-forum...
> >
> > I have the following code setting and unsetting the backup bit of a
> > database:
> >
> >  Err err;
> >  UInt iAttrib;
> >
> >  err = DmDatabaseInfo( 0, idDatabase, NULL, &iAttrib, NULL, NULL, NULL,
> > NULL,
> >  NULL, NULL, NULL, NULL, NULL );
> >  if( err )
> >  {
> >   ErrDisplay( "DmDatabaseInfo FAIL" );
> >   return;
> >  }
> >
> >  if( bState )
> >   iAttrib |= dmHdrAttrBackup;
> >  else
> >   iAttrib &= dmHdrAttrBackup;
> >
> >  err = DmSetDatabaseInfo( 0, idDatabase, NULL, &iAttrib, NULL, NULL, NULL,
> > NULL,
> >  NULL, NULL, NULL, NULL, NULL );
> >  if( err )
> >  {
> >   ErrDisplay( "DmSetDatabaseInfo FAIL" );
> >   return;
> >  }
> >
> > Turning the backup bit on works fine but turning that backup bit off
> doesn't
> > seem to work.  I imagine that I'm just being dumb but it's not coming to
> me.
> >
> > Thanks,
> > Mark
> >
> >
> >
> >
>
>
>
>



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



Graphical Buttons - solution

2001-12-19 Thread Laurie Davis

I started a thread a few weeks ago in an attempt to find a good way to provide
graphical buttons that worked on color devices and was backwards compatible with
Palm OS 3.0. I have found a solution that seems to work.

Palm OS has a graphical button that works great, but is only available on OS
versions 3.5 and later.

The usual way to provide graphical buttons that work on OS versions prior to 3.5
is to overlay a bitmap with a button (without a label). This works fine on black
and white devices, but the button does not highlight in the right colors on color
devices.

The best solution proposed for color devices was to create a font with the
appropriate bitmaps and use the custom font for the button label. There are two
drawbacks to this solution. Constructor does not allow you to specify custom
fonts for button labels. PilRC allows this, but I did not want to convert all of
my application from Constructor to PilRC. This option also does not allow you to
take advantage of some of the features of graphical buttons such as a different
bitmap for the selected state.

The solution I have come up with is as follows. Start with the bitmap and a
regular button overlay. On top of this overlay a graphical button with the bitmap
set to the same bitmap. Set the usable bit for the graphical bitmap to false.
In the frmOpenEvent of the form do a simple check of the OS version, and if it
is version 3.5 or later, show the graphical button. This solution works on OS
versions prior to 3.5 (the graphical button is hidden) and supports full graphical
buttons on OS version 3.5 and later (the graphic button is shown).

Code snippets:

At application start:

   // get the ROM version
   const UInt32 rom35Version = 0x03503000;
   UInt32 RomVersion = 0;
   FtrGet(sysFtrCreator, sysFtrNumROMVersion, & RomVersion); // update RomVersion

Form event handler:

   Boolean FormHandleEvent(EventPtr eventPtr)
   {
  FormPtr frmPtr = FrmGetActiveForm();
  switch (eventPtr->eType)
  {
 case frmOpenEvent:
if (RomVersion >= rom35Version)
   FrmShowObject(frmPtr, FrmGetObjectIndex(frmPtr, GraphicButton));
...
break;
 ...

 case ctlSelectEvent:
switch (eventPtr->data.ctlEnter.controlID)
{
   case RegularButton:
   case GraphicButton:
  // process button press (common to both buttons)
  break;
   ...
}
  }
   }



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



Button Font

2001-12-14 Thread Laurie Davis

"Michael Glickman" <[EMAIL PROTECTED]> wrote in message 
news:71236@palm-dev-forum...
>
> If appearence is the only think you care,
> then what you do is having a push button without
> any group. In ctlSelect you use CtlSetValue
> to remove highlighting.
>
> This is the way I use it. Doesn't look elegant,
> but no violation of Palm rules.
>
> M.

I was not the person interested in rectangular frames. I picked up
this thread when I realized that using a custom button font could
be a solution to the problem of proper button highlighting on color
Palms.

I was looking for a solution that was compatible with OS3.0.
The usual method of overlaying a bitmap with a button works
ok in black and white, but does not highlight properly in color.

The conclusion so far seems to be that this is possible with PilRC,
but there is no way when using Constructor to specify a custom font
for a button.

Since I already have a significant number of resources defined
using Constructor I was hoping to avoid a wholesale conversion
of everything to PilRC. After a quick look at PilRC my conclusion
is that it is more powerful than Constructor, but not as user
friendly.

Laurie






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



Re: Rectangle Button Frame

2001-12-13 Thread Laurie Davis

I have looked at PilRC and it certainly looks like it is up to the job. Unfortunately
my application is quite large (32 forms, and most of them are very complicated) and
I would prefer to avoid having to change everything over to PilRC.

I can use the PalmRez plugin for Creator to create the font resource, and I was hoping 
that there
was a way to get Constructor to recognize it.

Laurie

"Max Bian" <[EMAIL PROTECTED]> wrote in message news:71215@palm-dev-forum...
>
> As a poor programmer I cannot afford the use of CW.  It is very easy with
> pilrc. You just need to specify the font resource to use it for button. eg.
>
> BUTTON "\001" ID FancyButton AT ( ... ) FONT MyCustonFont, where "\001" should
> be replaced by the character you want in your custom font.
>
> I also heard there is pilrc plugin for CW.  You may want to look into that.
>
> Max
> --- Laurie Davis <[EMAIL PROTECTED]> wrote:
> > I like this as a potential solution to providing graphic buttons that are
> > compatible
> > with OS3.0. The usual method of overlaying a bitmap with a button works ok
> > in black and white, but does not highlight properly in color.
> >
> > I have been able to create an appropriate custom font, but I have not figured
> > out how to tell Constructor to use the custom font for the button label. I am
> > using
> > CodeWarrior 7.
> >
> > I used xFONT to create the custom font.
> >
> > Any suggestions would be appreciated,
> >
> > Laurie
> >
> >
> > "Max Bian" <[EMAIL PROTECTED]> wrote in message news:70638@palm-dev-forum...
> > >
> > > Another way to do it:
> > >
> > > Draw a bitmap with whatever look you want your button to have (hint: with
> > the
> > > rectangle frame you want);
> > > Make a custom font resource out of that bitmap (hint: do it for all your
> > > buttons);
> > > Specify the buttons borderless and use the single char in your custom font
> > as
> > > the button label.
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe, please
> > see http://www.palmos.com/dev/tech/support/forums/
>
>
> __
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
>



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



Re: Rectangle Button Frame

2001-12-13 Thread Laurie Davis

I like this as a potential solution to providing graphic buttons that are compatible
with OS3.0. The usual method of overlaying a bitmap with a button works ok
in black and white, but does not highlight properly in color.

I have been able to create an appropriate custom font, but I have not figured
out how to tell Constructor to use the custom font for the button label. I am using
CodeWarrior 7.

I used xFONT to create the custom font.

Any suggestions would be appreciated,

Laurie


"Max Bian" <[EMAIL PROTECTED]> wrote in message news:70638@palm-dev-forum...
>
> Another way to do it:
>
> Draw a bitmap with whatever look you want your button to have (hint: with the
> rectangle frame you want);
> Make a custom font resource out of that bitmap (hint: do it for all your
> buttons);
> Specify the buttons borderless and use the single char in your custom font as
> the button label.



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



Re: Installing sample data

2001-12-12 Thread Laurie Davis

I have been following this thread with interest. I have tried to install a sample 
database into my application but have run into a
small problem. I have created a .r file with a line like the following:

read 'abc ' (Resource#) "DBName";

PalmRez does not like the last character of the TypeID to be a blank character. I get 
the following error message:

Link Error   : PalmRez Error: Bad resource ( cba) found (first letter not a-z)

An obvious solution would be to change the TypeID so that the last character is not a 
blank, but unfortunately the application has
been released for several years and I would like to preserve backward compatibility.

Any suggestions?

Laurie





"Mitch Fawcett" <[EMAIL PROTECTED]> wrote in message news:70835@palm-dev-forum...
>
> To all who offered guidance, I have it working and it's great!  Now I can
> distribute one .prc file containing basic sample data that used to require
> three .pdbs.
>
> Thanks all.
>
> Mitch Fawcett
> Tapn'see Software
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Ben
> > Combee
> > Sent: Sunday, December 09, 2001 2:21 AM
> > To: Palm Developer Forum
> > Subject: Re: Installing sample data
> >
> >
> > "Steve Mann" <[EMAIL PROTECTED]> wrote in message
> > news:70650@palm-dev-forum...
> > >
> > > >Can anyone point to any examples of this to help get me started.
> > I've
> > > >searched using keywords CreateDatabaseFromImage, ExgDBRead and
> > ExgDBWrite
> > > >and I'm not making much headway.
> >
> > Steve, close, but a few misconceptions.
> >
> > > Using the PilRC plugin, you can fold a PDB into a PRC by including a
> > > ".r" in your project that has something like this in it:
> >
> > First, .r files are Rez source files -- they're the output of the PilRC
> > plugin, but the plugin is not needed to use them.  Rez is installed in
> > all versions of CodeWarrior for Palm OS -- it was originally a Macintosh
> > tool for making Mac OS format resources.
> >
> > > read 'CreatorID' (Resource#) "DBName";
> >
> > Where you have 'CreatorID', you mean 'TypeID'.  Databases have creators,
> > but resources within a database have types.
> >
> > > Then, in your app start routine, use
> > >
> > > DmGetNextDatabaseByTypeCreator
> > >
> > > to find the database. If it's not there, do this to unpack it and
> > install it:
> > >
> > > MemHandle resH = DmGetResource ( CreatorID, Resource# );
> > > MemPtr resP = MemHandleLock ( resH );
> > > Err error = DmCreateDatabaseFromImage ( resP );
> > > MemHandleUnlock ( resH );
> > >
> > > Error handling has been removed to simplify the code. I hope that
> > helps.
> >
> > Right -- you should note that what you are doing is storing the PDB file
> > as a resource, then recreating it from the read-only copy in the app if
> > its missing.  The type of the resource doesn't matter for the final
> > output -- the output's creator ID and type ID are determined by its
> > embedded PDB header.
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to
> > unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
> >
> >
>
>
>



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



Re: Graphic Buttons

2001-10-30 Thread Laurie Davis

I tried that. If  I set the label to one blank, the button still highlights in black. 
If
I set the label to two blanks, it highlights in blue. Unfortunately, in both
cases the button is opaque (i.e. I cannot see the bitmap underneath it).

Laurie


"Max Bian" <[EMAIL PROTECTED]> wrote in message news:66407@palm-dev-forum...
>
> If only the label matters, you may try put a label with all space characters.
>
> Just a guess.
>
> Max
> --- Laurie Davis <[EMAIL PROTECTED]> wrote:
> > I use a number of graphic buttons in my application. Since I want to preserve
> > compatibility with Palm OS version 3.0, rather than
> > use the built in graphic button capability, I put a button with no label over
> > a bitmap graphic. This works fine, but has some subtle
> > side effects on color displays. On a color display a normal button highlights
> > by turning the normally white background blue. On a
> > button with no label, the background is turned black when the button is
> > highlighted. Is there a way to overcome this problem.
> >
> > Thanks,
> >
> > Laurie
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe, please
> > see http://www.palmos.com/dev/tech/support/forums/
>
>
> __
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
>



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



Graphic Buttons

2001-10-30 Thread Laurie Davis

I use a number of graphic buttons in my application. Since I want to preserve 
compatibility with Palm OS version 3.0, rather than
use the built in graphic button capability, I put a button with no label over a bitmap 
graphic. This works fine, but has some subtle
side effects on color displays. On a color display a normal button highlights by 
turning the normally white background blue. On a
button with no label, the background is turned black when the button is highlighted. 
Is there a way to overcome this problem.

Thanks,

Laurie



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



Event Queue Question

2001-09-24 Thread Laurie Davis

I have been reviewing event logs in order to debug a problem. I do not
understand the sequence of events when you exit one form (a dialog box with
an ok button) and return to a base form.


62048.591 (63236): <-  EvtGetSysEvent: penDownEventX:9   Y:142
62048.601 (63236): <-  EvtGetEvent: penDownEventX:7   Y:62

   makes sense, pen down in the ok button

62048.601 (63236):  -> EvtAddEventToQueue: ctlEnterEvent   ID: 12004
62048.601 (63236): <-  EvtGetEvent: ctlEnterEvent   ID: 12004

   makes sense, entering the ok button

62048.601 (63237):  -> EvtEnqueuePenPoint: pen->x=-1, pen->y=-1.
62048.601 (63237): <-  EvtGetPen: screenX=7, screenY=62, penDown=0.

   I don't understand what these are for

62048.611 (63237):  -> EvtAddEventToQueue: ctlSelectEvent  ID: 12004   On: 0
62048.611 (63237): <-  EvtGetEvent: ctlSelectEvent  ID: 12004   On: 0

   makes sense, pen must have been lifted, and the ok button was selected

62048.722 (63237):  -> EvtAddEventToQueue: frmUpdateEventID: 1500

   makes sense, this is a call to FrmUpdateForm

62048.842 (63237): <-  EvtGetEvent: winExitEventEnter: 4AB4   Exit:
5AA6  Enter Form: "Flight Plan"
62048.842 (63237): <-  EvtGetEvent: winEnterEvent   Enter: 4AB4   Exit:
5AA6  Enter Form: "Flight Plan"

   makes sense, the old form is gone, and the new form is in place

62048.852 (63237): <-  EvtGetEvent: frmUpdateEventID: 1500

   makes sense, the update event generated by my call to FrmUpdateFrom

62049.042 (63237): <-  EvtGetSysEvent: penUpEvent  X:9   Y:142
62049.042 (63237): <-  EvtGetEvent: penUpEvent  X:9   Y:142

   this is where I get really confused. It appears that this is the pen up
that resulted in the ctlSelectEvent
   (the ok button on the previous form).
   I am surprised that this event is generated since I would have assumed
that the pen up would have been
   handled by the system when it was tracking the pen before it generated
the ctlSelectEvent.

62049.052 (63238):  -> EvtEnqueueKey: ascii = 0x00F9, keycode = 0x,
modifiers = 0x.
62049.052 (63239): <-  EvtGetSysEvent: keyDownEventKey:0xF9,  Modifiers:
0x
62049.052 (63239): <-  EvtGetEvent: keyDownEventKey:0xF9,  Modifiers:
0x

   the penUpEvent results in a keyDownEvent being generated on the new form

62049.132 (63239): === ERROR:
*
62049.132 (63239): === ERROR: ... SysFatalAlert with the message: "Table.c,
Line:94, Text not usable".
62049.132 (63239): === ERROR:
*

This does not normally cause a problem, but after 2.7 million gremlins, this
problem occurred.

Any help would be appreciated,

Laurie



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



Re: This target is not registered

2001-09-10 Thread Laurie Davis

I got rid of my problem with Palm OS 3.0 by creating a new emulator session.
There is a possibility that the session that I was trying to use was created
with an earlier version of the emulator and/or CodeWarrior. I thought that I
had tried creating a new session, but maybe I didn't.

Laurie



"Jun-Kiat Lam" <[EMAIL PROTECTED]> wrote in message
news:62134@palm-dev-forum...
>
> I've been hearing reports about this problem with CW for Palm 7.1 debugger
> plugin. However, absent a reproducible case, it's been difficult for us to
fix
> this bug. I know that Tom Fraunhoefer has reported this problem - Laurie,
is
> this happening consistently for your code in Palm OS 3.0? Is there any way
for
> you to send us your code?
>
> -- jkl
>
> - Original Message -
> From: "Laurie Davis" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Saturday, September 08, 2001 7:05 AM
> Subject: This target is not registered
>
>
> > I can use CodeWarrior & POSE to debug on PalmOS 4.0 and 3.5. When I try
to
> > use PalmOS 3.0 I get the message "This target is not registered" when I
try
> > to debug.
> >
> > Thanks,
> >
> > Laurie
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
please
> see http://www.palmos.com/dev/tech/support/forums/
>
>
>
>



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



This target is not registered

2001-09-08 Thread Laurie Davis

I can use CodeWarrior & POSE to debug on PalmOS 4.0 and 3.5. When I try to
use PalmOS 3.0 I get the message "This target is not registered" when I try
to debug.

Thanks,

Laurie



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



External Memory

2001-06-26 Thread Laurie Davis

I'm having trouble understanding how external memory should be used. I would
like to have the option of moving some of my very large database files onto
external memory (expansion cards). My startup code is the standard:

dbHandle = DmOpenDatabaseByTypeCreator(dbType, creator, dmModeReadWrite);
if (dbHandle == 0)
{
// the database does not exist, create it now
DmCreateDatabase(0, dbName, creator, dbType, false);
// open the newly created database
dbHandle = DmOpenDatabaseByTypeCreator(dbType, creator,
dmModeReadWrite);
}
// get the localID and card number of the database
LocalID localID;
UInt16 cardNo;
DmOpenDatabaseInfo(dbHandle, &localID, NULL, NULL, &cardNo, NULL);
// get the attributes and the version number
UInt16 version, attributes;
DmDatabaseInfo(cardNo, localID, NULL, &attributes, &version, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL);
...

My assumption was that when you initially open a database,
DmOpenDatabaseByTypeCreator would find the database even if it is not on
card 0. If a database is NOT found on external memory, DmCreateDatabase
would create it on card 0, but if there was one on another card, the first
DmOpenDatabaseByTypeCreator should find it.

I do not have a real external memory card to test this on, but have
simulated external memory using HostFS and POSE. Using DigiBrowse I can see
that the database is in external memory and that it has been removed from
main memory. The bottom line is that the first DmOpenDatabaseByTypeCreator
does not find the database on external memory.

Help,

Laurie



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