RE: Assembler Error: Value of -35828 too large for field of 2 byt es

2006-02-14 Thread Jeffry Loucks
Title: Message



What 
is the code around line 12041, say lines 12035-12050. It would be good to see 
what the compiler is complaining about :)
Jeff LoucksMobile 
253-691-8812

  
  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Michael 
  KangSent: Tuesday, February 14, 2006 1:03 PMTo: Palm 
  Developer ForumSubject: Assembler Error: Value of -35828 too large 
  for field of 2 bytes
  Hi 
  All,
  
  There is a unsigned long array in my code. When I 
  compiled it I got the following error:
  
  Error: Value of -35828 too large for field of 2 
  bytes at 0x8bf4 
  EE5 line 
  12041 
  Error: Value of -35828 too large for field of 2 
  bytes at 0x8bf4[/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp/cciL5iuQ.s] 
  EE5 line 12041 
  
  Error: value out of range 
  EE5 
  line 12041 
  Error: value out of 
  range[/cygdrive/c/DOCUME~1/Michael/LOCALS~1/Temp/cciL5iuQ.s] 
  
  Who knows what that means? I avoided the errors by 
  adding a "-O1". But how come?
  Thanks,
  Michael.
  
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/



RE: Stack Size

2006-01-31 Thread Jeffry Loucks

SysGetStackInfo() reports the space allocated for use as a stack. The value
of the stack pointer (SP or a7) tells you where you are in the stack.

I believe SysGetStackInfo() returns the address of the first and last bytes
allocated to the stack, so actual stack size would be (end - start + 1). You
can read the stack pointer with the following:

UInt32 GetSP(void) = 0x200F;

To determine how much of the stack has been consumed; ((UInt32)end - GetSP()
+ 1) bytes.
To determine how much of the stack remains; (GetSP() - (UInt32)start) bytes.



Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim McGowen
Sent: Tuesday, January 31, 2006 3:24 PM
To: Palm Developer Forum
Subject: Stack Size


I got this from another post:

Chris Apers previously wrote:
 Is there a way to know the size of the stack ?.

UInt32 GetStackSize( // returns size of stack in bytes
   void) // no parameters

{
MemPtr StartPP = NULL;
MemPtr EndPP = NULL;

SysGetStackInfo(StartPP, EndPP);

UInt32 TotalBytes = (Char *) EndPP - (Char *) StartPP;
return TotalBytes;
}

Given StartPP and EndPP you can also determine the amount of stack used and
amount unused.

My question is, how do you use StartPP and EndPP to determine the amount of 
stack used and amount unused?  SysGetStackInfo always gives me the same 
values no matter where in my app I call it.

 - Jim 

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


RE: Fixed string in code.

2006-01-13 Thread Jeffry Loucks
I'm glad it worked for you :)

BTW, the inline was not because it was small, but to embed the data into
code with the least amount of overhead (2-4 bytes). Other methods generate a
function body and access code (30-38 bytes), which is not necessary.

jeff 

-Original Message-
From: cbruner
To: Palm Developer Forum
Sent: 1/12/2006 9:17 PM
Subject: Re: Fixed string in code.

Well the problem was solved with inline assembly thanks to Jeffry
Loucks, 
but for completeness sake the code was very similar to this. The code
wasn't 
specified to be in inline, although it was small enough that it could
have 
been.


static//tried with and without
const char *GetTimeStamp(void)
{
 return chrisbruner__DATE__  __TIME__someothertag;
}

Chris Bruner
Compulife Software Inc.
==

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


RE: Fixed string in code.

2006-01-12 Thread Jeffry Loucks

I routinely place constants in code resources, such as tables and data
blocks that I want literally formatted and quickly referenced. It's also
easy to create any kind of literal resource using the resource compiler.
Normally, however, I don't care about the data being visible while not
executing.

Your issues are that 1) you want the cpp to make a pass on it so the date
and time tokens get resolved, and 2) you want it to be 'in the clear' for
casual observation.

One way - define an inline function like the following, and reference it
somewhere in your code:

#define kIDTag chrisbruner
inline void asm PrvIDTag(void)
{
bra.s   @1
dc.b\n,kIDTag,__DATE__,__TIME__,\n
nop
nop
nop
@1: 
}

It doesn't have to be executed, but it must be reachable (so it isn't
dead-stripped). In case it is executed, there is a branch over itself. The
NOPs are to help disassembly stay in sync. I'd reference it in a piece of
code that is rarely executed, but will not be optimized out. For example,
your version of RomVersionCompatible().

For M$DOS, the command 'grep -a chrisbruner yourapp.prc' will yield the
line that contains the tag.


Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: cbruner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 2:56 PM
To: Palm Developer Forum
Subject: Re: Fixed string in code.


That's exactly the problem. I'm trying to check the compile date and time 
from outside the code, so that the palm software can be kept in sync with 
other software/data in our system. I need to be able to find the string 
using other software and save it into a datafile, which can be verified by 
the palm software later when it's running. That way updates can be sure that

they are running with the correct data.

My scheme was to originally have
_PDADATESTAMP
{
char Tag1[12];
char Date[50];
char Time[50];
};

_PDADATESTAMP pdaDateStamp = {chrisbruner,__DATE__,__TIME__};

I find the tag fine, but the date and time are jumbled. Of course when the 
palm software starts up it can see them just fine, which leads me to suspect

that the linker is compressing data, and the loader uncompresses when the 
palm software starts. Normally a very nice feature, but in this case


Chris Bruner
Compulife Software Inc.
==
- Original Message - 
From: Borszczuk [EMAIL PROTECTED]
Newsgroups: palm-dev-forum
To: Palm Developer Forum palm-dev-forum@news.palmos.com
Sent: Thursday, January 12, 2006 5:44 PM
Subject: Re: Fixed string in code.


 On Thursday 12 of January 2006 23:27 cbruner wrote:

 You had me all excited, thinking that you had a solution for me. Turns 
 out
 it
 compresses that just as much. This can easily be tested by grep 2006
 program.prc

 Can't you just call your app with own code that would return needed
 information to the caller? Shall work (unless you want to check that
 outside PalmOS)

 Regards,
 -- 
 Daddy, what Formatting drive C: means?...

 Marcin   http://wfmh.org.pl/carlos/

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


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

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


RE: (Sys 0505) (0, 841)

2005-12-07 Thread Jeffry Loucks
sysErrNotAllowed
Os trap # 841 - sysTrapOEMDispatch

Check for any device specific calls that aren't appropriate for the T5.


Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: Jan Slodicka [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 07, 2005 2:05 PM
To: Palm Developer Forum
Subject: (Sys 0505) (0, 841)


Hello,

does anybody have any clue what does it mean the message
 Error (Sys 0505) (0, 841) ?

I am getting it randomly on my T5 and I am not even sure whether it is
caused by our SW (could be) or something else.
Happens mostly in the system launcher, but also in another application.
Everything seems to be working afterwards.

I could not find any answer on the web.

Than you,
Jan Slodicka


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

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


RE: Where Can I see the Rom version for treo 650:

2005-12-07 Thread Jeffry Loucks
This may seem a simple question to most, but there's a catch...

You must be careful which method you use to retrieve a ROM or OS version.

My Treo 650's disagree internally. For example:

My Sprint Treo 650 (CDMA) displays Palm OS Garnet v. 5.4.8 in the
launcher, and SysGetOSVersionString() returns v. 5.4.8. However, the ROM
version returned by FtrGet(sysFtrCreator,sysFtrNumROMVersion,v) is
0x05403017, which means v.5.4.0r23.

My PalmOne Treo 650 (GSM) displays Palm OS Garnet v. 5.4.7 in the
launcher, and SysGetOSVersionString() returns v. 5.4.7. However, the ROM
version feature is 0x05403017, which again means v.5.4.0r23.

However, my Kyocera 7135 (CDMA) and Tungsten T3 agree internally.

My Kyocera 7135 (CDMA) displays Palm OS Software v. 4.1 in the launcher,
and SysGetOSVersionString() returns v. 4.1, and the ROM version feature is
0x04103000, or v.4.1.0r0.

My Tungsten T3 displays Palm OS software v. 5.2.1 in the launcher, and
SysGetOSVersionString() returns v. 5.2.1, and the ROM version feature is
0x05213000, or v.5.2.1r0.

My code gets the feature and the version string, decodes the version string,
compares the two and uses the highest it finds.

YMMV


Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: babbu cathy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 07, 2005 1:09 AM
To: Palm Developer Forum
Subject: Where Can I see the Rom version for treo 650:


hi all,

Where Can I see the Rom version for treo 650 in the
device itself.

- cathy.



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

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

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


RE: DateTimeType converting seconds to string

2005-11-11 Thread Jeffry Loucks

Katie,

Several problems that could cause a crash:

1. You pass in a (char **), implying you expect an allocated return buffer,
or a reference to some internal static buffer. Instead, you pass back the
address of an 'auto' buffer, one that temporarily exists on the stack only
as long as the CreateWavFileName() function is executing. It is no longer
valid after returning from CreateWavFileName().

2. The declaration char seconds[2] leaves no room for the trailing nul.
You expect two digits but have forgotten about the nul at the end of the
string. It should be at least char seconds[3]. That may also be the case
with your other declarations.

Since you know the specific format, why not format it yourself. Following is
a quick example. I presumed you wanted an allocated buffer returned. If
that's not the case, you can remove that part.

/*
 * Returns an allocated buffer at *ReturnFileName, or NULL for failure.
 * Caller must free the allocated buffer with MemPtrFree().
 */
void CreateWavFileName (char **ReturnFileName)
{
DateTimeType dt;

*ReturnFileName = MemPtrNew(22);// YY.MM.DD.hh.mm.ss.wav\0
== char[22]
if (*ReturnFileName)
{
TimSecondsToDateTime(TimGetSeconds(),dt);

StrPrintF(*ReturnFileName,%02d.%02d.%02d.%02d.%02d.%02d.wav,

dt.year%100,dt.month,dt.day,dt.hour,dt.minute,dt.second);
}
}


Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: Katie A. (Moor) Siek [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 11, 2005 2:18 PM
To: Palm Developer Forum
Subject: DateTimeType converting seconds to string


Hi Everyone,

I am trying to make unique file names. So I thought I would use the 
date and time (including seconds) in my function below. I could not 
find a function that would make a string for time that would include 
seconds. So I thought I could concatenate the strings for date and time 
and then use StrIToA to convert seconds from DateTimeType and append it 
to the end. However, I must be stomping on memory somewhere because 
when I use the function below, my PDA has to be reset. When I comment 
out the seconds code, it works fine. What am I doing wrong? Is there a 
way to get seconds?

Thanks in advance.

Katie

void CreateWavFileName (char **ReturnFileName)
  {
/* we want a file name like this:
 *yr.mo.da.hr.min.sec.wav\0
 *95.11.31.12.04.32.wav\0
 *yr.mo.da = dateStringLength
 *. period between date and time = 1
 *hr.min = timeStringLength
 *.sec = 3
 *.wav\0 = 5
 */
char filename[dateStringLength+1+timeStringLength+3+5];
char date[dateStringLength]; /* short length of 9 */
char time[timeStringLength]; /* short length of 9 */
char seconds[2]; /* seconds has length of 2 */
DateTimeType now;

/* initialize strings */
filename[0] = '\0';
date[0] = '\0';
time[0] = '\0';
seconds[0] = '\0';


TimSecondsToDateTime(TimGetSeconds(), now);

/* this gives us year.month.day (i.e. 95.11.31) */
DateToAscii(now.month, now.day, now.year,
dfDMYWithDots, date);

/* this gives us hour.minute (i.e. 12.4) */
TimeToAscii(now.hour, now.minute, tfDot24h, time);

/* create seconds to a string */
StrIToA(seconds, (Int32)now.second);

/* concatenate date, time, seconds, .wav\0 */
StrCat(filename,date);
StrCat(filename,.);
StrCat(filename,time);
StrCat(filename,seconds);
StrCat(filename,.wav\0);

*ReturnFileName = filename;

  }


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

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


RE: How to find out if the network is connected

2005-11-08 Thread Jeffry Loucks
Title: Message



Try 
the following:

1. 
Call NetLibOpenCount() to determine if NetLib is already 
open.
2. 
If not, call NetLibOpenIfCloseWait() to see if NetLib was recently closed and 
may not have already disconnected.
3. 
If not already open and not in close-wait state, the network is PROBABLY not 
available.
4. 
If already open or in close-wait state, call NetLibOpen().
5. 
For info on how you MIGHT be connected, use 
NetLibIFGet() and NetLibIFSettingGet() to Iterate through the interfaces, 
looking for which interface is 'up'.

At 
this point, you believe you are connected to the phone network and possibly to 
the data network.

For 
a Handspring GSM device:

6. 
You can call PhnLibGPRSAttached() to determine if you have a valid data 
connection.

For 
a Handspring CDMA device...

6. 
Can somebody fill in this blank?

Jeff LoucksMobile 
253-691-8812

  
  -Original Message-From: Benjamin 
  Bloomfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 08, 
  2005 10:09 AMTo: Palm Developer ForumSubject: How to 
  find out if the network is connectedIs there a way to 
  find out on the Treo if it currently connected to the data network? For 
  example, when it is connected it shows two arrows above the bars symbolizing 
  signal strength. Also, if it is not connected and you go to the web 
  browser, it will start connecting. I need to know if it is going to 
  connect when I call NetLibOpen() or not. There must be a way to do this, 
  but I have not found it yet. Thanks,Benjamin Bloomfield-- 
  For information on using the PalmSource Developer Forums, or to unsubscribe, 
  please see http://www.palmos.com/dev/support/forums/
-- 

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



RE: Reading AppInfo block in DB

2005-11-08 Thread Jeffry Loucks
You have incremented appInfoP, so it no longer points to the originally
allocated memory. Save the pointer someplace to use in free().


Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: Jim Duffy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 08, 2005 3:57 PM
To: Palm Developer Forum
Subject: Reading AppInfo block in DB



Hi All,

I'm having trouble reading the app info block in my DB.

I've written this kind of code before and it works fine when the AppInfo 
block is of a known size that can be directly assigned to a C struct. 
However, in this particular database, the app info block can be of an 
arbitrary size..

I get the app info pointer like so:
appInfoP = (char*)MemLocalIDToLockedPtr(appInfoID, cardNum);

I then assign some local variables with the data contained in the app info 
block by cycling through the pointer.

Like:

// number of strings
groupList.SetCount(*appInfoP);
appInfoP++;
// read each string
for(int j = 0; j  groupList.GetCount(); j++)
{
do
{
 groupList[j]+= *appInfoP;
 appInfoP++;
 }
  while(*appInfoP != '\0');
  // skip over null byte
  appInfoP++;

After doing this I call:

 MemPtrUnlock(appInfoP);

However, my application crahses as soon as the call to unlock the pointer is

made..

If I get the lock pointer and then immediately unlock it without reading any

values, it doesn't crash..

Does anyone know why this is happening and how I can resolve the issue?

Thanks for the help in advance,

Jim



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

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


RE: Reading AppInfo block in DB

2005-11-08 Thread Jeffry Loucks
Errr.. I meant originally locked and later unlocked.


Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: Jeffry Loucks [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 08, 2005 4:05 PM
To: Palm Developer Forum
Subject: RE: Reading AppInfo block in DB


You have incremented appInfoP, so it no longer points to the originally
allocated memory. Save the pointer someplace to use in free().


Jeff Loucks
Mobile 253-691-8812


-Original Message-
From: Jim Duffy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 08, 2005 3:57 PM
To: Palm Developer Forum
Subject: Reading AppInfo block in DB



Hi All,

I'm having trouble reading the app info block in my DB.

I've written this kind of code before and it works fine when the AppInfo 
block is of a known size that can be directly assigned to a C struct. 
However, in this particular database, the app info block can be of an 
arbitrary size..

I get the app info pointer like so:
appInfoP = (char*)MemLocalIDToLockedPtr(appInfoID, cardNum);

I then assign some local variables with the data contained in the app info 
block by cycling through the pointer.

Like:

// number of strings
groupList.SetCount(*appInfoP);
appInfoP++;
// read each string
for(int j = 0; j  groupList.GetCount(); j++)
{
do
{
 groupList[j]+= *appInfoP;
 appInfoP++;
 }
  while(*appInfoP != '\0');
  // skip over null byte
  appInfoP++;

After doing this I call:

 MemPtrUnlock(appInfoP);

However, my application crahses as soon as the call to unlock the pointer is

made..

If I get the lock pointer and then immediately unlock it without reading any

values, it doesn't crash..

Does anyone know why this is happening and how I can resolve the issue?

Thanks for the help in advance,

Jim



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

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

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


RE: Receiving data

2005-10-14 Thread Jeffry Loucks
Returns 0 if the socket is closed, else -1 (error) or 0 for number of bytes
received.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 13, 2005 10:46 PM
To: Palm Developer Forum
Subject: Receiving data


Hi All,

 I have socket in non blocking mode ... I get netErrWouldBlock when I try to
read the data using NetLibReceive() .. its ok .. coz that time the data
might not available. But after receiving some chunks of data, it again
starts giving netErrWouldBlock .. is that mean the data is finished or
expecting some more data? it returns -1.

Can anybody tell me in which case it returns 0? is it when the data is
finished?

thanks in Advance.

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

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


RE: Receiving data

2005-10-14 Thread Jeffry Loucks
On a stream socket, the data never ends. Keep reading until you get all the
data you expect (if you know the length), or until the socket is closed.

For example, if you connect to a service that sends packets of known length,
read the socket until you have received a complete packet, and then repeat
as required until closed.

Another example, if you are connecting to a server that sends a single
stream of data and then closes the socket (a web page, for example), then
read the data until the socket is closed by the other end. Even a web page
response contains the content length, but you can read until closed just as
easily.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 13, 2005 11:13 PM
To: Palm Developer Forum
Subject: RE: Receiving data


Hi Jeff,

 Thanks for your reply.

Can you please tell me when I get -1 and netErrWouldBlock .. after
receiving the data, does that mean its the end of data? no more data
available to read? 

 Returns 0 if the socket is closed, else -1 (error) or 0 for 
  number of bytes received.

what error it returns when the data is finished? 


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

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


RE: Initiating a phone call (dialing) programmatically on the Tre o 600

2005-10-12 Thread Jeffry Loucks

Try using the dialer helper. First, check for the existence of the dialer
helper. Second, use the helper to place the call:

Boolean DialPhone(char *pPhoneNumber, char *pDisplayName)
{
if (VerifyHelper(kHelperServiceClassIDVoiceDial,0))
return DialerHelper(pPhoneNumber,pDisplayName);
return false;
}

Boolean VerifyHelper(UInt32 serviceClassID, UInt32 helperAppID)
{
SysNotifyParamType notifyParam;
HelperNotifyEventType helperEvent;
HelperNotifyValidateType helperValidate;

MemSet(notifyParam,sizeof(notifyParam),0);
notifyParam.broadcaster = your_creator_id;
notifyParam.notifyType = sysNotifyHelperEvent;
notifyParam.notifyDetailsP = helperEvent;

MemSet(helperEvent,sizeof(helperEvent),0);
helperEvent.version = kHelperNotifyCurrentVersion;
helperEvent.actionCode = kHelperNotifyActionCodeValidate;
helperEvent.data.validateP = helperValidate;

MemSet(helperValidate,sizeof(helperValidate),0);
helperValidate.serviceClassID = serviceClassID;
helperValidate.helperAppID = helperAppID;

SysNotifyBroadcast(notifyParam);
return notifyParam.handled;
}


Boolean DialerHelper(char *pPhoneNumber, char *pDisplayName)
{
SysNotifyParamType notifyParam;
HelperNotifyEventType helperEvent;
HelperNotifyExecuteType helperExecute;

MemSet(notifyParam,sizeof(notifyParam),0);
notifyParam.notifyType = sysNotifyHelperEvent;
notifyParam.broadcaster = your_creator_id;
notifyParam.notifyDetailsP = helperEvent;

MemSet(helperEvent,sizeof(helperEvent),0);
helperEvent.version = kHelperNotifyCurrentVersion;
helperEvent.actionCode = kHelperNotifyActionCodeExecute;
helperEvent.data.executeP = helperExecute;

MemSet(helperExecute,sizeof(helperExecute),0);
helperExecute.serviceClassID = kHelperServiceClassIDVoiceDial;
helperExecute.dataP = pPhoneNumber;
helperExecute.displayedName = pDisplayName;

SysNotifyBroadcast(notifyParam);
return notifyParam.handled;
}


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Benjamin Bloomfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 12, 2005 12:22 PM
To: Palm Developer Forum
Subject: Initiating a phone call (dialing) programmatically on the Treo 600


Hi,

I need to dial a number on the Treo 600, and it doesn't seem to be working.
It causes a crash, and according to the system log, the application causing
the crash was Phone, and not my own application.

Anyway, here's the code I'm using to initiate the call:

Wait -- one more thing: everything works, if I set confirm to true, or copy
the values for name and number from string constants.

Here's the code:

static void LaunchPhone(char* number, char* name, bool confirm)
{
PhoneAppLaunchCmdDialType* dial;
UInt16 len;
dial = (PhoneAppLaunchCmdDialType *)
MemPtrNew(sizeof(PhoneAppLaunchCmdDialType));
dial-version = 1;
dial-confirm = confirm;
len = StrLen(name);
dial-name = (char*)MemPtrNew(len+1);
StrCopy(dial-name, name);
len = StrLen(number);
dial-number = (char*)MemPtrNew(len+1);
StrCopy(dial-number, number);
dial-failLaunchCreator = appFileCreator;
dial-failLaunchCode = sysAppLaunchCmdNormalLaunch;
dial-dialMethod = PhoneAppDialMethodNormal;

MemPtrSetOwner((MemPtr)dial, 0);
MemPtrSetOwner((MemPtr)dial-name, 0);
MemPtrSetOwner((MemPtr)dial-number, 0);
LaunchWithCommand(sysFileTApplication, hsFileCPhone,
phoneAppLaunchCmdDial, dial);
}

Thanks.

-Benjamin Bloomfield

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


RE: conversion of float to string

2005-10-12 Thread Jeffry Loucks
Err FlpFToA (FlpDouble a, Char *s)


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: cbruner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 12, 2005 12:55 PM
To: Palm Developer Forum
Subject: conversion of float to string


There must be a way to do it. I've searched the libraries, and can't seem to

find it.

I've looked at all the standard methods,

fcvt,ecvt,gcvt,d_to_cstr,sprint

How do you convert a float/double to a string?

Chris Bruner
Compulife Software Inc.
== 

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


RE: Initiating a phone call (dialing) programmatically on the Tre o 600

2005-10-12 Thread Jeffry Loucks

Try using the dialer helper. First, check for the existence of the dialer
helper. Second, use the helper to place the call:

Boolean DialPhone(char *pPhoneNumber, char *pDisplayName)
{
if (VerifyHelper(kHelperServiceClassIDVoiceDial,0))
return DialerHelper(pPhoneNumber,pDisplayName);
return false;
}

Boolean VerifyHelper(UInt32 serviceClassID, UInt32 helperAppID)
{
SysNotifyParamType notifyParam;
HelperNotifyEventType helperEvent;
HelperNotifyValidateType helperValidate;

MemSet(notifyParam,sizeof(notifyParam),0);
notifyParam.broadcaster = your_creator_id;
notifyParam.notifyType = sysNotifyHelperEvent;
notifyParam.notifyDetailsP = helperEvent;

MemSet(helperEvent,sizeof(helperEvent),0);
helperEvent.version = kHelperNotifyCurrentVersion;
helperEvent.actionCode = kHelperNotifyActionCodeValidate;
helperEvent.data.validateP = helperValidate;

MemSet(helperValidate,sizeof(helperValidate),0);
helperValidate.serviceClassID = serviceClassID;
helperValidate.helperAppID = helperAppID;

SysNotifyBroadcast(notifyParam);
return notifyParam.handled;
}


Boolean DialerHelper(char *pPhoneNumber, char *pDisplayName)
{
SysNotifyParamType notifyParam;
HelperNotifyEventType helperEvent;
HelperNotifyExecuteType helperExecute;

MemSet(notifyParam,sizeof(notifyParam),0);
notifyParam.notifyType = sysNotifyHelperEvent;
notifyParam.broadcaster = your_creator_id;
notifyParam.notifyDetailsP = helperEvent;

MemSet(helperEvent,sizeof(helperEvent),0);
helperEvent.version = kHelperNotifyCurrentVersion;
helperEvent.actionCode = kHelperNotifyActionCodeExecute;
helperEvent.data.executeP = helperExecute;

MemSet(helperExecute,sizeof(helperExecute),0);
helperExecute.serviceClassID = kHelperServiceClassIDVoiceDial;
helperExecute.dataP = pPhoneNumber;
helperExecute.displayedName = pDisplayName;

SysNotifyBroadcast(notifyParam);
return notifyParam.handled;
}


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Benjamin Bloomfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 12, 2005 12:22 PM
To: Palm Developer Forum
Subject: Initiating a phone call (dialing) programmatically on the Treo 600


Hi,

I need to dial a number on the Treo 600, and it doesn't seem to be working.
It causes a crash, and according to the system log, the application causing
the crash was Phone, and not my own application.

Anyway, here's the code I'm using to initiate the call:

Wait -- one more thing: everything works, if I set confirm to true, or copy
the values for name and number from string constants.

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


RE: Memory allocation

2005-10-11 Thread Jeffry Loucks

pdat = (struct pdata *) MemPtrNew(sizeof(struct pdata));
pdat-idat = (struct idata *)MemPtrNew(5 * sizeof(struct idata));


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Gnadinger, David [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 11, 2005 1:23 PM
To: Palm Developer Forum
Subject: Memory allocation


Can someone help me? I'm trying to allocate space for the following
structure within a structure:

struct pdata {
 ...
 ...
 struct idata *idat;
 ...
 ...
} *pdat;

I have successfully allocated space for the pdata structure this way:
pdat = (pdata *) MemPtrNew(sizeof(pdata);

I want to allocate space for, for example, 5 structures of type idat. How
would I do that?
Thanks for any help
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/

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


Info on PhnLibCardInfoEx() crashing

2005-10-11 Thread Jeffry Loucks
Has anyone been able to call PhnLibCardInfoEx() on a Treo650 CDMA without
crashing?

I get the fatal error TILUtilsCDMAHtc.c, Line:69, Not NV read response.
This call works on Treo600.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: Reading phone/data signal levels on Treo 600 and Treo 650

2005-10-10 Thread Jeffry Loucks
For CDMA, the number returned is the ABS(dBm). A value of 113 corresponds to
-113dBm.

According to GSM 07.07 Section 8.5, convert from dBm to rssi [0..31]:

0   -113 dBm or less
1   -111 dBm
2...30  -109... -53 dBm   [ (113 - s)/2 ]
31  -51 dBm or greater

To convert from rssi to bars [0..5]

0   -113 dBm or less
1   -111 dBm
2...4   -109... -53 dBm   [ ((rssi * 2)/15 + 1 ]
5   -51 dBm or greater


For GSM, I believe the number returned is rssi [0..31].

0   0..3
1..44..24   [ rssi/6 + 1 ]
5   25..n



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Ilia Mandev [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 2:57 PM
To: Palm Developer Forum
Subject: Reading phone/data signal levels on Treo 600 and Treo 650


Hi all!

Anyone knowing how to interpret the return values from 
PhnLibSignalQuality()?

And if these values differ for the both phones or on GSM/CDMA networks?

The final task is to know how much bars (0 - 4) will the signal indicator 
show...


Seems a difficult task, but thanks in advance!

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


RE: INet.lib confusion

2005-09-28 Thread Jeffry Loucks

The netErrWouldBlock is normal if you read an empty non-blocking socket. It
means your call would have blocked to wait for data. All you do is come back
to it another time and try again. If there is data, you will receive it,
else you will get another netErrWouldBlock.

It is common to keep trying the socket at intervals. You can set the maximum
time EvtGetEvent() will wait for a system event. Then, when you receive a
nil event from EvtGetEvent(), which will occur at timeout (and other times,
as well), you poll the socket for data.

Socket notices will do all this for you, so you don't have to poll. It's
very handy when you want to receive data while the device is sleeping, and
the event handler is not running.
 

Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 27, 2005 10:15 PM
To: Palm Developer Forum
Subject: Re: INet.lib confusion


Hi Henk,

 Thank you very much for your reply. I got your solution. But the problem is
that. If I call NetLibReceive(), it blocks the other events and if I use 
NetLibSocketOptionSet(.., netSocketOptSockNonBlocking, ..); it gives me
netErrWouldBlock when I call NetLibReceive() after that.

am I doing something wrong? any suggestions?

Thank you very much.

..
KiraN Puranik


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


RE: INet.lib confusion

2005-09-28 Thread Jeffry Loucks
If anyone is aware of an issue with socket notices, please contact me.

I don't recall a crash using them, but there was an issue setting them up.
Just have to remember to pass the address of a pointer to the option
structure.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Henk Jonas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 28, 2005 2:00 AM
To: Palm Developer Forum
Subject: Re: INet.lib confusion


Wasn't there some thing about crashes with socket notices some weeks ago 
here in the posts?

Can't really remember, but if not, this is of course the best way to do it.

Regards
Henk


Jeffry Loucks wrote:

 The netErrWouldBlock is normal if you read an empty non-blocking socket.
It
 means your call would have blocked to wait for data. All you do is come
back
 to it another time and try again. If there is data, you will receive it,
 else you will get another netErrWouldBlock.
 
 It is common to keep trying the socket at intervals. You can set the
maximum
 time EvtGetEvent() will wait for a system event. Then, when you receive a
 nil event from EvtGetEvent(), which will occur at timeout (and other
times,
 as well), you poll the socket for data.
 
 Socket notices will do all this for you, so you don't have to poll. It's
 very handy when you want to receive data while the device is sleeping, and
 the event handler is not running.
  
 
 Jeff Loucks
 Work 425-284-1128 [EMAIL PROTECTED]
 Home 253-851-8908 [EMAIL PROTECTED]
 Mobile 253-691-8812
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 27, 2005 10:15 PM
 To: Palm Developer Forum
 Subject: Re: INet.lib confusion
 
 
 Hi Henk,
 
  Thank you very much for your reply. I got your solution. But the problem
is
 that. If I call NetLibReceive(), it blocks the other events and if I use 
 NetLibSocketOptionSet(.., netSocketOptSockNonBlocking, ..); it gives me
 netErrWouldBlock when I call NetLibReceive() after that.
 
 am I doing something wrong? any suggestions?
 
 Thank you very much.
 
 ..
 KiraN Puranik
 
 


-- 
-
   Henk Jonas[EMAIL PROTECTED]
   Palm OS (r) certified developer

   Please contact me, if you need an off-site contract worker.
-

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

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


RE: INet.lib confusion

2005-09-27 Thread Jeffry Loucks
Check out socket notices. You set the socket to send a notice on one or more
events, and then go off and do other things until the notice (notification)
arrives.

OS5 supports only the 'notification' type of notice, on any combination of
the following events:

netSocketNoticeErr
netSocketNoticeUDPReceive
netSocketNoticeTCPReceive
netSocketNoticeTCPTransmit
netSocketNoticeTCPRemoteClosed
netSocketNoticeTCPClosed
netSocketNoticeConnectInbound
netSocketNoticeConnectOutbound

Sorry about the outbound connection notice not working. My fault. There are
alternatives to non-blocking outbound connection, though.

If you need code, there's probably some in the archives, and there's some
fairly opaque sample code in the SDK, or I can send you some.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 27, 2005 10:15 PM
To: Palm Developer Forum
Subject: Re: INet.lib confusion


Hi Henk,

 Thank you very much for your reply. I got your solution. But the problem is
that. If I call NetLibReceive(), it blocks the other events and if I use 
NetLibSocketOptionSet(.., netSocketOptSockNonBlocking, ..); it gives me
netErrWouldBlock when I call NetLibReceive() after that.

am I doing something wrong? any suggestions?

Thank you very much.

..
KiraN Puranik

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


RE: Parameter Error

2005-08-26 Thread Jeffry Loucks
Which NetLib call? netErrParamErr (0x1204) normally means a parameter value
is unacceptable. It's either an invalid value, or is a valid value that is
not acceptable in that particular instance.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Donald C. Kirker
Sent: Friday, August 26, 2005 6:24 PM
To: Palm Developer Forum
Subject: Parameter Error


What does the 0x1024 Parameter Error mean when it comes from the Network
Library?

Thanks,
Donald Kirker

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


Re: Background operation on PalmOS

2005-08-25 Thread Jeffry Loucks

Good suggestion. People have attempted to use real AMX tasks in pre-OS5,
which is neither supported nor recommended. I would like to point out right
up front that my work does not involve any additional OS 'tasks' of any
kind.

And yes, it is possible to do background-like stuff with notifications. 

However, my work is less about background operation and more about
application threads that happen to work in the background.

I have been called upon to do a lot of communication related stuff, often
porting from other operating systems. It is common to have at least a send,
receive and service thread, asynchronous I/O and some kind of background
presence.

Early on (I've been at this since 1996) I got really tired of having to
re-engineer everything to the, dare I say, 'frightfully primitive' Palm
model, so I created threads, added async I/O, and facilitated background
operation.

This work has served me well and I'm offering it to the community (in a form
yet to be determined).

Thanks,
jeff

Jeffry Loucks a écrit, le 25/08/2005 03:48 :

 I have received several requests for the background and thread stuff, so
 I am assembling some documentation and a preliminary install. Please
 allow me a few more days to make sense of it.

If I can make a suggestion, it would be a good idea to start your
documentation by explaining that there are usually better - and more
supported - ways to do things than creating a background task.

You can do a lot of stuff with notifications...

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


RE: Background operation on PalmOS

2005-08-24 Thread Jeffry Loucks
I have received several requests for the background and thread stuff, so
I am assembling some documentation and a preliminary install. Please
allow me a few more days to make sense of it.

There have been offers of webspace, as well. Very much appreciated.

Thanks,
jeff

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


RE: How to accomplish a background application on palm platform

2005-08-19 Thread Jeffry Loucks

I've been using a homegrown thread manager in both foreground and background
for several years now. I could be convinced to make it available, if there's
sufficient interest.

Features:
1. Works on PalmOS 3.5 and later (including OS5 - haven't tried OS6).
1. Any number of threads, in any number of contexts (app environments).
2. Non-preemptive, with some exceptions.
3. App globals and multi-segment support.
4. Asynchronous socket and serial IO.
5. Timers, events (semaphore, mutex) and queues.
6. Power and sleep management.

Caveats:
1. It's PalmOS, so all copies would be shipped with a packet of salt, to be
taken a grain at a time.
2. The thread stacks annoy the emulator.
3. Non-preemptive, so you are at the mercy of the current CPU resident.

 
-Original Message-
From: [EMAIL PROTECTED]
Sent: 8/19/2005 1:20 AM
Subject: How to accomplish a background application on palm platform

hi, is there any way to accomplish a background application on palm
platform just like the realplayer on treo650?

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


RE: SslRead() problem

2005-08-16 Thread Jeffry Loucks
Docs say SslReceive() and SslRead() are the same, except SslReceive()
returns info on the socket (sender).

A similar issue I've heard from other Ssl users; are you setting the send
timeout, as well? It seems they have to be the same, or at least set
concurrently. Try setting the send and receive timeout to the same value,
each time as needed.

Sounds goofy, but it solved their problem.

-Original Message-
From: Henk Jonas
To: Palm Developer Forum
Sent: 8/16/2005 3:11 AM
Subject: Re: SslRead() problem

Philippe Fischer wrote:

 
 Hello developers,
 I have a problem with the SslRead() function, if there is a small
amount
 of data sended to the device my app hangs 60 seconds in this function
until
 SslRead() returns the data. I've tried setting IOTimeout and
AppNetTimeout
 without a result .
 

Without having used SSL Lib before: Have you tried to use SslReceive 
with a given timeout (0 for example)? Have you tried to read the data 
byte-wise (if this is possible at all with the underlying encryption 
algorithm)?
I would expect the small amount of data is smaller than the internal 
buffer size. That's why the SslLib is waiting for more data to come to 
fill the buffer before it will be proceed and decrypt. Have a look into 
RbufSize for this.

Regards
Henk

-- 

-
   Henk Jonas[EMAIL PROTECTED]
   Palm OS ® certified developer

   Please contact me, if you need an off-site contract worker.

-

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

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


RE: Read about it in the SDK.

2005-08-15 Thread Jeffry Loucks

First, you increment 'recordindex' before using, so you skip strArray[0] and
potentially write past the allocated array.

Second, since you skipped strArray[0], LstDrawList() tells the list draw
code to dereference a string pointer that is garbage and probably crashes
doing so.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: druid [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 15, 2005 5:27 PM
To: Palm Developer Forum
Subject: Re: Read about it in the SDK.


well I tried to incorporate your ideas intot he snippet
but it still crashes with the same error

Char letter[256];
Char *p;
Char **strArray = NULL; //empty array
Char* strLines = NULL;
Err err;
UInt16 recordindex = 0;

StrCopy( letter, A );
err = Open(); // routine to open database
pForm = FrmGetActiveForm(); // get active form
lsp1 = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm, frmList1));
// get id of list control
nRecordIndex = DmNumRecords(dbPtr); // number of records

strArray = MemPtrNew(nRecordIndex * sizeof(Char *));

for(index =0; index  10; index++) // lets index through database
 {
  h = DmQueryRecord(dbPtr, index); // lets query each record
  p = (Char *) MemHandleLock(h); // lets lock each record
  if( 0 == StrNCaselessCompare( letter, p, 1) ) //compare first letter
of first field
   {
recordindex++;
strArray[recordindex] = MemPtrNew(StrLen(p) + 1);
StrCopy(strArray[recordindex], p);

//ghStringArray = SysFormPointerArrayToStrings(p, 1);
//strArray = (Char**) MemHandleLock(ghStringArray);
   }
  MemHandleUnlock(h); // unlock each record 
 }
LstSetListChoices(lsp1,strArray,recordindex); // clear list
LstDrawList( lsp1 );  HERE is where debugger stops
err = CloseDB(); 
return true;
}

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

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


RE: Simple question about how to increase stack size

2005-08-11 Thread Jeffry Loucks
Stanislav,

You can change the stack size at least two ways;
1) change the requested stack size at build time in the 'pref' resource
2) change the actual stack at run time

The first is simple. For example, if using PilRC, the following is supposed
to work:

SYSAPPLICATIONPREFERENCES ID 0 PRIORITY 30 STACKSIZE 8192 MINHEAPSPACE 4096

Unfortunately, the above statement does not work in our version of PilRC, so
I use the following manual method:

HEX pref ID 0 /*priority*/0x00 0x1E /*minstack*/0x00 0x00 0x20 0x00
/*minheap*/0x00 0x00 0x10 0x00

The second is a hack, but works fine. Note, this method causes the emulator
to complain that the stack pointer is outside the stack boundaries. Turn
that warning off, of don't use the emulator.

How it works: you allocate the stack you'd prefer with MemPtrNew(), save the
current stack pointer, then change the stack pointer to point to the end of
the newly allocated stack, and call your code. When you return, restore the
stack pointer to the saved one, MemPtrFree() the one you created and return
to the original caller. It's easy in assembler. Example:

void asm ExecuteWithNewStack(void (*proc)(), UInt32 stackSize)
{

// allocate new stack
move.l   8(sp),-(sp)// retrieve 'stackSize'
trap #15
dc.w #sysTrapMemPtrNew
move.l   a0,(sp)// save new stack base

// call proc using new stack
add.l12(sp),a0  // add 'stackSize' to new stack pointer
move.l   8(sp),a1   // retrieve 'proc'
exg  a0,sp  // exchange new and old stack
move.l   a0,-(sp)   // save original stack pointer
jsr  (a1)   // call proc
move.l   (sp)+,sp   // restore original stack pointer
 
// dispose of allocated stack
// previously allocated pointer is still on original stack
trap #15
dc.w #sysTrapMemPtrFree

// cleanup and return
lea  8(sp),sp
rts

}

- Original Message -
From: Stanislav Borisov
Sent: Thursday, August 11, 2005 5:01 PM
Subject: Simple question about how to increase stack size

 Hi all,
 I'm new in the forum and in the Palm programming.

 I'm developing Palm application with CW9.0 for PalmOne Treo 650 device
and
now I'm testing with the simulator.

 I have following problem: Sometimes my application crashes with fatal
error Invalid chunk ptr or sometimes the simulator crashes comletely
without displaing this message. Without any changes in the code
sometimes my
application works fine, and sometimes crashes.

 I read all posts related with this Invalid chunk ptr error and try
lot
of things described there but nothing helps me.

 Please can somebody can explain me what can be the possible reasons
for
such type of crashes?

 Also if the stack size is too small can you tell me how I can increase
it?

 When I try to Debug application crashes in different places in the
code
and I can't understand where exactly is the problem. I have checked all
my
code for any memoty leaks but I didn't found anything wrong.

 My application has 3 segments, if this is significant.

 Please give me some advices, bocuse I'm stucked here. I will give you
more
info about my app if you need.

 Thanks in advance!!!

 --
 

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


RE: Need some help determing what might be crashing this code

2005-08-10 Thread Jeffry Loucks
You are not setting dbPtr back to NULL after closing the database, so the
second time through your Open() routine, the database is not reopened, dpPtr
remains pointing to garbage and Open() returns no error.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: druid [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 10, 2005 7:32 PM
To: Palm Developer Forum
Subject: Re: Need some help determing what might be crashing this code


Here is the open routine

static Err Open(void)
{
// Open the database or create it if it doesn't exist:
if(dbPtr == NULL)
{
// First see if we can find it:
LocalID dbID = DmFindDatabase(DB_CARDNO, DB_NAME);
if(!dbID)
{
// Couldn't find it, so create it:
Err err = DmCreateDatabase(DB_CARDNO, DB_NAME,
DB_CREATOR, DB_TYPE, false);
if(err)
return err;
// Now we ought to find it:
dbID = DmFindDatabase(DB_CARDNO, DB_NAME);
if(!dbID)
return 1;
}
// Found it, now open it:
dbPtr = DmOpenDatabase(DB_CARDNO, dbID, dmModeReadWrite);
if(dbPtr == NULL)
return 1;
}
// Everything went smoothly:
return 0;
}


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

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


RE: Question on Socket notifications

2005-07-01 Thread Jeffry Loucks
The inbound socket activity has already awakened the device and deferred the
socket notice. The deferred notification will be broadcast during
EvtGetEvent(), which your app is probably blocked in. You need to make sure
you defer sleep (see sleep event/notifications and management) long enough
to be able to broadcast the notification and return from EvtGetEvent() to do
any followup servicing. You can do all of this without fully waking the
device (screen remains off), and returning to full sleep when finished.

jeff


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Aaron Hansen [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 01, 2005 9:32 AM
To: Palm Developer Forum
Subject: Question on Socket notifications


Hey folks,

I am trying to get socket notifications working and seem to be having
problems.  I am trying to use it in a shared library, and I have a
callback setup for the notification.  I'm testing on a Treo650.  Since
the socket notify is deferred, will the device wake up if it's asleep
when this notify is triggered?  I'm not seeing them come in, but I'm
hoping it's just an error in my code.  Any tips or pitfalls on using
this api with a shared library would be appreciated as well.

Thanks,

Aaron


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


RE: Zire Rom ID problem

2005-06-13 Thread Jeffry Loucks
Devices without Flash ROM do not have serial numbers available in ROM.
Devices without Flash use a mask ROM that cannot be modified, thus cannot be
programmed with a serial number.

Treo devices may have a serial number, but do not respond to the
SysGetROMToken() call. You must use the
HsGetVersionString(hsVerStrSerialNo). Here's sample code:

char serialNumber[32];
serialNumber[0] = 0;
if (handspring)
{
UInt16 size;
size = sizeof(serialNumber);
HsGetVersionString(hsVerStrSerialNo,serialNumber,size);
}
else
{
UInt8 *p;
UInt16 size;
if (SysGetROMToken(0,sysROMTokenSnum,p,size) == 0  size
 0  *p != 0xFF)
{
if (size  sizeof(serialNumber)-1)
size = sizeof(serialNumber)-1;
MemMove(serialNumber,p,size);
serialNumber[size] = 0;
}
}


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Yuen Kwee [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 10, 2005 8:54 PM
To: Palm Developer Forum
Subject: Zire Rom ID problem


hi there! 

a user of the program i wrote is having problems getting the rom id from hi
Zire 71, i wrote this to get the rom id 

returnVal = SysGetROMToken((UInt16) 0,(UInt32)
sysROMTokenSnum,datap,size); 

the line works, but not for treo and tungsten E. are the zire series the
same as the TE? or some of the zire series has and some doesn't?

please help!

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


RE: How to get Palm Phone Number

2005-06-09 Thread Jeffry Loucks
There are several ways, depending on the device and telephony support.

Handspring uses the PhnLib. First, use PhnLibGetOwnNumbers() to get the list
of phone numbers. Then, depending on phone type CDMA or GSM, extract the
number (phnAddrFldPhone) from the first entry in the list. For CDMA, use
PhnLibAPGetNth() and PhnLibAPGetField(). For GSM, use PhnLibGetNth() and
PhnLibGetField().

Kyocera uses PDQModGetPhoneNumber().

On the old Tungsten-W, you had to read it from the Mobile Panel preferences
using PrefGetAppPreferences() to retrieve
kFileCMobilePanel/kMobilePanelPrefsId into a MobilePanelPrefsType.

There may be other methods, but I've not used them - yet.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: imran baig [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 09, 2005 6:42 AM
To: Palm Developer Forum
Subject: How to get Palm Phone Number


Hi All, 

Does any know how to get Palm Phone Number?

Cheers,

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

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


RE: How to get Palm Phone Number

2005-06-09 Thread Jeffry Loucks
Oh, I forgot a critical detail. In some cases, the phone number is not
available if the phone is turned off, or for the first 30 seconds after
powering the phone. You may consider stashing a copy, updating your stash as
appropriate.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Jeffry Loucks [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 09, 2005 1:17 PM
To: Palm Developer Forum
Subject: RE: How to get Palm Phone Number


There are several ways, depending on the device and telephony support.

Handspring uses the PhnLib. First, use PhnLibGetOwnNumbers() to get the list
of phone numbers. Then, depending on phone type CDMA or GSM, extract the
number (phnAddrFldPhone) from the first entry in the list. For CDMA, use
PhnLibAPGetNth() and PhnLibAPGetField(). For GSM, use PhnLibGetNth() and
PhnLibGetField().

Kyocera uses PDQModGetPhoneNumber().

On the old Tungsten-W, you had to read it from the Mobile Panel preferences
using PrefGetAppPreferences() to retrieve
kFileCMobilePanel/kMobilePanelPrefsId into a MobilePanelPrefsType.

There may be other methods, but I've not used them - yet.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: imran baig [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 09, 2005 6:42 AM
To: Palm Developer Forum
Subject: How to get Palm Phone Number


Hi All, 

Does any know how to get Palm Phone Number?

Cheers,

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

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

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


RE: Reciving Data in a Socket

2005-06-07 Thread Jeffry Loucks
Alexandre,

Use socket notices. 

1. Register to receive a notification, either procedural or app launch.
2. Prepare a socket to do what you need to do (stream or datagram).
3. Prime the socket to send a socket notice (notifications are the only type
supported by OS5).
4. When data arrives (or an error or shutdown), a deferred notification will
be sent by NetLib.
5. When you receive the notification, service the socket and then re-prime
the socket (one notice per prime).

A socket can be primed to send a notice on any combination of data receipt,
inbound connect, error or shutdown. Unfortunately, outbound connect was
overlooked.

NOTES:
1. Socket notices use a deferred notification, meaning the notification will
not be broadcast until the foreground app calls EvtGetEvent().
2. Socket notices are one-shot and must be reset after each trigger. You can
do it in the notification handler, if it is convenient.
3. The option argument passed in NetLibSocketOptionSet() in this case is the
address of a void pointer which points to the NetSocketNoticeType. Kind of
confusing.
4. There is sample socket notice code provided in the knowledge base, but it
is not very clear.


Try something like the following to prime the socket to send a notice:

// Refer to NetMgr.h for socket notice options.
Int16 AsyncSocketSetup(SOCKET sock, UInt32 condition)
{
NetSocketNoticeType notice;
void *option;

notice.condition = condition;   // some combination of conditions
from NetMgr.h
notice.type = netSocketNoticeNotify;
notice.notice.notify.notifyType = your selected notification ID;
option = notice;   // note the address of the pointer is used
if (NetLibSocketOptionSet(
NetLibRefnum,
sock,
netSocketOptLevelSocket,
netSocketOptSockNotice,
option,
sizeof(option),
NetLibTimeout,
NetLibErrno))
{
TRACE(AsyncSocketSetup() cannot set socket notice:
%x,NetLibErrno);
return -1;
}
return 0;
}

Hope this helps.
Jeff

Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Alexandre Barreto [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 07, 2005 5:38 AM
To: Palm Developer Forum
Subject: Re: Reciving Data in a Socket


My friend Regis said i was a litle confusing in my post.

what i want to know is How do I specify a function to be called 
automaticaly when there is data received on a socket (a call back or a 
notification)

thanx

Alexandre Barreto escreveu:
 Hi,
 
 I need to call a function evertime there is data on a socket.
 i can´t block my program wating for data there. i need the user to do
other stuffs..and when data arrives this function read the socket and do
stuffs.
 
 how can i do that?
 
 thank you,
 Alexandre

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


RE: How to prevent the device from going to sleep?

2005-06-02 Thread Jeffry Loucks

If you invoke modal UI objects, the event loop is out of your hands. Nasty
part of doing business with events (especially custom events) or using an
event loop. 

There are several ways to prevent a device from going to sleep. I think all
of them have already been mentioned. If EvtResetAutoOffTimer() in the event
loop didn't work (modals?), try one of the others, eg EvtSetAutoOffTimer().
To recap:

1. EvtResetAutoOffTimer() simply resets the auto-off timer, but does not
deactivate it. If the auto-off timer ever reaches the timeout value (see
EvtSetAutoOffTimer()), the device will attempt to auto-off. You must call
EvtResetAutoOffTimer() before the auto-off timer counts up to the timeout
value. This is useful when you are certain you can keep up with the auto-off
timer (beware of modals and long compute bound procedures).

2. Use EvtSetAutoOffTimer() to modify the auto-off timer. I believe setting
the timeout value to zero disables auto-off. Be careful that you don't leave
it disabled, so that it never goes to sleep, unless draining the battery is
really what you want to do :)

3. Register for and intercept the sleep notifications. There's a white paper
and a discussion under notifications in the companion.

4. If you are in charge of the event loop (beware of modals), you can waylay
the power-off and auto-off keys.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Tony Janke [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 02, 2005 3:18 PM
To: Palm Developer Forum
Subject: Re: How to prevent the device from going to sleep?


I tried sticking that command in my AppEventLoop function following the
function EvtGetEvent and that didn't work for me, the device still went to
sleep.  Where else can you place it so it is constantly accessed while my
app is running?

~Tony

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


RE: How to get a ref to an opened socket?

2005-05-31 Thread Jeffry Loucks

One way would be to save the socket handle in a feature. Then, any app could
find the socket handle in the feature and use it. Be sure to properly manage
NetLib, so that it doesn't close out from under you.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Asher Aslan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 31, 2005 3:42 AM
To: Palm Developer Forum
Subject: How to get a ref to an opened socket?


Hello Everyone,

My application opens a TCP connection to the server via socket.
Closing the app without explicitly closing the socket make the socket
still be connected and ready
to receiving data (via registering the app for sockets notifications).

My question is:
After I closed my app and left an opened socket, in which way can I
get a ref back to the connected socket after user re-launching the
app?

Thanks,
Asher

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


RE: Network

2005-05-27 Thread Jeffry Loucks
Open a UDP socket, bind it, set up a code fragment somewhere (feature
memory, or whatever) and register it to receive a system notification of
your choice, and set the socket to send a notification to the code fragment
on socket receive/error. As packets are received on the socket, a system
notification will be sent to the registered code fragment. In response, the
code fragment (or some app triggered by the fragment) should read the packet
off the socket, and re-set the socket to send a new notification.
Rinse.
Repeat.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: David Dionne [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 26, 2005 10:43 PM
To: Palm Developer Forum
Subject: RE: Network


Have I not posted this question in the right forum?

David Dionne
CEO

Nextworks
866-488-9799
256-468-6398
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Dionne
Sent: Sunday, May 22, 2005 6:57 PM
To: Palm Developer Forum
Subject: Network

Hey all, I need to constantly monitor a udp port for inbound packets.  How
could I do that?

David Dionne
CEO

Nextworks
866-488-9799
256-468-6398
[EMAIL PROTECTED]


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

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

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


RE: if Application can Delete itself if a tenable condition

2005-05-17 Thread Jeffry Loucks
Set the dmHdrAttrRecyclable attribute bit in the app database attributes
using DmSetDatabaseInfo(). You could do this while the app is running, or in
response to an alarm set for the expiration date.

dmHdrAttrRecyclable:
The database is recyclable. Recyclable databases are deleted when they are
closed or upon a system reset.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: SEAn Chen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 17, 2005 8:28 PM
To: Palm Developer Forum
Subject: if Application can Delete itself if a tenable condition


Hi

I want to know that if the application could delete itself when something
happens, maybe the trial version expired or some data has been modified.

so how can i do this?
any hint will be  thankful.

--SEAn ..

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


was RE: Is DmSyncDatabase() synchronous?

2005-05-11 Thread Jeffry Loucks

I realize the question appears to be simply a play on words, but I'm serious
:)

If nobody knows if the call is synchronous, has anyone observed anything
that would indicate it is not?

Thanks.

-Original Message-
From: Jeffry Loucks
To: Palm Developer Forum
Sent: 5/10/2005 4:58 PM
Subject: Is DmSyncDatabase() synchronous?

Anyone know if the new DmSyncDatabase() call is synchronous?
I'd like to know if, upon return, the database is completely
flushed to flash or is it simply flagged to be flushed. I
suspect it is synchronous, but I don't know what's behind the
scenes, so I'm not making any assumptions.

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


Is DmSyncDatabase() synchronous?

2005-05-10 Thread Jeffry Loucks
Any one know if the new DmSyncDatabase() call is synchronous? I'd like to
know if, upon return, the database is completely flushed to flash or is it
simply flagged to be flushed. I suspect it is synchronous, but I don't know
what's behind the scenes, so I'm not making any assumptions.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: T|E2's device id

2005-04-29 Thread Jeffry Loucks
Do you know the HAL id, as well?
Thanks


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Douglas Handy [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 29, 2005 4:39 AM
To: Palm Developer Forum
Subject: Re: T|E2's device id


Yuen,

any 1 knows the sysFtrNumOEMDeviceID / device id for tungsten e2?

Company ID  = 'Palm'
Device ID   = 'Zir4'

I thought the Zir prefix to the device was very interesting, considering
that
Zire devices don't even start with that!  And this certainly seems planned
as
more of a TE follow-on than a Zire follow-on.  Go figure.

Doug

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


RE: Bottom to top Pen stroke

2005-04-23 Thread Jeffry Loucks

The bottom to top stroke, beginning in the Grafitti area and ending near the
top of the screen is known as the 'ronamatic' stroke. The OS generates a
KeyDownEvent with the value 0x010E (see below). The default OS' response to
the ronamatic character is to generate a KeyDownEvent with the value 0x010F
(see below).

#define ronamaticChrvchrRonamatic   //
0x010E
#define graffitiReferenceChrvchrGraffitiReference   //
0x010F



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Jim Duffy [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 22, 2005 5:49 PM
To: Palm Developer Forum
Subject: Bottom to top Pen stroke



Hi All,

In the 'Buttons' dialog of the Prefs panel there is a button titled More. 
In there, one can select an action that happens when one strokes the pen 
from the bottom of the Graffiti area to the top of the screen..

Does this pen stroke have a virtual key code or something? I would like to 
use it in my app as a shortcut..

Thanks,

Jim

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


Was ... RE: Bottom to top Pen stroke

2005-04-22 Thread Jeffry Loucks
I see a lot questions like what event is generated when such-and-such
happens?

Here are some suggestions:

1. Hook your device up to a debugger and watch what happens when you do
such-and-such.
2. Or, use the emulator and log events while you do such-and-such.
3. Or, write an app to simply dump the contents of each event returned by
EvtGetEvent().

Pick your favorite. I usually use the third option, and write to the serial
port which I connect to a terminal emulator. You can do this realtime while
an app is running. If you don't want to use the serial port, write to a memo
or directly to the screen in a scrolling window.

Be creative.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: Cooperative Multitasking

2005-04-20 Thread Jeffry Loucks

A7 points to the current top of a stack (always valid). The stack is
allocated in the dynamic heap.
A6 is the 'frame' pointer (sometimes valid). The frame exists on the stack.
A5 is the 'globals' pointer (sometimes valid). Globals is your apps' data,
and is allocated in the dynamic heap.

Non-preemptive multi-threading is fairly simple. It does not require copying
the stack, merely changing the stack pointer (A7). I use a homebrew
muli-threading package that supports any number of threads, complete with
sync objects and asyncronous sockets, and it works just fine. Allows all
kinds of stuff to 'run' in the background.

See me offline if you'd like info.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Zakai Hamilton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 20, 2005 8:04 AM
To: Palm Developer Forum
Subject: Re: Cooperative Multitasking


OK... I am writing an environment for PalmOS and because its very module
oriented, I wanted Cooperative multitasking using ErrSetJump and ErrLongJump
and storing/restoring stacks via dynamic memory. Its a long story and I will
post it once it works but I am stuck on writing the saved stack back to the
real stack.

The idea is that after I use ErrLongJump to jump to the yield function to
continue the code, I want to restore the stack that was saved previously in
the yield before I used ErrSetJump there.

The funny thing is that I can save and restore a stack if I do the Save and
then the Restore function one after each other but I cannot Save in one
place and Restore in another if ErrSetJump and ErrLongJump happens
inbetween. Any ideas why that would happen? (I get the run68k.c, Line:4425,
Unhandled instr error when it tries to use MemMove to copy from the saved
stack to the real stack).

Note that the copying code is fine... otherwise I wouldnt able to Save to
the stack and then Restore from the stack. The problem is when I save the
stack in one place of execution and restore it at another location.

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


RE: NVFS articles online

2005-04-20 Thread Jeffry Loucks
Sorry Ben, but with great respect I must disagree and beat a dead horse.
Your answer ignores the question.

1) The SD card solved the non-volatile issue several years ago without
breaking a lot of stuff. An embedded SD card would have been wonderful. NVFS
is a not.

2) An SD card (or something like it) doesn't require power, either. And, see
#1.

3) Embedded or external SD card (or something like it) is NAND, which is why
they're a cheap and elegant solution. NVFS is not.

While I appreciate the position you are in, good intentions are not an
acceptable answer.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Ben Combee [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 20, 2005 1:04 PM
To: Palm Developer Forum
Subject: re: NVFS articles online


At 01:38 PM 4/20/2005, you wrote:
Ben,

What did NVFS buy us?  Seems like its just breaking a lot of stuff...

The big advantages to NVFS are, in my opinion:

1) Database storage is non-volatile and won't be erased if the battery goes 
dead.  This is very important for smartphones where users often run the 
device to an out-of-power state or where the device has a replaceable
battery.

2) Storage memory doesn't require power, making it possible to have longer 
battery lives while increasing the amount of memory available.  Reviews 
have shown the NVFS-enabled Tungsten E2 to have a much longer life than the 
similar Tungsten E.

3) NAND flash is cheaper than low-power dynamic RAM and a lot cheaper than 
NOR flash.  This means devices can have more storage yet cost less.



-- Ben Combee, Senior Software Engineer, palmOne, Inc.
Combee on Palm OS weblog: http://palmos.combee.net/
Developer Forum Archives:   http://news.palmos.com/read/all_forums/


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


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


RE: NVFS articles online

2005-04-20 Thread Jeffry Loucks
Doug,

You are correct, it answers one interpretation of the question.

The question was What did NVFS buy us?  Seems like its just breaking a lot
of stuff

IMHO, the question was not what was intended, but what did we get.

We got a non-determinant and unreliable implementation. I'm all for reliable
non-volatile storage, but I'll trust NVFS as a non-volatile alternative, and
admit it has bought us something, when it is able to survive an unexpected
reset, which at this point is all too frequent.

BTW, backup software is not the only way to use SD cards, or other form of
non-volatile storage. Apps have always been able to read and write them
directly. NVFS tries to do this automatically, but IMHO, gives us a false
sense of security by having us believe that our stuff is magically backed
up. NVFS does not (yet) do a deterministic job of automatically backing
stuff up. This is very important, if data state is important.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Douglas Handy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 20, 2005 2:11 PM
To: Palm Developer Forum
Subject: Re: NVFS articles online


Jeffry

Sorry Ben, but with great respect I must disagree and beat a dead horse.
Your answer ignores the question.

It does not ignore the question -- it answers the question (IMHO).

1) The SD card solved the non-volatile issue several years ago 

Only if people used backup software and regularly ran backups.  The NVFS
implementation backs up to non-volatile storage with every database close,
call to DmSyncDatabase, etc.  Some of my software includes automatic backups
(of
my app databases) to SD cards when present in part because people are not
good
about taking responsibility for backup themselves.

I think the theory of NVFS-like feature was great and is a welcome
improvement
in my book.  I think the only problem is there wasn't a beta period where us
developers could help test compatibility issues prior to publicly shipping
devices.

It would be nice if they issued a ROM update for the T5 to address some of
the
issues though.

Doug

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


RE: Flashing Palm Logo

2005-04-15 Thread Jeffry Loucks
It's likely that code flagged to run after system reset, is in a bad state
and is causing a repeating fatal exception. Thus, the flashing logo
(repeated resets).

Yes, I know, duh. But, it may be something you or the other package is doing
improperly on reset. Is any of your software flagged to run at reset?

You may be able to interrupt the repeating reset by holding the uparrow.
This will tell it to reset without extensions. Then, at least you'd be able
to look over the system without a hard boot. If holding the uparrow doesn't
interrupt it, well...

Now and then system data files and various memory locations get corrupted.
Resets may help them Very rarely is flash corrupted, and if that happens no
kind of reset will help :(


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: John Christensen [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 15, 2005 12:20 AM
To: Palm Developer Forum
Subject: Flashing Palm Logo


Dear Sir or Madam:

I developed a scanning order entry program that runs on Symbol SPT1800s(Palm
OS 4.1.2). The program has been deployed nation wide and has been in use
since last July. Overall it has been reliable and well received.  There is
one problem that occurs very rarely but when it does, it causes  me
tremendous pain.

I purchased a third part product that compresses data files and sends the
compressed files via modem to a server at corporate headquarters. On
occasion, something will go wrong during the connect session and this
product will freeze. For whatever reason, the third party company has not
been able to correct the freeze problem. For now the users just do a soft
reset when this happens.

On a handful of occasions, upon doing the soft reset, the user gets a
flashing Palm logo. The only way to revive the handheld is with a hard
reset. I'm assuming some of the OS files get corrupted somehow but which
ones? I'm not using any hacks and I have no idea how to diagnose what might
be causing this. If it matters, I am using HandEra's InstallPro to install
some files in User Flash memory. By the way a warm reset doesn't fix it.

Does anyone know if my use of User Flash might relate to this problem?

Is there any way to determine what is causing the flashing Palm logo?

I'm getting a lot of pressure to get this fixed. Anyone with info or ideas
PLEASE respond.

Thanks,

John C. Christensen

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


RE: Global variables and special launch codes

2005-04-14 Thread Jeffry Loucks
Free the memory when you no longer need it, but no sooner :)

If your callback registration comes and goes, you may want to leave the
memory allocated. If, after unregistering, you do not know when you'll need
it again, free it up. If it's a small amount of memory, you could leave it
for the next reset to 'clean' it up for you, but that's sloppy. Freeing up
when your app is deleted...


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Dr. Vesselin Bontchev [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 14, 2005 8:13 AM
To: Palm Developer Forum
Subject: RE: Global variables and special launch codes


Thanks for the idea!

 1) MemPtrNew() or MemHandleNew() a structure that contains all the
 info your code needs. Be sure to MemPtrSetOwner() to 0, so the
 memory is not automatically freed when your app exits, unless
 that's okay.

If I do this, when should I free the allocated memory chunk? When my
application is deleted (and/or when I instruct it to stop listening to the
special events from the user interface)?

Regards,
Vesselin

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


RE: Global variables and special launch codes

2005-04-13 Thread Jeffry Loucks

Globals (globals, statics, and multi-segment jump tables) are stored in a
chunk of dynamic heap that is only allocated for the app when it is launched
normally. This memory is available to the app via M68K register A5. The
compiler knows this and generates code that accesses globals relative to A5.
If you attempt to execute your code without A5 pointing to you globals, bad
things happen.

Code that expects to be executed without a valid A5 should not use globals
of any kind. There are alternatives.

A common solution is to:
1) MemPtrNew() or MemHandleNew() a structure that contains all the info your
code needs. Be sure to MemPtrSetOwner() to 0, so the memory is not
automatically freed when your app exits, unless that's okay.
2) Optionally use a feature to remember the pointer or handle that you
allocated in step #1.
3) Pass the pointer or handle as a user data pointer or reference in any API
that sets up your code to be called back. Those situations that do not
provide a user data pointer or reference can rely on the feature.

YMMV.

-Original Message-
From: Dr. Vesselin Bontchev
Subject: Global variables and special launch codes

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


RE: T5 storage issues

2005-04-11 Thread Jeffry Loucks

Sorry, for the length of this response. I had to leave for my son's
birthday. I would have liked to have been in the thick of this. After all, I
started it :)

 I have a theory that it's a little more complex than that.  I think
 what happened is that the T5 was supposed to be an OS 6 device, but
 PalmOne punted at or near the last minute and decided to make it an
 OS 5 device.  Whether this was due to PalmOne's unwillingness to

Thanks Logan, but from the developer and user's perspective, it doesn't
matter what predicament they (PalmX) faced, or that they didn't intend to
break anything. What's important is that they knowingly DID depart from some
very important things and broke several other things.

(with battery backed) You reset and you've lost nothing. The new way
buffers all our nice
important data in volatile storage. We can't flush it and we can't
know when the OS has deigned to write it through to flash, so we never
really know when the data is safe. Scratch reliability.
Wrong!  While we can't flush the cache and *empty* it, we can force
the cache to be committed back to NAND and therefore be safe from loss.
But then with your attitude of Forget the white paper, I guess you'll
never read about adding calls to DmSyncDatabase() to force this commit
to occur.

Thanks Doug, but many of you still consider manipulating a single record and
then syncing it, the only kind of database activity used. Our app requires a
fairly complex data caching scheme. It requires simultaneous use and update
of tens of megabytes of data. The NAND flash and device performance in
general cannot tolerate constantly syncing each database every time a cache
link or update is performed. We'd quickly wear out the flash, our patience
or both.

My attitude is not the question - I've read the white paper. It doesn't
address complicated apps. It gives simplistic bandaids for general purpose
use. It does not address our issues.

I don't have any problems with realiability in my tests, even with
unannounced resets.  But then, I read the white paper...

Please lay off the white paper. Some apps can accept simple workarounds.
Your issues may have been resolved, but ours remain.

We use NetLib over the cell phone on the Treo650. That's bad enough on any
device. It's even worse on Palm devices. Resets are simply a fact of life.
Until NVFS, we could endure them. Now, however...

I'm planning on doing a talk on NVFS at PalmSource 2005; I'm still
gathering all my information and seeing just what I can get cleared by
legal, but I hope to have a lot of information about the initial
implementation, the changes made for the Sprint Treo 650 update, and, if I
can, future directions for this technology.

I appreciate you in the forum Ben, and I'll look forward to your
presentation, but I'm afraid I'm less interested in the history and good
intentions of NVFS, than I am hearing how it will be fixed.

For those of us who can't make the conference, I would presentation
materials or
a white paper or something will be released following the conference.

Ditto.

IMHO I don't think data loss is a real threat for most users and I don't
think flash memory is better and more reliable than it's counterpart.

I agree Miguel. Even if the NVFS implementation worked reliably, it only
solves lesser problems. It cannot be argued that it provides better, or even
the same data reliability during use, only that it doesn't forget what you
can manage to stuff into it before the platform croaks out from under you.

I for one
feel that non-volatile memory is one of the most important additions to
the handheld world in a long time. That said, I can't speak to how well
it's been implemented on the T5 and Treo 650, because I haven't used
either device yet.  The battery on my Simulator works great though... :)

I have no problem with non volatile storage Mark, only as you say, the
implementation. If they couldn't get it right, they could have made it a
built in SD card, and left the storage heap in battery backed ram. At least
then it would be up to us how we choose to impose reliability.

I think you may be underestimating the significance of non-volatile memory.
And
keep in mind that one real advantage is the T5 does not require *any*
battery
power while off.  So it can sit in a drawer or purse for whatever length
of
time, and when you pull it out it is still ready to go.  This may encourage
people who don't use it as often, to start using it more and/or perceive it
as
more reliable. 

Please see my offhanded interim solution in the previous paragragh, Doug.
You don't have to throw out the value of non volatile. The same can be
accomplished in any previous device that supported an SD card. They didn't
have to complicate our lives with a poorly implemented and MANDATORY NVFS.

I'm not saying non-volatile memory is less or not reliable but what I
think is that many times the phrase you won't lose your data is
misused to improve the perceived reliability, and perceived != 

RE: T5 storage issues

2005-04-10 Thread Jeffry Loucks

Excuse me ahead of time - flames ahead...

 It wasn't supposed to break anything; the implementation that shipped
 on the T5 is a bit buggy, but palmOne and PalmSource are working on
 improving it and making it work much better with new software.

Okay, I've been holding my tongue for a long time...

Anyone could take one look at the PalmOS plan to improve things with this
lame NVFS stuff and know there was going to be trouble. Right off the bat
their marketing hype claimed improved reliability, performance and capacity.

First of all, the old way provided immediate write to battery backed
storage. You reset and you've lost nothing. The new way buffers all our nice
important data in volatile storage. We can't flush it and we can't know when
the OS has deigned to write it through to flash, so we never really know
when the data is safe. Scratch reliability.

Second, the performance sucks rocks for many of us who use the storage heap
a lot. No problem for the simple little app that gets a record, the user
plays with it for a while, then writes it back out. For those of us with
lots of dynamic data, it's an unreliable pig.

Third, I'll give PalmWhomever half credit - they sorta solved the ugly 512
byte sector fiasco. So just how many DECADES have the rest of us had
blocking and deblocking figured out? How many file system failures did it
take for the rest of the known world to settle on a few working paradigms?
And somehow Palm couldn't maybe just look around a little and figure it out,
too?

So, all in all I wish PalmWhomever would stop yapping about all the
advantages of this NVFS stuff, and just admit that it's a cheap way to build
high capacity devices. We'll just have to suck it up and deal with the wild
departure from the old way, the poor, indeterminant lack of reliabilty, and
the lack of performance. We can handle that.

 On the PluggedIn site, please look for a whitepaper called NVFS White 
 Paper in the Developer Resources section.  It was last updated in March

Forget the white paper. How about a big my fault paper, and then some plan
for fixing it.

Flame off.


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


RE: detecting device models

2005-04-05 Thread Jeffry Loucks

Check out the following:

UInt32 companyID,deviceID,HALID;
FtrGet(sysFtrCreator,sysFtrNumOEMCompanyID,companyID);
FtrGet(sysFtrCreator,sysFtrNumOEMDeviceID,deviceID);
FtrGet(sysFtrCreator,sysFtrNumOEMHALID,HALID);

The values returned define the platform. For example:

Tungsten T3 returns:
'Palm', 'Arz1', 'aAz1'
Tungsten T5 returns:
'Palm', 'TnT5', 'aTT5'

Google for other values. Also on PalmOne and PalmSource sites. I can send a
fairly complete list, as well.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Yuen Kwee [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 04, 2005 11:16 PM
To: Palm Developer Forum
Subject: detecting device models


hihi!

is there any method to know what model of the device is? for example, how do
i detect a clie, treo, t3 and t5. i want to run special functions for each
of them. if there is a method to detect, please provide some info on it...
thanks!

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


RE: fatal exception from multiplication in gcc compiled callback

2005-04-05 Thread Jeffry Loucks

The 68EZ328 indeed supports a mulu instruction, but you'll notice it is a
16x16 operation. In other words, a mulu.S. You were trying to use a mulu.L,
which is not supported by the EC000 core.

Your original callback uses a global value to locate the multiply code
[move.l [EMAIL PROTECTED](%a5),%a0]. It is found relative to the A5 register,
which is reserved as the globals context register. If the A5 register is not
correct when CallbackPeckAudio() is called, you will not be able to
correctly locate the desired global value. In other words, the calling code
may have it's own globals context, which could mean that the value of A5 has
been changed to meet the calling code's needs, and is wrong for your needs.

If this is the case, you should either 1) not refer to globals in your
callback, or 2) pass your A5 value to the callback and use SysSetA5() to
temporarily set A5 for your use.

This is all best accomplished by creating a structure containing everything
needed by the callback, and then passing the address of the structure to the
callback as a userdata pointer. The structure could contain your own A5
value, giving you full access to your normal globals, or it could contain
everything needed without globals, or some combination.

You already do the structure bit with struct PeckAudioType. You could
either add your A5 value to the structure, or add a reference to the global
in the structure. Whatever works best for you.

If you'd like info on a (32x32).L, that's another email.

Sorry so long winded.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Greg Sepesi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 12:10 PM
To: Palm Developer Forum
Subject: fatal exception from multiplication in gcc compiled callback


I'd like to implement a UInt32 x UInt32 multiply (discarding the most
significant 32 bits of result) in a callback for a sound stream, but the
multiplication is causing a fatal exception (on a Zire 31).  From 
looking at the assembly language produced by gcc, the reason for the 
exception appears to be the attempted use of a global (not available in 
callback). 

Here's the applicable data structure and code:

typedef struct PeckAudioType {
   SndStreamRef streamRef;
   UInt32 fileSize;
   UInt32 fileOffset;
   FileRef fileRef;
   UInt32 bufferCount;

   UInt32 s;
   UInt32 a;
   UInt32 b;
} PeckAudioType;

Err CallbackPeckAudio(void *pUserData, 
   SndStreamRef stream, 
   void *bufferP, 
   UInt32 frameCount) 
{
   PeckAudioType *pPeckAudio = (PeckAudioType *)pUserData;
   Err err;

   /* Read next sound stream buffer from file. */
   err = VFSFileRead(pPeckAudio-fileRef, frameCount*2, bufferP, NULL);

   pPeckAudio-a *= pPeckAudio-b;  /* LINE 8 */

- - -

The assembly language for Line 8 is:

.globl CallbackPeckAudio
CallbackPeckAudio:
...
.ln 8
move.l [EMAIL PROTECTED](%a5),%a0
add.l #__mulsi3,%a0 /*JANE2*/
move.l 28(%a2),-(%sp)
move.l 24(%a2),-(%sp)
jsr (%a0)
addq.l #8,%sp
move.l %d0,24(%a2)

- - -

Noting that changing the multiplication to addition causes an in-line
calculation and allows the sound stream callback to work properly, I
tried gcc's inline assembly.

Err CallbackPeckAudio(void *pUserData, 
   SndStreamRef stream, 
   void *bufferP, 
   UInt32 frameCount) 
{
   PeckAudioType *pPeckAudio = (PeckAudioType *)pUserData;
   Err err;

   /* Read next sound stream buffer from file. */
   err = VFSFileRead(pPeckAudio-fileRef, frameCount*2, bufferP, NULL);

//   pPeckAudio-a *= pPeckAudio-b;
   __asm__(
  move.l   28(%a2),%d0; 
  mulu.l   24(%a2),%d0; 
  move.l   %d0,24(%a2);
   );

- - -

However, that results in the compiler error: invalid instruction for
this architecture; needs 68020 or 68030 or 68040 or 68060 or cpu32 or
5200 or 5206e or 5307 or 5407 -- statement `mulu.l 24(%a2),%d0'
ignored.  That's a bit confusing because the MC68EZ328 User Manual
lists a mulu instruction in its EC000 instruction set.  I've never had
to mess much with the prc-tools.  Do I need to somewhere specify that I
want gcc to produce MC68EZ328 instructions?

Before I get into this any deeper, I'd like to ask how others have
implemented multiplications from within callbacks.

Thanks,
Greg

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


RE: Updated NVFS_White_Paper.doc on PalmOne web site

2005-04-01 Thread Jeffry Loucks

So, just how many databases are ok to be open during MemHeapCompact()?

In the following list of open databases (on a Treo 650), my app is
responsible for the top three, leaving fifteen others that are out of my
control. How am I to make sure to close all databases before calling
MemHeapCompact?

64002D38 0 F3B9FA74 'PERD' 'SPQT' 1 0003 D 8000 0007 92816024194
SpClientDeepPersist
64002C48 0 F3B9FA64 'PERS' 'SPQT' 1 0003 D 8000 0007 12673  2067456  1382908
SpClientPersist
64002218 0 F30501A0 'appl' 'SPQT' 1 0001 R 8029 0001   204   739328   716514
spclient
640021F8 0 F30502B8 'a68k' 'a68k' 1 0003 R 8001  2  272  140
PACERsrcDB0
64002328 0 20CDF540 'trec' '0lss' 1 0005 D 0002 0001   1014001138315
CertMgrDB
64003130 0 F305014C 'HsT3' 'HsTr' 1 0005 D 8000  0 20480
HSTraceDatabaseHead
64002848 0 F3050148 'HsTr' 'HsTr' 1 0007 D 8108 1914336 6608
HSTraceDatabase
64003050 0 20476DFC 'lCLb' 'HsSr' 2 0005 R 0063 0001 2 7160 7040
HsSysResource5.0_SPCS_enUS
64003000 0 20478A1C 'cCLb' 'HsSr' 1 0005 R 0063 0001 2  256  136
HsSysResource5.0_SPCS
64002B88 0 20BB8C9C 'ovly' 'HsSr' 1 0005 R 0863 000114521865
HsSysResource5.0_enUS
640022C8 0 20BBE498 'rsrc' 'HsSr' 1 0004 R 0063 0001461891117911
HsSysResource5.0
64003110 0 20476DFC 'lCLb' 'HsSr' 2 0005 R 0063 0001 2 7160 7040
HsSysResource5.0_SPCS_enUS
640030A0 0 F3050144 'rsrc' 'HsSr' 1 0004 R 8001  1 3072   98
HsSysResource68K
640007B8 0 20ACFDEC 'ovly' 'lati' 1 0005 R 0843 021C 5  2042
Latin Locale Module_enUS
640006E0 0 2081E680 'locm' 'lati' 1 0005 R 0043 0226326372263002
Latin Locale Module
64000638 0 20CCAD80 'rsrc' 'pdvc' 1 0005 R 0063 021C 5  472  292
DeviceResources
640005E8 0 20678290 'ovly' 'psys' 1 0005 R 0843 0223   1835047246732
Boot_enUS
64000360 0 200058B0 'rsrc' 'psys' 1 0005 R 0043 0223   140   401256   398376
Boot


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Regis St-Gelais [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 01, 2005 10:27 AM
To: Palm Developer Forum
Subject: Re: Updated NVFS_White_Paper.doc on PalmOne web site


Ben Combee [EMAIL PROTECTED] a écrit dans le message de news: 
[EMAIL PROTECTED]
snip
 This white paper is our official mechanism for confirming problems and 
 providing workarounds.
snip

Hi Ben,

The white paper says:

10- MemHeapCompact crash on Tungsten T5
MemHeapCompact causes the Tungsten T5 to crash when there are open 
databases.
MemHeapCompact works fine when there are no open databases.
Please make sure to close all databases before calling MemHeapCompact.

Do you have an idea how I can make shure that all the databases are closed 
if other application then my own can live some open?
I tryed Douglas Handy suggestion by using DmNextOpenDatabase( NULL) in my 
appStart routine but but it look like it always return something other than 
NULL.

Thanks

-- 
Regis St-Gelais
www.laubrass.com 


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


RE: Dates prior to 1904

2005-03-25 Thread Jeffry Loucks
Date/time math is simply:

1. convert dates/times to a common base unit of time since a reference
epoch, eg. days or seconds since 1904
2. add or subtract or compare converted dates
3. convert result back to desired date/time format

Works for all time, so to speak...

 What I did not find (or recognize) was an algorithm to return a Date xxx
days prior to another Date.

1. convert date to days since some past day
2. subtract xxx days
3. convert back to original date format


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Clive Walden [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 25, 2005 4:45 PM
To: Palm Developer Forum
Subject: RE: Dates prior to 1904


Aaron Hansen wrote:
 Don't reinvent the wheel or anything.
Yes, I have already Googled there.

What I did not find (or recognize) was an algorithm to return a Date xxx
days prior to another Date.

I know I can roll my own without too much difficulty; but I did not really
want to reinvent it.

Thanks,
Clive
Clive Walden
Walden Consulting
Phone: 760-632-5856
Web site: www.clivewalden.com

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


RE: Sprint Treo 650 firmware update posted

2005-03-24 Thread Jeffry Loucks

 TILUtilsCDMAHtc.c, Line:69, Not NV read response
...
 TIL - Telephony Interface Library (I think)
 Utils - Utility functions
 CDMA - what kind of radio, could also be GSM
 Htc - Could be the contract manufacturer, HTC builds the Treo 650

Yes, that makes sense. What made me wonder about NVFS is the content of the
error message Not NV read response. Sounded a little like NVfs. I'm gun
shy on the 650.

 Has this error reproduced itself?

Not until tomorrow, when I get back to it :)

Thanks.

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


RE: change os of palm

2005-03-23 Thread Jeffry Loucks
Yes and no. How's that for an answer!

First, let me tell you that it is entirely possible to do what I think it is
you want to do. My Palm experience includes principal hardware engineer for
the PalmIII, and engineering team member for the PalmVII, Tungsten-W,
Tungsten-T, and I've written several alternative OS's for palm devices. It
can work just fine. You need to know a lot about the device, though.

Direct and complete hardware access is only slightly more difficult on any
of the ARM platforms, but both ARM and 68K platforms are essentially open to
the world, or can be made so. For example, you have full access at all times
on any of the 68K devices.

The only area that may cause you trouble will be the things your OS must do
to either make the hardware function as designed, or keep the hardware from
interfering with whatever you may desire it to do.

The Palm devices are not designed as generic microprocessor platforms, but
are highly integrated systems. Certainly, you can disable system features to
the point that you have simply a processor and memory, but to be useful, you
would need to re-enable features such as serial and USB ports, IrDA, battery
management, LCD, backlight, touch screen, buttons, wireless subsystems,
audio subsystems, and the like. You would be limited to doing this in
accordance with the way the device was designed, or it may not function.

To make a long story short, you would need a system description and
schematics to the extent that you could determine how, where and why the
components are connected, and you would need to understand how the PDA was
designed to function as an integrated system.

After that, it's a piece of cake :)

Jeff

PS. Someone suggested writing your OS on top of PalmOS, or you can write it
on top of the existing HAL/DAL. This is often done if it is a proof of
concept, something like a school project, or a value-added/embedded use for
the device.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Leo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 23, 2005 3:59 PM
To: Palm Developer Forum
Subject: RE: change os of palm


We wrote a HAL for a microcontroller, but in that case
we knew that we could program it as we wish. In the
case of the palm we want to know if we can do the
same, i mean use the complete instruction set and
interact directly with the microprocessor. Of course
we have to build a bootloader, drivers and a lot of
things that together make the HAL. What we want to
know is if there is any limitation concerning access
to the chip a very low level.
Thank you,

Leo
--- Jeffry Loucks [EMAIL PROTECTED] wrote:
 
 Leo,
 
 Have you ever written a hardware layer for an
 embedded microprocessor
 system? If so, then you probably had access to the
 specifications, including
 schematics and sample drivers. Do you have these
 specifications for any of
 the Palm-ish devices you wish your OS to be
 compatible?
 
 If you are satisfied that you understand the
 hardware, then are you asking
 how to load, execute and test your new OS? If you
 presume to understand how
 to write the OS for a platform, then I would assume
 you'd know how to load
 and test it.
 
 What is it you want to know? What are your
 limitations? Be specific, please.
 
 
 
 Jeff Loucks
 Work 425-284-1128 [EMAIL PROTECTED]
 Home 253-851-8908 [EMAIL PROTECTED]
 Mobile 253-691-8812
 
 
 -Original Message-
 From: Leo [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 22, 2005 8:51 AM
 To: Palm Developer Forum
 Subject: Re: change os of palm
 
 
 But can't we use the palm to program its
 microprocessor. What are the limitations? Be
 specific,
 please.
 Thank you,
 

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


RE: Sprint Treo 650 firmware update posted

2005-03-23 Thread Jeffry Loucks

Anxiously downloaded and applied the 1.08 firmware update for Treo 650.
Firmware update went smoothly.

Our app makes heavy use of NetLib. It also hammers the storage heap and uses
a lot of small records, so have been severely impacted by the NVFS problems.
The new firmware greatly reduced the size of our databases, just a bit
larger than when running on the 600. After running for an hour or so, the
device crashed with the following error:

TILUtilsCDMAHtc.c, Line:69, Not NV read response

Anybody know what this means? Is this the NVFS error others were seeing when
they had 'overused' NVFS?


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: change os of palm

2005-03-22 Thread Jeffry Loucks

Leo,

Have you ever written a hardware layer for an embedded microprocessor
system? If so, then you probably had access to the specifications, including
schematics and sample drivers. Do you have these specifications for any of
the Palm-ish devices you wish your OS to be compatible?

If you are satisfied that you understand the hardware, then are you asking
how to load, execute and test your new OS? If you presume to understand how
to write the OS for a platform, then I would assume you'd know how to load
and test it.

What is it you want to know? What are your limitations? Be specific, please.



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Leo [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 22, 2005 8:51 AM
To: Palm Developer Forum
Subject: Re: change os of palm


But can't we use the palm to program its
microprocessor. What are the limitations? Be specific,
please.
Thank you,


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


RE: Exporting reports

2005-03-21 Thread Jeffry Loucks

No, not 'difficult', but maybe not that interesting :0

Oh, sorry, that was rude... What I mean is that PDA apps generally don't do
things that, by their nature, aren't readily accomplished on PDAs. No, that
cuts the PDA a bit too much slack. Instead, developers have adapted to the
limitations of PDAs, and try to reason a different approach.

Some thoughts:
1. Stream your report to a text file on an SD card.
2. Paginate your report, each page to a memo or a record in your own
database.
3. Leave the data in it's raw, and I assume smaller state, and reproduce the
report format on the fly.
4. Compress the report - zlib does ok with fluffy text.
5. Stream to a common DOC format and view with the appropriate reader.
6. Similar to 3 and 4 above, I've written self extracting/viewing report
apps by appending compressed data resources to a common execution resource.

I've done all of the above. It depends on which suits best, given the needs
and limitations.

Hope this helps.

  
-Original Message-
From: Vesselin Bontchev
To: Palm Developer Forum
Sent: 3/21/2005 8:43 AM
Subject: re: Exporting reports

Wow, not even a single answer! :-( Was it such a difficult question?

Regards,
Vesselin

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


RE: Exporting reports

2005-03-21 Thread Jeffry Loucks
 Uhm, I thought that generating a report on the PDA and sending it to a
 PC or to another PDA is something that PDAs are normally used for?

Quite right, but not necessarily in destination format. PDAs are commonly
used to acquire data of many forms, and sometimes this data is viewable, to
some extent, on the PDA. But, if it is ultimately destined for a PC or other
resource 'unlimited' platform, it is often left as an exercise for the
reader to format and display the data.

 1. Stream your report to a text file on an SD card.
 Not good; the receiving device might not have an SD card.

Memory card readers are cheap. Cheaper, at times, than the effort to do
without. Most PDAs have them and most recent PCs have them. You might be
faced with a PDA that doesn't specifically use the SD format. That would be
a problem, although a local PC with a multiformat reader could convert, in a
pinch.

 I was thinking of splitting the report into multiple memos as a possible
 (albeit ugly) solution. Is this what you mean by the above?

Yes. It's ugly, but expedient. I often do tracing to memos, as some devices
don't have serial ports %^$#%$#.

 What is considered a common DOC format in PalmOS and what is the
 reader for it? I thought it was the memo and MemoPad respectively.

MemoPad is simply available, but certainly not optimal. Kind of like the
PalmVII using the Mobitex pager network and proxy for network access. As for
a common DOC format, there are several. You'll have to ask around.

 Am I stuck with
 writing a conduit that translates the report into a TXT file?

Maybe, if it works for you.

 Can MemoPad *view* memos larger than 4 Kb? Can I somehow disable the
 ability to edit a memo (e.g., write-protect it or something)?

AFAIK, MemoPad is limited to 4Kb for convenience. The size limit allows easy
access to existing UI resources.

There are open source office automation tools out there. Maybe one of those
could be used to generate and read the report on the PDA, and then
'standard' office tools could be used on the PC. Doesn't address getting it
to the PC, though.


 

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


RE: change os of palm

2005-03-21 Thread Jeffry Loucks
Yes, the hardware will do whatever you tell it, assuming it can. Beware the
'halt-and-catch-fire' opcode :)

But, that doesn't mean the device will end up acting like a PDA. There is
almost nothing the device does for itself (in hardware), so the hardware
must be closely managed or you don't get a functioning device. Imagine a PC
without a BIOS. Some devices utilize custom hardware that depends on special
attention by the driver software.

You might be able to replace the OS, leaving the HAL and DAL (hardware and
device abstraction layers) in place.

No matter the approach, you'll need to be intimate with the device
architecture.

If, on the other hand, you don't need it to be a PDA, but instead want it to
run a robot or control a blender, then have at it and YMMV!


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Leo [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 21, 2005 11:32 AM
To: Palm Developer Forum
Subject: Re: change os of palm


Very useful what you say. So i wouldn't have any
hardware problem, i mean, the hardware would let me do
anything with it. Is that right?

Leo

--- Marcelo van Kampen [EMAIL PROTECTED] wrote:
 Well, it is possible, but you will need a
 bootloader. If you google a
 little over the net you´ll find that some folks had
 archieved to port
 the uclinux kernel to the Palm (68K only). With arm
 machines you´ll
 need a different bootloader, but it will be easier
 to find support,
 because arm machines are everywhere...  If ou are
 developing a OS that
 will be compiled for 68K i suggest you to try first
 running on the
 Emulator, because it really emulates a 68K
 machine... But if you´re
 developing a SO that will be targeted to ARM
 machines, i suggest you
 to try out on Portable Video Games emulators that
 are ARM based (GP32
 - Try geepee32 emulator, and GbaAdvance -Try VBA
 or NO$GBA, those
 last ones have some nice features like an integrated
 Debugger/Assembly). Hope that this info helps,
 
 Regards,
 Marcelo
 
 
 On Mon, 21 Mar 2005 10:40:35 -0800 (PST), Leo
 [EMAIL PROTECTED] wrote:
  Hi, this is my first of many more messages to the
  list. I'd like to know if it's possible to change
 the
  os a palm. We are developing a small os and want
 to
  try it on a palm.
  thank you,
  
  Leo
  
  
  __
  Do you Yahoo!?
  Yahoo! Small Business - Try our new resources
 site!
  http://smallbusiness.yahoo.com/resources/
  
  --
  For information on using the Palm Developer
 Forums, or to unsubscribe, please see
 http://www.palmos.com/dev/support/forums/
 
 
 -- 
 For information on using the Palm Developer Forums,
 or to unsubscribe, please see
 http://www.palmos.com/dev/support/forums/
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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

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


RE: What header contains - HsGetVersionString

2005-03-19 Thread Jeffry Loucks

palmOne_SDK_4_1_Headers_Public_4_1_Build_31

68K/System/HsExt.h

 
Jeff Loucks 
Work 425-284-1128 [EMAIL PROTECTED] 
Home 253-851-8908 [EMAIL PROTECTED] 
Mobile 253-691-8812 



Nigel Grant wrote:

Hi Guys

Can someone tell me what is name of the header file that contains

HsGetVersionString

Thanks in advance.

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


RE: M-Systems' DiskOnChip H

2005-03-16 Thread Jeffry Loucks

If a couple of megabytes isn't reliable, why on earth would I jeopardize 2
Gigabytes?

Pardon my attitude, but the PalmSource FFS gives me the creeps. I don't know
where my data is, when it's safe and when it's not. They could offer 2
Terabytes and it wouldn't make any difference. 

Here's hoping Palm gets the NAND stuff worked out. We've all got a lot
riding on it.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Corrado [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 16, 2005 1:01 AM
To: Palm Developer Forum
Subject: M-Systems' DiskOnChip H


What about this news ??

http://www.m-systems.com/content/Corporate/Press/prInfo.asp?id=754

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


RE: Notifications buggy on NVFS as well?

2005-03-16 Thread Jeffry Loucks
Yes, that's probably some of what we've seen, too.

Our company has put T5/650 dev on hold. The NVFS has thrown us too big a
curve. We have a DM intensive app, with many small and large records, lots
of notifications and intensive NetLib activity. It was hard enough on the
much more reliable devices. Pile it all on a T5/650 and we're just plain out
of luck.

Not happy.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Jan Slodicka [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 16, 2005 1:23 AM
To: Palm Developer Forum
Subject: Re: Notifications buggy on NVFS as well?


No reaction?

This might be the worst problem of all NVFS-related problems. It simply
means that the presence of programs like TextPlus, ClipPro, ScrShot etc. may
cause the crash of your program, while the user will attribute the problem
to you.

Jan Slodicka


- Original Message - 
From: Jan Slodicka [EMAIL PROTECTED]
To: Palm Developer Forum palm-dev-forum@news.palmos.com
Sent: Tuesday, March 15, 2005 11:29 AM
Subject: Notifications buggy on NVFS as well?


 Hello,

 there are several indications that Palm notification mechanism (that seems
 to be LocalID-based) can easily fail (i.e. cause a crash) when the DbCache
 is full. I myself collected some evidence and got confirmations from other
 developers as well.

 Did anybody observe something similar?

 I am particularly interested if there exist a way to find out if some
 notification registrations exist. Or even better to block them.

 Best regards,
 Jan Slodicka



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


RE: error - buffer isn't large enough for the purpose

2005-03-16 Thread Jeffry Loucks
First off, you allocate 500 bytes and then tell NetLibReceive() you have
room for 1000 bytes. Second, you are passing the address of the pointer to
your buffer, not the address of the buffer. Try:

#define kBufSize 1000
void *str = MemPtrNew(kBufSize);

Int16 result = NetLibReceive(AppNetRefnum,socket,str,kBufSize,
   0,(NetSocketAddrType*)destAddr,size,-1,error);


-Original Message-
From: versha khar
To: Palm Developer Forum
Sent: 3/16/2005 1:55 AM
Subject: error - buffer isn't large enough for the purpose

hi all ,
i am running a network communication program , my NetLibReceive gives an
error , buffer isn't large enough for data.
but the data i get from the server is very small .

str  = MemPtrNew( sizeof( char ) * 500 );

result = NetLibReceive(AppNetRefnum , socket ,str , 1000 , 0
,(NetSocketAddrType *)destAddr , size, -1 , error );

i get 0 bytes received in result while debugging.

kindly suggest!

thanks
versha

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


RE: EvtGetEvent on T3

2005-03-15 Thread Jeffry Loucks
EvtGetEvent() will return no later than your timeout (give or take). On
the real device, something is demanding attention at flank speed.
EvtGetEvent() has no way to tell you it isn't returning an event. It always
returns an event, just sometimes it's a nilEvent. Better yet, the nilEvent
may mean something to someone somewhere for timing or whatever, so you
generally have to treat them all as real events.

The TC does the same thing. 


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Gert van Kruiningen 
Sent: Tuesday, March 15, 2005 5:05 PM
To: Palm Developer Forum
Subject: EvtGetEvent on T3


The EvtGetEvent function behaves different on T3 simulator and real T3
The timeout parameter in the EvtGetEvent specifies the number of timer ticks
before checking if there is an event in the event queue. With the value set
at -1 (evtWaitForever) the T3 only wakes up if there is an event. For any
other value, it wakes up every timeout timerticks to check for an event.
If there is nothing, it sends an nilEvent into the event queue.
The code below works fine on the T3 simulator (OS 5.2.1) where the dot is
stepping across the screen at a 1 step per second (100 timerticks per
second). When you move the stylus over the screen sysPenMove events are
generated which make the dot speed up when ever the stylus is moving.
But;
On the real T3 (the same version:OS 5.2.1) however, the speed at wich the
dot moves is irrelevent of the parameter of 100 in the EvtGetEvent function.
It always moves at 100 dots per second. Note that the number of timer ticks
per seconds is 100.

Anyone know why the real T3 is not behaving??

Regards
Gert



static void AppEventLoop(void)
{
EventType event;

do
{
static UInt16 x = 0;

WinEraseLine(x,  80, x,  80);
x++;
if (x  150) x = 0;
WinDrawLine(x,  80, x,  80);

EvtGetEvent(event, 100);


if (! SysHandleEvent(event))
{
if (! MenuHandleEvent(0, event, error))
{
if (! AppHandleEvent(event))
{
FrmDispatchEvent(event);
}
}
}
} while (event.eType != appStopEvent);
}

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


RE: EvtGetEvent on T3

2005-03-15 Thread Jeffry Loucks
Oh yes, forgot to suggest something.

If you wish to do timing with EvtGetEvent(), keep track of the next system
tick that you care about and pass the difference between now and the desired
system tick as the timeout to EvtGetEvent(). On return, check to see if
you've reached your desired tick. Take care as 'timeout' is an Int32, so
watch for overflow/underflow and 0/-1, as they mean something special.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: EvtGetEvent on T3

2005-03-15 Thread Jeffry Loucks

I suspect one or more comm stack (or other driver) is needing to poll.

EvtWakeup() can be called by anything and will wake up the foreground. If
there are no real events, EvtGetEvent() will return a nilEvent.
EvtSetNullEventTick() can be called by anything to set the minimum ticks
until an EvtWakeup() occurs. Libraries, extensions and drivers will use
these calls to wake the foreground as necessary to keep the OS alive.
Remember, almost everything happens in either EvtGetEvent() or in the event
handlers immediately following.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Gert van Kruiningen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 7:19 PM
To: Palm Developer Forum
Subject: RE: EvtGetEvent on T3


You are right Jeff,

With the timeout set to -1, this simulator just goes to sleep because there
is nothing to process, and if you move the stylus over the screen, it starts
to move again.
But on the real T3, it keeps on racing along. So the trick is to find out
what the events are that it comes back with. There is no such thing as
View Events on the real T3, but displaying data on the screen, events
coming out of EvtGetEvent() does not seem to work yet!!!
Oh its going now and guess what, it's the nilEvent that is returned all the
time by EvtGetEvent(), until you move the stylus on the screen of course and
press buttons.
Where is this nilEvent coming from? Anybody got an idea?

Gert

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


General List Mangler question

2005-03-14 Thread Jeffry Loucks
I've got some stuff I want to post and the stupid List Mangler keeps telling
me I've got unsubscribe commands and unsupported attachments in my post. I
don't have any of the sort, but I guess it sees something it doesn't like.
Is there a guideline somewhere about List Mangler idiosyncrasies?

Thanks and sorry for the off-topic question.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: Treo 650 SysGetROMToken()

2005-03-13 Thread Jeffry Loucks
The normal (old?) Palm way to retrieve the device serial number (assuming it
has one) follows. If the first byte == 0xFF, there isn't a serial number:

{
UInt8 *p;
UInt16 size;
err = SysGetROMToken(0,sysROMTokenSnum,p,size);
}

Handspring does it a different way. I suppose if the call returns an error,
there isn't a serial number:

{
char buf[32];
UInt16 size = sizeof(buf);
err = HsGetVersionString(hsVerStrSerialNo, buf, size);
}

-Original Message-
From: Harvey Muzina
To: Palm Developer Forum
Sent: 3/13/2005 12:00 PM
Subject: Treo 650  SysGetROMToken()

I tried SysGetROMToken() on Treo 650 but it does not work.
I need some sort of unique ID -- I considered ESN/IMEI, but they seem
not to be available if phone functionality is turned off.
Phone application has menu selection Options-Phone Info that displays
HS SN value -- is this unique and how do I get it programmatically?

Thanks,
Harvey

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


RE: USB has replaced serial

2005-03-11 Thread Jeffry Loucks
The Palm SDIO Bluetooth card is implemented in two parts; an SDIO-serial
controller internally wired to the Bluetooth chipset with tx/rx/rts/cts. If
you want to part with your Bluetooth card, you could open it up and patch
into the serial port. If you're careful, you wouldn't necessarily break the
Bluetooth functionality, but it's pretty tight on the pc card.

There may be other SDIO cards implemented this way.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Douglas Handy [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 11, 2005 4:39 PM
To: Palm Developer Forum
Subject: Re: USB has replaced serial


John,

What I'd like to see is some mfg likeSocketIO to come out with a RS-232
SDIO
card.  

I've always thought that seemed like a logical product too.

Doug

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


RE: USB has replaced serial

2005-03-11 Thread Jeffry Loucks
Am I missing something? (don't answer that :)

I regularly use the serial (RS232C) port on T-W, T-C, T-T, T-3, Kyocera7135
(unless the phone is on), Treo600, and Treo650. I realize the T-W and T-T
are old, but the rest are current.

I don't have any Zire devices, so no experience.

Past devices all had serial ports. 


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Mike [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 8:33 AM
To: Palm Developer Forum
Subject: USB has replaced serial


Well it looks like it's official, Palm's complete lineup of currently
shipping Palms all have USB only.  This is very bad news for people like me.
I have customers calling up saying they can't find a compatible Palm because
my product needs a serial port. Looks like Palm will put me out of business
unless I can find a solution.

I have toyed around with BT some.  Not a good option as it's pretty slow
compared to the wired connection. (the one byte req, one byte resp has a lot
of overhead, I'm guessing, when over BT)   Cost is another issue since my
products use non-standard baud rates, I cannot use an 'off the shelf' BT to
serial converter.

Has anyone come up with an affordable USB periferal to RS232 adapter? I
briefly looked into this a while ago and the chipsets were very expensive.

Thanks,
Mike

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


RE: Are notifications pointing to functions bad?

2005-02-24 Thread Jeffry Loucks

You need to make sure your registered functions don't move around on you,
because the OS will not automatically adjust them. You do this by opening
the application database (and overlays, as necessary) and locking the
resources. The OS does this for you when you run your app, but unlocks and
closes the app when you exit. You need to do it in addition to the OS, so
that when the OS unlocks and closes, you still have them open and locked.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Rob [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 24, 2005 2:42 PM
To: Palm Developer Forum
Subject: Are notifications pointing to functions bad?


My application (Butler) is crashing in two scenarios

1) After I run flyzip's stability test (at the end immediately after the  
defrag)
2) After some hotsyncs on the treo650 (some users only)

I use notifications extensively and point them to functions rather than  
going through launch codes as I assume it's faster (and I'm registering  
for eventDequeuedNotification')

Is this a dengerous programming technique?  Could the Operating system be  
moving my application to a different place and not updating my  
notification registration?

I get the error Emul68KMAin.c, line:403, illegal instruction 792C at  
address 1116ADBC (final address changes)

Should I stick to notifications through launch codes - or is there a way  
to find out if my db is moved and re-register before an event is diverted  
to a non-function?

Thanks in advance,

Rob

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


RE: Are notifications pointing to functions bad?

2005-02-24 Thread Jeffry Loucks
Some other details...

Your app will need to know when it should unlock itself, eg HotSync and
deletion attempts. I have my app run on reset, and register for HotSync
start notification and delete protected database notification (I set the
protect attribute on my app).


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Rob [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 24, 2005 2:42 PM
To: Palm Developer Forum
Subject: Are notifications pointing to functions bad?


My application (Butler) is crashing in two scenarios

1) After I run flyzip's stability test (at the end immediately after the  
defrag)
2) After some hotsyncs on the treo650 (some users only)

I use notifications extensively and point them to functions rather than  
going through launch codes as I assume it's faster (and I'm registering  
for eventDequeuedNotification')

Is this a dengerous programming technique?  Could the Operating system be  
moving my application to a different place and not updating my  
notification registration?

I get the error Emul68KMAin.c, line:403, illegal instruction 792C at  
address 1116ADBC (final address changes)

Should I stick to notifications through launch codes - or is there a way  
to find out if my db is moved and re-register before an event is diverted  
to a non-function?

Thanks in advance,

Rob

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


RE: retrieving data from a website and storing it in a string(Pal m OS Simuator5.x)

2005-02-23 Thread Jeffry Loucks
versha khar,

YMMV, but it can be as simple as:

1. Using NetLib within your app, open a socket to your website URL port 80.
2. Send GET / HTTP/1.0, or whatever query you need to send.
3. Receive on the socket until you get the entire answer.
4. Close the socket.
5. Parse the answer into your string.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: versha khar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 22, 2005 10:58 PM
To: Palm Developer Forum
Subject: retrieving data from a website and storing it in a string(Palm OS
Simuator5.x)


I have my internet application running  on PalmSimulator5.1 and I am using
WebBrowser20 , I connect to a website through the URL and I am able to
display the contents of the website. Now I want to capture the data
displayed From the website into a string (we have our own website and I give
its address). I have to retrieve some content from my own server. Anyone
working on internet applications for PalmOS Simulator Kindly Help? 

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


RE: Where is PhnLibGetOwnNumbers?

2005-02-21 Thread Jeffry Loucks
PhnLibGetOwnNumbers() is defined in the Handspring telephony header file
HsPhoneNetwork.h, and is part of the Handspring SDK. The SDK I have came
from the Handspring developers site (www.handspring.com/developers), which
now redirects you to http://www.palmone.com/us/. 


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: John Spence [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 21, 2005 12:17 PM
To: Palm Developer Forum
Subject: Where is PhnLibGetOwnNumbers?


Hello, I need to obtain my Treo 600's own phone number for identification
purposes.  I read an earlier set of posts that described how to use the
function PhnLibGetOwnNumbers to do that.  Can somebody tell me where the
library containing that function and the related functions can be found?  

I'm using CodeWarrior 9.2, OS 5 SDK R2.  I went to the Plugged-in site at
PalmOne and downloaded what appeared to be the Cingular SDK for Treo 650,
but it turned out to be just that Desktop utility.  I'm now really confused
on what SDK's I need to get.

Thanks for your help.

John

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


RE: Where is PhnLibGetOwnNumbers?

2005-02-21 Thread Jeffry Loucks
I believe what you need is part of the PalmOne SDK 4.1, which is available
for download on the PalmOne developer's site.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: John Spence [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 21, 2005 12:46 PM
To: Palm Developer Forum
Subject: Re: Where is PhnLibGetOwnNumbers?


Hi Jeffry,

Thanks.  Yes, I have found that the Handspring site redirects back to
PalmOne, and that makes finding these libraries very
confusing.  I'm fairly new at Palm development and having a great deal of
difficulty determining what technologies to use for
particular development.  I have found no reference to a Handspring SDK,
could somebody give me some more specific
information?

Thanks,

John

Jeffry Loucks wrote:

 PhnLibGetOwnNumbers() is defined in the Handspring telephony header file
 HsPhoneNetwork.h, and is part of the Handspring SDK. The SDK I have came
 from the Handspring developers site (www.handspring.com/developers), which
 now redirects you to http://www.palmone.com/us/.

 
 Jeff Loucks
 Work 425-284-1128 [EMAIL PROTECTED]
 Home 253-851-8908 [EMAIL PROTECTED]
 Mobile 253-691-8812

 -Original Message-
 From: John Spence [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 21, 2005 12:17 PM
 To: Palm Developer Forum
 Subject: Where is PhnLibGetOwnNumbers?

 Hello, I need to obtain my Treo 600's own phone number for identification
 purposes.  I read an earlier set of posts that described how to use the
 function PhnLibGetOwnNumbers to do that.  Can somebody tell me where the
 library containing that function and the related functions can be found?

 I'm using CodeWarrior 9.2, OS 5 SDK R2.  I went to the Plugged-in site at
 PalmOne and downloaded what appeared to be the Cingular SDK for Treo 650,
 but it turned out to be just that Desktop utility.  I'm now really
confused
 on what SDK's I need to get.

 Thanks for your help.

 John

--
[EMAIL PROTECTED]
(714)846-8389 (home)

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


RE: get phone/IMEI/ESM/IMSI number for Treo6xx

2005-02-17 Thread Jeffry Loucks

This is what we've encountered while looking for
phone identity on Treo 6xx:


1. If the phone is type hsAttrPhoneTypeCDMA (see
HsAttrGet(hsAttrPhoneType)):

// Treo 600 returns ESN
// Treo 650 crashes!
char *pEsn;
PhnLibCardInfoEx(telRefNum,0,0,0,pEsn,0,0,0,0);


2. If the phone is type hsAttrPhoneTypeGSM:

// Treo 600 returns IMEI and IMSI
// Treo 650 - don't know what happens (don't have one)
char *pImei,*pImsi;
PhnLibCardInfo(telRefNum,0,0,0,pImei);
PhnLibSIMInfo(telRefNum,pImsi);


Code to retrieve phone number:

// The own phone number is the first in the own numbers list.
// NOTE: The phone number is not always available right away.
// For example, a GSM phone number is not available until the SIM
// is queried, as much as 30-60 seconds after the phone is powered.

{
PhnAddressList list;
PhnAddressHandle address;
UInt16 count;
UInt32 phoneType;
Char *pPhoneNumber = 0;

// Get number list
if (PhnLibGetOwnNumbers(telRefNum,list) == 0)
{
// How many entries in the list?
if (PhnLibCount(telRefNum, list, count) == 0  count  0)
{
// Need the phone type, as it changes the API
HsAttrGet(hsAttrPhoneType,0,phoneType);
// Retrieve the 1st entry from the list
if (phoneType == hsAttrPhoneTypeCDMA)
err = PhnLibAPGetNth(telRefNum, list, 1, address);
else
err = PhnLibGetNth(telRefNum, list, 1, address);
if (err == 0)
{
// Extract the phone number from the entry.
// The returned phone number is a pointer to
// a malloc'd piece of memory which must
// be free'd after use.
if (phoneType == hsAttrPhoneTypeCDMA)
pPhoneNumber = PhnLibAPGetField(telRefNum,
address, phnAddrFldPhone);
else
pPhoneNumber = PhnLibGetField(telRefNum,
address, phnAddrFldPhone);
// Free the address handle
MemHandleFree(address);
}
}
// Deallocate the list
PhnLibDisposeAddressList(telRefNum,list);
}
return pPhoneNumber;
}



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Keyur Patwa
Sent: Thursday, February 17, 2005 9:00 AM
To: Palm Developer Forum
Subject: get phone number for Treo600 CDMA


Hi guys,

I know this question was asked and answered here before.
But my login is not working so I could not access the forum messages.

Can any one help me with the API call to access the phone number for CDNA
Treo600 phone.

Actually, I am trying to access the ESN number using,
PhnLibCardInfo (refrnceNum,0,0,version,serial);

but as it is not working, as an alternative I am trying to grab the phone
number.

Please help,
Keyur

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


RE: PhnLibGetOwnNumbers On Treo 600

2005-02-14 Thread Jeffry Loucks

Yes, and sometimes it even works! Here's what I've done:

// Try to get our phone number - sometimes this even works!
// The own phone number is the first in the own numbers list.
// NOTE: The phone number is not always available right away.
// For example, a GSM phone number may not be available until 30-60 seconds
// after the phone is powered. Depends on when in the startup sequence
// such attributes are read/initialized.

{
PhnAddressList list;
PhnAddressHandle address;
UInt16 count;
UInt32 phoneType;
Char *pPhoneNumber = 0;

// Get number list
if (PhnLibGetOwnNumbers(telRefNum,list) == 0)
{
// How many entries in the list?
if (PhnLibCount(telRefNum, list, count) == 0  count  0)
{
// Get the phone type, as it changes the API for number
retrieval - bad design :(
HsAttrGet(hsAttrPhoneType,0,phoneType);
// Retrieve the 1st entry from the list
if (phoneType == hsAttrPhoneTypeCDMA)
err = PhnLibAPGetNth(telRefNum, list, 1, address);
else
err = PhnLibGetNth(telRefNum, list, 1, address);
if (err == 0)
{
// Extract the phone number from the entry. The
returned phone number is a
// pointer to a malloc'd piece of memory which must
be free'd after use.
if (phoneType == hsAttrPhoneTypeCDMA)
pPhoneNumber = PhnLibAPGetField(telRefNum,
address, phnAddrFldPhone);
else
pPhoneNumber = PhnLibGetField(telRefNum,
address, phnAddrFldPhone);
// Free the address handle
MemHandleFree(address);
}
}
// Deallocate the list
PhnLibDisposeAddressList(telRefNum,list);
}
return pPhoneNumber;
}


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Neil Whitworth 
Sent: Monday, February 14, 2005 12:08 AM
To: Palm Developer Forum
Subject: PhnLibGetOwnNumbers On Treo 600


I need to be able to get the phone number on a treo 600, and have found 
this function. It claims to be able to get a list of numbers on both GSM 
and CDMA phones, but there is very little documentaion for it.

It is declared in HsPhoneNetwork.h as :-
Err PhnLibGetOwnNumbers (UInt16 refNum, PhnAddressList* ownNumbers)

and a PhnAddressList is typedefed in HsPhoneTypes as :-
typedef VoidHandPhnAddressList;/** Description  */



Has anyone else used this function? I sthere a better way of getting the 
phone number?

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


RE: DmDetachResource problems

2005-01-21 Thread Jeffry Loucks

You are confusing resource index with resource ID. Look closely at the
following definitions and you will see that DmDetachResource() requires the
index (UInt16) of the resource to detach from the database, while the
DmAttachResource() requires the resource ID (DmResID) of the resource to
attach to the database.

You must DmFindResource() to get an index, or otherwise know the index,
before you can detach or remove the resource.

Err DmAttachResource(DmOpenRef dbP, MemHandle newH, DmResType resType,
DmResID resID);
Err DmDetachResource(DmOpenRef dbP, UInt16 index, MemHandle *oldHP);


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: David Fedor [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 21, 2005 12:56 PM
To: Palm Developer Forum
Subject: Re: DmDetachResource problems


Which line is causing the error?  Step through with the debugger...

(Could it be that you have a copy-and-paste mistake? You're detaching 
9780 twice.)

-David Fedor
PalmSource, Inc.

Hi y all,
I am currently developing around on my PalmOS app and have encountered 
the following error in my program's code while trying to transport 
resources: Fatal Alert-DataMgr.c, Index out of range Here is the code:
if(DmCreateDatabase(cardno,Menu-LedM,appFileCreator,'data',true) !=
dmErrAlreadyExists )
{
DmOpenRef appdb, resdb;
LocalID idxo;UInt16 cardnoo;
MemHandle resource;
SysCurAppDatabase(cardnoo,idxo);
appdb=DmOpenDatabase(cardnoo,idxo,dmModeReadWrite);
resdb=DmOpenDatabaseByTypeCreator('data',appFileCreator,dmModeReadWrite);
DmDetachResource (appdb,9780,resource);
DmAttachResource(resdb,resource,'Tbmp',9780);
DmDetachResource (appdb,9780,resource);
DmAttachResource(resdb,resource,'Tbmp',9781);
DmCloseDatabase(appdb);
DmCloseDatabase(resdb);
}
What isn't working here?
Best regards
Tam Hanna


--

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


RE: Where are the emulator ROM images????

2005-01-18 Thread Jeffry Loucks
I came into this thread late, so please excuse me if I cover ground already
covered.

There is a piece of code floating around the net, maybe even around here
somewhere :), that will extract a ROM image from an actual device. Older
ROMs can be extracted from older devices. Older devices are available really
cheap off eBay or, (ahem) borrowed from others.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Ed Pugh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 18, 2005 5:30 PM
To: Palm Developer Forum
Subject: Re: Where are the emulator ROM images



Jan, Ben:

Thank you both for your thoughts.

The game that I wrote (see my earlier thread about
AccessorDispatch) is a fairly simple one that I intend to release as
freeware, mainly because it will be my first public offering of a Palm
application.  (Still needs a bit of work,
though.)

So, it would fit into the non-paying Palm market that Jan mentioned. Also,
as I mentioned before, my own Palm PDA is the m500 running OS 4.0, and is
quite sufficient for my needs.  I like the slimmer case that can fit in my
shirt pocket (WITH my reading glasses case, no less!) and, as I also
mentioned, I much prefer the original Graffiti over Graffiti 2.  (My other
half has a Tungsten E.  I find it is slower to write in Graffiti 2 than in
the original Graffiti, because of those extra strokes.)

MOST of my friends with PalmOS-based PDAs have older OS versions (OS 4.0 or
earlier; not just Palm, but also Sony Clie, Handspring Visor, etc.)  (Abeit,
I *do* consider my Tungsten-E-touting wife to be my friend, too. ;-)

As well, my next major Palm project will involve an application for a
particular hobby market.  I expect that most users for this application will
still be ones with older OS's.

So, from my own experience, I have to disagree with the thinking that
writers of new applications should not make any attempt to support older
OS's.

If an application does not necessarily need colour or any of the newer
features of the more recent Palm's, (navigation rocker,
etc.) then there should be no reason to leave users of older Palm PDA's
behind.

Sure, maybe the bigger software market consists of corporate types whose
companies can buy the latest and greatest Palm PDA's for them, but there is
still a considerable base consisting of home users who cannot afford to
upgrade their PDAs every three months.

Well, that's my CDN$0.02 anyway.  (That's gotta be at least worth half a
cent US. :)  Oh, that's another thing.  The average Canuck has to work about
1.5 times longer than the average USian to pay for those expensive Palm
devices!  So, we have have more incentive to make the older ones last a bit
longer.

And sorry about my earlier rant.  It came from the frustration of learning
that I cannot obtain the earlier OS ROM images (which is still a frustration
for me, but I should not have ranted, even though I still think Xerox are
The Bad Guys in all of this).

Best regards,

Ed.

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


RE: DmDatabaseInfo crashes simulator and emulator

2005-01-14 Thread Jeffry Loucks
DmFindDatabase returns a LocalID, which is a UInt32. You have dbID defined
as a UInt16, which is too small. You either ignored the error/warning about
it or have them turned off.

typedef UInt32  LocalID;// local
(card relative) chunk IDLocalID DmFindDatabase(UInt16 cardNo, const Char
*nameP)


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: steve p [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 14, 2005 8:58 PM
To: Palm Developer Forum
Subject: Re: DmDatabaseInfo crashes simulator and emulator


I know how to retrieve the version by putting version in the argument list.

The problem is with either NULL or version in that position - the simulator

crashes.

I can't see what I am doing wrong.

Any other suggestions?

Steven

steve p [EMAIL PROTECTED] wrote
 This little snippit crashes each time I try to use it:

 Char fname[25];
 UInt16dbID;
 Err err;
 StrCopy(fname, PEL-Template);
 dbID = DmFindDatabase(0, fname);

 if (dbID) {
  err = DmDatabaseInfo (0, dbID, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL);
  }

 Stepping thru the debugger, it crashes on DmDatabaseInfo.  What am I 
 doing
 wrong??

 I am really tring to get the version number but could not get that 
 back
 and thought I would try passing NULL for all of the parameters.

 Can someone help?

 SWP


 

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


RE: Debug app works, Release doesn't

2005-01-06 Thread Jeffry Loucks

CtlGetLabel() is defined as returning (const char *). The compiler will
complain that you are assigning a (const char *) to a (char *). The 'const'
keyword is the issue. The 'const' tells the compiler to treat the value as
non-writeable, in this case the data the returned pointer points to. AFAIK,
you can (cast) away any declaration.

const char *p = char *  // okay - the compiler can accept
writeable as non-writeable
char *p = const char *  // not okay - the compiler cannot
accept non-writeable as writeable
char *p = (char*) const char *  // okay - you are overriding the compiler
with the cast


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Robert Moynihan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 06, 2005 7:14 PM
To: Palm Developer Forum
Subject: Re: Debug app works, Release doesn't


Chris Tutty wrote:

From: Robert Moynihan [EMAIL PROTECTED]
  

(char*) s = CtlGetLabel(GetObjectPtr(ReadyButton));

... that might get rid of your error message, but might not solve the
problem that you are asking about.



How on earth is this going to make any difference?  Aside from
the questionable approach of trying to eliminate a warning rather 
than fix the underlying problem, how would casting a variable
defined as char * to char * change anything.
  

Actually, I did make a mistake.  I meant to write (Char*) instead of 
(char*).  The docs say the prototype is...
const Char *CtlGetLabel(const ControlType *controlP)
... so I gave a try casting it exactly as the prototype and it 
eliminated the error message.

I didn't know WHY it worked, so, not understanding all the mysteries of 
compilers, I then went on to see if I could figure out what was 
happening.  I originally thought that Char* and char* were the same, and 
the ONLY thing that I changed between the 6 trials was the case of the 
'c' in the declaration and cast:

All 4 of these give the warning message:
char*s;
s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID));

Char*s;
s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID));

char*s;
(char*) s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID));

Char*s;
(Char*) s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID));

These 2 don't:
char*s;
(Char*) s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID));

Char*s;
(char*) s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID));

This all feels very odd to me.  I wish I understood it better.

Bob.

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


RE: Difference between NULL and 0?

2004-12-24 Thread Jeffry Loucks

I apologize ahead of time for my verbosity. Those who know me rarely involve
me in a conversation without having a pre-arranged escape plan.

Okay, the curmudgeon's gotta speak.

Generally used to make a null pointer clear, NULL has been simply eye
candy
for the value 0.

But recently, I've been finding places where a comparison against NULL
gives different result than against 0...
...This sucks because I haven't figured out where it should be NULL and
where it should be 0

I agree. Precisely my point. NULL has been used incorrectly long enough that
it is differentiating 'C' dialects and breaking code.

Since some mistakenly define NULL as '(void*)0', you should only use NULL
with pointers, and never to mean zero in a mathematical sense. Are you using
NULL only with pointers and you still have problems? Are you only using the
assignment operators and the equality comparison?

One thing to try. Definitions of NULL are conditional on NULL being
undefined. If you superceed the definition of NULL with '#define NULL 0',
does your code work?


(Note: the following is agreement and commiseration, not argument :)



Some references:

KR, 1st ed, pg 97
#define NULL 0

KR, 1st ed, pg 192
(due to nonportable pointer differences)...it is guaranteed that assignment
of the constant 0 to a pointer will produce a null pointer distinguishable
from a pointer to an object.

KR, 2nd ed (ANSI), pg 102
Pointers and integers are not interchangeable. Zero is the sole exception:
the constant zero may be assigned to a pointer, and a pointer may be
compared with the constant zero. The symbolic constant NULL is often used in
place of zero, as a mnemonic to indicate more clearly that this is a special
value for a pointer. NULL is defined in stdio.h.



A quick search of this machine finds some troubling disagreement:

Metrowerks\CodeWarrior\CW for Palm OS
Support\MSL\MSL_C\MSL_Common\Include\null.h
#define NULL0L

Metrowerks\CodeWarrior\Palm OS Support\Incs\PalmTypes.h
#define NULL0

sdk-3.5\include\PalmTypes.h
#define NULL0

sdk-4\include\PalmTypes.h
#define NULL0

cygwyn\usr\arm-palmos\include\sys\types.h
#define NULL ((void *) 0)

cygwyn\usr\H-i586-cygwin32\lib\gcc-lib\m68k-palmos\2.95.2-kgnd\include\stdde
f.h
#ifdef __GNUG__
#define NULL __null
#else   /* G++ */
#define NULL ((void *)0)
#endif  /* G++ */

cygwyn\usr\H-i586-cygwin32\m68k-palmos\include\string.h
#define NULL ((void *) 0)

cygwyn\usr\H-i586-cygwin32\m86k-palmos\include\sys\types.h
#define NULL ((void *) 0)

cygwyn\usr\include\locale.h
#define NULL0

cygwyn\usr\include\stdio.h
#define NULL0

cygwyn\usr\include\stdlib.h
#define NULL 0

cygwyn\usr\include\string.h
#define NULL 0

cygwyn\usr\include\sys\param.h
#define NULL0L

cygwyn\usr\include\tiffio.h
#define NULL0

cygwyn\usr\include\time.h
#define NULL0

cygwyn\usr\include\win32api\windef.h
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif

cygwyn\usr\include\wchar.h
#define NULL0



Merry Christmas. 
Thank you very much. Merry Christmas to you, too.


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


RE: Palm OS Developer Program

2004-12-23 Thread Jeffry Loucks

Is it possible that more were deleted than were retained? I, too, was
deleted after several years. Maybe it would be useful to ask how many 
were NOT removed, and see what they had in common.

-Original Message-
From: Ben Combee

I have collected all the missing account reports and forwarded them on
to
our provider.  It's obvious to me that the validation routines aren't
working correctly and have eliminated a lot of correct accounts.  This
shouldn't have happened this way.








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


RE: Difference between NULL and 0?

2004-12-23 Thread Jeffry Loucks

Okay, the curmudgeon's gotta speak.

Generally used to make a null pointer clear, NULL has been simply eye candy
for the value 0. NULL is often confused with NUL, which is simply eye candy
for the character value of 0. In addition, NULL has been used as a scalar in
logical or symbolic math expressions, again simply to mean 0.

That's the problem with semantic candy. You use it for a while and you begin
to believe it is something special, when all along it's been just a
mneumonic. '0' is, indeed, a special value in C, and always has been. NULL
has from the beginning simply been a convenientce, and is defined as just 0;
not (void*)0, and not const void *NULL = 0. If defined as anything but
0, it's just wrong, and code may break.

Practically speaking, using NULL only as a pointer value of 0 should work no
matter how it's defined. Other uses will probably break, since you may
encounter a definition other than 0.

Anybody want to talk about true and false?

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


RE: Difference between NULL and 0?

2004-12-23 Thread Jeffry Loucks
No bug, just plain C.

I guess we should both be ashamed, because I do the same type of thing. Not
because performance is any better, as compilers pretty much do what they
want these days, but because it simply speaks to me.

It can be faster to write and easier to read, but only to those who think in
the language. I began my career enamored with the possiblilty of writing
entire routines on a single line. I still prefer it, because I despise
having to search pages of comments and white space to find that one fragment
of code.

Others, however, will have trouble with it. It doesn't 'speak' to them. I've
known some who would snicker and move on, but others who would demand I be
burned at the stake! For their peace of mind I try to avoid the abuse of
coding tricks.

But, when I get into one of my moods, this coding style can serve as a
release, and it can be vicious :)



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Logan Shaw [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 23, 2004 12:15 PM
To: Palm Developer Forum
Subject: Re: Difference between NULL and 0?


Jeffry Loucks wrote:
 Okay, the curmudgeon's gotta speak.

 Anybody want to talk about true and false?

Well, not exactly.  But I have a question:  I recently wrote a set of
fixed-point math functions (24 to the left and 8 to the
right) and defined ceil(a) as (a  8) + !!(a  0xff).

So my question is, should I be ashamed of myself?  If it affects the answer,
my motivation was speed and not obfuscation, and I put a comment explaining
what it does.

  - Logan

(And if there's a bug with that, somebody tell me...)


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


HELP! Retrieving phone info on Treo 600 and 650

2004-12-17 Thread Jeffry Loucks

Any help would be appreciated.

I've asked this question mostly before, but so far nobody admits to knowing
anything about the subject.

I need to programatically retrieve the ESN, IMSI(MIN) and phone number from
the Treo 6x0 CDMA phones for use in identifying the phone and subscriber to
a billing network.

I have successfully retrieved the IMEI, IMSI and sometimes phone number from
a Treo 600 GSM.

I cannot retrieve any of the info on a Treo 6x0 CDMA, except ESN on the Treo
600 (Treo 650 crashes when I try the same call).

The documentation is severly limited, and where it does suggest a possible
API, they either don't work or cause a fatal exceptions.

BTW: the Treo 650 exception when I call PhnLibCardInfoEx() is:

TILUtilsCDMAHtc.c, Line:69, Not NV read response


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: Identifying Treo 600 CDMA from GPRS

2004-12-16 Thread Jeffry Loucks

The following retrieves the phone type, either hsAttrPhoneTypeCDMA or
hsAttrPhoneTypeGSM:

UInt32 temp;
HsAttrGet(hsAttrPhoneType,0,temp);

It is a Handspring function with the following definition:

#define sysTrapHsSelector sysTrapOEMDispatch
#define hsSelAttrGet  0x27
#define SYS_SEL_TRAP(trapNum, selector) \
= {0x3f3c, selector, m68kTrapInstr+sysDispatchTrapNum,trapNum}

Err 
HsAttrGet (UInt16 /*HsAttrEnum*/ attr, UInt32 param, UInt32* valueP)
SYS_SEL_TRAP (sysTrapHsSelector,
hsSelAttrGet);

I suppose if you didn't want to use the HS SDK, you could hardwire it.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 16, 2004 1:02 PM
To: Palm Developer Forum
Subject: Identifying Treo 600 CDMA from GPRS


Is there a way to programatically differentiate between a Treo 600 CDMA and
GPRS phones,

- using the Handspring SDKs, and
- without using the Handspring SDKs

Thanks!

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


RE: Retriving ESN on CDMA Treo devices

2004-12-14 Thread Jeffry Loucks

The following is for the Treo 600. I haven't figured out the Treo 650 yet
(looking for documentation).

Determine phone type with HsAttrGet(hsAttrPhoneType,0,temp), eg:
{
UInt32 temp;

HsAttrGet(hsAttrPhoneType,0,temp);
if (temp == hsAttrPhoneTypeCDMA)
...
}


Use PhnLibCardInfo(UInt16 refNum, CharPtr* manufacturer, CharPtr* model,
CharPtr* version, CharPtr* serial) to get the ESN on a CDMA Treo600. ESN is
returned as serial.



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Keyur Patwa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 14, 2004 1:49 PM
To: Palm Developer Forum
Subject: Retriving ESN on CDMA Treo devices


Hi guys,

Can anyone here tell me about the API function that can return the ESN
number for CDMA Treo devices?

I would also like to grab the Device Name (e.g Treo 600 / Treo 650) and tye
type of device (CDMA/GSM) programatically if it is possible!

I am working on Treo 600 and 650 devices only.

Thanks,
Keyur.

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


RE: Retriving ESN on CDMA Treo devices

2004-12-14 Thread Jeffry Loucks
I've got to stop replying while I'm so tired.
Correct my last to read CDMA instead of CDMS, and all samples of 600
instead of 650.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Jeffry Loucks [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 14, 2004 3:49 PM
To: Palm Developer Forum
Subject: RE: Retriving ESN on CDMA Treo devices



CDMS phones also implement the extended version of the CardInfo API,
PhnLibCardInfoEx(UInt16 refNum, CharPtr * manufacturer,
CharPtr * model, CharPtr * modemSWRev,
CharPtr * esn, CharPtr * prlRev, CharPtr * hostSWRev,
CharPtr * modemHWRev, CharPtr *priChecksum)
This perportedly returns ESN directly (see CharPtr *esn).

It could be that the extended call should be used on CDMA phones, but I
found the regular call to be more reliable on all samples of the 650. YMMV


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


RE: Retriving ESN on CDMA Treo devices

2004-12-14 Thread Jeffry Loucks

CDMS phones also implement the extended version of the CardInfo API,
PhnLibCardInfoEx(UInt16 refNum, CharPtr * manufacturer,
CharPtr * model, CharPtr * modemSWRev,
CharPtr * esn, CharPtr * prlRev, CharPtr * hostSWRev,
CharPtr * modemHWRev, CharPtr *priChecksum)
This perportedly returns ESN directly (see CharPtr *esn).

It could be that the extended call should be used on CDMA phones, but I
found the regular call to be more reliable on all samples of the 650. YMMV


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Jeffry Loucks [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 14, 2004 3:39 PM
To: Palm Developer Forum
Subject: RE: Retriving ESN on CDMA Treo devices



The following is for the Treo 600. I haven't figured out the Treo 650 yet
(looking for documentation).

Determine phone type with HsAttrGet(hsAttrPhoneType,0,temp), eg:
{
UInt32 temp;

HsAttrGet(hsAttrPhoneType,0,temp);
if (temp == hsAttrPhoneTypeCDMA)
...
}


Use PhnLibCardInfo(UInt16 refNum, CharPtr* manufacturer, CharPtr* model,
CharPtr* version, CharPtr* serial) to get the ESN on a CDMA Treo600. ESN is
returned as serial.



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Keyur Patwa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 14, 2004 1:49 PM
To: Palm Developer Forum
Subject: Retriving ESN on CDMA Treo devices


Hi guys,

Can anyone here tell me about the API function that can return the ESN
number for CDMA Treo devices?

I would also like to grab the Device Name (e.g Treo 600 / Treo 650) and tye
type of device (CDMA/GSM) programatically if it is possible!

I am working on Treo 600 and 650 devices only.

Thanks,
Keyur.

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


Help: Treo600 CDMA retrieving info

2004-12-12 Thread Jeffry Loucks
Hi all,

I have a wireless app for a Treo600 that needs to retrieve (via API) some
kind of phone ID, like a phone number, IMEI/ESN, IMSI/MIN. I have been able
to find the phone number , IMSI and IMEI for a GSM phone, but can only find
the ESN for a CDMA phone. I'd like to get the phone number and MIN.

Anyone know how this can be done?

Thanks much,
jeff


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812 

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


RE: View Treo 600 Camera Images on PC

2004-12-10 Thread Jeffry Loucks

I don't see my pics show up anywhere on my WinXP machine after I HotSync my
Treo600.
I use an SD card to retrieve the pics.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Manpreet Singh [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 10, 2004 9:51 PM
To: Palm Developer Forum
Subject: Re: View Treo 600 Camera Images on PC


Great if they could be seen in My Pictures folder but ! but I am unable to
find them, also did a find with the name I specified in Treo, but in vain, I
am using Palm Desktop.

Thanks for Help

Ben Wrote:

They should be either in a folder under your My Documents/My Photos  
folder, or somewhere in the Palm Desktop folder for the device.

Manpreet wrote:

 Hi all,
 
 How can I see the images captured on my Treo 600 device on desktop 
 PC,
Isn't
 they are available in any dektop format like gif or jpg or bmp, after 
 hotsync. or any other way or workaround.

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


Treo600 CDMA retrieving MSID/MIN/MDN

2004-12-09 Thread Jeffry Loucks

Does anyone know how to programatically retrieve the identity info (MSID,
MIN or MDN) on a CDMA phone? The GSM library is fairly well documented and
works as expected, but I don't see/know a way to access the info with the
CDMA library. Any help would be appreciated.
Thanks.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812

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


RE: Socket Notification

2004-12-07 Thread Jeffry Loucks

What kind of 'crash' happens? The mechanism is stable, and I use it a lot.

Several thoughts;

1. Which Treo and what version of OS? I assume Treo 6x0 and OS5, since
socket notices were not announced until OS5. 

2. I assume you are using the system notification mechanism of socket
notices, since I believe that's the only one supported on OS5. I ask,
because I do not know if the other socket notice methods are not allowed, or
are simply not supported (in other words, weren't ported or don't work).

3. Prior to OS5, the system notification was broadcast deferred, which means
you would receive it in the context of whomever performed the next
EvtGetEvent(). I do not know how it is implemented in OS5, so I would
suggest you not rely on the application context being correct/predictable at
the time the system notification is delivered to your handler. For this
reason I have always passed a reference to the application context, usually
just a copy of the A5 register. I set the A5 register to that of my
application, do what I have to do, and then restore the A5 register. This
assumes you need access to your application globals. If you do not, choose
your own mechanism.

Sorry to be so vague. Do you have more detail?



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: a Rachna Tibrewala [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 07, 2004 12:11 PM
To: Palm Developer Forum
Subject: Socket Notification


Hi
I m using Socket notification mechanism for receiving data from non blocking
socket on a Treo device. I see inconsistent behaviour in the notification
callback.It crashes intermittently. Has anyone seen this before.I m not sure
of the stability of this mechanism since its not well documented and not
widely used by many people.

Can anyone help on this.

thanks
regards
rachna

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


RE: Debug on Treo 600

2004-12-06 Thread Jeffry Loucks
Be careful with the aftermarket power supplies. This applies to cables we've
found in several 'reputable' stores, not just the internet. While the cables
worked just fine, the wall warts produced neither sufficient voltage nor
current to power or charge the device. I ended up splicing in some known
good 5V1A wall warts. However, if you're not concerned with powering the
device, we've not had any trouble with the cables themselves.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Ben Combee [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 06, 2004 8:03 AM
To: Palm Developer Forum
Subject: Re: Debug on Treo 600


At 12:27 AM 12/6/2004, you wrote:
Manpreet Singh wrote:
I need to debug my application on Palm treo 600 device. I came to know 
I need a serial cradle or cable, as debugging with USB is not 
supported with this device?? Which serial cable/cradle should I buy? 
please post any links. Am I going the right way here: 
http://web.palmone.com/products/Product.jhtml?id=330002cat=310004

That looks like a Treo 600 serial cable so that should do the trick. 
It's $30

It looks like you can get the same (or similar anyway) cable from a 
number
of folks on eBay for under $10 (plus shipping).  I searched for Treo 600 
serial cable on eBay and found several listed at about $9.95.

Since the Treo 600 uses the same connector as the earlier Treo 180/270/300 
devices, a serial cable for one of those phones also works for 
debugging.  I think a lot of the eBay cables are actually just older gear.

The phone accessory market is also a very high profit market; resellers are 
often able to get a $30 accessory for under $5, so there is lots of room 
for price adjustment in the unauthorized sellers market.


-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
Combee on Palm OS weblog: http://palmos.combee.net/
Developer Forum Archives:   http://news.palmos.com/read/all_forums/

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


RE: console port for debug?

2004-11-30 Thread Jeffry Loucks
Connect a terminal emulator to the Palm serial port, open the console port
and write to it. What you write will be displayed on the terminal emulator.

Some issues:
1. Use a serial HotSync cable.
2. Make sure the terminal emulator serial port is configured the same as the
Palm serial port (baud, parity, stop bits and flow control). 115200 baud
(8N1) works well for me, with hardware flow control enabled.
3. If you are trying to debug a fatal situation, insert a SysTaskDelay() (of
appropriate length) after each write to allow the serial buffers to empty
before the Palm device crashes.

I use a trivial PC program that simply copies bytes from a serial port to a
window. Works great.



Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Gary Olmstead [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 8:08 PM
To: Palm Developer Forum
Subject: console port for debug?


I would like to send some debug information down the console port while my
program is running.  Can the Serial HotSync cable be used for this purpose?
-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/

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


RE: question about record indexing technique

2004-11-15 Thread Jeffry Loucks
If you must rely on the sort index, leave 'deleted' records in place and
simply mark them deleted. You can reuse the records by linking them together
in a 'deleted' list.


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-Original Message-
From: Ralph Curtis [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 15, 2004 12:59 PM
To: Palm Developer Forum
Subject: Re: question about record indexing technique


Yes, they change from (x+n) to (x+n-1). The index is just the record's sort
position in the db.

Ralph

Jennifer Fell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 If I delete a record say with index x from the database, what happens 
 to
the
 indexes of records with a value greater than x? Do they change from 
 (x+n)
to
 (x+n-1)?

 - If not, what happens if a new record is added to the end of the 
 database using dmMaxRecordIndex?
 - If yes, is there any way to avoid this?

 Thanks a lot.

 Regards,
 Jenni




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

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


  1   2   >