Re: How can I add text to a field "undoably"

2000-09-08 Thread Ken Krugler

At 12:00am -0700 00-09-08, Palm Developer Forum digest wrote:
>Subject: How can I add text to a field "undoably"
>From: Dave Johnson <[EMAIL PROTECTED]>
>Date: Thu, 7 Sep 2000 14:44:17 -0700
>X-Message-Number: 37
>
>I'm using FldInsert to insert text in a user-editable field (in response
>to a button press). Surprisingly (to me, anyway) this is not an undoable
>action.
>
>How can I insert text into a visible field and make that action undoable?
>
>(Frankly, I'd consider this a bug: shouldn't insertions of characters in
>a field, whether done programmatically or by typing, "register"
>themselves as undoable?)

One issue is that the field object's undo buffer is only 100 bytes or 
so. Which means that if you're editing a field and the amount of data 
required to be saved for undo exceeds this limit, you get an 
alert...which isn't something that Palm wanted to display as a result 
of programmatic modifications to the field.

>Of course I'm hoping for something a little more elegant than queuing a
>series of key events, or putting the text in the clipboard first then
>calling FldPaste. Though I'm sure either of those would work, that kind
>of work-around is a last resort :-)

Unfortunately FldPaste is your best option.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Reserved resource IDs (was Re: Question about patching)

2000-09-08 Thread Ken Krugler

At 12:00am -0700 00-09-08, Palm Developer Forum digest wrote:
>Subject: Re: Question about patching
>From: Richard Bram <[EMAIL PROTECTED]>
>Date: Thu, 7 Sep 2000 20:36:21 -0500
>X-Message-Number: 46
>
>  >5. Also note that Palm reserves resource IDs >= 1, so 0x2710 
>isn't valid.
>  >
>  >-- Ken
>
>I wasn't aware of this rule, although I did know we can't use all lower case.
>Is this new ? In fact, my program already uses IDs up to 24000 in my own
>data base. Is this likely to be a problem?

Since your app gets opened "above" the Palm OS resource DBs, 
typically this only causes a problem when you've got a bug...like a 
missing resource, which just happens to match the resource type/id of 
something found in one of the lower resource DBs. So if your resource 
types are all custom (not all lower-case, and not the same as any of 
the currently defined upper/mixed case types) then you won't run into 
this problem.

If and when Palm releases the PrcChecker tool, it will warn about 
resource IDs in the reserved range, use of reserved resource types, 
etc.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Question about patching

2000-09-07 Thread Ken Krugler

At 12:00am -0700 00-09-07, Palm Developer Forum digest wrote:
>Subject: Question about patching
>From: "mouss mouss" <[EMAIL PROTECTED]>
>Date: Wed, 06 Sep 2000 16:40:10 GMT
>X-Message-Number: 60
>
>I want to load one ressource in my patch using DmGetRessource. Can I do that
>??
>in my code I have :
>
>void mySysKeyboardDialog (KeyboardType kbdType)
>{
>DWord d;
>VoidHand KeybHandle0;
>KeybHandle0=DmGetResource('tkbd', 0x2710);   (1)
>kbdType=kbdNumbersAndPunc;   (2)
>if ( !FtrGet( 'TyTq', 7000, &d ) ){
>   void (*orgfunc)( KeyboardType);
>   orgfunc = (void (*)(KeyboardType))d;
>   return orgfunc(kbdType);
>   }
>   return ;
>}
>
>and after i patsh the system function
>
>but the numeric keyboard is desplayed (instuction 2) but my keyboard how is
>defin in ressource is not loaded (instruction 1)  !!!
>
>when i call DmGetResource('tkbd', 0x2710); in a simple application , my
>keeyboard is loaded !!

1. I'm guessing your keyboard resource (tkbd 0x2710) is located in 
PRC that is not opened at the time that SysKeyboardDialog is called. 
Thus it won't be found by the DmGetResource call.

2. Note that the format of the tkbd resource is private, and will be 
changing soon, and that the resource ID for the 'tkbd' resource used 
by the original SysKeyboardDialog routine will also be changing.

4. If you've got your own private format for the keyboard layout, you 
should be using a different resource type - and Palm reserves all 
resource types that are all lower-case.

5. Also note that Palm reserves resource IDs >= 1, so 0x2710 isn't valid.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: the cursor location - an amazing discovery

2000-09-05 Thread Ken Krugler

At 12:00am -0700 00-09-05, Palm Developer Forum digest wrote:
>Subject: the cursor location - an amazing discovery
>From: Paul Nevai <[EMAIL PROTECTED]>
>Date: Mon, 4 Sep 2000 12:37:04 -0400 (EDT)
>X-Message-Number: 13
>
>Do this:
>
>In, e.g., Memo Pad, create a long enough document so that there is a scroll
>bar. Now create a long enough line so that it spreads over more than one
>"screen line". Now you put your cursor to the beginning of the 2nd line of
>the "screen line". Scroll away so that the line is not visible. Scroll
>back. Did you see that your cursor moved back to the end of the previous
>"screen line"?
>
>Here is an example:
>
>...
>This is one line without a single linefeed character in it
>|but it spreads over several "screen lines" and "|" stands for
>the cursor location.
>...
>
>Now do a scrolling back and forth job. You end up with
>
>...
>This is one line without a single linefeed character in it|
>but it spreads over several "screen lines" and "|" stands for
>the cursor location.
>...
>
>QUESTION: why?
>
>CONCLUSION: on the Palm the beginning and end of a "screen line" are not
>exactly well defined.

When a field is scrolled such that the insertion point isn't visible, 
the offset of the insertion point is saved in the insPtXPos field as 
the # of bytes from the beginning of the text. If this offset could 
represent both the end of a line and the beginning of a line, then 
you have this ambiguity when the offset gets scrolled back into view. 
Note that in the situation you're describing, editing operations are 
unaffected by whether the cursor is located at the beginning or end 
of a line.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: The Mighty Morphin Function Stack

2000-09-01 Thread Yu, Ken [IT]

Wouldn't

> recordP->fields[index]="";
> 
be a problem? 

Won't the empty string become invalid once the function is exited?

-Ken


> --
> From: Jason Partyka[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Friday, September 01, 2000 11:36 AM
> To:   Palm Developer Forum
> Subject:  RE: The Mighty Morphin Function Stack
> 
> here you go:
> 
> every field is of type CharPtr.
> 
> void initializeRecord (DBRecordPtr recordP){
>   int index;
>   for (index =0; index   recordP->fields[index]="";
> }
> 
> 
> 
> >>> [EMAIL PROTECTED] 09/01/00 10:20AM >>>
> > When I get rid of the last four fields in the struct, the 
> > program works as expected and no functions are dropped from the stack.
> 
> Let's see some code.  I will bet 1 container of your favorite liquid
> refreshment that populating one of these last fields is munging the stack
> (array overrun, data mismatch, pointer math error, etc.).
> 
> -- 
> 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/
> 

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



Re: Shared library and Database

2000-08-30 Thread Ken Krugler

At 12:00am -0700 00-08-30, Palm Developer Forum digest wrote:
>Subject: Shared library and Database
>From: "Pilot Pogrammer" <[EMAIL PROTECTED]>
>Date: Tue, 29 Aug 2000 10:26:22 +0200
>X-Message-Number: 4
>
>When creating a database in a shared library, I don't see the database when
>I want to delete it from Palm OS menu..? What's wrong?

I assume you mean that you don't see the database listed in the 
Launcher's Delete form. Assuming you created the DB with the correct 
creator type (= to the creator type of your shared library), then 
it's "owned" by the shared library, and won't be displayed 
separately. This is also why you don't see the Address app's DB, the 
ToDo app's DB, etc.

If this is the case, then the DB is deleted when you delete the shared library.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Combining shared libraries and static libraries

2000-08-30 Thread Ken Krugler

At 12:00am -0700 00-08-30, Palm Developer Forum digest wrote:
>Subject: Combining shared libraries and static libraries
>From: =?iso-8859-1?Q?Petrus_Wrang=F6?= <[EMAIL PROTECTED]>
>Date: Tue, 29 Aug 2000 17:14:35 +0200
>X-Message-Number: 36
>
>Would it be possible to make a shared library which in turn uses one or two
>static libraries to overcome the 64K limit on shared libraries?

Static libraries still get linked into code resources, so that 
wouldn't help you.

You _could_ have one shared library (the top level) that would 
dispatch some of the calls to one or more additional shared 
libraries. This creates problems with sharing globals (though you can 
use the technique of passing around a pointer to a global data 
structure), and you wind up with multiple PRCs to install on a 
device, but it would solve the problem that you'd mentioned 
previously of needing to replace one shared library with a different 
one.

Other than that, solutions get more tricky. You could create 
additional code resources, each with their own dispatch table, and 
write your own code to do the dispatching, but that's pretty 
complicated.

Currently there is no compiler/linker support in Codewarrior for 
multi-segment shared libraries.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Overlay Manager Status?

2000-08-30 Thread Ken Krugler

At 12:00am -0700 00-08-30, Palm Developer Forum digest wrote:
>Subject: Re: Overlay Manager Status?
>From: John Lehett <[EMAIL PROTECTED]>
>Date: Tue, 29 Aug 2000 20:07:59 -0400
>X-Message-Number: 143
>
>
>David Fedor:
>
>Thanks for the info on this.  Do you have any estimated release date,
>even a ball park figure, for when Constructor would be able to handle
>the Overlay .prc editing? (the current alternative tools cause some
>headaches when coming from Codewarrior, and then trying to edit a prc
>file broken into rcp/bin files etc, unless there is a PRC editing tool
>available that makes this a less worrisome endeavor already
>available?).

You could edit the overlay using the RsrcEdit Palm app. We've done 
this in the past - a bit painful, but it works.

a. Create the overlay using PRC2OVL.
b. Launcher Poser with some generic ROM and load the overlay and RsrcEdit.
c. Edit the overlay using RsrcEdit.
d. Export the modified overlay from Poser.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: error - bad size for resource file

2000-08-30 Thread Ken Krugler

At 12:00am -0700 00-08-30, Palm Developer Forum digest wrote:
>Subject: Re: error - bad size for resource file
>From: "Shay" <[EMAIL PROTECTED]>
>Date: Tue, 29 Aug 2000 10:58:02 +0200
>X-Message-Number: 3
>
>at last the news-group is working...
>
>and if i have a prc that exceed 1M ???
>and yes, i want to have 2 resources in my prc.
>and i can't do it, because it give me the error i mentioned.

For now, your only option is to put some of the resource data into a 
separate PRC so that the total size of each is less than 1MB. I think 
this restriction is going to be removed in the next release of 
PalmRez.

Or potentially you could use GCC and build-prc, since I don't believe 
they have any such restrictions on the max size of the resulting PRC.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: appVersionID / appVersionAlternateID

2000-08-30 Thread Ken Krugler

At 12:00am -0700 00-08-30, Palm Developer Forum digest wrote:
>Subject: appVersionID / appVersionAlternateID
>From: "Chris Percival" <[EMAIL PROTECTED]>
>Date: Tue, 29 Aug 2000 14:15:48 +0100
>X-Message-Number: 16
>
>Sorry to bring this subject up again, but is this code expected to return
>the application version number as set with constructor?
>On OS 3.2 it works but on OS 3.5 it returns what looks like the OS version
>(3.5.2).
>
>h = DmGetResource(verRsc, appVersionID);
>if (!h) h = DmGetResource(verRsc, appVersionAlternateID);
>ErrFatalDisplayIf(!h, "Unable to find version string");
>p = MemHandleLock(h);
>SetFieldText(AboutDlgVersionField, p);
>MemPtrUnlock(p);

This code should work - I'd have to say that you've got some other 
problem in your app that's causing odd results.  My guess is still 
that you don't really have any tver resources in your app, and thus 
the call to DmGetResource is "finding" the resource in the system's 
PRC. See what happens when you use DmGet1Resource.

>Ken Krugler:  I am  unsure how to use the db ref result from
>DmSearchResource to determine which resource file
>it came from, as suggested by you in a previous post.

Compare this with the result returned by DmNextOpenResDatabase(NULL), 
which will be the top-most resource database (should be your app's 
PRC).

>Do people use this application version resource or do you just hardcode a
>string somewhere?

Mostly it's a matter of the Launcher (and other apps/tools) using the 
tver resource as the standard method for determining the app's 
version. So if you hard-code it (where?), then it won't be publicly 
available.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: Palm as engine management computer

2000-08-30 Thread Yu, Ken [IT]

A Palm can communicate with a PC @ 115,200 bits per second (HotSync max
speed) which is 14,400 bytes per second.  This means a byte of data can be
clocked in at 14.4KHz which is greater that 9KHz. So, wouldn't this be
theoretically possible?

-Ken


> --
> From: Richard Anderson[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, August 30, 2000 10:24 AM
> To:   Palm Developer Forum
> Subject:  RE: Palm as engine management computer
> 
> If you can get the Palm to sample at 9KHz please let me know. Also the
> Palms
> IO is somewhat lacking/barely existant.
> 
> Rik
> 

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



Re: Is PalmOSGlue (TxtGluePrepFindString and TxtGlueFindString) broken?

2000-08-29 Thread Ken Krugler

At 12:00am -0700 00-08-29, Palm Developer Forum digest wrote:
>Subject: Is PalmOSGlue (TxtGluePrepFindString and TxtGlueFindString) broken?
>From: "Kirk Dybvik" <[EMAIL PROTECTED]>
>Date: Mon, 28 Aug 2000 13:20:14 -0500
>X-Message-Number: 94
>
>I am trying to implement TxtGluePrepFindString and TxtGlueFindString, with
>no luck.   I have seen other messages where people claimed these functions
>were broken.

You're trying to implement these functions, or use them? What 
specific problems are you seeing? Which version of the SDK are you 
using? Do you compile with CodeWarrior or GCC?

>--
>
>Subject: Re: Is PalmOSGlue (TxtGluePrepFindString and 
>TxtGlueFindString)- broken?
>From: Aaron Ardiri <[EMAIL PROTECTED]>
>Date: Mon, 28 Aug 2000 20:21:18 +0200 (MET DST)
>X-Message-Number: 95
>
>  > I am trying to implement TxtGluePrepFindString and TxtGlueFindString, with
>  > no luck.   I have seen other messages where people claimed these functions
>  > were broken.
>
>   looking at the "docs", and unfortunately, these functions are not
>   really documented that well - mainly cause they are "SystemOnly"
>   type functions.
>
> TxtGluePrepFindString()  <-- system only
> TxtGlueFindString()  <-- cannot find a reference to it.
>
>   what exactly are you trying to achieve, and is there a need to use
>   the "system" level functions? they are marked system only for a
>   reason, and there must be a way to do what you need using the real
>   API calls that are made available.

Actually both of these routines are now documented, though 
TxtGluePrepFindString  might only be described online until the next 
SDK gets released. TxtGlueFindString is exactly the same as 
TxtFindString, which is definitely documented.

>TxtGluePrepFindString looks like it is used to normalize the string to be
>searched for and should be called prior to TxtGlueFindString.

Correct.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Emulator OR Pilot?

2000-08-28 Thread Ken Krugler

>Subject: Re: Emulator OR Pilot?
>From: Chris Faherty <[EMAIL PROTECTED]>
>Date: Thu, 24 Aug 2000 11:06:57 -0400 (EDT)
>X-Message-Number: 33
>
>On 24-Aug-2000 Rick Gadbois wrote:
>
>  > Is there a way to tell from within your program if it is running in the
>  > emulator or a real palm pilot??
>
>Boolean inposer;
>DWord temp;
>
>if (FtrGet('pose', 0, &temp) == ftrErrNoSuchFeature) inposer = false;
>else inposer=true;

If you know your app only runs on 3.0 or later devices, you can use 
the HostControl.h calls, for example:

inPoser = HostGetHostID() == hostIDPalmOSEmulator;

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: error - bad size for resource file

2000-08-24 Thread Ken Krugler

At 12:00am -0700 00-08-24, Palm Developer Forum digest wrote:
>Subject: error - bad size for resource file
>From: "Shay" <[EMAIL PROTECTED]>
>Date: Wed, 23 Aug 2000 12:16:18 +0200
>X-Message-Number: 11
>
>Hi,
>i want to include another resource in my codewarrior project,
>and i get link error : unexpected error #32. bad size for resource file.
>
>i've got a warning too - ignored duplicate resource ... (16400)
>but i read to just ignored it.
>
>what to do about the link error ?

This error occurs with the resulting size of your PRC exceeds 1MB. 
Normally it indicates some problem with either your code or resource 
data, as Palm apps typically don't get that big.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Displaying Fonts...

2000-08-23 Thread Ken Krugler

At 12:00am -0700 00-08-23, Palm Developer Forum digest wrote:
>Subject: Displaying  Fonts...
>From: <[EMAIL PROTECTED]>
>Date: 22 Aug 00 09:51:29 MDT
>X-Message-Number: 39
>
>
>Hi,
>
>I've two questions, =
>
>1> is there a way to create fonts such as itallics?

Yes. The list archives contain many emails on the general topic of 
converting a Windows or Mac font to a Palm font.

You'll have to use a hack to allow the user to select (system-wide) 
any custom font that you create.

>2> is there a way to set more than one font as we do in windows for examp=
>le
>bold, itallics etc..

There's currently no way to use more than one font in a single field, 
so the entire field has to be the same face and style.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Creator ID of the alarm app

2000-08-22 Thread Ken Krugler

At 12:00am -0700 00-08-22, Palm Developer Forum digest wrote:
>Subject: Creator ID of the alarm app
>From: "Pilot Pogrammer" <[EMAIL PROTECTED]>
>Date: Tue, 22 Aug 2000 08:41:41 +0200
>X-Message-Number: 181
>
>The alarm application launched with the keyDown.chr = = alarmChr must have a
>Creator ID. Anyone who know what it is??

There is no "alarm app". When SysHandleEvent sees the alarmChr 
(vchrAlarm) character, it calls AlmDisplayAlarm. This in turn 
launches the app which originally registered to handle that alarm 
with the AlmSetAlarm call. Typically it's the Datebook app (creator = 
sysFileCDatebook) that called AlmSetAlarm.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Month names

2000-08-22 Thread Ken Krugler

At 12:00am -0700 00-08-22, Palm Developer Forum digest wrote:
>Subject: Month names
>From: Richard Bram <[EMAIL PROTECTED]>
>Date: Fri, 18 Aug 2000 23:19:27 -0500
>X-Message-Number: 101
>
>According to the OS3.5 headers, we shouldn't use monthNamesStrID
>   anymore because it is "OBSOLETE - use monthNamesStdStrListID"
>But, when I try to get a 'tSTR' resource of ID monthNamesStdStrListID
>on the Emulator with OS3.5 ROM, it returns 0. AND monthNamesStrID
>still works.

1. As the name suggests, "monthNamesStdStrListID" is a string list 
resource (tSTL), not a string resource (tSTR).

2. If you're running on OS 3.5 or later, then you can call the new 
DateTemplateToAscii routine to get the month name in a safe manner 
without grabbing system resources. For example, if you want the 
standard month name (e.g. "Jan") then you would use:

DateTemplateToAscii("^2r", // Template string = 2 (month), r (regular)
january,
1,  // days (don't care)
2000,   // years (don't care)
resultStr,
sizeof(resultStr));

To get "January", use "^2l" for the template string.

3. Currently there's no DateGlueTemplateToAscii, so you're stuck with 
parsing the old string resource on pre-3.5 ROMs, but I'll add that to 
PalmOSGlue.lib if I get some time.

>Does it seem likely that monthNamesStrID will continue to work in 
>future ROMs for a while, then?

No, it will stop working soon.

>And by the way, is there a built-in function to extract a given
>word from a string list (space demarcated)?

No, and hopefully the need to parse the Palm OS string resources will 
go away as the API matures.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Beaming

2000-08-22 Thread Ken Krugler

At 12:00am -0700 00-08-22, Palm Developer Forum digest wrote:
>Subject: Re: Beaming
>From: Adam Wozniak <[EMAIL PROTECTED]>
>Date: Mon, 21 Aug 2000 15:06:37 -0700
>X-Message-Number: 158
>
>Danny Epstein wrote:
>
>  > When the receiving Palm OS device receives a beamed .prc or .pdb, the
>  > Launcher accepts it. The Launcher only expects to receive a 
>single database.
>  > If you send more than one database in a single transaction, they'll get
>  > concatenated in a weird way: the last record/resource in the first database
>  > will include all of the remaining databases.
>
>What about overlay databases?  Do they get beamed with the app database?

Unfortunately not (yet).

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: HotSync Error: Insufficient disk space. (800A)

2000-08-21 Thread Yu, Ken [IT]

This is a misleading message.  I also had this occur on me when I had more
than enough disk space.  It turns out that it was a write permission
problem.

-Ken

> --
> From: Adam Wozniak[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Friday, August 18, 2000 7:38 PM
> To:   Palm Developer Forum
> Subject:  HotSync Error: Insufficient disk space.  (800A)
> 
> HotSync operation started 08/18/00 16:35:10
> HotSync Error: Insufficient disk space.  (800A)
> 
> The drive with the Palm desktop software has 12 Gigs free
> Rebooting the machine did not help.
> 
> Any ideas?
> 
> Windows 2000
> Hotsync manager 3.0.2
> 
> --Adam
> --
> Adam Wozniak Chief Architect
>  Surveyor Corporation
> [EMAIL PROTECTED]4548 Broad Street
> [EMAIL PROTECTED]  San Luis Obispo, CA 93401
> 
> 
> 
> -- 
> 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: exit call

2000-08-18 Thread Ken Krugler

>Ken Krugler wrote:
>
>  > At 12:03am -0700 00-08-18, Palm Developer Forum digest wrote:
>  > >Subject: Re: exit call
>  > >From: Adam Wozniak <[EMAIL PROTECTED]>
>  > >Date: Thu, 17 Aug 2000 09:42:23 -0700
>  > >X-Message-Number: 64
>  > >
>  > >Ken Krugler wrote:
>  > >
>  > >  > You can use setjmp/longjmp, but a better option would be ErrSetJump
>  > >  > and ErrLongJump. These take advantage of a top-of-chain "global"
>  > >  > that's set aside in the app info block that gets created for your app
>  > >  > even when you're launched without globals, so you can safely use
>  > >  > these calls in a sub-launch situation.
>  > >
>  > >I've seen those in the code, but when I looked for them in the Reference
>  > >I couldn't find them.
>  >
>  > Scanning the headers, I see them declared in ErrorBase.h, as in:
>  >
>  > Int16 ErrSetJump(ErrJumpBuf buf)
>  > SYS_TRAP(sysTrapErrSetJump);
>  >
>  > In ErrorBase.h, you'll also see that ErrTry macro uses ErrSetJump.
>
>Yes, like I said, I've seen them in the code.  They're not in the Reference,
>which makes me wonder if they are "system use only" or not.  Palm generally
>reserves the right to change undocumented behavior, so I avoid using it
>whenever possible.

You're right, it's not in the reference (but it should be). Hopefully 
the doc writers will take care of that in the next release of the SDK.

In the meantime, yes, it is safe to use the ErrTry, ErrCatch, and 
ErrEndCatch macros, plus the ErrSetJump and ErrThrow routines. The 
behavior of these routines will not change in the future.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: finding a characters ASCII decimal value?

2000-08-18 Thread Ken Krugler

At 12:03am -0700 00-08-18, Palm Developer Forum digest wrote:
>Subject: finding a characters ASCII decimal value?
>From: "Zach Austin" <[EMAIL PROTECTED]>
>Date: Thu, 17 Aug 2000 10:16:43 -0500
>X-Message-Number: 41
>
>Can anyone tell me how to do this when I have a non decimal character?

I don't know what you mean by "...a non decimal character". If you 
know the character, you can look up its character code in Chars.h and 
CharLatin.h or CharShiftJIS.h.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Turning Japanese

2000-08-18 Thread Ken Krugler

At 12:03am -0700 00-08-18, Palm Developer Forum digest wrote:
>Subject: Turning Japanese
>From: Rick Gadbois <[EMAIL PROTECTED]>
>Date: Thu, 17 Aug 2000 14:31:03 -0400
>X-Message-Number: 91
>
>My programs support multi-language.  Even custom fonts like Hebrew.
>But...now I must support Japanesein my new programs.
>
>In order to display Japanese fonts
>Do I need a Japanese Palm??

No, current versions of Poser will work just fine.

>Japanese OS?

Yes, you'll need a Japanese ROM image.

>Do they replace ASCII?, extended ASCII?

Yes, the ROMs using something other than ASCII and extended ASCII (Shift-JIS).

>Any other advice appreciated

Search the archives for Japanese - there's quite a bit of info available.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: Change text on Alerts

2000-08-18 Thread Ken Krugler

>First of all ... Yes I want to change these texts at run-time.
>
>I'm well aware of the fact that you can change the window title with
>FrmSetTitle and change the button texts with CtlSetLabel (I do it all the
>time in my normal forms) but this requires me to have a FormPtr and I
>only have an Alert ID.
>
>Now how do I get from Alert ID to a FormPtr ?
>I've tried several things like GetFormPtr and passing the Alert ID instead
>of a Form ID but that doesn't seem to work.
>Maybe a code snippet would be helpfull ?

Sorry, I didn't think about the fact that alerts are inherently 
modal. So off the top of my head, the easiest solution to dynamically 
set alert buttons and titles is (ugly!) to patch FrmDoDialog(), which 
gets called with the alert form pointer. Assuming this code is only 
run when you've got globals, here's what you might do (danger! 
untested code):

typedef UInt16 (FrmDoDialogProcPtr) (FormType* formP);

static FrmDoDialogProcPtr pOldFrmDoDialogProc = NULL;

static UInt16 MyFrmDoDialog(FormType* formP)
{


return(pOldFrmDoDialogProc(formP));
} // MyFrmDoDialog


static void DoCustomizedAlert(UInt16 alertID)
{
// WARNING! Assumes you can access the pOldFrmDoDialogProc global.
pOldFrmDoDialogProc = SysGetTrapAddress(sysTrapFrmDoDialog);
SysSetTrapAddress(sysTrapFrmDoDialog, MyFrmDoDialog);

FrmAlert(alertID);

SysSetTrapAddress(sysTrapFrmDoDialog, pOldFrmDoDialogProc);
} // DoCustomizedAlert


Note that this hack relies on the fact that _currently_ the ROM calls 
FrmDoDialog to actual display/handle an alert. If and when this 
changes in the future, your code will no longer function properly. So 
I'd still advise using the method of opening up one of a set of PRCs 
that contain localized versions of the various alerts, versus trying 
to set the title/buttons at run-time.

-- Ken

>  > -Original Message-
>  > From: Ken Krugler [mailto:[EMAIL PROTECTED]]
>  > Sent: Thursday, August 17, 2000 17:31
>  > To: [EMAIL PROTECTED]
>  > Cc: [EMAIL PROTECTED]
>  > Subject: Re: Change text on Alerts
>  >
>  >
>  > At 12:00am -0700 00-08-17, Palm Developer Forum digest wrote:
>  > >Subject: Change text on Alerts
>  > >From: Rob Mermans <[EMAIL PROTECTED]>
>  > >Date: Wed, 16 Aug 2000 10:44:56 +0200
>  > >X-Message-Number: 180
>  > >
>  > >Hello,
>  > >
>  > >I'm working on an app that supports multi-language.
>  >
>  > Do you mean your app is localized into multiple languages, or you
>  > have to be able to switch between languages at run-time? I'm assuming
>  > the latter, otherwise it's just a build problem/resource file
>  > management issue.
>  >
>  > >I'm using the default Alerts from Constructor and changing
>  > the messages by
>  > >using FrmCustomAlert and
>  > >the ^1 ^2 ^3 trick. I also want to change the text on the
>  > buttons and the
>  > >text on the title of the alert.
>  > >All this has to be done on the fly and I'd rather not make
>  > all the alerts in
>  > >all the languages.
>  > >
>  > >Any ideas on how to do this ?
>  >
>  > FrmSetTitle is the easy way to set the alert title. If you're OK with
>  > having fixed width buttons, then you can call CtlSetLabel to change
>  > the button text. Note that both of these calls "grab" the string
>  > pointer you pass in, so you have to make sure the localized string
>  > data sticks around for the duration of the alert.
>  >
>  > Another option is to have separate PRCs with contain the localizable
>  > resources, one for each language. At launch time, open the
>  > appropriate PRC based on the language the user has selected. This
>  > adds the PRC to the top of the resource DB chain, so subsequent calls
>  > to FrmCustomAlert (assuming you pass a valid resource ID) will work
>  > just fine.
>  >
>  > -- Ken
>  >
>  > Ken Krugler
>  > TransPac Software, Inc.
>  > <http://www.transpac.com>
>  > +1 530-470-9200
>  >

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Watch out for 16-bit constants!

2000-08-18 Thread Ken Krugler

>It makes sense that on the Palm, ints are 16-bit, not 32-bit.
>
>But what I didn't catch is that in macros, such as:
>
>#define MY_FLAG(32768 << 256)
>
>UInt32 flags |= MY_FLAG;
>
>Everything will act like it's working OK -> in fact, all the normally
>"integer math" functions such as (a << b) still work in 32-bits.
>
>But the #defines don't.  The #define above will only contain the low
>word of the value, and since you can't see the value of a define in the
>debugger, all you notice is that values and branches aren't working
>right.
>
>The best way I found around this was just to check the USE 4 BYTE INTS
>option.

Or, by either explicitly using the C++ compiler or changing your 
source file suffix to .cpp, you could use:

static const UInt32 MY_FLAG = ; // 32768 shifted left by 256 bits 
is invalid

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Feeling the change in a field!

2000-08-18 Thread Ken Krugler

At 12:03am -0700 00-08-18, Palm Developer Forum digest wrote:
>Subject: Re: Feeling the change in a field!
>From: "Tony Malinaric" <[EMAIL PROTECTED]>
>Date: Thu, 17 Aug 2000 14:03:25 +0200
>X-Message-Number: 24
>
>I might have come a bit on the way. Now i'm checking for a keyDownEvent. The
>problem then is that I get the keyDownEvent before the system has a chance
>to respond to it, resulting in that I cannot read the values from the field
>(since the system hasn't written the character yet). In other words:
>If the field contains a 3 and I write a 0 (to get 30), I get the
>keyDownEvent before the system has written the 0 and I only get the 3 when I
>read the field! Is there a way to put userdefined events to the queue (like
>sending userdefined messages in Windows)? Then I could respond to that event
>instead, after the system has printed my char!

You can't rely on the fldChangedEvent, since that won't always get 
posted in response to the field's contents changing, and sometimes 
gets posted when the contents aren't changing (e.g. up/down arrow 
keys).

You could  do something like:

while (true)
{
get the event
FieldType* activeFldP = GetActiveFieldPtr();
process the event

if ((activeFldP != NULL) && FldDirty(activeFldP))
{
do your stuff
FldSetDirty(activeFldP, false);
}
}

FieldType* GetActiveFieldPtr(void)
{
FieldType* activeFldP = NULL;
FormType* activeFrmP = FrmGetActiveForm();

if (activeFrmP != NULL)
{
UInt16 activeObjID = FrmGetFocus(activeFrmP);
if (activeObjID != noFocus)
{
FormObjectKind objKind;
objKind = FrmGetObjectType(activeFrmP, activeObjID);
if (objKind == frmFieldObj)
{
activeFldP = 
(FieldType*)FrmGetObjectPtr(activeFrmP, activeObjID);
}
else if (objKind == frmTableObj)
{
TableType* activeTblP;
activeTblP = 
(TableType*)FrmGetObjectPtr(activeFrmP, activeObjID);
activeFldP = TblGetCurrentField(activeTblP);
}
}
}
return(activeFldP);
}

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: exit call

2000-08-18 Thread Ken Krugler

At 12:03am -0700 00-08-18, Palm Developer Forum digest wrote:
>Subject: Re: exit call
>From: Adam Wozniak <[EMAIL PROTECTED]>
>Date: Thu, 17 Aug 2000 09:42:23 -0700
>X-Message-Number: 64
>
>Ken Krugler wrote:
>
>  > You can use setjmp/longjmp, but a better option would be ErrSetJump
>  > and ErrLongJump. These take advantage of a top-of-chain "global"
>  > that's set aside in the app info block that gets created for your app
>  > even when you're launched without globals, so you can safely use
>  > these calls in a sub-launch situation.
>
>I've seen those in the code, but when I looked for them in the Reference
>I couldn't find them.

Scanning the headers, I see them declared in ErrorBase.h, as in:

Int16 ErrSetJump(ErrJumpBuf buf)
SYS_TRAP(sysTrapErrSetJump);

In ErrorBase.h, you'll also see that ErrTry macro uses ErrSetJump.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Changing DB creator

2000-08-18 Thread Ken Krugler

An easier way to change the creator is to edit the PDB file on the 
desktop using your favorite hex editor.  The four character DB type 
is at offset 0x3C and the four character DB creator is at offset 0x40.

-- Ken

>  > Farzin Ashraghi wrote:
>  >
>  > > Using a generic converter I'm generating *.pdb files.  But I want to
>change
>  > > its creator IDs in order to relate them with my palm application.  I'm
>  > > trying to use DmSetDatabaseInfo command, but  creator ID is a ULong.
>Why is
>  > > a ULong and not a String?  How may I convert my desired creator ID to a
>  > > ULong?  I didn't have results trying to cast it.

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Attn: MetroWorks CW, Annoying optimization issue

2000-08-17 Thread Ken Krugler

As many people pointed out, the debugger can display interesting 
results with optimizations turned on, and that could very well be the 
source of the problem.

However, I _have_ seen a similar problem in the past, where the 
compiler was indeed generating incorrect code (skipping the entire 
code block) for a simple if/else statement with the optimization 
level set to 1. This was with an older version of CodeWarrior, so I 
don't know if it still happens with v2.3.2 of the C/C++ compiler. 
What version are you using?

I'd use CodeWarrior to generate a 68K disassembly of the routine with 
opt=1, and see if the 68K instructions are actually getting 
generated. If you want, email the dump to me.

-- Ken

At 12:00am -0700 00-08-17, Palm Developer Forum digest wrote:
>Subject: Attn: MetroWorks CW,  Annoying optimization issue
>From: "Charles Rezsonya" <[EMAIL PROTECTED]>
>Date: Mon, 14 Aug 2000 14:48:50 -0400
>X-Message-Number: 40
>
>i have a small chunk of code which i was wondering why it wasn't working.  i
>have the projects debugging level 1 up from "no optimizations".  when i
>place some frmCustomAlerts, a calculation is made, and some numbers are
>assigned to ulongs.  but when i remove the customAlerts, it totally skips
>the calculation which is importent.  so i tried putting the optimizations to
>none and see what it does and now it does it.  can anyone bring up anything
>that might cause this bug?  i say bug, because an optimizer isn't supposed
>to skip lines of code.
>
>
>Word CheckXORAdjustData(ULong serverDate, UShort offSet) {
>  ULong curDate;
>  ULong offSetSec;
>  ULong dateDiff;
>
>  curDate=TimGetSeconds(); // get units time in seconds
>  if(curDate==serverDate) { // if seconds match then exit
>   return 0;
>  }
>  offSetSec=offSet*60;  // get offset in seconds
>
>  if(curDate>serverDate) {
>//  FrmCustomAlert(TestAlert, "TEST", " ", " ");// < these two
>lines if removed make the entire if statement skipped
>   dateDiff=curDate-serverDate;
>  } else {
>//  FrmCustomAlert(TestAlert, "TEST2", " ", " ");// < these two
>lines if removed make the entire if statement skipped
>   dateDiff=serverDate-curDate;
>  }
>
>  if(dateDiff>offSetSec) {
>   TimSetSeconds(serverDate);
>   return 2;
>  }
>
>  return 1;
>}

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Change text on Alerts

2000-08-17 Thread Ken Krugler

At 12:00am -0700 00-08-17, Palm Developer Forum digest wrote:
>Subject: Change text on Alerts
>From: Rob Mermans <[EMAIL PROTECTED]>
>Date: Wed, 16 Aug 2000 10:44:56 +0200
>X-Message-Number: 180
>
>Hello,
>
>I'm working on an app that supports multi-language.

Do you mean your app is localized into multiple languages, or you 
have to be able to switch between languages at run-time? I'm assuming 
the latter, otherwise it's just a build problem/resource file 
management issue.

>I'm using the default Alerts from Constructor and changing the messages by
>using FrmCustomAlert and
>the ^1 ^2 ^3 trick. I also want to change the text on the buttons and the
>text on the title of the alert.
>All this has to be done on the fly and I'd rather not make all the alerts in
>all the languages.
>
>Any ideas on how to do this ?

FrmSetTitle is the easy way to set the alert title. If you're OK with 
having fixed width buttons, then you can call CtlSetLabel to change 
the button text. Note that both of these calls "grab" the string 
pointer you pass in, so you have to make sure the localized string 
data sticks around for the duration of the alert.

Another option is to have separate PRCs with contain the localizable 
resources, one for each language. At launch time, open the 
appropriate PRC based on the language the user has selected. This 
adds the PRC to the top of the resource DB chain, so subsequent calls 
to FrmCustomAlert (assuming you pass a valid resource ID) will work 
just fine.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: exit call

2000-08-17 Thread Ken Krugler

At 12:00am -0700 00-08-17, Palm Developer Forum digest wrote:
>Subject: Re: exit call
>From: "Andrew Lathrop" <[EMAIL PROTECTED]>
>Date: Wed, 16 Aug 2000 15:01:24 -0400
>X-Message-Number: 231
>
>Lets see if i understand how setjmp/longjmp works.  Using the following
>sample code down below, i would call some_function from my exit function.
>The call to longjmp transfers control to the line
>value=setjmp(environment_buffer)  Inplace of the the printf, i would put my
>handling code?

[snip]

You can use setjmp/longjmp, but a better option would be ErrSetJump 
and ErrLongJump. These take advantage of a top-of-chain "global" 
that's set aside in the app info block that gets created for your app 
even when you're launched without globals, so you can safely use 
these calls in a sub-launch situation.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Using appVersionID/appVersionAlternateID

2000-08-16 Thread Ken Krugler

At 12:00am -0700 00-08-12, Palm Developer Forum digest wrote:
>Subject: Using appVersionID/appVersionAlternateID
>From: "Chris Percival" <[EMAIL PROTECTED]>
>Date: Fri, 11 Aug 2000 09:46:44 +0100
>X-Message-Number: 5
>
>I am using the following code to get the application version string:
>
>h = DmGetResource(verRsc, appVersionID);
>if (!h) h = DmGetResource(verRsc, appVersionAlternateID);
>ErrFatalDisplayIf(!h, "Unable to find version string");
>p = MemHandleLock(h);
>SetFieldText(AboutFormVersionField, p);
>MemPtrUnlock(p);
>
>However it seems that on OS 3.2 this works OK, but on 3.5 this gives the OS
>version.  Is this correct, or am I being a muppet?  If so how do I get the
>application version string on OS 3.5?

If your app didn't contain a vers=1 or vers=1000 resource for some 
reason, then calling DmGetResource will wind up searching through the 
chain of opened resource databases. Hmm, usually it would only wind 
up getting the version resource from another app if your app was 
sub-launched.

One easy thing to do is to call DmSearchResource with the handle you 
get back, and use the db ref result to determine which resource file 
it came from.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: DmWriteCheck fails.

2000-08-14 Thread Yu, Ken [IT]

How do you determine 'size'?  Is it large enough to store your entire
record?

-Ken

> --
> From: Kshama Sathaye[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Monday, August 14, 2000 4:38 PM
> To:   Palm Developer Forum
> Subject:  Re: DmWriteCheck fails.
> 
> custHandle = DmNewHandle(size);
> 
> -- 
> 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: Unique Record Identifyier within a database - How

2000-08-14 Thread Yu, Ken [IT]

You might want to try using a seperate category for your records.  This also
gives you the ability to use the category API's for data retrieval.

-Ken

> --
> From: Mike Davis[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Saturday, August 12, 2000 8:45 PM
> To:   Palm Developer Forum
> Subject:  Unique Record Identifyier within a database - How
> 
> I don't know if this is generic to palm databases or just applicable 
> to MemoPad but I have a problem for which I need a tip.
> 
> I have an application that saves data to MemoPad.  But I would like 
> my application to be able to identify MemoPad records that were 
> created by the application itself.  
> 
> Is there a way to save some data (always the same) to each record 
> created so that my application can look for that data.  I don't want 
> the data to be visible when the record is viewed in MemoPad.  Where 
> could (should) I place such identifyiers?
> 
> Thanks,
> 
> -- 
> 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: resource types

2000-08-11 Thread Ken Krugler

At 12:00am -0700 00-08-11, Palm Developer Forum digest wrote:
>Subject: resource types
>From: "Owen G. Emry" <[EMAIL PROTECTED]>
>Date: Wed, 09 Aug 2000 23:57:12 -0400
>X-Message-Number: 137
>
>Are there any rules governing the use of resource types?  I want to avoid
>colliding with other resources in the resource type namespace.
>
>More specifically, if I append custom resources (containing, say, binary
>data) to my (or any) application's resource database, is there a way to
>know what resource type(s) are "safe" to use (i.e. unlikely to conflict
>with the other resource types typically found in an application).
>
>I realize, of course, that I can simply survey some applications to see
>what resources they contain, but I prefer not to solve problems by guessing.
>
>Thanks as always,

To be as safe as possible, here are some of the guidelines that I follow:

1. Only use resource ids in the range from 100 to .

2. Don't use resource types that are all lower-case.

3. Don't use any of these not-all-lowercase Palm OS resource types:

'FONT'
'MBAR'
'MIDI'
'Talt'
'Tbmp'
'Tbsb'
'tAIB'
'tAIN'
'tAIS'
'tFRM'
'tSTL'
'tSTR'

4. Avoid using Mac OS resource types that are well-known, as they can 
cause some PRC checking tools to complain about bogus resource data.

a. Here are some of the resources that get munged into forms, menus, 
bitmaps, etc. by PalmRez:

'CODE'
'DATA'
'ICON'
'MENU'
'NFNT'
'PICT'
'tBTN'
'tCBX'
'tFBM'
'tFLD'
'tGDT'
'tGSI'
'tLBL'
'tLST'
'tPBN'
'tPUL'
'tPUT'
'tREP'
'tSCL'
'tSLT'
'tTBL'
'tTTL'

b. Here are some Mac OS resource types that occasionally will 
accidentally show up in a PRC:

'BNDL'
'FREF'
'SIZE'
'TMPL'

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: OS 3.3 vs OS 3.5

2000-08-09 Thread Yu, Ken [IT]

How are you populating your tables?  Are you using the method of storing the
record number in the table's Row ID and then letting your
CustomDrawProcedure query the database and displaying the row?   If so, try
to figure out which record number your CustomDrawProcedure is processing by
using Palm Reporter (or debugger).  If you see that it is trying to retrieve
an invalid record (most likely a deleted record from the end of the
database), your problem is the situation I've described earlier.

A quick test you can do is to return from your CustomDrawProcedure
immediately if your DmQueryRecord() fails and see if your problem goes away.

-Ken


> --
> From: Timothy Astle[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, August 09, 2000 2:46 PM
> To:   Palm Developer Forum
> Subject:  Re: OS 3.3 vs OS 3.5
> 
> > I think the problem you are experiencing is that 3.5 refreshes a table
> more
> > often than earlier OS's.  This causes your CustomDrawProcesure's to be
> > called when you do not expect it.  They may be called  at a time your
> record
> > is no longer available (eg after a delete) to refresh the table.  When
> this
> > happens, you get the errors you've mentioned.  (A big PITA to work
> around)
> 
> Really?  Any quick ideas as how to fix this as this seems really odd...
> 
> I know that I don't have this problem with a table I created which has 2
> textTableItems and 1 customTableItem in it.  That one works perfectly.
> It's

> just my two tables with the single customTableItems that have the problem.
> 
> +
> Timothy D. Astle
> Embedded Systems Programmer
> ALT Group Inc.
> +
> 
> "People who can smile when things go wrong has thought of someone else to
> blame it on."
> 
> 
> 
> -- 
> 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: OS 3.3 vs OS 3.5

2000-08-09 Thread Yu, Ken [IT]

Tim,

I think the problem you are experiencing is that 3.5 refreshes a table more
often than earlier OS's.  This causes your CustomDrawProcesure's to be
called when you do not expect it.  They may be called  at a time your record
is no longer available (eg after a delete) to refresh the table.  When this
happens, you get the errors you've mentioned.  (A big PITA to work around)

-Ken


> --
> From: Timothy Astle[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, August 09, 2000 11:32 AM
> To:   Palm Developer Forum
> Subject:  OS 3.3 vs OS 3.5
> 
> I just ran into an OS difference problem, and I'm not certain as to why.
> I
> was using OS 3.3 in most of my development, and I just recently did a test
> on a 3.5 Rom.
> 
> The problem I'm getting is that whenever I use a DmRemoveRecord or
> DmDeleteRecord on the last record listed in my table, I get the following
> error.  I can delete other records with no sweat.  (weird...)
> 
> MemoryMgr.c, Line:4340, NULL handle
> 
> This confuses me because this code should work, and it's been working on
> OS
> 3.3 with no problems.  I noticed that Nick Torenvliet mentioned upgrading
> to
> 3.5 and running into similar problems, but he cited Dialog boxes as a
> possible culprit.
> 
> +
> Timothy D. Astle
> Embedded Systems Programmer
> ALT Group Inc.
> +
> 
> "People who can smile when things go wrong has thought of someone else to
> blame it on."
> 
> 
> 
> -- 
> 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: Calculating text

2000-08-08 Thread Ken Krugler

At 12:00am -0700 00-08-08, Palm Developer Forum digest wrote:
>Subject: Calculating text.
>From: Ralph Krausse <[EMAIL PROTECTED]>
>Date: Mon, 7 Aug 2000 11:19:21 -0400
>X-Message-Number: 9
>
>Hello all...
>
>   I have a field control with text in it. I takes up 3 of the 4 lines.
>Is there a way I can get the 'n'th line of text. IE, I need to get the 2nd
>or 3rd line of text in that field control.
>
>TIA!
>Ralph Krausse

I assume you're talking about a field object, and not the text in a 
control label, right? There's no public API to return back this 
information. Your two options are:

a. Wrap the field text yourself, calling FntWordWrap. This is 
somewhat slow, but avoids directly using field data structure 
elements. On the other hand you wind up making the implicit 
assumption that the field code also calls FntWordWrap with the width 
of the field object.

b. Use the information in the FieldType.lines array of LineInfoType 
records. Note that the FieldType.lines pointer might be NULL, for a 
single line field or a field with no text in it.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Palm devices memory bus width ?

2000-08-08 Thread Ken Krugler

Hi Florent,

I believe the original Palm Pilot (the 128K version) uses an 8-bit 
wide bus, while the 512K version (and all subsequent versions) uses a 
16-bit wide bus.

My experience on the Mac has been that using movem.l is the fastest 
way to move big chunks of memory, and if you take advantage of all of 
the registers, you'll pretty much max out the bus. Something like:

@0  move.l  (a0)+,d0-d6/a2-a6   // Suck up 48 bytes of data.
move.l  d0-d6/a2-a6,(a1)// Spew it out (can't post-inc)
add.w   #48,a1  // or maybe stash 
48.l in a reg.
dbrad7,@0   //

-- Ken

At 12:00am -0700 00-08-08, Palm Developer Forum digest wrote:
>Subject: Re: Palm devices memory bus width ?
>From: "Roger Chaplin" <[EMAIL PROTECTED]>
>Date: Mon, 7 Aug 2000 20:44:31 -0400
>X-Message-Number: 82
>
>Adam Wozniak <[EMAIL PROTECTED]> wrote:
>
>  > Florent Pillet wrote:
>  >
>  > > I'm trying to determine the memory bus width on various Palm 
>models, to be
>  > > able to optimize large data transfers (i.e. using move.w or move.l
>  > > instructions) but did not find any information about it.
>  > >
>  > > Anybody knows where I can get this information?
>  >
>  > Poking at the registers on my MC68328 based Palm VII tells me the bus
>  > is 16 bits wide.  Poking through the manual for the MC68EZ328 tells me
>  > that you have two choices; 8-bit or 16-bit.  I suspect wide moves are the
>  > best you'll get.
>
>Seems to me that using the move.l instruction would be more efficient
>even though the bus is only 16 bits wide, especially using an address
>register indirect with increment addressing mode. If you have the chart
>that shows CPU/bus cycles for each instruction, see how many cycles
>each of the following code bits takes:
>
>1$  move.l (a0)+,(a1)+
>
>2$  move.w (a0)+,(a1)+
> move.w (a0)+,(a1)+
>
>I don't have the chart handy, but I would bet that the first takes
>fewer cycles than the second.
>
>--
>Roger Chaplin
><[EMAIL PROTECTED]>

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



multiple draw areas (HTML Frames)

2000-08-05 Thread ken av

I'd like to have multiple active draw areas (a la HTML
frames) in my app, but am not sure what the general
approach should be.

Here are some strategies I've considered...

Perhaps I should be using one main form, and then several
windows as clipping regions. If so, then how can I get
one form to draw in multiple windows?

Or maybe I should have multiple forms drawn at the same
time, and then switch back and forth between them when
the user clicks outside the "active" one. This sure
doesn't seem like anything I've ever seen done before!
And then how do I dynamically resize the forms if the
user tries to resize one of the frames?

Or should I abandon forms altogether and do something
lower-level? I'd like to have the convenience of using
Forms for drawing fields, tables, etc, though.

Any thoughts (or references to source code!) would be
greatly appreciated.

Thanks,
Ken



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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



Re: Field.c line 132

2000-08-05 Thread Ken Krugler

At 12:00am -0700 00-08-05, Palm Developer Forum digest wrote:
>Subject: Re: Field.c line 132
>From: Oliver King-Smith <[EMAIL PROTECTED]>
>Date: Fri, 04 Aug 2000 16:15:53 -0700
>X-Message-Number: 73
>
>Basically this happens with several of my fields.  I create the field in
>constructor, and when I try to issue a call to it ( such as
>FldSetAttributes() ) I get this error.
>
>They are on a form with a table, I don't know if this is affecting things.
>The failure happens as soon as the form loads.  The function that the
>failure is happening in is called Validate.  I believe it only exists in
>the debug roms.  The regular roms run fine without any error messages.

1. If you need to programmatically make a field usable at run-time, 
then you should be using the FldSetUsable() call.

2. FldSetAttributes should only be used as a last resort, when the 
API to do what you want isn't available.

3. If you do call FldSetAttributes, then you _must_ call 
FldGetAttributes first, change the flags, then immediately call 
FldSetAttributes _without_ calling any other field object routines in 
the middle. Calls to Fld routines can change the value of the 
field attributes, which would make the copy that you loaded with the 
FldGetAttributes call invalid.

At 12:00am -0700 00-08-05, Palm Developer Forum digest wrote:
>Subject: RE: Field.c line 132
>From: Oliver King-Smith <[EMAIL PROTECTED]>
>Date: Fri, 04 Aug 2000 20:30:21 -0700
>X-Message-Number: 76
>
>John,
>
>When I try to do that I am still getting the same error.  I found the bug
>you were talking about with the FldFreeMemory, so all calls to that
>function are bracketed with a FldSetSelection( pField, 0, 0 ).  This call
>fails on my system, unless the field is read only, in which case the call
>to FldSetAttributes fails (to make the field usable before changing the
>contents).  I am wondering if this is the debug rom under the simulator
>that is reporting a bogus error.  It sure paints the screen strange colors.
>   If my program really looked like that on a Palm IIIc I think I would feel
>a little queasy.

The Simulator uses a debug color palette to make it more obvious when 
your app has drawing errors.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Insertion point error in an alert

2000-08-04 Thread Ken Krugler

>>Gremlins uncovered that in a particular alert in my application, tapping
>>on the text of the message on a 3.5 debug ROM produces a "Invalid
>>insertion point position" fatal error.  No error occurs on release
>>ROMs.  This alert is relatively long (taking up about 2/3 of the
>>screen), but this is not the cause of the error as other longer alerts
>>have no problems.  A single substitution is made using FrmCustomAlert;
>>the error occurs regardless of the length of the parameter text.  What
>>could I be doing to cause this?  Is it simply a case of the debug ROM
>>being too paranoid and checking the insertion point of a non-editable
>>field?

>Ken Krugler wrote:
>  > It would be great if you could send me the app, with a reproducible
>  > test case. We've run into (and fixed) other problems with alerts and
>  > long messages, but this is a new one to me.
>  >
>  > Another option, if you're handy with the debugger, is to dump out the
>  > contents of the field being checked, as well as a stack crawl. That
>  > might provide enough information to find the source of the problem.
>  >
>
>I'm not handy enough with the debugger to figure out what's going on
>deep within FrmCustomAlert.  I've attached the app;

Thanks for the app & debugging steps. The problem is that your alert 
message has a linefeed at the very end. The trailing linefeed is 
skipped when calculating the height of the message text, which is 
then used to resize the text field box in the alert. Unfortunately 
the insertion point is at the end of the text, so when you tap on the 
text, the field code correctly complains that the insertion point 
visible flag is set the field attributes, but the insertion point is 
on line 7 (the eighth line, since line counts are zero-based) which 
isn't visible, being below the bottom of the text field bounding 
rectangle.

So the fix for you is to remove any trailing linefeeds from your 
alert messages. The fix for Palm OS is to trim off trailing linefeeds 
before creating the text field used in alerts. I'll put that on the 
list for future fixes.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Using OS 3.5 calls...

2000-08-04 Thread Ken Krugler

At 12:00am -0700 00-08-04, Palm Developer Forum digest wrote:
>Subject: Re: Using OS 3.5 calls...
>From: Steve Sabram <[EMAIL PROTECTED]>
>Date: Thu, 03 Aug 2000 23:11:57 -0700
>X-Message-Number: 122
>
>This is the problem with backwards compatibility.  We take it a 
>policy here to support all the way back to 3.0.  One programatic
>technique is to check for the OS version or libraries that are 
>there.  You can pop up a message saying they need these libraries or
>to upgrade their OS.  Considering the market, expect a lot of "How 
>do I upgrade tech support?" calls.  Jeff Hawkins at the launch of
>Visor stated that only 5% of the user base has upgraded their 
>Flashable Palm devices.  Then there are the units with masked ROMs
>which can be upgraded but only with a memory patch if it is made available.
>
>One concession is to compartmentalize your 3.5 API calls and disable 
>the functionality if running on an older device.  You could
>even have an error message saying "To use the feature, please 
>upgrade you Palm device to OS version X.X.  Check www.palm.com for
>upgrade details."  The last can save you a lot of support calls. 
>Another technique is to put an 3.5 OS call functionality into your
>app for older devices.  But then, that is a bit self-defeating.

Sometimes backwards compatible routines are provided in 
PalmOSGlue.lib. Examples include all of the Text Mgr routines. If you 
need to run on 3.0 devices, then you can call these TxtGlue 
functions and they'll either wind up jumping to the real routines in 
ROM, or provide reasonable approximations of correct behavior on 
older devices.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Bitmap not displaying on Graphic Button

2000-08-04 Thread Ken Krugler

At 12:00am -0700 00-08-04, Palm Developer Forum digest wrote:
>Subject: Bitmap not displaying on Graphic Button
>From: "Timothy Astle" <[EMAIL PROTECTED]>
>Date: Thu, 3 Aug 2000 17:00:13 -0300
>X-Message-Number: 69
>
>I'm getting the Euro symbol displaying on my button instead of the graphic
>I've set up.  I see the graphic in constructor, but not when I run the app.
>
>Don't get me wrong, I have nothing against the Euro... I just don't want it
>on my graphic button :-)

This could be another case of "is it a numeric space or a euro"? The 
Euro character was substituted for the numeric space glyph at 
position 0x80, starting with Palm OS 3.3.

What this means is that Constructor might still have older fonts with 
the numeric space at this location, so it looks OK when you're 
editing the UI, but at run-time you'll see the Euro. Try running your 
app with a 3.1 ROM, and see what happens.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Clipper mini-font

2000-08-04 Thread Ken Krugler

At 12:00am -0700 00-08-04, Palm Developer Forum digest wrote:
>Subject: Clipper mini-font
>From: Bob Whiteman <[EMAIL PROTECTED]>
>Date: Thu, 3 Aug 2000 11:49:29 -0700
>X-Message-Number: 57
>
>The clipper appliation that's in the ROM for Palm VII devices apparently has
>a special mini font used for some data displayed by .pqa files. Is this a
>built-in font on the Palm VII? If so, is it available on other ROMs as well?
>
>-Bob Whiteman


At 12:00am -0700 00-08-04, Palm Developer Forum digest wrote:
>Subject: Re: Clipper mini-font
>From: Tom Zerucha <[EMAIL PROTECTED]>
>Date: Thu, 3 Aug 2000 16:17:54 -0400
>X-Message-Number: 73
>
>On Thu, Aug 03, 2000 at 11:49:29AM -0700, Bob Whiteman wrote:
>  > The clipper appliation that's in the ROM for Palm VII devices 
>apparently has
>  > a special mini font used for some data displayed by .pqa files. Is this a
>  > built-in font on the Palm VII? If so, is it available on other 
>ROMs as well?
>
>It is in the Clipper resource database.  You would have to open
>clipper (as resource DB) to access that font.

Note that if you're going to reach into the Clipper app to grab the 
fonts at run-time, this won't work in future versions of the OS, 
where the fonts are now in a different PRC. Also, on non-Latin 
devices the font IDs could be different.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Display problems in mail app sample

2000-08-04 Thread Ken Krugler

At 12:00am -0700 00-08-04, Palm Developer Forum digest wrote:
>Subject: Display problems in mail app sample
>From: "H Lee" <[EMAIL PROTECTED]>
>Date: Fri, 04 Aug 2000 05:16:33 -
>X-Message-Number: 116
>
>I compiled the mail app obtained from Palm OS 3.5 SDK examples and
>ran it on the emulator (using PalmV image ROM).
>
>In the list view, I notice that a square box is displayed instead of
>the ellipsis (...) (at the end of truncated string). Why ?
>
>However, when I downloaded the app to a PalmIIIc, ellipsis (...) is
>displayed. It works on PalmIIIc but not PalmV.

This is because the Latin version of the 3.1 ROMs (used on a Palm V) 
had a bug in WinDrawChar(), which is used by WinDrawTruncChars, which 
is what the Mail app uses to draw truncated strings. The Shift-JIS 
(Japanese) version of the 3.1 ROMs is OK.

The fix to the Mail app should be to call WinGlueDrawTruncChars 
(found in PalmOSGlue.lib) instead of WinDrawTruncChars, but currently 
the glue code still calls WinDrawTruncChars on 3.1 devices. Thanks 
for the reminder - I'll update the code to fix this problem for Latin 
3.1.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Insertion point error in an alert

2000-08-04 Thread Ken Krugler

At 12:00am -0700 00-08-04, Palm Developer Forum digest wrote:
>Subject: Insertion point error in an alert
>From: Ben Darnell <[EMAIL PROTECTED]>
>Date: Fri, 04 Aug 2000 02:33:10 -0400
>X-Message-Number: 124
>
>Gremlins uncovered that in a particular alert in my application, tapping
>on the text of the message on a 3.5 debug ROM produces a "Invalid
>insertion point position" fatal error.  No error occurs on release
>ROMs.  This alert is relatively long (taking up about 2/3 of the
>screen), but this is not the cause of the error as other longer alerts
>have no problems.  A single substitution is made using FrmCustomAlert;
>the error occurs regardless of the length of the parameter text.  What
>could I be doing to cause this?  Is it simply a case of the debug ROM
>being too paranoid and checking the insertion point of a non-editable
>field?

It would be great if you could send me the app, with a reproducible 
test case. We've run into (and fixed) other problems with alerts and 
long messages, but this is a new one to me.

Another option, if you're handy with the debugger, is to dump out the 
contents of the field being checked, as well as a stack crawl. That 
might provide enough information to find the source of the problem.

Thanks,

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Changing "Application Icon Name"

2000-08-02 Thread Ken Krugler

At 12:00am -0700 00-08-02, Palm Developer Forum digest wrote:
>Subject: Changing "Application Icon Name"
>From: Stringer <[EMAIL PROTECTED]>
>Date: Tue, 01 Aug 2000 11:14:17 -0400
>X-Message-Number: 95
>
>Is there any way programmatically to change the "Application Icon Name"
>that one sets in the Constructor.
>
>It seems like it should be very possible, but I don't see anything in the
>documentation!
>
>I'm looking for something that works under OS 3.0 and more recent.

You can grab the tAIN=1000 resource and modify it, but...

1. As with any modification of an app, you should be prepared for it 
to fail, because the app might be in flashable ROM.

2. In the future, the app might be running as a copy in the storage 
heap (dynamically loaded from "someplace else"), and thus your name 
change won't stick.

3. If somebody has created an overlay for you app, then depending on 
how you determine the resource file to modify, you might wind up 
modifying the name in the overlay or the name in the base (your app), 
but not in both places.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: C++ or C

2000-08-02 Thread Yu, Ken

A conduit is a module that performs the synchronization logic between the
desktop and the Palm.  It is usually a .dll executed by the HotSync manager.
A conduit runs on the desktop (not on the Palm).   HotSync Conduits can be
developed in VC++ or in Java.

Using the full release of CodeWarrior (not lite), you can develop Palm
applications in C++.


-Ken

> --
> From: Dean Salman[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, August 02, 2000 8:45 AM
> To:   Palm Developer Forum
> Subject:  Re: C++ or C
> 
> Please explain conduit using VC++
> 
> 
> "Richard Burmeister" <[EMAIL PROTECTED]> wrote in message
> news:19453@palm-dev-forum...
> >
> > From: "Dean Salman" <[EMAIL PROTECTED]>
> > Subject: C++ or C
> >
> >
> > > I am seeing questions using C++.  I am using the Code Warrior Lite
> > > 6.0 and C.  How can C++ be used with Code Warrior, and can I
> > > use MS Visual C++ to create the Palm program.
> >
> > 1. CW Lite doesn't support C++.  You need to buy the full CodeWarrior
> for
> > Palm to use C++.
> > 2. VC++ does not compile Palm apps.  However, you can use VC++ to create
> a
> > conduit.
> >
> >
> >
> >
> 
> 
> 
> 
> -- 
> 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: Bad Developer Survey format

2000-08-01 Thread Yu, Ken

I never got a survey.  Palm does not love me :(

-Ken


> --
> From: Tom Zerucha[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Tuesday, August 01, 2000 1:54 AM
> To:   Palm Developer Forum
> Subject:  Bad Developer Survey format
> 
> I just got the current email newsletter and it mentioned the survey I
> got a few days ago.  Note there was a place to send the survey back,
> but nowhere to tell them that the survey was in a bad format.
> 

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



Re: compiler handling word alignment

2000-08-01 Thread Ken Krugler

At 12:00am -0700 00-07-29, Palm Developer Forum digest wrote:
>Richard Anderson <[EMAIL PROTECTED]> wrote:
>
>  > Anyone know why sometimes the compiler gives the error
>
>*Which* compiler?
>
>  > PS - The compiler also does not handle even word alligment 
>correctly - ie if
>  > you point a UInt 16 * at an odd address and read it you get a bus error. Im
>  > sure that the complier should handle this !!!
>
>I'm sure that it should not. When I create a pointer to something, then
>dereference that pointer, the compiler had better not change the value
>of the pointer behind my back!
>
>Pointers in C are like a high-powered rifle: very useful in the hands
>of a skilled marksman, but not too smart about what they're pointed at.

Just to clarify, the 68K core used by all current Palm devices does 
not handle word (or long) accesses to odd addresses. I've never seen 
a compiler that would automagically generate code to check whether an 
address is odd or even before attempting word/long accesses, and 
inject byte-access code for you.

What compilers have you used in the past that would do this sort of 
thing, and what were the target CPUs?

-- Ken

PS - Note that when you use the Simulator on a Mac, it does _not_ 
cause a system error when reading words/longs at odd addresses, since 
the Mac OS 68K emulator is pretending to be a 68020, which can handle 
odd address accesses. That is, unless you're a masochist and happen 
to be using the Simulator on an ancient Mac with the original 68K 
processor. Poser, on the other hand, will catch this type of run-time 
error.

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: How to modify a program during execution...

2000-08-01 Thread Ken Krugler

At 12:00am -0700 00-07-29, Palm Developer Forum digest wrote:
>Subject: How to modify a program during execution...
>From: DIAMOND JEFF <[EMAIL PROTECTED]>
>Date: Fri, 28 Jul 2000 12:25:07 -0400
>X-Message-Number: 40
>
>I desire to modify data within the actual code of a program while it is
>executing.
>
>I have two questions:
>
>(1) Will this generate an access violation?
>(2) Will the change persist, i.e., in the PalmOS, is code being executed
>in place or is it copied before being executed?

In general, having an app modify itself can cause problems. For 
example, if a user flashes your app into ROM, then your code will 
fail.

Also, there could be situations in future versions of the Palm OS 
where an application _does_ get temporarily copied into memory before 
it's executed, and thus your changes won't "stick".

So my question would be why you need to have a self-modifying app?

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: new subject line:) 'Inconsistent behavior with Database Opera tions...."

2000-08-01 Thread Yu, Ken

Is the value of recindex valid for all your databases?

You should also use DmGetLastErr() to check for errors after calling
DmQueryRecord().

-Ken


> --
> From: Frank Ableson[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Monday, July 31, 2000 10:16 PM
> To:   Palm Developer Forum
> Subject:  new subject line:) 'Inconsistent behavior with Database
> Operations"
> 
> Can anyone offer some insight to the problem outlined below.
> 
> Thank you.
> 
> Frank
> 
> 
> W.F. Ableson <[EMAIL PROTECTED]> wrote in message
> news:19178@palm-dev-forum...
> >
> >
> > VoidHand dataH;
> > BytePtr dataP;
> >
> > dataH = DmQueryRecord(mydbref,recindex);
> >
> > // I get a valid (?) VoidHand, which I then use to lock down that
> record.
> I

> > just want to read the record...
> >
> > dataP = (BytePtr) MemHandleLock(dataH);
> >
> > this line works for some databases and causes a fatal exception for
> others??
> > Any insights?
> >
> > Also, any other function which required the dataH causes the same
> problem:
> > MemHandleSize, MemHandleFlags, etc.
> >
> > Thanks,
> >
> > Frank
> >
> >
> >
> > W.F. Ableson
> > [EMAIL PROTECTED]
> > http://www.cfgsolutions.com
> >
> >
> >
> >
> 
> 
> 
> -- 
> 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: Executing apps upon install

2000-07-27 Thread Yu, Ken

sysAppLaunchCmdSyncNotify


> --
> From: Brian Pearson[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Thursday, July 27, 2000 2:38 PM
> To:   Palm Developer Forum
> Subject:  Executing apps upon install
> 
> I need to have my app execute some code immediately after it is installed.
> I've got reason to believe that all apps are run with a certain launch
> code
> right after they are installed.  So, what i need to know is, what is the
> launch code that is given to newly installed apps?
> 
> 

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



High speed animation

2000-07-26 Thread Yu, Ken


Can anyone share any techniques on how to produce high speed
animation?  I've experimented with creating an offscreen buffer and copying
it to the display using WinCopyRectangle().  Even at the fastest possible
iterations through the event loop, the performance does not seem to compare
with some of the games out there.  Any hints or tips?

Thanks,
    -Ken


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



Re: Algorithm or format of the compressed bitmap

2000-07-25 Thread Ken Krugler

I wrote an article about this a while back. You can still get the 
code for compressing bitmaps at <ftp://ftp.transpac.com/bitmaps/>

-- Ken

At 12:00am -0700 00-07-24, Palm Developer Forum digest wrote:
>Subject: Re: Algorithm or format of the compressed bitmap
>From: "Kijang Jung" <[EMAIL PROTECTED]>
>Date: Sun, 23 Jul 2000 21:44:03 -0400
>X-Message-Number: 23
>
>I have to implement the scan line compression on "Windows" platform to
>create a PRC file which, in turn, will be decompressed and displayed on Palm
>platform.
>
>I'm familiar with RLE, but I have no idea on  the 'scan line compression'. I
>code-dumped a compressed bitmap, but I couldn't decode it at all.
>Do you happen to know what the scan line compression is?

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Reg Codes and Japanese OS

2000-07-25 Thread Ken Krugler

At 12:00am -0700 00-07-25, Palm Developer Forum digest wrote:
>Subject: Reg Codes and Japanese OS
>From: "Michael S. Davis" <[EMAIL PROTECTED]>
>Date: Mon, 24 Jul 2000 10:02:50 -0700 (PDT)
>X-Message-Number: 25
>
>
>I have been using a variant of the Reg Code scheme to generate keys for
>registration.  I have only recently come up against a problem.  For some
>reason the keys are not working on the Japanese version of the OS.  I
>know there is a difference in the character size for US and Japanese
>versions but I don't understand why, after a year, this is now a
>problem.
>
>My scheme basically just does some arithmetic operations and shifting
>and logic operations on characters of type char.  What specific changes
>should I make so that such code works with Japanese characters also?

As long as your code correctly handles bytes in the range from 0x20 
to 0xFC then it should work fine with Japanese (Shift-JIS) as well. 
If I was going to hazard a guess, it would be that the algorithm has 
a problem with sign-extension, such that English user names with 
characters in the high-ASCII range would also fail.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Help writing Japanese apps

2000-07-22 Thread Ken Krugler

Hi Chris,

At 12:00am -0700 00-07-22, Palm Developer Forum digest wrote:
>Subject: Re: Help writing Japanese apps
>From: "Chris Percival" <[EMAIL PROTECTED]>
>Date: Fri, 21 Jul 2000 13:33:26 +0100
>X-Message-Number: 10
>
>Hi John / everyone,
>
>On similar lines, how does one use any other kind of font than the standard
>ones?  I would like to use a fixed width font, but couldn't find any
>infomation on how to do this.  I read somthing about a 'special' kind of
>file that you can make, and then 'add' to the resource?

Ultimately you need to have a resource in your app that contains font 
data in the appropriate Palm OS format. You then lock down this 
resource and pass it to FntDefineFont, using a font id >= 
fntAppFontCustomBase.

Getting a custom resource such as this into your PRC is a separate 
topic, one that has been beaten to death on this list. Various 
techniques exist, depending on your platform/development environment. 
For example, on a Mac I'd use ResEdit to create a Mac OS resource 
file with the data, then add that to my CodeWarrior project file. I 
could also create a Rez-format text file (xxx.r).

Creating the correct font data is yet another topic, one which has 
also been discussed ad nauseam on this list. In a nutshell the format 
is virtually the same as the Mac 'FONT' resource format, but each 
character glyph's width has to be equal to the actual character 
width, including any trailing white space.

Perhaps it's time for a KnowledgeBase article that answers this 
specific question.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Help writing Japanese apps

2000-07-21 Thread Ken Krugler

At 12:00am -0700 00-07-21, Palm Developer Forum digest wrote:
>Subject: Help writing Japanese apps
>From: "John Duhart" <[EMAIL PROTECTED]>
>Date: Thu, 20 Jul 2000 11:46:18 -0400
>X-Message-Number: 47
>
>Hello,
>
>   I am trying to write an app that will support Japanese text.  How =
>to I enter Japanese text into a form using the CW Constructor?  Is there =
>any documentation explaining this.  My version of CWR6 Constructor is =
>missing its help file.

I'm assuming that you want to edit UI text such as a menu, form 
title, etc. so that it contains Japanese text. In that case, the 
first thing you need to do is select the appropriate character 
encoding. In the Project Settings pane, select "Palm OS for Japan" 
for the Palm OS Target setting.

After that, assuming your desktop supports Japanese text entry, you 
should be able to enter Japanese and see it displayed properly in 
Constructor. At least it works for me, using Constructor 1.2 on Mac 
OS 8.6 with the Japanese Language Kit.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: Err Getting Rec - why?

2000-07-20 Thread Yu, Ken

Tim,

Perhaps you meant to pass 'i' and not 'index' to DmReleaseRecord()?

>   DmReleaseRecord(gFpurDB, index, true);
> 
Your code will only release the record of 'index' that is passed to foo()

-Ken

> --
> From: Tim Astle[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Thursday, July 20, 2000 9:22 AM
> To:   Palm Developer Forum
> Subject:  Err Getting Rec - why?
> 
> Hey guys, what could be causing this error?  I'm using Palm OS 3.3 and the
> error is 5424: Err Getting Rec.  Normally it's because of a busy record
> when
> the DmGetRecord is called, but I don't see how this is possible.
> 
> This is the function that causes it:
> 
> 
> void foo(UInt index)
> {
>  tblFpur theFpur;
>  tblPackedFpurPtr p;
>  VoidHand record;
>  UInt numRec;
>  Int i;
> 
>  // Get a count of the matching records
>  numRec = CountFpurRecord(index);
> 
>  // Do a sort
>  DmInsertionSort(gFpurDB, (DmComparF *)ComparePackedFpurRecord,
> index);
> 
>  // Knock the top record off repetitively until satisfied
>  for(i = 0; i < numRec; i++)
>   DmRemoveRecord(gFpurDB, 0);
> 
>  // Get a count of all the records in the database
>  numRec = DmNumRecords(gFpurDB);
> 
>  for(i = 0; i < numRec; i++)
>  {
>   record = DmGetRecord(gFpurDB, i);
>   p = MemHandleLock(record);
>   UnpackFpur(&theFpur, p);
> 
>   // If the records deleted were under this record, drop it's ID
> by
> one
>   if(theFpur.ID > index)
>   {
>theFpur.ID -= 1;
>PackFpur(&theFpur, record);
>   }
> 
>   MemHandleUnlock(record);
>   DmReleaseRecord(gFpurDB, index, true);
>  }
> }
> 
> Thanks in advance!
> 
> +
> Timothy D. Astle
> Embedded Systems Programmer
> ALT Group Inc.
> +
> 
> People on Jolt cola write the funniest things.
> 
>  A-10 Obedience Guide,
>  Kitty Hawk Studios
> 
> 
> 
> -- 
> 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: Using OS 3.5 calls...

2000-07-20 Thread Ken Krugler

At 12:00am -0700 00-07-20, Palm Developer Forum digest wrote:
>Subject: Re: Using OS 3.5 calls...
>From: "Gordon, Douglas" <[EMAIL PROTECTED]>
>Date: Wed, 19 Jul 2000 08:42:19 -0400
>X-Message-Number: 20
>
>  >OS 3.5 has some very nice features I could take advantage of.  But if I
>  >use it more than trivially, I'd have to write a substantially different
>  >version of my code to work on < 3.5 devices.  And once I finished this,
>  >I'd have accomplished the same thing without using 3.5.

Note that there are some routines Palm _really_ wants you to use, no 
matter what version of Palm OS you're running under - for example, 
the Text Manager routines. In those cases the PalmOSGlue.lib library 
contains glue routines that either call through to the new routine 
(if it exists), or execute code to do the right thing based on the 
older OS version.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: keyboard & graffiti

2000-07-19 Thread Ken Krugler

>From: Mostapha BOUTERFASS [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 18, 2000 8:17 AM
>To: Palm Developer Forum
>Subject: keyboard & graffit
>
>
>can you tell me where can i find a definition of keyboard ressource

I don't think the tkbd resource is currently documented. Sorry. Most 
people wind up patching out the keyboard routines and drawing 
alternative keyboards themselves.

>and how to change a strok for one gliph ??

If I understand your question correctly, you want to modify the 
Graffiti dictionary so that the definition of one of the strokes is 
different. There's no documented way to do that either.

-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: records

2000-07-19 Thread Yu, Ken

Do you have less than 2 records in your database when running this code?
index = 2 may not be a valid index since it will be reassigned if you have
less than 2 recs.

-Ken

> --
> From:
> [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, July 19, 2000 9:03 AM
> To:   Palm Developer Forum
> Subject:  Re: records
> 
> for example,if I insert a record in a database,
> 
>  UInt   regIndex=2; 
> regHandle=DmNewRecord(dbp,®Index,sizeof(Entrada));
> if (regHandle)
> {
> e.registro=registro;
> e.Hc=Hc;
> e.Tip=Tip;
> entrada=MemHandleLock(regHandle);
> DmWrite(entrada,0,&e,sizeof(e));
> }
> 
> when I want to get the record at index 2 can I use this ?
> UInt regIndex=2;
> VoidHandreg=DmQueryRecord(dbp,regIndex);  --> I get a fatal 
> exception here
> Entrada *e=MemHandleLock(reg);
> 
> -- 
> 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: PDB Export Utilities for PC

2000-07-18 Thread Yu, Ken

The creation time is a 32-bit value. Have you taken account the word
ordering difference between Palm and Intel machines? (That's if you are
using a PC)

-Ken

> --
> From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Tuesday, July 18, 2000 3:36 AM
> To:   Palm Developer Forum
> Subject:  Re: PDB Export Utilities for PC
> 
> I've tried to reverse engineer the PDB format with some small degree of
> success, I just can't seem to read the creation date field right. One
> thing I know for sure is that it is not zero-based on 1/1/1904 midnight.
> 

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



RE: Beginner programming questions

2000-07-17 Thread Yu, Ken

I say it's flexible because since it is a C compiler, you are only limited
by your coding ability as opposed to tools that provide an IDE where you may
get stuck by the tool's limitatiions.  The callback hack is fixed in
PRC-Tools 2.0.

-Ken

> --
> From: Bryan Batchelder[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Monday, July 17, 2000 2:54 PM
> To:   Palm Developer Forum
> Subject:  Re: Beginner programming questions
> 
> How is it more flexible?  Do you still have to use the lame callback hack,
> or has that been fixed?
> 
> --b
> 
> "Yu, Ken" <[EMAIL PROTECTED]> wrote in message news:17600@palm-dev-forum...
> >
> > I would go with GCC.  It is the most flexible and the price is right
> (free).
> > You'll also gain knowledge in C programming which is usable on other
> > platforms.
> >
> > -Ken
> >
> > > --
> 

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



RE: Beginner programming questions

2000-07-17 Thread Yu, Ken

I would go with GCC.  It is the most flexible and the price is right (free).
You'll also gain knowledge in C programming which is usable on other
platforms.

-Ken

> --
> From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Monday, July 17, 2000 2:45 PM
> To:   Palm Developer Forum
> Subject:  Beginner programming questions
> 
> My questions:  Any advise on the best (quickest, 
> cheapest) way to get into programming?  What are the 
> advantages/disadvantages (limitations) of the various 
> options?
> 
> Thanks in advance for any help,
> 
> Jeff
> 
> -- 
> 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: DmDeleteRecord(..) vs. DmRemoveRecord(..) Info needed please

2000-07-17 Thread Yu, Ken

Tim,

DmRemoveRecord() removes the entire from memory while DmDeleteRecord()
removes just the data but leaves behind the record header.  It is possible
that your table redraw routine accesses deleted records (because the header
is still available) and tries to use data that is no longer valid causing
your error.

-Ken

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



Re: Qur'an Arabic eBook port to PalmOS & related MISC

2000-07-15 Thread Ken Krugler

At 12:00am -0700 00-07-15, Palm Developer Forum digest wrote:
>Subject: Qur'an Arabic eBook port to PalmOS & related MISC.
>From: "Akil Fahd" <[EMAIL PROTECTED]>
>Date: Fri, 14 Jul 2000 08:42:47 EDT
>X-Message-Number: 12
>
>I'am trying to create a bilingual and bi-directional (Arabic and English
>Qur'an)e-Book, that will be compliant with the Open eBook OEB specification.
>   This is targeted at the PalmOS, but should be renderable in XML and/or
>XHTML compliant browsers such IE 5.0 and Netscape 6.0 or any type of Open
>eBook reader.
>
>I already have the HTML files entire of the Qur'an in Arabic and English -
>though I will have them proof read many times before I distribute the
>completed eBook.
>
>The Arabic pages are coded using the win-1256 (Arabic) codepage in the
>following manner:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>These pages show up fine (correct font and directionality) when using the IE
>5.0 browser, however when I convert them to the PalmOS, the right to left
>directionality is lost.
>
>In order to convert the HTML pages to the OEB eBook format I'm using the
>MobiPocket Publisher (home page
>http://www.mobipocket.com/en/HomePage/default.asp)that creates a prc file
>from the HTML files.
>
>In order to test the conversion to the PalmOS, I'm using the PalmOS Emulator
>(running a 3.5 Palm OS IIIc rom) with the APOS 2.0 (home page
>http://www.arabicpalm.com/) and Mobipocket Reader software installed.
>
>The above setup is being tested on Windows 98 (Arabic Enabled Edition) and
>Windows 2000 PCs.
>
>The prc files created using this method, display the Arabic font on the the
>emulator's Palm IIIc screen (when using the MobiPocket reader), however the
>correct direction is not enforced.
>
>Please note that Arabic and English text are coded with separate html files.
>
>My questions are as follows
>
>How can I force the correct directionality in the created prc file?

Note that the Palm OS doesn't currently support right-to-left writing 
systems. Thus APOS installs patches to field object routines to 
enable proper editing and display of Arabic text. My guess is that 
the MobiPocket Publisher does its own text layout, thus circumventing 
the field object patches.

You'd need to contact the author(s) of MobiPocket Publisher to figure 
out if there's a solution.

>How can I convert from cp 1256 to unicode, without doing it character by
>character? Is there software that will do this?

This is more a question for the Unicode mailing list, versus this 
list, but I believe that there are utilities built on top of the ICU 
open-source classes that can do this type of conversion.

>Dose the eBook Spec. allow for the nesting of a right to left languages
>(Arabic) inside of a left to right language (English) on the same page?

I don't think this is an eBook specification issue. I believe that 
this requires the MobiPocket Publisher software to correctly 
implement the Unicode BiDi (bi-directional) algorithm when it renders 
text.

>Does anyone know if APOS is unicode compliant?

I'd have to guess no - they probably support 1256 as their base 
character encoding. It would be up to MobiPocket Publisher to handle 
conversion from Unicode (what XML uses) into the device's character 
set.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: millisecond delay

2000-07-14 Thread Ken Krugler

Petrus,

I've got no input on whether or not you really need a 
higher-resolution timer, but there's code to do what you want at 
<ftp://ftp.transpac.com/timer>

-- Ken

>But let me put the question in another form:
>Is there a way to read the time/tick count/other with accuracy of about 1ms?
>
>This could be a timer with high resolution (I don't know any such timer on
>palm devices), or some kind of clock cycle counter.
>
>What I need is a way to, more accurate than the clock ticks at 10ms,
>estimate short time periods.
>And a ISR delaying a couple of microseconds wont matter.

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: Doc bug on FldSetTextPtr

2000-07-13 Thread Ken Krugler

Ben,

Thanks for the bug report...

At 12:00am -0700 00-07-13, Palm Developer Forum digest wrote:
>Subject: Doc bug on FldSetTextPtr
>From: "Ben Combee" <[EMAIL PROTECTED]>
>Date: Wed, 12 Jul 2000 14:08:11 -0400
>X-Message-Number: 59
>
>The 3.5 SDK docs for FldSetTextPtr indicate that you should call
>
> FldSetTextPtr(fld, NULL)
>
>before deleting the contents of the field.  However, this causes an emulator
>crash (at least in the 3.2 debug ROM) due to FldSetTextPtr calling StrLen on
>the passed-in string pointer.  Is this usage supposed to be supported, or
>were the docs wrong?

It's not clear who's at fault here, since the code _should_ handle 
being passed a NULL pointer. But passing NULL does indeed trigger the 
problem you report, so what the documentation should say is to call 
FldSetTextHandle(fldP, NULL). This sets the field text pointer to 
NULL in a safe manner.

I'll pass this note along to the documentation group.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: Problem Sync'ing Address Book (disk full?)

2000-07-13 Thread Yu, Ken

Could be write permission problem.

> --
> From:
> [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, July 12, 2000 7:38 PM
> To:   Palm Developer Forum
> Subject:  Problem Sync'ing Address Book (disk full?)
> 
> 
> 
> Hi All,
> 
> I am getting a disk full message from the HotSync:
> 
> -- Address Book
>- Could not save the Desktop file.
>  Your disk on your PC may be full.  Check the disk space and perform a
> HotSync
> 
> I have about 10GB of PC space.  Can someone please tell me what is the
> problem.
> Thanks.
> 
> 
> 
> -Elizabeth
> 
> 
> 
> -- 
> 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: StrIToA

2000-07-12 Thread Ken Krugler

At 12:00am -0700 00-07-12, Palm Developer Forum digest wrote:
>Subject: RE: StrIToA
>From: "McMicken, Steven" <[EMAIL PROTECTED]>
>Date: Tue, 11 Jul 2000 15:15:51 -0400
>X-Message-Number: 75
>
>PalmTypes.h defines Char as type char so there is no difference in their
>use.  For localization, I believe you should use type WChar, which is
>defined as UInt16 (or unsigned short).

Actually strings are still sequences of bytes, even when the device's 
character encoding is Shift-JIS (Japanese). You'd declare a string 
variable as:

Char myString[kMaxStringLength+1];

The WChar type is useful for those less-common situations where you 
need to process individual characters. For example, to snag every 
character from a string, one at a time, you'd do something like:

const Char* tempP = myString;
do {
WChar curChar;
tempP += TxtGetNextChar(tempP, 0, &curChar);
// do something with curChar
} while (curChar != chrNull);

Also note that the keydown event contains a WChar, not a Char, so if 
you need to pass that around in your program, use WChar function 
parameters so that you don't wind up stripping the high byte of the 
character code.

Finally, proper use of the WChar type and the Text Mgr routines is 
good Palm programming, not just "for localization". The goal is for 
all software to run properly on all devices, regardless of the 
device's character set. There are rare cases where you have to code 
specifically for ASCII/Latin, but those are few and far between.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: dateTableItem internationalization

2000-07-12 Thread Ken Krugler

At 12:00am -0700 00-07-09, Palm Developer Forum digest wrote:
>Subject: dateTableItem internationalization
>From: "Michael P. Hutchens, M.D., M.A." <[EMAIL PROTECTED]>
>Date: Sat, 8 Jul 2000 17:23:43 -0700
>X-Message-Number: 9
>
>I've got what I think is an interesting question I need a bit of help
>with.  I have a table with a column set to:
>
>   TblSetItemStyle(table, i, 1, dateTableItem);
>
>To display the date type in the column, I do the following -- based
>on example code I got from Rhodes & McKeehan :
>
>   TblSetItemInt(table, row, 1,DateToInt(date));
>
>This displays the date in the table in MM/DD, which is fine for
>Americans who drive on the correct side of the road and read dates
>the right way, but my British customers are understandably upset at
>the inconsistency in my program (which correctly [from their
>perspective] displays dates elsewhere).  Is there any way to get the
>table to do the right thing magically?  Or do I have to make my own
>table style and do it myself?

Thanks for the interesting question. You're correct that the table 
code currently always draws dates using the MM/DD format, regardless 

of the device's locale. This is a short-coming that I'll look at 
fixing up in the future.

For now, your only solution is to make it a customTableItem, and do 
the right thing in your call-back procedure. The ToDo app handles it 
this way.

Note that the table date drawing code also appends a '!' for dates 
before or equal to the current date.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: Questions (Emulated program counters)

2000-07-11 Thread Yu, Ken

You can test on different OS's by loading the respective ROMs into the
emulator.

The purpose of the gremlins is to report any abnormal behavior in running
your program and shouldn't be ignored.

The error you are seeing can occur if you exceed the bounds of memory you
allocated. (eg setting the form title to a string  longer than what you have
designated in your resource).

Find out which event number is triggering the error and rerun the gremlin up
to a few events before the error and then step it through until the error
occurs.  This will give you an idea of where it is failing.  Also, examine
the log files for more details on the sequence of events that caused the
error.

-Ken

> --
> From: Andrew Lathrop[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Tuesday, July 11, 2000 3:14 PM
> To:   Palm Developer Forum
> Subject:  Questions (Emulated program counters)
> 
> I have a few questions.  How do i test my program under different OS's?
> Also, is it possible to have the Gremlins simply not an error and then
> keep
> running?  They give me an error about trying to change the emulated
> program
> counter to an invalid adress that isn't in either the RAM or the ROM.  I
> can't duplicate the same error on my Palm, and i have no idea what is
> causing it.  I need to see if there are any other problems and Gremlins
> stopping wont let me do that. Any help isgreatly appreciated,
> Thanks
> Andrew
> 
> 
> 
> -- 
> 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: Big problem with fields

2000-07-11 Thread Yu, Ken

Can you give a more detailed description of your 'solution'?  Maybe we can
help you find the real cause of the problem so that you can avoid this
kludge.  You may have gotten your program to work but you may also be hiding
a potential larger problem.

-Ken

> --
> From: Pierre Baux[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Tuesday, July 11, 2000 10:32 AM
> To:   Palm Developer Forum
> Subject:  Re: Big problem with fields
> 
> I managed to solve the problem, I don't know why but I had to declare the
> string twice as long as it actually is to make it work.
> Now everything's all right and a new palm application will be released
> very
> soon
> Thanx everybody
> Pierre Baux
> <[EMAIL PROTECTED]> a ecrit dans le message :
> [EMAIL PROTECTED]
> >
> > what is the maximun lenght of the field??
> >
> >
> >
> 
> 
> 
> -- 
> 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: Suggestions Please

2000-07-10 Thread Yu, Ken

I've done something similar.  I've assigned a hidden category to my records
to indicate if they are viewable/nonviewable and then retrieve the viewable
records using functions like DmQueryNextInCategory() to populate the table.

-Ken

> --
> From: Tim Astle[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Monday, July 10, 2000 9:59 AM
> To:   Palm Developer Forum
> Subject:  Suggestions Please
> 
> I have a table that I only want certain records to be viewable.  Currently
> I
> have a sort set up to place the files I want at the top of the table.  I
> figured if I could count the number of "matches" in my sort, I could use
> that somehow to only display the first X records on the table.  I tried
> different ways, but still didn't get any luck.
> 
> Has anyone ever done anything like this before?  Keep in mind I've based
> my
> tables from the O'Reilly book.  If you need to see some of my code, just
> let
> me know.  I'm kinda stumped right now.
> 
> Sincerely,
> 
> 
> Timothy D. Astle
> 
> People on Jolt cola write the funniest things.
> 
>  A-10 Obedience Guide,
>  Kitty Hawk Studios
> 
> 
> 
> -- 
> 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: cancer causing devices (was Re: QualComm PDQ Phone)

2000-07-05 Thread Ken Sale

Apparently, it was long enough ago that the laws of physics have changed since then.  
If the radiation is omnidirectional then the
field strength falls off as the inverse second power of distance (only if you are far 
away from the source compared to the size of
the source).

"John E. Christ III" wrote:

> > > The point is that the transceivers are meant to operate over a distance
> of
> > > many yards, or even miles).  Moving the device a few feet has a
> miniscule
> > > impact on EMI and EMR exposure.  Other environmental factors, headset
> > wire,
> >
> > This seems way OT for Palm development, but here's my 2 cents worth...
> > According to reports by one of the labs that actually tests the emissions
> of
> > cell phones, moving the device just a few inches makes a significant
> > difference in the exposure level to the brain.  That's why the cell phone
> > companies got the US government to allow them to provide data from tests
> > with the phone in any one of a number of positions, and they always
> publish
> > the results from positions that nobody would actually use.
>
> Actually since cell phones are essentially point source omnidirectional
> antennas (you don't have to aim them, right?), the electromagnetic field
> disperses equally in three dimensions; therefore the intensity of the field
> drops by distance to the third power.  That means the intensity at 10 inches
> away is 1000 times less than at one inch.  Think about that the next time
> you've got that phone jammed up against your ear :)
>
> Electromagnetic Field Theory 101 was such a long time ago.  Makes my head
> hurt to think about it :)
>
> John E. Christ III
> UTA Software Centre
> Tampa, FL.
>
> --
> 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: double byte Character in Avango

2000-07-05 Thread Ken Krugler

Eric,

At 12:00am -0700 00-07-05, Palm Developer Forum digest wrote:
>Subject: double byte Character in Avango
>From: Eric <[EMAIL PROTECTED]>
>Date: Wed, 05 Jul 2000 11:43:56 +0800
>X-Message-Number: 25
>
>why, in Avango, the double byte character cannot display correctly?
>some space between or half of bitmap character is cut. what's the
>problem and how to solve it if I am writing a hack to display double
>byte character(Big5/GB)?

I'm assuming that AvantGo uses their own text layout routines, which 
are probably not multi-byte aware (and/or don't use the Text Manager 
routines). In that case, there are many ways that code could screw up 
processing double-byte characters. As to how to fix it via a hack, 
sometimes you can tweak a program to fix specific problems by 
patching the application, but it's often impossible to achieve 
acceptable results. The best solution would be for AvantGo to modify 
their app to be multi-byte aware.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



RE: a question to shareware authors

2000-07-05 Thread Yu, Ken

I believe the original formula was correct.

xx = 0.

price = 1.95

yy = xx + 1 (00.0+1)

price = 2.00

feeling guilty for pricing $1.95 instead of $2.00

> --
> From: Michael S. Davis[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, July 05, 2000 9:45 AM
> To:   Palm Developer Forum
> Subject:  Re: a question to shareware authors
> 
> > BTW :
> > > Don't you feel guilty when you price your products like $xx.95 instead
> of
> > $yy.00 [yy = xx + 1]?
> > wouldn't that be $yy.96 not $yy.00 ?
> 
> Actually, it would be yy+1.95, if you want to be picky.
> 
> 
> -- 
> 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: Globals in shared libraries and virtual drivers

2000-07-02 Thread Ken Krugler

Petrus,

The code is at <ftp://ftp.transpac.com/globals/>. As mentioned in 
Steve Mann's reply, the article in on his CD.

As to responses from Aaron Ardiri and Richard Hartman, yes there are 
a variety of methods for implementing dynamic heap data storage that 
persists during the lifetime of a shared library session. The reason 
I implemented support for C-style globals is that I also had a large 
body of existing code with many functions that required global access 
(the Japanese input method for the Palm), so the easiest and fastest 
way to port it to a shared library was to implement support for 
A4-based globals.

-- Ken

At 12:00am -0700 00-07-01, Palm Developer Forum digest wrote:
>Subject: Globals in shared libraries and virtual drivers.
>From: "Petrus Wrangö" <[EMAIL PROTECTED]>
>Date: Fri, 30 Jun 2000 09:24:43 +0200
>X-Message-Number: 1
>
>Official information states that 'real' globals canot be used in a shared
>library.
>What I want to know is: Can I use globals in serial and virtual drivers?
>How?
>
>I'm also interested in using globals in shared libs, despite official info.
>
>Anyone knows the whereabouts of this article?:
>"PalmOS Shared-Library Globals," by Ken Krugler

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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



Re: chrShortcutStroke and Latin-1 character set

2000-06-29 Thread Ken Krugler

At 12:00am -0700 00-06-29, Palm Developer Forum digest wrote:
>Subject: chrShortcutStroke and Latin-1 character set
>From: "Joseph Koral" <[EMAIL PROTECTED]>
>Date: Wed, 28 Jun 2000 09:42:42 -0400
>X-Message-Number: 16
>
>Why does the shortcut character (chrShortcutStroke) persist in a text field
>if no text is entered after it?

A current limitation in the way that shortcuts are implemented, 
mostly involving the field code. Typically the shortcut character 
gets removed when the user completes the entry of the shortcut, but 
if they tap off the field, or quit the form/app before completing the 
shortcut, then the shortcut character will get left behind.

>In my application, if a user enters a shortcut character in a text field,
>chrShortcutStroke is mapped to chrEndOfTransmissionBlock in Chars.h, which
>is 0x17.  My conduit gets 0x17 and it's XML parser chokes because it is not
>in the iso-8859-1 character set.
>
>For the short term, I'm just stripping out chrShortcutChar, but what would
>be a more general solution?

Before saving a field, you could call the TxtStrEncoding routine. If 
it returns the same result as the device's character encoding, then 
you know that the string contains "special" characters. Unfortunately 
this will only work in newer versions of the OS (i.e. _after_ 3.5), 
since all current versions of TxtStrEncoding will return 
charEncodingAscii for anything in the 0x00..0x7F range.

Hmm, on the other hand you probably also want to catch _any_ 
character in the control range (other than tab or linefeed or null), 
even if it's not a specific Palm extension to the Windows 1252 code 
page.

So if I had to solve this problem, I'd write a simple routine that 
loops over the text in a field when the field is about to be saved, 
looking for bytes in the range of 0x00..0x1F (but not tab or 
linefeed). You know that none of these values will ever be part of a 
multi-byte character, so it's safe to walk the string a byte at a 
time.

>I see there are other "special characters" in
>Chars.h:
>
>// Special meanings given to characters by the PalmOS
>#definechrOtaSecurechrDeviceControlFour// 0x0014
>#definechrOta  chrNegativeAcknowledge  // 0x0015
>#definechrCommandStroke chrSynchronousIdle // 0x0016
>#definechrShortcutStroke  chrEndOfTransmissionBlock// 0x0017
>#definechrEllipsis chrCancel   // 0x0018
>#definechrNumericSpace chrEndOfMedium  // 0x0019
>#definechrLeftArrowchrFileSeparator// 0x001C
>#definechrRightArrow   chrGroupSeparator   // 0x001D
>#definechrUpArrow  chrRecordSeparator  // 0x001E
>#definechrDownArrowchrUnitSeparator// 0x001F
>
>Can any of these other characters be input into text fields by the user?

The left/right arrows can be entered via Graffiti, but the field code 
just uses them to move the insertion point. Only the shortcut 
character gets entered into the text data.

>How can I force my app to only work with the Latin character set?  Ideally,
>if run on a Palm with a different encoding, it would pop up an error message
>(future versions may support other encodings).

You can determine the device's character encoding by calling 
FtrGet(sysFtrCreator, sysFtrNumEncoding, &encoding). If the encoding 
is anything other than charEncodingPalmLatin, you're not running on a 
device that uses the Latin character encoding. Note that if the call 
to FtrGet returns an error, you can assume that the device's encoding 
is Latin.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




table invalid/redraw not working

2000-06-28 Thread Ken Hejmanowski

I am attempting to draw the contents of my table.  If I do a TblEraseTable()
followed by a TblDrawTable(), everything works fine.  However, what I really
want to do is to mark certain rows invalid, and then call TblRedrawTable()
so that the entire screen is not cleared in between draws as it is with the
TblEraseTable()/TblDrawTable() combo.

To test, if I comment out the TblEraseTable()/TblDrawTable() combo and just
replace it with TblMarkTableInvalid()/TblRedrawTable(), nothing draws at
all.  I have also tried to mark individual rows invalid by calls to
TblMarkRowInvalid( ) followed by calling TblRedrawTable(), but to no avail.

The items in my table are of type customTableItem, and I install a custom
draw function for the cells of the table via TblSetCustomDrawProcedure().
Running in the debugger, I can see that my custom draw function doesn't even
get called when I do the invalid/redraw combo!

I am modeling what I am doing on the Address book sample app, which does the
invalid/redraw combo.  I don't see the difference between what I am doing
that doesn't work, and what it does that does work.

Any thoughts?

Thanks,

-Ken



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




Re: TxtFindString Error....

2000-06-27 Thread Ken Krugler

You have to "prepare" the target string before passing it to 
TxtFindString. The best way to do this is to call 
TxtGluePrepFindString, in the PalmOSGlue library.

Note that when your app receives the sysAppLaunchCmdFind launch 
command, the FindParamsType.strToFind field contains the results of 
calling TxtPrepFindString with the string entered by the user in the 
Find form (the FindParamsType.strAsTyped string).

-- Ken

At 12:00am -0700 00-06-27, Palm Developer Forum digest wrote:
>Subject: Re: TxtFindString Error
>From: "Sam Trimble" <[EMAIL PROTECTED]>
>Date: Mon, 26 Jun 2000 15:39:35 -0700
>X-Message-Number: 66
>
>Thanks, that solved the Null problem anyway... But now I'm wondering if the
>function even works the way it is supose to.. It always returns a 0 for
>'someULong' even though I know it isn't suppose to be...
>
>
>"McMicken, Steven" <[EMAIL PROTECTED]> wrote in message
>news:15455@palm-dev-forum...
>  >
>  > Just a guess, but you may have to provide a variable of type UInt16 for
>the
>  > last parameter.  The function is probably trying to replace the return
>value
>  > of "outLength" in there.
>  >
>  > Regards,
>  >
>  > Steve

At 12:00am -0700 00-06-27, Palm Developer Forum digest wrote:
>Hey,
>  I'm trying to use the following code to get the starting posistion of a
>string but I always get a "NULL result ptr" error. Can someone help me
>out on what I'm doing wrong here?
>
>ULong  someULong = 0;
>
>if (TxtFindString(myCharPtr, "String I'm Searching For", &someULong, NULL));

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




RE: Defining Custom Font

2000-06-26 Thread Ken Krugler

Hi Sumita,

Once you've got font data in the proper format for the Palm OS, the 
easiest way to use it in your app is to:

1. Create a resource (typically type NFNT) with the data, and add 
that to your application (e.g. NFNT=1000).

2. Install the font using code like this:

#define kCustomFontResID1000
#define kCustomFontID   ((FontID)128)

MemHandle h = DmGetResource('NFNT', kCustomFontResID);
FntDefineFont(kCustomFontID, (FontPtr)MemHandleLock(h));

3. Explicitly call FntSetFont(kCustomFontID) to use the font, or set 
the font id for the UI object (e.g. a text field) to be kCustomFontID.

-- Ken

At 12:00am -0700 00-06-24, Palm Developer Forum digest wrote:
>Subject: RE: Defining Custom Font
>From: "Nesse, Rustin" <[EMAIL PROTECTED]>
>Date: Fri, 23 Jun 2000 08:18:14 -0700
>X-Message-Number: 26
>
>Not really.  It's like using a script font in Windows without actually
>having the font file loaded on your system.  You need to build your
>font, then convert it to a pbd (most of the font programs designed
>specifically for the Palm do so) and load it on your system along with
>your application.
>
>Hope that helps!
>-Rus
>
>  >-Original Message-
>  >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>  >Sent: Friday, June 23, 2000 1:42 AM
>  >To: Palm Developer Forum
>  >Subject: RE: Defining Custom Font
>  >
>  >
>  >
>  >
>  >
>  >Thanks for the link. But what  I need is  some way for
>  >changing Font within
>  >my application. Is it possible without using a pbd for Font?
>  >
>  >
>  >
>  >
>  >
>  >"Fitzpatrick, Joe" <[EMAIL PROTECTED]> on 06/22/2000 09:16:07 PM
>  >
>  >
>  >
>  >
>  >
>  >For an example of how to use FntDefineFont check out:
>  >
>  >http://www.sochi.com/~sandy/fe/
>  >
>  >Good Luck,
>  >-jjf

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




Re: TxtGlueCharAttr - broken?

2000-06-26 Thread Ken Krugler

Hi Paul,

At 12:00am -0700 00-06-23, Palm Developer Forum digest wrote:
>Subject: TxtGlueCharAttr - broken?
>From: Paul Nevai <[EMAIL PROTECTED]>
>Date: Thu, 22 Jun 2000 06:11:57 -0400 (EDT)
>X-Message-Number: 11
>
>Hi:
>
>I came to the conclusion that TxtGlueCharAttr is broken whether or not it is
>used with Char or WChar. When I have macros like TxtGlueCharIsAlNum (wch) and
>run GREMLINS [OS 3.3],then POSE keeps complaining after every 3 or 4
>thousand GREMLINS,

OK, I give, what's the POSE message?

>whereas if I replace them by stuff like IsAlNum
>(GetCharAttr (), wch) then it passes millions of GREMLINS w/o any problem.
>
>Has this been observed and/or documented before?

Not that I know of.

>Am I correct about
>TxtGlueCharAttr?

No idea. One common problem is for apps to pass a Char variable to a 
routine that takes a WChar parameter. If the contents of the Char 
have a value > 0x7F, then the compiler will sign-extend the 8-bit 
value to be a 16-bit value, so 0xC1 winds up getting passed to the 
routine as 0xFFC1.

It's easy to fix by casting the Char to be a (UInt8) first. Often, 
though, this is a sign of deeper problems - for example, extracting 
just the low byte from the keydown event record, and then passing 
that around as a Char parameter to routines.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




Re: Enqueuing virtual keycodes

2000-06-26 Thread Ken Krugler

Hi Andy,

1. EvtEnqueueKey takes the character code as the first parameter, and 
the key code as the second. The key code should always be zero 
currently, so calls like:

> EvtEnqueueKey (0x0030, chrDigitZero, 0);

should actually be

> EvtEnqueueKey (chrDigitZero, 0, 0);

2. The delete button should be generating a backspace keydown event 
(chrBackspace = 0x0008), not chrDelete.

3. Handling the next and previous field keydown events is the 
responsibility of your app - it isn't done for you by the form code, 
for example.

-- Ken

At 12:00am -0700 00-06-26, Palm Developer Forum digest wrote:
>Subject: Enqueuing virtual keycodes
>From: Andy Black <[EMAIL PROTECTED]>
>Date: Sun, 25 Jun 2000 18:24:46 -0400
>X-Message-Number: 6
>
>Hello,
>
>I am using the following code for my numeric keypad in my program and am
>having some problems.
>
> case ctlSelectEvent:
> switch (eventP->data.ctlSelect.controlID)
> {
> //--code removed---//
> case MainZeroButton:
> EvtEnqueueKey (0x0030, chrDigitZero, 0);
> break;
> case MainDecimalButton:
> EvtEnqueueKey (0x002E, chrFullStop, 0);
> break;
>
> case MainDeleteButton:
> EvtEnqueueKey (0x007F, chrDelete, 0);
> break;
>
> case MainNextButton://move to next editable text field
> EvtEnqueueKey (0x0103, vchrNextField, commandKeyMask);
> break;
>
> case MainPreviousButton://move to previous text field
> EvtEnqueueKey (0x010C, vchrPrevField, commandKeyMask);
> break;
> }
> handled = false;
> break;
>
>Everything works except the chrDelete, vchrNextField, vchrPrevField. I tap
>the buttons on my keypad and nothing. Do I need to handle these (chrDelete,
>etc...) differently than the rest of the keycodes?

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




Re: Gremlins and FIND

2000-06-26 Thread Ken Krugler

Hi Steve,

At 12:00am -0700 00-06-24, Palm Developer Forum digest wrote:
>Subject: Gremlins and FIND
>From: "Stephen Bentley" <[EMAIL PROTECTED]>
>Date: Fri, 23 Jun 2000 16:47:11 -0400
>X-Message-Number: 62
>
>Trying to be a good Palm developer, I unleashed
>a horde of Gremins on my app.  29,600 events
>later I got this nasty message:
>
>"Lamp" 1.0 reports "Find.c Line:818, Error launching
>app for Find" If this is the latest...
>
>The debugger shows that it has died somewhere in
>SysHandleEvent but I don't know why?  I added
>the handling of the sysAppLaunchCmdFind launch
>code and for now simply set findParams->more = false
>in my empty search routine.  Still died.

This alert gets displayed when SysAppLaunch returns a non-zero 
result. Note that this result isn't the same as what your app returns 
from its main routine - SysAppLaunch returns an error when there's 
not enough memory to sub-launch the app, for example.

So if you could use the debugger to determine the actual result 
returned by SysAppLaunch, that would tell you a lot.

My wild guess is that you've got a memory leak, and the heap fills 
up, so that there's not enough free memory to sub-launch one of the 
apps during the find operation.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




Re: AbtShowAbout

2000-06-26 Thread Ken Krugler

At 12:00am -0700 00-06-23, Palm Developer Forum digest wrote:
>Subject: AbtShowAbout
>From: "SvenÅke Andersson" <[EMAIL PROTECTED]>
>Date: Thu, 22 Jun 2000 10:16:50 +0200
>X-Message-Number: 4
>
>How does AbtShowAbout find the version number and the name of the
>application by using the Creator ID ?

It calls DmGetNextDatabaseByTypeCreator with the DB type = 'appl', 
and the type = creator ID passed to the routine. Then it opens up the 
DB and reads in the tAIN and tver resources.

Note, however, that 3rd party apps should NEVER use AbtShowAbout. The 
only reason it's in the public APIs is so that the sample apps (e.g. 
Address) will compile properly. This routine is for Palm's internal 
use only, and most attempts to use it by 3rd parties have resulted in 
busted code when the OS gets revised.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




Re: conduit questions

2000-06-24 Thread Ken Hejmanowski

Go to:

 http://www.palmos.com/dev/tech/support/forums/sub.html

And fill out the form and submit it.  You'll receive an e-mail asking you to
confirm joining a forum.  Once you confirm, you'll get another e-mail with
lots of information about it all.

Regards,

-Ken



Charles Rezsonya <[EMAIL PROTECTED]> wrote in message
news:15313@palm-dev-forum...
>
> how do i sign up for the conduit forum?  email etc?
>
> tia
> Charles R
>
>
>



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




popup trigger bounds changing

2000-06-23 Thread Ken Hejmanowski

Hi all,

I am calling CtlSetLabel() to set the text of a popup trigger.

It would appear that calling this function on a popup trigger resets the
bounds of the trigger object.  What is troubling about this is that the
trigger object can then be resized to a width greater than what was
originally set in the resource for the trigger.  This means that my nicely
layed out dialog can become garbage as my trigger's width runs over other
control areas.

In the documentation for 'ControlType', the description for the 'bounds'
member is that the control's text label is clipped to the control's bounds.
This would not seem to hold true for popup triggers.  I would expect the
trigger control to use the 'bounds' member as a maximum width possible, but
it doesn't seem to, it seems to resize whenever its label is set.  I
understand that to a certain degree given the resizing behavior of the
control.

Now, I know there is the 'Anchor Left' setting in Constructor which can help
a little, but not completely.  My popup trigger is along the left edge of
the form, so if I choose to NOT anchor left, then it runs off the left side,
and no trigger arrow is visibl--not good!

I know there is the CategorySetTriggerLabel() function which seems to let
the trigger grow only so wide, and then truncates the text and adds "..." to
it.

S...has anyone found a way to control this control, so to speak?  Is
there a way to specify the maximum width of a popup trigger?  The only
alternative I see is storing what the maximum pixel width of the trigger can
be, and then calling a function that determines how many characters of my
string will fit within that width, and then use that truncated string in my
call to 'CtlSetLabel().'

Any/all help greatly appreciated!

Thanks,

-Ken





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




RE: How to capitalize first char in field?

2000-06-23 Thread Yu, Ken

Thank you!  That's exactly what I'm looking for.

-Ken

> --
> From: Stuart Nicholson[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Friday, June 23, 2000 3:21 PM
> To:   Palm Developer Forum
> Subject:  RE: How to capitalize first char in field?
> 
> Errmm, isn't that what the 'auto shift' property of the UI field
> resource specifies? You can set it in the Code Warrior contructor (it's
> just a property of the field) or use AUTO SHIFT property in PilRC I
> believe.
> 
> Stuart Nicholson
> Programmer
> Firepad, Inc.
> 
> -Original Message-
> From: Yu, Ken [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 23, 2000 8:08 PM
> To: Palm Developer Forum
> Subject: How to capitalize first char in field?
> 
> 
>   Is there any easy way of capitalizing the first character in a
> text
> field during input (like the built-in apps)?  I am using PRC-Tools.
> 
>   -Ken
> 
> 
> -- 
> 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/
> 

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




How to capitalize first char in field?

2000-06-23 Thread Yu, Ken

Is there any easy way of capitalizing the first character in a text
field during input (like the built-in apps)?  I am using PRC-Tools.

-Ken


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




Re: How to reduce illegal characters in a text field

2000-06-15 Thread Ken Krugler

At 12:00am -0700 00-06-15, Palm Developer Forum digest wrote:
>Subject: How to reduce illegal characters in a text field
>From: Richard Bram <[EMAIL PROTECTED]>
>Date: Wed, 14 Jun 2000 07:34:26 -0500
>X-Message-Number: 11
>
>Are there any ASCII values that are illegal to insert into a text field
>on the device (other than zero, of course)? I remember on the old
>Macintosh simulator, you would get a crash if you put something like
>a 0x07 or other low number into a field, but I can't remember if any
>low numbers will crash the device?


You'll get weird drawing results with invalid characters in the 
field, but I don't think it will cause a crash. You want to avoid 
calling FldInsert with characters that have code points less than 
0x20, other than tab or linefeed.

The set of characters that can safely be passed to FldHandleEvent are:

chrTab, chrBackspace, chrLineFeed, chrLeftArrow, chrRightArrow, 
chrDownArrow, chrUpArrow, and TxtCharIsPrint(theCharacter) == true.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




RE: Your app has just overflowed the stack

2000-06-09 Thread Yu, Ken

Symptoms described in the archives are similar just that I was using 3.1
Release ROMs
not 3.3.

-Ken

> --
> From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Friday, June 09, 2000 4:30 PM
> To:   Palm Developer Forum
> Subject:  RE: Your app has just overflowed the stack
> 
> 
> 
> You all might want to check the archives:
> 
> <http://www.escribe.com/computing/pcpef/m1276.html>
> <http://www.escribe.com/computing/pcpef/m1280.html>
> 
> <http://www.escribe.com/computing/pcpef/m1369.html>
> 
> <http://www.escribe.com/computing/pcpef/m1181.html>
> 
> <http://x71.deja.com/getdoc.xp?AN=565854875&CONTEXT=960582479.661192706&hi
> tnum=24>
> (Titled "Re: POSE 3.03a Bugs???", on 12/28/99)
> 
> If the described problems don't apply to you, let us know.
> 
> -- Keith Rollin
> -- Palm OS Emulator engineer
> 

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




RE: Your app has just overflowed the stack

2000-06-09 Thread Yu, Ken

I've seen this too.  It happened to me when I was using multiple databases
in my app.  When I converted to one DB, it went away.  Not sure what's the
cause.


> --
> From: Fima Furman[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Friday, June 09, 2000 4:03 PM
> To:   Palm Developer Forum
> Subject:  RE: Your app has just overflowed the stack
> 
> I'm having the same problem. I tried to increase the stack size and it
> didn't fix it.
> This happens only in Emulator. It doesn't seem to happen when I reset the
> actual device. I would appriciate if somebody can provide more info on
> this...
> 
> Thank you.
> 

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




RE: Selecting rows from a table

2000-06-08 Thread Yu, Ken

Jason,

What you can do is have one column and display all your data in that one
column (but print your data in such a way that appears to be multiple
columns).

-Ken

> --
> From: Jason Freund[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Thursday, June 08, 2000 2:43 PM
> To:   Palm Developer Forum
> Subject:  Selecting rows from a table
> 
> Hi,
> 
> I have a 2 column table, and I'm trying to figure out how to get an entire
> row to highlight when you select it.  When an cell is selected, only that
> one cell highlights.  
> 

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




RE: Number of Fields

2000-06-07 Thread Yu, Ken

Another way is the method used by the built-in apps (eg AddressBook).  Bit
fields are used to indicate if a field exists in the record.  I find that
this method is best for memory conservation.  You won't waste a byte for
each empty field when using deliminators and fixed length always causes
maximum memory usage for each field.  Memory is a important concern when a
database can potentially contain numerous records.  Even saving one byte per
record can make a huge difference.

> --
> From: Steve Austin[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, June 07, 2000 2:55 PM
> To:   Palm Developer Forum
> Subject:  RE: Number of Fields
> 
> There are two basic ways to keep track of "fields"  in a record.  Either
> you've got to use some kind of delimeter, or you've got to keep track of
> the
> size of each field.  It's your choice.
> 

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




RE: Modal form over a Form

2000-06-07 Thread Yu, Ken

Then that's your problem.  The fields should be drawn after FrmDrawForm().
If you draw your fields before, the screen image is saved before the next
form is displayed.  When your modal dialog closes, this image is restored
thus displaying the fields from the previous dialog.


> --
> From:
> [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, June 07, 2000 5:26 PM
> To:   Palm Developer Forum
> Subject:  RE: Modal form over a Form
> 
> Yes, in both forms fields are drawn and data retrieved and placed in the 
> fields before FrmDrawForm...
> 
> 
> >Are you drawing your fields *before* calling FrmDrawForm()?
> 
> http://www.palmos.com/dev/tech/support/forums/
> German Dominguez
> Proyectos
> Synerg-e Consulting
> Tel. 5220-0051
> Tel. 5220-0061
> Fax. 5531-0963
> email: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> 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: Modal form over a Form

2000-06-07 Thread Yu, Ken

Are you drawing your fields *before* calling FrmDrawForm()?

> --
> From:
> [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Wednesday, June 07, 2000 5:00 PM
> To:   Palm Developer Forum
> Subject:  Modal form over a Form
> 
> 
> After pressing the "Back" button named "Regresar" in spanish, the Fields 
> are still displayed on the normal form. With the following code:
> 

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




RE: Curious occurance...

2000-06-06 Thread Yu, Ken

Are using using OS 3.5?  I had a similar occurance.  The cause was that my
custom draw routine is being
called on 3.5 when a record no longer exist in the database.

Example:

- I have a table listing the short description of each record.
- A row is tapped and this brings me to a detail screen.
- I press the delete button.  This wipes out the record and returns me to
the list screen. On OS 3.5, the table is forced to be redrawn BUT the record
index of the record I just deleted is still saved in the table. My draw
routine is called again with an invalid index.



> --
> From: Tim Astle[SMTP:[EMAIL PROTECTED]]
> Reply To: Palm Developer Forum
> Sent: Tuesday, June 06, 2000 3:14 PM
> To:   Palm Developer Forum
> Subject:  Curious occurance...
> 
> I just ran into a case when if I return to a form /w table, scrollbar,
> which
> dynamically loads from my database, I get a DataMgr.c, Line:7821, Index
> out
> of range error.
> 
> Now this is weird because it indicates, from what I can tell, that I have
> an
> invalid index for referencing my database.  To flush this out, I ran it
> through the debugger, and it runs perfectly!  I'm very curious as to why
> this is happening.  Does anyone have an idea?
> 
> --
> 
> Tim Astle
> 
> 
> 
> -- 
> 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: bitmaps

2000-05-29 Thread Ken Krugler

At 12:00am -0700 00-05-29, Palm Developer Forum digest wrote:
>Subject: Re: bitmaps
>From: "gaurav palvia" <[EMAIL PROTECTED]>
>Date: Mon, 29 May 2000 11:04:07 +0530
>X-Message-Number: 29
>
>Thnax a lot Ken for ur detailed response i will be highly thankul if u clear
>a few more doubts regarding bitmaps.
>
>1.i have downloaded those 4 files from your ftp site.but can u explain me
>what they do.do they do some type of conversions.i have gone thru those
>files but could not understand.how to use them

They show how to convert a regular bitmap to a compressed bitmap (1 
bit-per-pixel only, though). As such, I thought they might be useful 
as a demonstration of how to dynamically create bitmaps.

>2.in palm os 3.0 the bitmap depth can be 1 bit or 2 bit am i right.

Yes, i believe so. Check out this knowledge base article for more info:

<http://oasis.palm.com/dev/kb/article.cfm?id=1147>

>can it be
>more then that say 4 bit ,24 bit.i have read the description of
>scrDisplayMode and i m bit confused

I believe that on certain devices using the 68EZ328 processor, with 
Palm OS 3.1 or later, 4 bits-per-pixel is supported. On the Palm 
IIIc, with Palm OS 3.5, 8 bits-per-pixel is supported. Currently 
there is no support for 16 or 24 bpp.

>3.can i create a bitmap  in the palm without using the resources functions
>like FrmNewBitmap and without using any bitmap resource.i want to display
>them dynamically.is it possible

Yes, though you'll have to do some hacking to get it to work on older 
ROMs (pre-3.5) which don't support the BmpCreate() routine found in 
Bitmap.h. I believe there was a Handheld Systems Journal article 
about dynamically creating bitmaps, written by Alan Weiner 
([EMAIL PROTECTED]) that would give you the information you need. I don't 
know if it's available on-line any longer, though.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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




<    2   3   4   5   6   7   8   >