RE: calculate the mean(average) of numbers

2003-08-05 Thread Kaloyan Donev
Here is one algorithm, but n should fit in some type for it. Probably long long long long mean = 0; long long sum = 0; long long i; for(i=0; i= n) { sum -= n; mean++; } } Kaloyan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

DB create/write problem

2003-08-05 Thread Boris Epshteyn
Hi, I am trying to create a DB from the static data. In my AppStart, if DB does not exists, I create it with four records. The records is defined as following: typedef struct Airline { UInt16 airlineID; char *airlineName; } Airline; Since my airlineName is variable length, I am

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

2003-08-05 Thread Alan Ingleby
"James" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Exactly my point; for huge lists, you often don't want to use LstSetListChoices > because you're retrieving the strings from somewhere else, and you don't want > to deal with the extra memory requirements and management. Hence,

Changing the colour of the title of a form.

2003-08-05 Thread Alan Ingleby
Form Titles are always blue... I want a different colour for the form title on certain forms in my app. can this be done, or is it a roll-your own affair? I'd also prefer if the solution would be OS3.5 compatible... Alan -- For information on using the Palm Developer Forums, or to unsubscribe

Re[2]: DB create/write problem

2003-08-05 Thread Boris Epshteyn
Please Never mind. Found a stupid bug. Boris, Tuesday, August 5, 2003, 8:18:25 PM, you wrote: BE> My problem with writing to database is now solved. BE> However another problem came up -- now I can't read from the DB. BE> I am getting "Bus error". The code I am using to read is: BE> static v

memory leak -- but where?

2003-08-05 Thread David Martin
Greetings Here is a subroutine that does a frequently-wanted thing: it retrieves the hotsync name. It also leaks "maxsize" bytes every time you call it. I thought I had goofed by not Unlocking something, but I have matching MemHandleLock/MemHandleUnlock. what gives? thanks, David M /* paramet

Re[2]: DB create/write problem

2003-08-05 Thread Boris Epshteyn
My problem with writing to database is now solved. However another problem came up -- now I can't read from the DB. I am getting "Bus error". The code I am using to read is: static void drawProc(void *tableP, Int16 row, Int16 column, RectangleType *bounds) { Int16 y = bounds->topLef

Re: ALLOW_ACCESS_TO_INTERNALS_OF_CONTROLS?

2003-08-05 Thread Alan Ingleby
I'd personally suggest you try to avoid bypassing this protection mechanism, unless of course, you know which devices your program will be running on. Surely there's another was to keep track of which controls are visible or not, using your own code? Alan "Dragomir Goranov" <[EMAIL PROTECTED]> w

calculate the mean(average) of numbers

2003-08-05 Thread Ralf Krauss
Hi, does anybody know, how to calculate the mean (average) of numbers if the quantity of numbers is to high? sum = x1 + x2 + x3 + ... + xn; (with 'sum' and 'n' = very big, bigger as every type) mean = sum/n; Thanks Ralf -- For information on using the Palm Developer Forums, or to uns

Re: .rsrc Zero Bytes

2003-08-05 Thread Ben Combee
At 03:30 PM 8/5/2003, Paul Johnson wrote: Can someone explain to me why this is btw ? I find it a total pita so I guess its a Mac hangover. Flame on. lol :) Totally Mac OS hangover. When the tools were originally created, they reused many of the existing tools done for Mac 68K development. This

RE: Chunk under-locked (newbie ques)

2003-08-05 Thread Jeff Ishaq
> -Original Message- > From: [EMAIL PROTECTED] > Sent: Tuesday, August 05, 2003 7:50 AM > > Hi all > > I realize you need to set aside a block or "chunk" of memory > before assigning a variable any value but it's the how in > some scenarios that is messing me up... anyways... I hope

Re: FrmReturnToForm(0) crash....

2003-08-05 Thread kcorey
On Thu, 2003-07-31 at 16:30, kcorey wrote: > Anyone run into a situation where you've popped up a form on top of > another form, and when you call FrmReturnToForm(0), you crash with an > invalid memory location access? It particularly frustrating because it > just started happening out of the blue

.rsrc Zero Bytes

2003-08-05 Thread Manohar Chapalamadugu
Hi, I am in midst of developing a small application which has 4-5 forms. Today, I added a new form to the Constructor and the codewarrior simply shuts off itself when trying to copy resources while compiling. I checked the size of the .rsrc and it says 0 bytes. But when I open it with constructor,

Re: gdb with Simulator

2003-08-05 Thread Ton van Overbeek
Chris Faherty <[EMAIL PROTECTED]> wrote: > > 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

Redistributing the simulator

2003-08-05 Thread Brad Figler
I think this is probably best answered by someone at palmsource, but any information would be greatly appreciated. I was wondering if it is legal to redistribute the palm OS 5.2 windows simulator to our resellers. Here is what we are trying to accomplish. Our product is comprised of software tha

RE: ALLOW_ACCESS_TO_INTERNALS_OF_CONTROLS?

2003-08-05 Thread Jeff Ishaq
> -Original Message- > From: Dragomir Goranov > Sent: Tuesday, August 05, 2003 8:18 AM > > Hi, > I want to access the internals fields of ControlType > structures. Here is my > code: > //Before including any of the PalmOS system headers I define > insert this > line: > #define ALLOW_ACCE

Re: DB create/write problem

2003-08-05 Thread Thomas Damme
Hello Boris, I think your problem is there: >err = DmWrite(p, sizeof(air.airlineID), &(air.airlineName), sizeof(air.airlineName)); it should be like this: err = DmWrite(p, sizeof(air.airlineID), air.airlineName, StrLen(air.airlineName)); 1) air.airlineName is already a pointer since you aquired

Re: SSL-Error NoTrustedRoot

2003-08-05 Thread Thomas Damme
OK, I did this already. But somehow my app still crashes when I try to receive some data. So I guessed, the connection might not be made properly. How can I detect, if the connections is established successfully? Which HS-State must be the last? Currently the following States apprear after I return

Chunk under-locked (newbie ques)

2003-08-05 Thread nmailey
Hi all This is a bit of a fundamental question here but I think I only barely grasp how this whole Locking and Unlocking chunks is all about, not to mention I'm a newbie programmer. :\ I realize you need to set aside a block or "chunk" of memory before assigning a variable any value but it's

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

2003-08-05 Thread bullshark
On Mon, 04 Aug 2003 16:32:34 -0400, Douglas Handy <[EMAIL PROTECTED]> wrote: >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

Re: Visual Builder thoughts?

2003-08-05 Thread Alan Ingleby
I just downloaded a trial of Visual Builder, and I'd suggest you go with CW. VB doesn't even have autocompletion. (My pet CW9 feature :-). If you're that desperate to a Visual Studio look and feel, why not have a go at tying VC++ and PRC-Tools together.. It's possible... Alan "Arrow" <[EMAIL PR