RE: Dumbfounded: How Palm OS generates unique record IDs

2009-04-01 Thread Philip Sheard
Looks like a bug in the StyleTap implementation of the File Manager.

 

But do you need to set the UIDs in the first place? If not, just set them
all to zero, and let the system assign the UIDs.

 

There are situations where you might want to assign your own UIDs. For
instance, I use them to look up barcodes and phone numbers. But you have to
do extra work in that case, to avoid duplicates.

 

From: Jonathan Carse [mailto:jonathan.ca...@gmail.com] 
Sent: 01 April 2009 10:33
To: Palm Developer Forum
Subject: Re: Dumbfounded: How Palm OS generates unique record IDs

 

Reading this again I will clarify: the problem occurs on top of the Styletap
platform, running on top of a Windows Mobile Device Emulator.

Cheers.

On Wed, Apr 1, 2009 at 12:28 PM, Jonathan Carse jonathan.ca...@gmail.com
wrote:

Hey folks,

Still trying to get my application running with Styletap.

This time I've generated a PDB database from my Access one using the format
described here: http://www.nsbasic.com/palm/info/technotes/TN02a.htm

The problem: I assign each my records a unique ID when I generate the file,
starting at 1. But, when I add a record on the device, for some reason the
new record gets the ID of 2, even though it's already taken.

How can this be? Doesn't the device check to see if the ID already exists in
the database?

Since I saw there's a field called Unique ID Seed at offset 0x44 in the
PDB file (not really documented), I tried looking at what the field has in a
normal situation (I exported the same database from the Palm Emulator).
The seed had the value of 0x4000 (UInt32). I tried re-generating my
database with that value for unique ID seed. Then, the device not only keeps
insisting on writing 2 as the new ID, but changed the unique ID seed to
0x0003 (?!?!?!?)

What the hell is going on, does anybody know?

Thanks! :)

Jonathan

 

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe,
please see http://www.access-company.com/developers/forums/

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Re: Dumbfounded: How Palm OS generates unique record IDs

2009-04-01 Thread Jonathan Carse
Reading this again I will clarify: the problem occurs on top of the Styletap
platform, running on top of a Windows Mobile Device Emulator.

Cheers.

On Wed, Apr 1, 2009 at 12:28 PM, Jonathan Carse jonathan.ca...@gmail.comwrote:

 Hey folks,

 Still trying to get my application running with Styletap.

 This time I've generated a PDB database from my Access one using the format
 described here: http://www.nsbasic.com/palm/info/technotes/TN02a.htm

 The problem: I assign each my records a unique ID when I generate the file,
 starting at 1. But, when I add a record on the device, for some reason the
 new record gets the ID of 2, even though it's already taken.

 How can this be? Doesn't the device check to see if the ID already exists
 in the database?

 Since I saw there's a field called Unique ID Seed at offset 0x44 in the
 PDB file (not really documented), I tried looking at what the field has in a
 normal situation (I exported the same database from the Palm Emulator).
 The seed had the value of 0x4000 (UInt32). I tried re-generating my
 database with that value for unique ID seed. Then, the device not only keeps
 insisting on writing 2 as the new ID, but changed the unique ID seed to
 0x0003 (?!?!?!?)

 What the hell is going on, does anybody know?

 Thanks! :)

 Jonathan


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Dumbfounded: How Palm OS generates unique record IDs

2009-04-01 Thread Jonathan Carse
Hey folks,

Still trying to get my application running with Styletap.

This time I've generated a PDB database from my Access one using the format
described here: http://www.nsbasic.com/palm/info/technotes/TN02a.htm

The problem: I assign each my records a unique ID when I generate the file,
starting at 1. But, when I add a record on the device, for some reason the
new record gets the ID of 2, even though it's already taken.

How can this be? Doesn't the device check to see if the ID already exists in
the database?

Since I saw there's a field called Unique ID Seed at offset 0x44 in the
PDB file (not really documented), I tried looking at what the field has in a
normal situation (I exported the same database from the Palm Emulator).
The seed had the value of 0x4000 (UInt32). I tried re-generating my
database with that value for unique ID seed. Then, the device not only keeps
insisting on writing 2 as the new ID, but changed the unique ID seed to
0x0003 (?!?!?!?)

What the hell is going on, does anybody know?

Thanks! :)

Jonathan

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

displaying Bitmaps correctly

2009-04-01 Thread luis maldonado

Hello,
 
I'm desperatly looking for code samples on how to display bitmaps on TX.
 
I'm able to display a 24 color bitmap but the resolution is just bad.
 
I have several bitmaps I got from the web also 24 color and they display fine, 
but the ones I create with photoshop do not display very good as the colors are 
completly destroyed.
 
when I try to compare the structure of the bitmaps, there does not seem to be 
any difference reported by photoshop but one displays fine and the other does 
not.

 

So far I have had to settle for low res bitmap display but  I would like to 
update the application UI to use more modern bitmaps like the ones they use in 
the home screen and really be able to use the TX's high resolution screen.

 

I'm using cw 9.3 and pilcr for development tools


This is the code I'm using to display the bitmaps

 

void drawBitmap(UInt16 Bitmap, UInt16 X, UInt16 Y)
{
 MemHandle h;
 BitmapType* bmpP;
 Coord width, height;
 WinHandle winH = WinGetDrawWindow();
 WinDrawOperation oldMode;

 WinPushDrawState(); 
 h = DmGet1Resource(bitmapRsc, Bitmap);
 bmpP = (BitmapType*)MemHandleLock(h);
 oldMode = WinSetDrawMode(winPaint);
 WinPaintBitmap (bmpP, X, Y);
 MemHandleUnlock(h);
 DmReleaseResource(h);
 WinSetDrawMode(oldMode);
 WinPopDrawState(); 
}


and this is the resource code

 

BITMAP splashBM
BEGIN
 BITMAP screen_saver.bmp BPP 8 DENSITY 2 COMPRESS TRANSPARENTINDEX 0
END

 

Same code is used to display the Palm images I got from the web and the images 
I created with photoshop

 
Can anyone help help?
 
Thanks a bunch
 
Luis,
 


_
Windows Liveā„¢: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Re: displaying Bitmaps correctly

2009-04-01 Thread Michal Seliga

luis maldonado wrote:
 Hello,
  
 BITMAP splashBM
 BEGIN
  BITMAP screen_saver.bmp BPP 8 DENSITY 2 COMPRESS TRANSPARENTINDEX 0
 END
  

use BPP 16, conversion from truecolor to palette almost always looks bad.

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/