Re: Breakpoint stopping code, But I removed it!

2003-08-04 Thread Ben Combee
At 06:44 PM 8/3/2003, Randall Pulsifer wrote:
Anyone have any tips on how to remove a breakpoint that just won't quit?
I'm using CW9 on Win2k with Sony's OS5 Simulator (NZ90). I had placed
the BP and used it to debug as usual, then tapped the little red dot to
get rid of it - the dot went away, but the [EMAIL PROTECTED]' debugger stops in
the same place anyway! I removed object code, recompiled, hit Clear All
Breakpoints from the menu, deleted the line that it stops on (that
stopped it until I put the line back in), checked for accidental
EventPoints, rebooted, moved lines of code around that didn't mind - but
the breakpoint continues to follow this  subtraction operation. I could
just F5 it, but the line in question is in my DmComparF routine which
gets called 179 times each time a sort occurs.
Only odd thing - it doesn't stop with the solid blue arrow, but with the
dotted blue arrow, that might indicate waiting for user input if you
were single stepping.
Any Ideas???
Did you save the simulator state and restore it while your program was 
loaded?  It sounds like the program is loaded at a different location in 
memory than the debugger expects, so its not seeing a breakpoint there, but 
the instructions are still modified in memory to set the breakpoint.

Try deleting the pSYM file for your project, and also start from a totally 
clean simulator session.

--
Ben Combee [EMAIL PROTECTED]
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


RE: Beaming Problem

2003-08-04 Thread Dave Mottorn
It looks like both the fatal exception problem and the beaming problem I
posted have the same source. I have the following lines of code to clear
part of the screen and draw a box to put a status message in:

for (i = 0; i  9; i++) WinDrawChars(spaces, 150, 5, (i * 10) + 5);
WinDrawLine(5, 5, 5, 85);
WinDrawLine(5, 5, 235, 5);
WinDrawLine(235, 5, 235, 85);
WinDrawLine(5, 85, 235, 85);

It doesn't cause any problems as it is above. It seemed when I had either
instruction starting at the first pixel either horizontally or vertically I
had what might be memory problems - Fatal exception on program termination
or invalid chunk pointer on a different instruction.  I changed the code to
be offset 5 pixels from either the left or top and everything works fine.
I'm using high resolution on the Handera 330.  It's the only high resolution
PDA I have access to now and I'd be interested in hearing if anyone has run
into similar problems using high resolution on other PDAs.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Dave
Mottorn
Sent: Sunday, August 03, 2003 7:43 PM
To: Palm Developer Forum
Subject: RE: Beaming Problem


Here is my WriteProc:

Err WriteProc(const void *dataP, UInt32 *sizeP, void *userDataP)
{
Err err;

*sizeP = ExgSend((ExgSocketPtr) userDataP, dataP, *sizeP, err);
return err;
}

I tried putting ExgDisconnect after every ExgPut and got the same results.
All the non-null values are initialized in the routine.  f is a character
array with the name of the file, e.g., SM095036#0012345:.TXT.  The file
does get beamed correctly the first time.

I looked at the reference and didn't see anything I'm doing wrong.  I think
I may be declaring the description wrong though.  The recipe example has
Char *appName = ExgMgrBeamDB.prc.  I get a compile error on that.  The
files I'm beaming are ASCII text files incidentally.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jeff
Ishaq
Sent: Sunday, August 03, 2003 12:31 PM
To: Palm Developer Forum
Subject: RE: Beaming Problem


 -Original Message-
 From: Dave Mottorn
 Sent: Sunday, August 03, 2003 5:19 AM

SNIP

   err1 = ExgPut(exgSocket);
   if (err1 == 0) {
   if (id)
   err2 = ExgDBWrite(
   WriteProc,
   exgSocket,
   f,
   id,
   cardNumber);
   err3 = ExgDisconnect(exgSocket,err3);
   }

The documentation for ExgPut states that you must *always* follow it
with an ExgDisconnect().  You are doing this in the case of (err1 == 0),
however if (err1 != 0), you fail to call ExgDisconnect().  This is one
thing you want to fix immediately.

Have you tried using the filename, with extension?

exgSocket.name = AddressBook.PDB

There's also the following recipe to grok:
http://www.palmos.com/dev/support/docs/recipes/recipe_exg_mgr_send_db.ht
ml

Gotta run -- if none of this works, let's see what all the non-NULL
values in your exgSocket are.

-Jeff Ishaq


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



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



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


Re: LstGetSelectionText() - Memory Allocation ?!?!

2003-08-04 Thread bullshark
On Mon, 4 Aug 2003 09:59:53 +1000, Alan Ingleby [EMAIL PROTECTED] wrote:

Ken's right.  Specifically, you *can't* use LstGetSelectionText with a
dynamic list, so don't.  

What? Why would that be? That's just wrong. 

This is only the case when a (suspicious) program never calls LstSetListChoices.
I think there is foul play here. 

If all that is involved here is a dynamic list, a DrawList callback 
is the wrong way to do it. You would only resort to this if your list
had to display little icons or something. Even if you are doing it the 
wrong way, LstSetListChoices should still be called unless the list 
items don't have any text.

To set dynamic list text, create the list when the need arises and
call LstSetListChoices(). Keep your program simple and let the
OS do the work.

Use your own code to determine the value.  This shouldn't be hard, as it's 
effectively the same code you're using in your DrawList function.

I don't have any DrawList functions and I have dozens of Dynamic lists. 
Drawlist methods are not related to dynamic lists. Drawlist callbacks are 
for list choices that don't contain text or can't be displayed as a text 
string. Even then, if they contain text, LstSetListChoices should be called 
in most cases. It is the obvious place to store the text component of the
custom drawn list and simplifies the job of the DrawList callback.

A program could have many 'dynamic lists' that are set into the list
depending on events at another control. LstGetSelectionText() is
free of charge, provides correct results with respect to the last
set of elements given and eliminates the need to remember or organize
this programmatically.

The supplied code is riddled with unchecked possibilities for failure.
*
Char *listText;

ListType *list = GetObjectPtr(ListOrderList);

//What is GetObjectPtr?
//how do you know it succeeded?
//Why isn't there a cast to ListPtr?
//ListOrderList doesn't sound like a resourceID
//Is it a Popup list? Did you note the warning about
//FrmGetActiveForm() in the comments in FrmGetActiveForm()?

listText = MemPtrNew(50);

//what a giant memory leak. There is no attempt to deallocate.
//why are you allocating dynamically?
//How do you know the allocation succeeded?
// Char listText[50] will work just as well
//if dynamic allocation is mandatory, then why not allocate what's needed
//e.g.
// { 
//   if(listText != NULL){  //assuming listText is a global...
// MemPtrFree(listText);// take care of this memory leak
// listText=NULL; 
//   }
//   int n=LstGetSelection(list);
//   if( n!=noListSelection ){
// CharPtr cp=LstGetSelectionText(list,n);
// ErrFatalDisplayIf(cp==NULL,GetSelectionText failed);
// listText=(CharPtr)MemPtrNew(StrLen(cp)+1);
// ErrFatalDisplayIf(listText==NULL,Could'nt allocate listText);
// StrCopy(listText,cp);
//   }
// }

StrCopy(listText, LstGetSelectionText(list,LstGetSelection(list)));
// what if nothing is selected?

*

regards

bullshark

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


Link Errors

2003-08-04 Thread Paul Johnson
I've got a large project with 199 files in it that I'm converting from
PocketPC to Palm. I've finally gotten it to compile with no errors but now
it seems as though every single function is missing.

I have 50 (the max it reports) link errors from the 1st source file and
every one of them says function x is undefined. So, I go to my first source
file (main.c) select the first allegedly missing function, hit goto
definition, et voila, theres my poxy function. If the compiler knows where
it is, how come the linker doesnt ?

Oddly, all the missing files are part of what on all other formats is a
static library. I've munged it all in together for palm though - no
libraries are being made by me or included by me or whatever. How does it
know that all files starting with a PR_ prefix should be treated like
leppers and not linked ?

Is there anyway to get CW to tell me what the link error actually is, as the
one its reporting undefined clearly isn't. The function is perfectly well
defined thank you!

Could this be a segmentation thing ? I've not started moving stuff around
yet, but would at least expect function is too far away type errors as
opposed to undefined, so I'm not thinking this is the root cause.

Is there a CW mailing list where I should be asking this ?


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


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


Re: Link Errors

2003-08-04 Thread Paul Johnson
I knew I shoulda waited before posting this on account of dumbass error:
patient heal thy self

The master include file that other platforms include didn't have the extern
C crap around it. I have to build my vanilla C project as CPP due to some
iffy code in expat - an xml parser I use. So, it was user error due to
name-mangling, but I'm boring you to death with it in case it helps anyone
in the future.

I'm sure the linker could've helped me out with this though. Hey ho..


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


- Original Message -
From: Paul Johnson [EMAIL PROTECTED]
To: Palm Developer Forum [EMAIL PROTECTED]
Sent: Monday, August 04, 2003 3:02 PM
Subject: Link Errors


 I've got a large project with 199 files in it that I'm converting from
 PocketPC to Palm. I've finally gotten it to compile with no errors but now
 it seems as though every single function is missing.

 I have 50 (the max it reports) link errors from the 1st source file and
 every one of them says function x is undefined. So, I go to my first
source
 file (main.c) select the first allegedly missing function, hit goto
 definition, et voila, theres my poxy function. If the compiler knows where
 it is, how come the linker doesnt ?

 Oddly, all the missing files are part of what on all other formats is a
 static library. I've munged it all in together for palm though - no
 libraries are being made by me or included by me or whatever. How does it
 know that all files starting with a PR_ prefix should be treated like
 leppers and not linked ?

 Is there anyway to get CW to tell me what the link error actually is, as
the
 one its reporting undefined clearly isn't. The function is perfectly
well
 defined thank you!

 Could this be a segmentation thing ? I've not started moving stuff around
 yet, but would at least expect function is too far away type errors as
 opposed to undefined, so I'm not thinking this is the root cause.

 Is there a CW mailing list where I should be asking this ?


 Regards,
 Paul Johnson
 Applewood House
 www.applewoodhouse.com


 --
 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: LstGetSelectionText() - Memory Allocation ?!?!

2003-08-04 Thread kcorey
On Mon, 2003-08-04 at 14:53, bullshark wrote:
 On Mon, 4 Aug 2003 09:59:53 +1000, Alan Ingleby [EMAIL PROTECTED] wrote:
 
 Ken's right.  Specifically, you *can't* use LstGetSelectionText with a
 dynamic list, so don't.  
 
 What? Why would that be? That's just wrong. 
 
 This is only the case when a (suspicious) program never calls LstSetListChoices.
 I think there is foul play here. 
[...]
 If all that is involved here is a dynamic list, a DrawList callback 
 is the wrong way to do it. You would only resort to this if your list
 had to display little icons or something. Even if you are doing it the 
 wrong way, LstSetListChoices should still be called unless the list 
 items don't have any text.

It all depends on where your strings come from.  

Lately, I've done a bunch of work on lists built up from strings that
are individual records in a database.

If I wanted to be able to use LstSetListChoices, I'd need to either 
1) Have a String array.
2) Allocate an array from dynamic memory for the strings and copy all
the strings into memory.
3) Open all the records, and lock them in place while the list is on the
form.

All of these take up some amount of space.  Arguably, if you're only
going to display 10 items, big woop.  If you're going to display up to
100, now you're potentially chewing up large amounts of memory.

Using a custom-drawn list gets around this nicely, and it's a piece of
cake, also giving you the ability to draw graphics, change fonts, or do
whatever bit of wizardry you'd like in the list.

Besides, do it once, and the code for the custom drawn list become
boiler plate, as the functionality is quite similar.

-Ken



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


The PalmOs command line accept arguments for applications?

2003-08-04 Thread rguevara
I want launch the MultiMail III Pro and compose a new mail, i launch as:

 LocalID dbID=DmFindDatabase(0,MultiMailPROIII);
 SysUIAppSwitch(0 , dbID, sysAppLaunchCmdNormalLaunch, NULL);

the application start correctly but i dont know if this program or others
accepts arguments for the launching.
Thank's
--
Open WebMail Project (http://openwebmail.org)

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


RE: Link Errors

2003-08-04 Thread Eric Cloninger
Paul,

This is as good a place as any because the interested parties are
subscribed.  Since Ben is probably sleeping off the effects of an
all-night Freebirds veggie burrito bender, I'll step in.

CodeWarrior uses its' C compiler for files that end with a .c extension
and the C++ compiler for files that end with .cpp (among others).  If
you have files with both extensions and you want to force all files to
go through the C++ compiler and use C++ name mangling rules, go to the
preference panel for the C++ compiler and turn on Force C++
compilation.  Otherwise, you will need to force C name mangling using
'extern C' on your C prototypes.

-E

 -Original Message-
 From: Paul Johnson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 04, 2003 9:13 AM
 To: Palm Developer Forum
 Subject: Re: Link Errors
 
 
 I knew I shoulda waited before posting this on account of 
 dumbass error: patient heal thy self
 
 The master include file that other platforms include didn't 
 have the extern C crap around it. I have to build my 
 vanilla C project as CPP due to some iffy code in expat - an 
 xml parser I use. So, it was user error due to name-mangling, 
 but I'm boring you to death with it in case it helps anyone 
 in the future.
 
 I'm sure the linker could've helped me out with this though. 
 Hey ho..
 
 
 Regards,
 Paul Johnson
 Applewood House
 www.applewoodhouse.com
 
 
 - Original Message -
 From: Paul Johnson [EMAIL PROTECTED]
 To: Palm Developer Forum [EMAIL PROTECTED]
 Sent: Monday, August 04, 2003 3:02 PM
 Subject: Link Errors
 
 
  I've got a large project with 199 files in it that I'm 
 converting from 
  PocketPC to Palm. I've finally gotten it to compile with no 
 errors but 
  now it seems as though every single function is missing.
 
  I have 50 (the max it reports) link errors from the 1st source file 
  and every one of them says function x is undefined. So, I go to my 
  first
 source
  file (main.c) select the first allegedly missing function, hit goto 
  definition, et voila, theres my poxy function. If the 
 compiler knows 
  where it is, how come the linker doesnt ?
 
  Oddly, all the missing files are part of what on all other 
 formats is 
  a static library. I've munged it all in together for palm 
 though - no 
  libraries are being made by me or included by me or 
 whatever. How does 
  it know that all files starting with a PR_ prefix should be treated 
  like leppers and not linked ?
 
  Is there anyway to get CW to tell me what the link error 
 actually is, 
  as
 the
  one its reporting undefined clearly isn't. The function 
 is perfectly
 well
  defined thank you!
 
  Could this be a segmentation thing ? I've not started moving stuff 
  around yet, but would at least expect function is too far 
 away type 
  errors as opposed to undefined, so I'm not thinking this is 
 the root 
  cause.
 
  Is there a CW mailing list where I should be asking this ?
 
 
  Regards,
  Paul Johnson
  Applewood House
  www.applewoodhouse.com
 
 
  --
  For information on using the Palm Developer Forums, or to 
 unsubscribe,
 please see http://www.palmos.com/dev/support/forums/
 
 
 
 -- 
 For information on using the Palm Developer Forums, or to 
 unsubscribe, please see http://www.palmos.com/dev/support/forums/
 
 
 


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


SSL-Error NoTrustedRoot

2003-08-04 Thread Thomas Damme
Hi Folks,

can somebody tell me, how I can overcome the problem of
sslErrVerifyNoTustedRoot in the VerifyCallbackFunc? No matter which server I
try to connect to, I always get this error. When I connect to them via my
browser, often a window appears that some informations (the server-adress
mostly) do not match. The browser lets me click Accept but how can I do
this with the Palm? Do I have to set a special return-code or is there
something to be set in the SslVerify-Struct that comes in the info-param?

Thanks a lot,

Thomas



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


__RuntimeModule__: Near data segment is bigger than 64K

2003-08-04 Thread Paul Johnson
Any clues what this means and how to fix it please ?

Thanks...


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


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


Re: Link Errors

2003-08-04 Thread Paul Johnson
Yup, all sorted now thanks :)

Forcing C++ on everything brought up a whole army of lax castings etc, but
once they were addressed I got as far as my other question I just posted.
When I can fix that I can then spend another 6 months trying to make all
this code actually work :S

Thx for your help :)


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


- Original Message - 
From: Eric Cloninger [EMAIL PROTECTED]
To: Palm Developer Forum [EMAIL PROTECTED]
Sent: Monday, August 04, 2003 3:35 PM
Subject: RE: Link Errors


 Paul,
 
 This is as good a place as any because the interested parties are
 subscribed.  Since Ben is probably sleeping off the effects of an
 all-night Freebirds veggie burrito bender, I'll step in.
 
 CodeWarrior uses its' C compiler for files that end with a .c extension
 and the C++ compiler for files that end with .cpp (among others).  If
 you have files with both extensions and you want to force all files to
 go through the C++ compiler and use C++ name mangling rules, go to the
 preference panel for the C++ compiler and turn on Force C++
 compilation.  Otherwise, you will need to force C name mangling using
 'extern C' on your C prototypes.



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


Re: NetLib: Nonblocking socket calls

2003-08-04 Thread asiayeah
Hi,

I run into exactly the same problem. So far I am still unable to find
a workable solution for non-blocking socket connection.

Apparently, the NetLibSocketOptionGet(netSocketOptSockErrorStatus)
does not work at all. I once try the NetLibSocketAddr() to see if the
socket is connected. However, NetLibSocketAddr() returns the remote
address as soon as DNS is performed, but before the actual socket
connection takes place.

Thus, I am able to decide if a socket is connected after performing a
non-blocking connect. Is there any good solution?

I have also tried calling NetLibSocketConnect() repeatedly on a
non-blocking socket. However, it returns netErrInternal on the Palm
Simulator.

So is there a workable non-blocking socket connection on the PalmOS?

Thanks a lot.

Tony Cheung

--- In [EMAIL PROTECTED], Murad Kakabayev
[EMAIL PROTECTED] wrote:
 Hello everybody,
 
 I develop network application for PalmOS 4.0 and higher.
 For more frendly UI I want to use non-blocking socket calls.
 Here are my steps:
 1) Create socket
 2) make socket nonblocking
 NetLibSocketOptionSet(netSocketOptSockNonBlocking)
 3) connect socket - NetLibSocketConnect - got netErrWouldBlock error
 4) call NetLibSelect(read, write, except)
 5) analize result of NetLibSelect
 
 It works on PalmOS Emulator (OS 4.0) and PalmOS Simulator (OS 5.2) but
 don't work on real device (I have Tungsten T). On TT NetLibSelect
returns
 immideately regardless of connection result (success, timeout,rejected).
 It's not a big problem if I can recognize socket state (if it
connected).
 But
 I did not find any approach to check the socket. Usually I use
 getsockopt(SO_ERROR) on other platforms, but on PALM OS I have strange
 result for analog of getsockopt - NetLibSocketOptionGet
 (netSocketOptSockErrorStatus)
 
 1) PALMOS emulator wanted 4-byte buffer for result and
 returns WIN32 Network error code (10XXX)  :-)
 2) PALMOS simulator wanted 2-byte buffer and returns netErrUnimplemented
 3) TungstenT  wanted 2-byte buffer and returns errNone
 
 So I want make either NetLibSelect or NetLibSocketOptionGet
 (netSocketOptSockErrorStatus) work correct regardless of PalmOS
version and
 design. Or I want recognize if the socket connected.
 
 Any ideas?
 Thank you,
 Murad Kakabayev
 
 
 
 
 
 -- 
 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: Link Errors

2003-08-04 Thread Paul Johnson
I thought this was interesting. My other reply to this got bounced by the
server for having too many indented quotations in it. I went to look and it
appears to be the endless waves of crap that the server keeps appending :)


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


- Original Message -
From: Eric Cloninger [EMAIL PROTECTED]
To: Palm Developer Forum [EMAIL PROTECTED]
Sent: Monday, August 04, 2003 3:35 PM
Subject: RE: Link Errors


 Paul,

 This is as good a place as any because the interested parties are
 subscribed.  Since Ben is probably sleeping off the effects of an
 all-night Freebirds veggie burrito bender, I'll step in.

 CodeWarrior uses its' C compiler for files that end with a .c extension
 and the C++ compiler for files that end with .cpp (among others).  If
 you have files with both extensions and you want to force all files to
 go through the C++ compiler and use C++ name mangling rules, go to the
 preference panel for the C++ compiler and turn on Force C++
 compilation.  Otherwise, you will need to force C name mangling using
 'extern C' on your C prototypes.

 -E

  -Original Message-
  From: Paul Johnson [mailto:[EMAIL PROTECTED]
  Sent: Monday, August 04, 2003 9:13 AM
  To: Palm Developer Forum
  Subject: Re: Link Errors
 
 
  I knew I shoulda waited before posting this on account of
  dumbass error: patient heal thy self
 
  The master include file that other platforms include didn't
  have the extern C crap around it. I have to build my
  vanilla C project as CPP due to some iffy code in expat - an
  xml parser I use. So, it was user error due to name-mangling,
  but I'm boring you to death with it in case it helps anyone
  in the future.
 
  I'm sure the linker could've helped me out with this though.
  Hey ho..
 
 
  Regards,
  Paul Johnson
  Applewood House
  www.applewoodhouse.com



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


Re: __RuntimeModule__: Near data segment is bigger than 64K

2003-08-04 Thread Ben Combee
At 10:24 AM 8/4/2003, Paul Johnson wrote:
Any clues what this means and how to fix it please ?
This means that you've got too much code in the first segment of your 
project -- you need to create additional segments and move some of your 
routines to it.

--
Ben Combee [EMAIL PROTECTED]
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


RE: __RuntimeModule__: Near data segment is bigger than 64K

2003-08-04 Thread Eric Cloninger
You now get to have a lot of fun segmenting your application.  Use the
Segments tab on your CodeWarrior project to create multiple segments and
drag and drop files into the various segments.  There are a lot of rules
you have to follow when segmenting your app that I can't begin to
enumerate, but here's the short guidelines:

1) Pilotmain must go in segment 1
2) Global variables must go in segment 1
3) Any code accessed from a launch code other than
sysAppLaunchCmdNormalLaunch should go in segment 1.  This isn't a
hard-fast rule, but it's a good guideline to follow.

-E

 -Original Message-
 From: Paul Johnson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 04, 2003 10:24 AM
 To: Palm Developer Forum
 Subject: __RuntimeModule__: Near data segment is bigger than 64K
 
 
 Any clues what this means and how to fix it please ?
 
 Thanks...
 
 
 Regards,
 Paul Johnson
 Applewood House
 www.applewoodhouse.com
 
 
 -- 
 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: __RuntimeModule__: Near data segment is bigger than 64K

2003-08-04 Thread Paul Johnson
Ah, ok. I didn't just try this as I got different errors to start with
before I actually started adding segs. Ah well, here comes number 9  :)


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


- Original Message -
From: Ben Combee [EMAIL PROTECTED]
To: Palm Developer Forum [EMAIL PROTECTED]
Sent: Monday, August 04, 2003 4:49 PM
Subject: Re: __RuntimeModule__: Near data segment is bigger than 64K


 At 10:24 AM 8/4/2003, Paul Johnson wrote:
 Any clues what this means and how to fix it please ?

 This means that you've got too much code in the first segment of your
 project -- you need to create additional segments and move some of your
 routines to it.

 --
 Ben Combee [EMAIL PROTECTED]
 CodeWarrior for Palm OS technical lead
 Palm OS programming help @ www.palmoswerks.com


 --
 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: __RuntimeModule__: Near data segment is bigger than 64K

2003-08-04 Thread Paul Johnson
Thanks - I'm almost there now, just didn't understand this error - though it
was something different tbh


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


- Original Message -
From: Eric Cloninger [EMAIL PROTECTED]
To: Palm Developer Forum [EMAIL PROTECTED]
Sent: Monday, August 04, 2003 4:49 PM
Subject: RE: __RuntimeModule__: Near data segment is bigger than 64K


 You now get to have a lot of fun segmenting your application.  Use the
 Segments tab on your CodeWarrior project to create multiple segments and
 drag and drop files into the various segments.  There are a lot of rules
 you have to follow when segmenting your app that I can't begin to
 enumerate, but here's the short guidelines:

 1) Pilotmain must go in segment 1
 2) Global variables must go in segment 1
 3) Any code accessed from a launch code other than
 sysAppLaunchCmdNormalLaunch should go in segment 1.  This isn't a
 hard-fast rule, but it's a good guideline to follow.

 -E

  -Original Message-
  From: Paul Johnson [mailto:[EMAIL PROTECTED]
  Sent: Monday, August 04, 2003 10:24 AM
  To: Palm Developer Forum
  Subject: __RuntimeModule__: Near data segment is bigger than 64K
 
 
  Any clues what this means and how to fix it please ?
 
  Thanks...
 
 
  Regards,
  Paul Johnson
  Applewood House
  www.applewoodhouse.com
 
 
  --
  For information on using the Palm Developer Forums, or to
  unsubscribe, please see http://www.palmos.com/dev/support/forums/
 
 
 


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



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


The PalmOs command line accept arguments for applications?

2003-08-04 Thread rguevara
I want launch the MultiMail III Pro and compose a new mail automatically; i
launch as:

 LocalID dbID=DmFindDatabase(0,MultiMailPROIII);
 SysUIAppSwitch(0 , dbID, sysAppLaunchCmdNormalLaunch, NULL);

the application start correctly but i dont know if this program or others
accepts arguments for the launching.
Thank's
--
Open WebMail Project (http://openwebmail.org)



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


Which is the best palm?

2003-08-04 Thread Dinho
Hi all,

I'm looking for a good palm, but I didn't know how hard it could be!! I 
would like a palm with some good features for fun like MP3 and audible 
compatible but good for development also (I intend to develop a kind of 
HMI). any hints?

thanks

Aryldo



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


RE: Which is the best palm?

2003-08-04 Thread Robert Rhode
I really love my Palm Zire 71 handheld.  (Imagine perky engineer smiling and holding 
the product so that its name is clearly visible on your television screen.)


-Original Message-
From: Dinho [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2003 9:44 AM
To: Palm Developer Forum
Subject: Which is the best palm?


Hi all,

I'm looking for a good palm, but I didn't know how hard it could be!! I 
would like a palm with some good features for fun like MP3 and audible 
compatible but good for development also (I intend to develop a kind of 
HMI). any hints?

thanks

Aryldo



-- 
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: Which is the best palm?

2003-08-04 Thread Ben Combee
At 11:43 AM 8/4/2003, Dinho wrote:
Hi all,

I'm looking for a good palm, but I didn't know how hard it could be!! I 
would like a palm with some good features for fun like MP3 and audible 
compatible but good for development also (I intend to develop a kind of 
HMI). any hints?
Any of the Palm OS 5 devices would be a good choice.  So far, all of them 
have supported USB debugging with CodeWarrior for Palm OS V9, and at least 
the original Tungsten T will be supported by the FAST toolkit allowing 
debugging of ARM code in the near future.

--
Ben Combee [EMAIL PROTECTED]
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


Re: Which is the best palm?

2003-08-04 Thread NTL
Get a T2 or a T3 when it arrives.


- Original Message -
From: Dinho [EMAIL PROTECTED]
To: Palm Developer Forum [EMAIL PROTECTED]
Sent: Monday, August 04, 2003 5:43 PM
Subject: Which is the best palm?


 Hi all,

 I'm looking for a good palm, but I didn't know how hard it could be!! I
 would like a palm with some good features for fun like MP3 and audible
 compatible but good for development also (I intend to develop a kind of
 HMI). any hints?

 thanks

 Aryldo



 --
 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: Which is the best palm?

2003-08-04 Thread kcorey
From a Personal use standpoint, I *love* my Tungsten|T: light, small,
fast, high-res (320x320), good sound, decent screen, bluetooth
networking built-in.

But still, I can't wait until the Tungsten|T3 comes out.  *drool*
*drool*.

Also, the Tapwave Zodiac sounds pretty interesting, if you can wait a
little bit.

-Ken

On Mon, 2003-08-04 at 17:47, Robert Rhode wrote:
 I really love my Palm Zire 71 handheld.  (Imagine perky engineer smiling and holding 
 the product so that its name is clearly visible on your television screen.)
 
 
 -Original Message-
 From: Dinho [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 04, 2003 9:44 AM
 To: Palm Developer Forum
 Subject: Which is the best palm?
 
 
 Hi all,
 
 I'm looking for a good palm, but I didn't know how hard it could be!! I 
 would like a palm with some good features for fun like MP3 and audible 
 compatible but good for development also (I intend to develop a kind of 
 HMI). any hints?
 
 thanks
 
 Aryldo
 
 
 
 -- 
 For information on using the Palm Developer Forums, or to unsubscribe, please see 
 http://www.palmos.com/dev/support/forums/
 
 
 
 -- 
 For information on using the Palm Developer Forums, or to unsubscribe, please see 
 http://www.palmos.com/dev/support/forums/
 




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


Re: Which is the best palm?

2003-08-04 Thread Dinho
Thanks all,

I was about to buy a tungsten T but I heard it will be discontinued. 
what about sony clie or Tungsten C?

thanks

Aryldo

Ben Combee wrote:

At 11:43 AM 8/4/2003, Dinho wrote:

Hi all,

I'm looking for a good palm, but I didn't know how hard it could be!! 
I would like a palm with some good features for fun like MP3 and 
audible compatible but good for development also (I intend to develop 
a kind of HMI). any hints?


Any of the Palm OS 5 devices would be a good choice.  So far, all of 
them have supported USB debugging with CodeWarrior for Palm OS V9, and 
at least the original Tungsten T will be supported by the FAST toolkit 
allowing debugging of ARM code in the near future.



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


Re: Which is the best palm?

2003-08-04 Thread Ben Combee
At 12:07 PM 8/4/2003, Dinho wrote:
Thanks all,

I was about to buy a tungsten T but I heard it will be discontinued. what 
about sony clie or Tungsten C?
The original Tungsten T is end-of-life and out of production.  The Tungsten 
T2 has replaced it.  The T|C is a very nice device, especially if you're 
doing network programming and have a 802.11b wireless access point.  The 
extra memory can help with debug builds of your applications.  You won't be 
able to test apps using the graffiti area, however.

Palm OS developers tend to accumulate a lot of devices... I've got four 
devices in active use (T|T, T|C, Zire 71, Treo 300) and another set ready 
to be used for testing (CLIE T615C, Visor Prism, CLIE NX70V, Palm VIIx, 
HandEra 330, Palm IIIc, Palm IIIxe, Palm IIIe, Palm III, PalmPilot 
Professional, Pilot 5000), and I've got access to a i705, m500, m505, m125, 
CLIE S300, Visor Deluxe, Treo 270, and more.

--
Ben Combee [EMAIL PROTECTED]
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


Re: Which is the best palm?

2003-08-04 Thread Dinho
Ben,

My biggest problem here where I live(Brazil) is that we don't have much 
choice and not many types. Now, for example, we have only Zire, Zire 71 
and T | T from palm, and some PocketPC(but I realy like to buy a non 
Windows Palm). Zire 71 looks to be I nice Palm but it's expensive just 
because it has a (poor) camera. I need to choose carfully and try to get 
the best otherwise it will be just another thing in my drawer.

Thanks

Aryldo

Ben Combee wrote:

At 12:07 PM 8/4/2003, Dinho wrote:

Thanks all,

I was about to buy a tungsten T but I heard it will be discontinued. 
what about sony clie or Tungsten C?


The original Tungsten T is end-of-life and out of production.  The 
Tungsten T2 has replaced it.  The T|C is a very nice device, 
especially if you're doing network programming and have a 802.11b 
wireless access point.  The extra memory can help with debug builds of 
your applications.  You won't be able to test apps using the graffiti 
area, however.

Palm OS developers tend to accumulate a lot of devices... I've got 
four devices in active use (T|T, T|C, Zire 71, Treo 300) and another 
set ready to be used for testing (CLIE T615C, Visor Prism, CLIE NX70V, 
Palm VIIx, HandEra 330, Palm IIIc, Palm IIIxe, Palm IIIe, Palm III, 
PalmPilot Professional, Pilot 5000), and I've got access to a i705, 
m500, m505, m125, CLIE S300, Visor Deluxe, Treo 270, and more.



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


RE: Which is the best palm?

2003-08-04 Thread Eric Cloninger
Ben,

Next time we play poker and you go all in, I'll give you $20 for the
T|C.  :p

-E

 -Original Message-
 From: Ben Combee [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 04, 2003 12:22 PM
 To: Palm Developer Forum
 Subject: Re: Which is the best palm?
 
 
 At 12:07 PM 8/4/2003, Dinho wrote:
 Thanks all,
 
 I was about to buy a tungsten T but I heard it will be discontinued. 
 what
 about sony clie or Tungsten C?
 
 The original Tungsten T is end-of-life and out of production. 
  The Tungsten 
 T2 has replaced it.  The T|C is a very nice device, 
 especially if you're 
 doing network programming and have a 802.11b wireless access 
 point.  The 
 extra memory can help with debug builds of your applications. 
  You won't be 
 able to test apps using the graffiti area, however.
 
 Palm OS developers tend to accumulate a lot of devices... 
 I've got four 
 devices in active use (T|T, T|C, Zire 71, Treo 300) and 
 another set ready 
 to be used for testing (CLIE T615C, Visor Prism, CLIE NX70V, 
 Palm VIIx, 
 HandEra 330, Palm IIIc, Palm IIIxe, Palm IIIe, Palm III, PalmPilot 
 Professional, Pilot 5000), and I've got access to a i705, 
 m500, m505, m125, 
 CLIE S300, Visor Deluxe, Treo 270, and more.
 
 -- 
 Ben Combee [EMAIL PROTECTED]
 CodeWarrior for Palm OS technical lead
 Palm OS programming help @ www.palmoswerks.com 
 
 
 -- 
 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: Which is the best palm?

2003-08-04 Thread Aaron Ardiri
 Palm OS developers tend to accumulate a lot of devices... I've 
 got four devices in active use (T|T, T|C, Zire 71, Treo 300) and 
 another set ready to be used for testing (CLIE T615C, Visor Prism, 
 CLIE NX70V, Palm VIIx, HandEra 330, Palm IIIc, Palm IIIxe, Palm 
 IIIe, Palm III, PalmPilot Professional, Pilot 5000), and I've got 
 access to a i705, m500, m505, m125, CLIE S300, Visor Deluxe, Treo 
 270, and more.

now, that - i can agree with.

but, ben - you dont write apps for commercial use :) other than
using them for the codewarrior development, i am sure they are 
just toys :)

to give you an idea, i have a foot-by-foot-by-foot drawer just full
of cables specific to the palm devices (serial/usb cradles, chargers 
etc) i would take a picture - but, i dont think they'll all fit in 
the picture; not to mention the stuff your not supposed to see :)

---
Aaron Ardiri[EMAIL PROTECTED]
CEO - CTO   +46 70 656 1143
Mobile Wizardry  http://www.mobilewizardry.com/


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


Re: Which is the best palm?

2003-08-04 Thread Dinho
Just one more thing: what do you think about Sony Clie PEG-TG50? I just 
found one here.

Thanks

Aryldo

Aaron Ardiri wrote:

Palm OS developers tend to accumulate a lot of devices... I've 
got four devices in active use (T|T, T|C, Zire 71, Treo 300) and 
another set ready to be used for testing (CLIE T615C, Visor Prism, 
CLIE NX70V, Palm VIIx, HandEra 330, Palm IIIc, Palm IIIxe, Palm 
IIIe, Palm III, PalmPilot Professional, Pilot 5000), and I've got 
access to a i705, m500, m505, m125, CLIE S300, Visor Deluxe, Treo 
270, and more.
   

now, that - i can agree with.

but, ben - you dont write apps for commercial use :) other than
using them for the codewarrior development, i am sure they are 
just toys :)

to give you an idea, i have a foot-by-foot-by-foot drawer just full
of cables specific to the palm devices (serial/usb cradles, chargers 
etc) i would take a picture - but, i dont think they'll all fit in 
the picture; not to mention the stuff your not supposed to see :)

---
Aaron Ardiri[EMAIL PROTECTED]
CEO - CTO   +46 70 656 1143
Mobile Wizardry  http://www.mobilewizardry.com/
 



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


Re: Which is the best palm?

2003-08-04 Thread Ben Combee
At 01:13 PM 8/4/2003, Dinho wrote:
Just one more thing: what do you think about Sony Clie PEG-TG50? I just 
found one here.
It's nice, but I don't like the non-sticky shift keys on the keyboard, and 
I don't like Sony ignoring the standard OS 5 sound APIs or staying with OS 
5.0 instead of moving to the newer versions.  You'll also need to get a 
separate serial cable to debug applications running on it.

--
Ben Combee [EMAIL PROTECTED]
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


Re: LstGetSelectionText() - Memory Allocation ?!?!

2003-08-04 Thread nmailey

 Another thought, though...if you're having trouble reading from the
 list, why try to read from the list?  If you have it dynamically loading
 correctly, those strings need to be available to you in some other way
 (database, string array, string resource...something) so why not read
 them from the same location?

 -Ken

My current setup saves the records (packed) to a database.
From there, I generated a list dynamically by calling:
 DmNumRecordsInCategory();
 LstSetListChoices();
 LstSetDrawFunction();
  where my draw function...
  Seeks through all the records...
  DmSeekRecordInCategory();
  DmQueryRecord();
  and after unpacking...
  DrawCharsToFitWidth();

My goal is to determine which item in the list was chosen, get the key
from that info and pull up a record from another database? So I thought I
could just copy the string using StrCopy(listText,
LstGetSelectionText(list,LstGetSelection(list)))
But I can't figure out how I'm supposed to allocate the memory properly?

If I go:
listText MemPtr(sizeof(LstGetSelectionText(list,LstGetSelection(list
I get a return value of 4, which I thought was the size of the pointer...
I'm getting way off track here... but I'm at a loss here. How do I access
this info?

Thanks for all feedback thus far.. :)


Nole




   
 
kcorey 
 
[EMAIL PROTECTED]To: Palm Developer Forum 
[EMAIL PROTECTED]
Sent by: cc: (bcc: Nole 
Mailey/pmc) 
[EMAIL PROTECTED]Subject: Re: LstGetSelectionText() - 
Memory Allocation ?!?!
palmos.com 
 
   
 
   
 
08/04/2003 08:55 AM
 
Please respond to Palm Developer  
 
Forum 
 
   
 
   
 




On Mon, 2003-08-04 at 14:53, bullshark wrote:
 On Mon, 4 Aug 2003 09:59:53 +1000, Alan Ingleby
[EMAIL PROTECTED] wrote:
 
 Ken's right.  Specifically, you *can't* use LstGetSelectionText with a
 dynamic list, so don't.

 What? Why would that be? That's just wrong.

 This is only the case when a (suspicious) program never calls
LstSetListChoices.
 I think there is foul play here.
[...]
 If all that is involved here is a dynamic list, a DrawList callback
 is the wrong way to do it. You would only resort to this if your list
 had to display little icons or something. Even if you are doing it the
 wrong way, LstSetListChoices should still be called unless the list
 items don't have any text.

It all depends on where your strings come from.

Lately, I've done a bunch of work on lists built up from strings that
are individual records in a database.

If I wanted to be able to use LstSetListChoices, I'd need to either
1) Have a String array.
2) Allocate an array from dynamic memory for the strings and copy all
the strings into memory.
3) Open all the records, and lock them in place while the list is on the
form.

All of these take up some amount of space.  Arguably, if you're only
going to display 10 items, big woop.  If you're going to display up to
100, now you're potentially chewing up large amounts of memory.

Using a custom-drawn list gets around this nicely, and it's a piece of
cake, also giving you the ability to draw graphics, change fonts, or do
whatever bit of wizardry you'd like in the list.

Besides, do it once, and the code for the custom drawn list become
boiler plate, as the functionality is quite similar.

-Ken



--
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 

OS 5

2003-08-04 Thread Dave Mottorn
Has anyone run into any problems using an OS5 PDA with earlier types on the
same PC?



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


CRC check of an entire application

2003-08-04 Thread Eric Potter
I need to do an integrity check of an application and a shared
library. I would like to do a CRC check. I was going to use the
Crc16CalcBlock function. My question is, how do I get a pointer to the
application to pass as void *bufP?

Thanks for your help.

Eric Potter
Logikos, Inc

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


Re: CRC check of an entire application

2003-08-04 Thread Ben Combee
At 02:27 PM 8/4/2003, Eric Potter wrote:
I need to do an integrity check of an application and a shared
library. I would like to do a CRC check. I was going to use the
Crc16CalcBlock function. My question is, how do I get a pointer to the
application to pass as void *bufP?
Use the Palm OS API to determine the application database, then use the 
database APIs to check each resource in your application DB separately.

--
Ben Combee [EMAIL PROTECTED]
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com 

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


Linux Pose and HostFS not working for me.

2003-08-04 Thread Michael Kedl
I hate to complain about the same thing as several others, but...

I am using RedHat Linux 9, Pose 3.5 and the ROM
platform41_m505_enUS.rom.

I have downloaded the HostFS_emulator.prc several times (and can verify
it loaded) and configured my HostFS directories, checked
mount, and soft reset the emulator multiple times.

All the apps like cardinfo show No Card Inserted.

Is there something extra to get this to work under Linux?

I have tried the normal HostFS I found and one that said it was
specifically for Linux.

Thanks!
Mike Kedl



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


Re: Newbie Question - Using Visual Studio??

2003-08-04 Thread Jim Cooper

 They never had a Pascal compiler. You are thinking of PocketStudio,
 which is now at www.winsoft.dk

Sorry, typo.

www.winsoft.sk

Cheers,
Jim Cooper



Jim Cooper  [EMAIL PROTECTED]
Tabdee Ltd  http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi with your Palm


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


Re: The PalmOs command line accept arguments for applications?

2003-08-04 Thread Jim Cooper

 the application start correctly but i dont know if this program or others
 accepts arguments for the launching.

The PalmOS has no command line. You want to look at launch flags in
the SDK docs.

Cheers,
Jim Cooper



Jim Cooper  [EMAIL PROTECTED]
Tabdee Ltd  http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi with your Palm


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


Re: LstGetSelectionText() - Memory Allocation ?!?!

2003-08-04 Thread nmailey

*click* ... that was the sound made when I figured out what the past
few posts were all about

Becuase the list is generated from the databse, I'm taking the list
selection UInt16 return
value to get the record number at that exact location...

Excellent ladies and gents...excellent. Thanks again.

I love it when a plan comes together... ;)

Nole




   
 
kcorey 
 
[EMAIL PROTECTED]To: Palm Developer Forum 
[EMAIL PROTECTED]
Sent by: cc: (bcc: Nole 
Mailey/pmc) 
[EMAIL PROTECTED]Subject: Re: LstGetSelectionText() - 
Memory Allocation ?!?!
palmos.com 
 
   
 
   
 
08/04/2003 08:55 AM
 
Please respond to Palm Developer  
 
Forum 
 
   
 
   
 




On Mon, 2003-08-04 at 14:53, bullshark wrote:
 On Mon, 4 Aug 2003 09:59:53 +1000, Alan Ingleby
[EMAIL PROTECTED] wrote:
 
 Ken's right.  Specifically, you *can't* use LstGetSelectionText with a
 dynamic list, so don't.

 What? Why would that be? That's just wrong.

 This is only the case when a (suspicious) program never calls
LstSetListChoices.
 I think there is foul play here.
[...]
 If all that is involved here is a dynamic list, a DrawList callback
 is the wrong way to do it. You would only resort to this if your list
 had to display little icons or something. Even if you are doing it the
 wrong way, LstSetListChoices should still be called unless the list
 items don't have any text.

It all depends on where your strings come from.

Lately, I've done a bunch of work on lists built up from strings that
are individual records in a database.

If I wanted to be able to use LstSetListChoices, I'd need to either
1) Have a String array.
2) Allocate an array from dynamic memory for the strings and copy all
the strings into memory.
3) Open all the records, and lock them in place while the list is on the
form.

All of these take up some amount of space.  Arguably, if you're only
going to display 10 items, big woop.  If you're going to display up to
100, now you're potentially chewing up large amounts of memory.

Using a custom-drawn list gets around this nicely, and it's a piece of
cake, also giving you the ability to draw graphics, change fonts, or do
whatever bit of wizardry you'd like in the list.

Besides, do it once, and the code for the custom drawn list become
boiler plate, as the functionality is quite similar.

-Ken



--
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: LstGetSelectionText() - Memory Allocation ?!?!

2003-08-04 Thread Douglas Handy
Bullshark,

Ken's right.  Specifically, you *can't* use LstGetSelectionText with a
dynamic list, so don't.  

That should probably read you *can't* use LstGetSelectionText when you supplied
NULL as the itemsText pointer to LstSetListChoices.

If all that is involved here is a dynamic list, a DrawList callback 
is the wrong way to do it. 

Personal opinion.  Earlier, a link was made to a recipe on the Pam OS site
which describes static content lists, dynamic content lists, and custom-drawn
content.  (See http://www.palmos.com/dev/support/docs/recipes/lists.html#dynamic
for example.)

The last paragraph of the dynamic content method states:

  The complexity resulting from having to remember to free the list choices
often makes this technique worse than having a custom drawing routine for the
list. However, this way works much better than having a custom drawing routine
if the list of choices is slow to generate or must be generated sequentially.

To set dynamic list text, create the list when the need arises and
call LstSetListChoices(). Keep your program simple and let the
OS do the work.

IMHO, using custom draw lists is often *simpler* than creating the text,
populating the list, and freeing the memory later.While the recipe caveat of
this not necessarily being true when the list is slow to generate, in my
experience that has never been a problem.

I don't have any DrawList functions and I have dozens of Dynamic lists. 

And I have plenty of drawlist functions and zero using the method you prefer.

Even then, if they contain text, LstSetListChoices should be called 
in most cases. It is the obvious place to store the text component of the
custom drawn list and simplifies the job of the DrawList callback.

No it doesn't.  In cases where you have a database (or database subset)
containing the data, you just read the appropriate database record and draw the
value at the coordinates passed to the drawlist function.

This takes zero additional memory allocation to hold the list of choices,
regardless of the size of the list or database, and you never have to free the
memory either.  It has the added benefit of letting you change fonts or colors,
simulate multi-colum lists easily, etc.

Very similar to drawing table rows.

Calling  a drawlist function the wrong way to do it for a dynamic content list
is a disservice.  In many cases, a drawlist is a trivial way to do it by simply
using the item number to map to a record index in the database, grab the data,
and draw it.

Doug

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


gdb with Simulator

2003-08-04 Thread Khaki Wizard
Hi, 

It seems that the gdb in PRC-tools does not work with
the Palm OS 5 Simulator.
Anybody knows whether it should work or not?
SuggestionS?

Thanks,

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Re: LstGetSelectionText() - Memory Allocation ?!?!

2003-08-04 Thread James
I really, really wish Lists could have an application-defined callback to
retrieve the text for a specified item.

Here's how I envision it would work:

typedef Char* (*ListGetSelectionTextFuncType)(const ListType* listP, Int16
itemNum, void* userDataP);

void LstSetListChoices(ListType* listP, Char** itemsText, Int16 numItems, 
   ListGetSelectionTextFuncType getTextFunc, void*
userDataP);

getTextFunc would be optional; if NULL, all Lst functions would try to retrieve
strings directly from itemsText.

The advantage of this system would be that:
1. there's less need to use a custom drawing function; I'd bet that most 
   lists with custom-drawn items are purely textual, so the system now 
   could draw the list items itself
2. when dealing with pop-up triggers to such lists, the system could 
   update the trigger label itself
3. it would allow incremental-search to be used with such lists

(While I'm wishing, I wish you could set a callback for a pop-up list's event
handler too.)

#3 is the most important to me.  1 and 2 are not that much extra work with the
current system, but the combination of incremental-search's dependence on a
valid itemsText pointer and the lack of ability to set your own list event
handler makes it really hard to implement 3 yourself.  Currently if you want
incremental-search with a dynamically generated list, it's easiest to make
copies of all your strings and suffer the additional memory usage.

Obviously there's not much that can be done about this for existing versions of
Palm OS, but hopefully this stuff can be changed for Palm OS 6 if it hasn't
been already...

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Re: gdb with Simulator

2003-08-04 Thread Chris Faherty
On Monday 04 August 2003 08:05 pm, Khaki Wizard wrote:
 It seems that the gdb in PRC-tools does not work with
 the Palm OS 5 Simulator.
 Anybody knows whether it should work or not?
 SuggestionS?

It works.  But the 'gdbS' feature is not set by default so you have to force 
a break.  There was a program called gdbpanel.prc which simply sets the 
feature, but it doesn't work so hot in OS 5.x.

So what I usually do is in my app:

FtrSet('gdbS', 0, 0x12BEEF34);

And then I run it twice.  Someone should write another gdbpanel which 
doesn't blow up in OS 5.x.

-- 
/* Chris Faherty [EMAIL PROTECTED] */

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