bus error building dynamic list

2003-06-13 Thread Brian Preston
I'm trying to build my first dynamic list. 'Dynamic'
might be an exaggeration, I'm simply trying to build a
list of numbers 1 through x, where x's max value is
10, and x is randomly determined. The error occurs at
the first StrCopy. What am I doing wrong? I'm also not
sure if I need 3 chars for each line instead of two,
to include the null terminator at the end of each
string.

Here's the code:

int level = GetRandom(10)+1;
int d=0;
char SBuf2[5];

char **diffs = (char **) MemPtrNew (level * 2 *
sizeof(char));

for (d; d < level; d++) {

  if ( d<9) {
StrCopy(diffs[d], " ");
StrIToA(SBuf2, d+1);
StrCat(diffs[d], SBuf2);
  } else {
StrCopy(diffs[d], "10");
  }

}

LstSetListChoices(GetObjectPtr(StartDifficultyList),
diffs, level);
LstSetSelection(GetObjectPtr(StartDifficultyList), level-1);

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Re: Button size

2003-06-13 Thread Michel.P
You're absolutely right, it didn't even occur to me (I
use Pilrc).
Sorry for the trivial question, and thanks for the
equally simple answer.

--- Brad Figler <[EMAIL PROTECTED]> wrote:
> What resource editor are you using?  All of our
> buttons in our app are 36x20
> (makes it easier to use by hand).  You can easily
> change the size in
> constructor or Pilrc.

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Re: how to retrieve flash ID?

2003-06-13 Thread Dave Lippincott
Answered yesterday (and the week before).
http://groups.yahoo.com/group/palm-dev-forum/message/89383
http://groups.yahoo.com/group/palm-dev-forum/message/89187

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, June 13, 2003 4:24 PM
Subject: how to retrieve flash ID?


> Hi All,
>
> How to retrieve the flash ID from the device?
> Is there an API to do the job?
>
> THANKS!
>
>
>
> --
> 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/


how to retrieve flash ID?

2003-06-13 Thread achen
Hi All,

How to retrieve the flash ID from the device?
Is there an API to do the job?

THANKS!



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


Re: Button size

2003-06-13 Thread Brad Figler
What resource editor are you using?  All of our buttons in our app are 36x20
(makes it easier to use by hand).  You can easily change the size in
constructor or Pilrc.

Brad
"Michel.P" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Is there an easy way of changing the default size of a
> button?
> One of my forms is composed only of a few buttons with
> a label of only one character, thus I would like a
> larger than normal size for those buttons.
>
> I guess the buttons could be replaced by gadgets, but
> before I decide on such a "drastic" decision I wanted
> to exhaust the other posibility.
>
> __
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
>
>



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


Button size

2003-06-13 Thread Michel.P
Is there an easy way of changing the default size of a
button?
One of my forms is composed only of a few buttons with
a label of only one character, thus I would like a
larger than normal size for those buttons.

I guess the buttons could be replaced by gadgets, but
before I decide on such a "drastic" decision I wanted
to exhaust the other posibility.

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Re: pInstaller

2003-06-13 Thread José dos Santos Machado
Arpan Dalal escreveu:
I am using pInstaller to install the app on my palm.
Initially I tried using a xml file but I ran into
error: "Problem calling initial library. Installation
archive may be incomplete or corrupted". I have no
clue what this means. 
This is a little bit off-topic, but you should also include in your 
distribution the HSAPI.dll file, if I'm not wrong. That's in the docs. 

I really don't remember the name of the dll file, but I think is this. By 
the way, RTFM is a good advice. :) 

Why not change to Pilot Catapult ? IMHO it's better than pIntaller. 

-- J. Machado 

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


Re: 515 and console mode

2003-06-13 Thread Ben Combee
I can't get debugging from CW working on a real device. I have tried all
things I have found about putting the device in console mode (shortcut .. 2
and holding various scrollbuttons while doing a reset). The device is a m515
and I use CW version 8.x. Shortcut .. 1 works though and shows a green bar
at the botton of the screen. In CW I have Palmdebugger settings to Palm OS
device and USB connection. What is wrong and what should I see on the device
screen once I enable the correct mode?
We can't talk to the m515 over USB.  This device was released after 
the V8 product came out, and in our tests, we were not able to get a 
USB debugger connection working.  Other Palm devices that don't work 
with our debugger over USB include the i705 and m130.  The m500, 
m505, and m125 all do work, as best we can tell.

You'll need to get a serial cable and use that to debug to the m515.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS Technical Lead, Metrowerks
For programming help, see http://www.palmoswerks.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Packed records #pragma help GCC++ to CW9

2003-06-13 Thread Ben Combee
1. is the above the correct way to convert packed records from
GCC++ to CW9?
Yes, using #pragma options align=packed is appropriate.

2. How do I fix the odd byte memory fatal error
Unlike GCC, CodeWarrior's compiler won't automatically handle 
unaligned access for you.  You need to access your UInt16 members a 
byte at a time using something like

UInt16 value = ((UInt8 *)(&foo->member1)[0] << 8) + ((UInt8 
*)(&foo->member1)[1]);

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS Technical Lead, Metrowerks
For programming help, see http://www.palmoswerks.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


RE: Class library for getting/setting HH Hotsync info

2003-06-13 Thread Jeff Ishaq
At 10:11 AM 6/13/2003 -0400, Allen Robin E CRPH wrote:
Jeff,

I am new to the forum, but very interested in your class.  I 
found the HotSync.h file from your last email, but I do not have the 
information on where to find the .cpp file.  Help!

Robin E. Allen
I've purposefully omitted the implementation (.cpp) from online access only 
because there are certain malicious actions that can be performed with it 
that would jeopardize other Palm developers' income.  Sadly, I have to act 
as gatekeeper for this free code to prevent it from getting into the wrong 
hands (i.e., script kiddies / hacker types).

Please email me offline to my ishaq.biz address, and very briefly tell me 
some development projects you've worked with in the past.  I'd be more than 
happy to send you the .cpp file for your use once I am sure you're a Real 
Programmer, and without malicious intent.

I'm thinking of calling this distribution scheme "ResumeWare."  :)

-Jeff Ishaq



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


Looks like no where I can take the certificate exam now....

2003-06-13 Thread Yue Ma
Sorry for my question, but seems PalmSource.com will never answer my 
question, sent them twice
but not even got an echo

Any advice?

Thanks!

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


Re: 515 and console mode

2003-06-13 Thread ThuNguyet Nguyen
Hi there,

> putting the device in console mode (shortcut .. 2
> and holding various scrollbuttons while doing a reset). 
I know that we do Shortcut Dot Dot Two to put the device in the Console mode but I 
haven't heard
that holding various scrollbuttons while doing a reset put the device in the Console 
mode.

I hope Shortcut Dot Dot Two works for you.

Also, you can try to build the program "Dot Dot Two". The project should be in the CW 
example
folder, 2K DotDotTwo.prc file works. I haven't tried the 515 for a while but I think 
there is no
different from 515 and other Palm devices.

tnn

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Re: Dynamic popup list....not able to proceed

2003-06-13 Thread ThuNguyet Nguyen
Hi there,

I skim thru your code from the last posts, I am not good at catching the bugs, so
If you have CW 9, I can built a test program with dynamic popup list and you can try.

tnn

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Hold the pen on graffiti are & the game FREEZES

2003-06-13 Thread Giorgos Sarris
Hi all,

I'm a game programming in CW9 and C++.
During the game (When everything moves on the screen)
when someone tabs on the graffiti area and hold down
the pen down THE GAME FREEZES and when he stops
holding the pen down the GAME continues normally.

This happens also in PALM API EXAMPLE 'SubHunt'.

1) What can I do to fix that? (Whithout deactivating
graffiti because I need it.)


2) I see some bugs on Handspring Prism emulator that
none other emultor does. Is there a fix script or
anything like that?

Thanks a lot,
Giorgos Sarris
 


Do You Yahoo!?
Αποκτήστε τη δωρεάν @yahoo.gr διεύθυνση σας στο http://www.otenet.gr

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


Dynamic popup list....not able to proceed

2003-06-13 Thread Vidya Amar
Hi all,
I have created a dynamic popup list from the database using a 
callback function in  LstSetDrawFunction. The trigger is attached to the 
list in the constructor. When the form opens, the trigger label is set to 
the first item. Upto this point it is working fine.
Problem:-If the popup trigger is selected, the list is not being displayed. 
I have made handled = true in popSelectEvent as the trigger label is set 
from the data got from the database since LstGetSelectionText cannot be 
used. However, If I make handled = false(Which I think is wrong), the list 
is displayed properly but "read memory from memory location ,which is in 
low memory" error is got when an item is selected from the list.
How to display the list when the trigger is activated in the above case
Code snippet:-
static void MainListDraw(Int16 itemNum, RectangleType *bounds, Char** 
itemsText)
{
 ..
WinDrawChars(s,StrLen(s),bounds->topLeft.x,bounds->topLeft.y);//s got 
from database
}
static void MainFormInit(FormPtr /*frmP*/)
{

List = (ListType *)GetObjectPtr(PigmyAccountNoListList);
LstSetListChoices(List, NULL, n);//n=no. of records in the database
LstSetDrawFunction(List, MainListDraw);
LstSetHeight(List, 5);
.
ctl = (ControlPtr)GetObjectPtr (PigmyAccountNoTriggerPopTrigger);
CtlSetLabel (ctl,str);//str got from database
}
static Boolean MainFormHandleEvent(EventPtr eventP)
{
switch (eventP->eType)
{
case popSelectEvent:
   switch (eventP->data.popSelect.controlID)
   {
  case TriggerPopTrigger:
   ..
   ctl = (ControlPtr)GetObjectPtr (TriggerPopTrigger);
   CtlSetLabel (ctl,s);
   //handled = false;//Low memory error is got
   handled = true;//List is not displayed
   break;
 default:
   break;
   }
   default:
   break;
 }
   return handled;
}
Hope someone will help me. Thanks in advance,
Vidya

_
Dress up your desktop! Get the best wallpapers. 
http://server1.msn.co.in/msnchannels/Entertainment/wallpaperhome.asp Just 
click here!

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


BITMAPFAMILYEX in PilRC

2003-06-13 Thread Brian Toothill
Using PilRC Designer, how do I add bitmaps to a bitmap family?  I can create
a bitmap family by clicking on it in the Control Palette.  Then when I click
a bitmap, it just creates a new BITMAP - it doesn't add it to the family.

I could edit the source file - kind of defeats the purpose of the Designer,
though.  Am I going about this the right way?  Can't find anything in the
docs.

With thanks.

-- 
Brian Toothill




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


(test post)

2003-06-13 Thread Brian Toothill
Test post.

-- 
Brian Toothill




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


515 and console mode

2003-06-13 Thread Henrik Fredriksson
Hi,

I can't get debugging from CW working on a real device. I have tried all
things I have found about putting the device in console mode (shortcut .. 2
and holding various scrollbuttons while doing a reset). The device is a m515
and I use CW version 8.x. Shortcut .. 1 works though and shows a green bar
at the botton of the screen. In CW I have Palmdebugger settings to Palm OS
device and USB connection. What is wrong and what should I see on the device
screen once I enable the correct mode?

Regards
Henrik



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


EvtDequeuePenPoint crashes the APP ?

2003-06-13 Thread Rodolphe Bréjaude
Hi,

Do you know why this methods crashes my app when I called it and there is no
pen events in the queue?
If there are some, I get the first one, but if there is no, it crashes??

Is it a way to know if there are some pen events in the queue before calling
EvtDequeuePenPoint() ?

thanks


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


Re: Waking up when pageUp pressed

2003-06-13 Thread Daniel Seifert
Am Don, 2003-06-12 um 08.24 schrieb Jeff Ishaq:

Jeff,

> It seems the wakeup interrupt only happens with the four application keys 
> and the power button... is it possible to make the pageUp key also generate 
> this interrupt to turn the screen on?

No, this is not possible by software, afaik.

-- 
Daniel Seifert <[EMAIL PROTECTED]>


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


RE: Developing an "always on" application

2003-06-13 Thread Daniel Seifert
Am Mon, 2003-06-09 um 14.32 schrieb Roger Stringer:

Roger,

> Actually don't do "Always on".  Not necessary with Palm OS.
> 
> 1) Use the Event handler to generate nilEvents every, say, 5  seconds
> 
>  EventType event;
>  EvtGetEvent (&event, SysTicksPerSecond () * 5L);
> 
> 2) When you receive a nilEvent, check how much time has elapsed since the 
> last nilEvent.  If enough time has passed, (say 15 seconds) check if 
> anything is received on the socket.

But shouldn't this turn off the device, too, unless you set to not
auto-off at all or not to turn off while a network connection is
established? Simply waiting for nil events won't keep the unit awake.

-- 
Daniel Seifert <[EMAIL PROTECTED]>


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


Re: vfsErrFilePermissionDenied from VFSFileOpen

2003-06-13 Thread Magnus Berg
Nicolas Pabion wrote:

PalmOS has a bug with VFSFileOPen when you set the flag vfsModeLeaveOpen.
On T|T, we issues a patch for the audio that also fixed this problem so
players could play in the background.
Thank you Nicolas. I'll ask our customer to install the patch. BTW, 
which one? Will the first patch suffice with just the audio patch and a 
file FATFSPatch, or should I ask him to install the latest 600kB patch?

	Magnus

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