Re: FrmSetFrameType/WinSetFrameType?

2001-03-21 Thread krollin



> I just re-read your _News.txt and it seems to say that you were going to
> allow update of frameType:

OK... I see the problem.  I have the offset for the frameType field wrong.  In
EmPalmStruct.i, the following line:

 DO_TO_FIELD (28, FrameBitsType, frameType) \

should be:

 DO_TO_FIELD (30, FrameBitsType, frameType) \

I know that you've rebuilt Poser in the past (I seem to recall that I have some
modifications from you that I still haven't rolled in yet), so perhaps you can
make this change on your copy.

-- Keith Rollin
-- Palm OS Emulator engineer



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



Re: FrmSetFrameType/WinSetFrameType?

2001-03-21 Thread krollin



When determining what accesses to allow and disallow, I came up with a list of
all the fields in windows, forms, and form objects.  I then determined if there
was an API that allowed the setting or getting of each field.  If the API
existed, the direct access was disallowed.

After all that, there were quite a number of fields that weren't covered by the
API.  I then tried to make a stab at dividing those into two groups: those that
should have an API but don't, and those that don't have an API for the reason
that we don't want anyone mucking with those fields.

Needless to say, there's no hard rule for what goes into each of those two
lists. Therefore, I had to make a SWAG of my own.  When considering the
"frameType" field, I couldn't come up with a reason for wanting to change the
value of the field.  My understanding was that the value was set when the 'tFRM'
resource was created, and that it would stay that way for the life of the form.
In that case of FrmNewForm, it seems to me that -- in order to provide a
consistant user experience -- the form should be using the standard frame type
as defined by the function.

If there is a valid reason for wanting to change the frame type, then I'm open
to hearing about this (and other similar direct-access problems).  It's quite
likely that my choices in what access should be allowed and what shouldn't is
incorrect.  For that reason, I seeded Palm OS Emulator 3.1 to several developers
before releasing it (hoping to catch most problems before inflicting them on the
rest of the developer community), and allowed room in my schedule to quickly
release a Palm OS Emulator 3.1.1 that fixes these problems, if need be.

-- Keith Rollin
-- Palm OS Emulator engineer






Stephen Best <[EMAIL PROTECTED]> on 03/20/2001 10:03:47 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Stephen Best <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  FrmSetFrameType/WinSetFrameType?



I've been going through my code trying to make it run clean with all debug
options set with POSE 3.1. Where's the API that will do this:

win = FrmGetWindowHandle (frm);

win->frameType.word = 0x0005;

Setting the desired frame isn't an option on FrmNewForm ...

Stephen Best
Bitware Australia





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



Re: StrNCompare & PalmOS4

2001-03-20 Thread krollin



> What other functions are available on Palm3.x and Palm4.0 that I can
> use to compare two byte strings?

You could use TxtCompare.

-- Keith





"Ji Lee" <[EMAIL PROTECTED]> on 03/20/2001 07:24:13 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ji Lee" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: StrNCompare & PalmOS4



I thought that the whole point of using StrN* was to tell the funciton the
size of buffer
you are passing to the function? (thus avoiding bufferoverflow?) But then, I
could be wrong
since I am not much of a C programmer =)  *sigh* writing Perl for a while
caused quite
a brain damage..

Anyhow, I guess I can't use StrNCompare for comparing byte string anymore
then..
What other functions are available on Palm3.x and Palm4.0 that I can use to
compare
two byte strings? Or should I write my own function for such purpose?
(StrNCompareAscii is available only on os4 I think)

Thanks!

-Ji



<[EMAIL PROTECTED]> wrote in message news:42905@palm-dev-forum...
>
>
>
> This is the expected behavior.  The function accepts "strings" as
parameters. A
> "string" is a sequence of characters terminated by a NULL.
>
> -- Keith
>
>




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





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



Re: StrNCompare & PalmOS4

2001-03-20 Thread krollin



This is the expected behavior.  The function accepts "strings" as parameters. A
"string" is a sequence of characters terminated by a NULL.

-- Keith






"Ji Lee" <[EMAIL PROTECTED]> on 03/20/2001 06:49:33 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ji Lee" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  StrNCompare & PalmOS4



Hi,

I have just ran into problem where if I am comparing two NON null terminated
string,
StrNCompare will cause crash (I could verify this only on OS4 DR4 rom
image..)
Here is a code sample:

Char* test1 = (Char*)MemPtrNew ( 4 );
Char* test2 = (Char*)MemPtrNew ( 4 );
test1[0] = 1;
test1[1] = 1;
test1[2] = 1;
test1[3] = 1;
test2[0] = 1;
test2[1] = 1;
test2[2] = 1;
test2[3] = 1;

StrNCompare ( test1, test2, 4 );

This code crashes and from the stack, it looks like StrNCompare is calling
StrLen
internally. (I am not 100% sure.. that was as far as I could tell from CW
debugger.)

I can currently getting around this problem by using "StrNCompareAscii",
which doesn't
suffer from this problem.

My question is whether this is expected behavior. If not, is it fixed on DR5
image?

Thanks

-Ji





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



Re: Detect emulator at run-time?

2001-03-20 Thread krollin



Steve,

Please see the URL that Danny posted for the correct answer (and background):

 

Of course, it would be a real hoot if I were to roll that information into the
official documentation.  I don't think I did that for the next version of Poser
being posted, but I'll make a note for the next time the docs are updated.

-- Keith Rollin
-- Palm OS Emulator engineer





Steve Mann <[EMAIL PROTECTED]> on 03/20/2001 02:06:34 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Steve Mann <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Detect emulator at run-time?



>Does anyone know of a way I can detect that I'm running in the
>emulator at run-time?

if ( HostGetHostID () != hostIDPalmOSEmulator )

You might want to check out the Host File APIs in the Tools
documentation for more details. Besides that function, there's lots
of good stuff in there.

Regards,
Steve Mann






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



Re: Misinformed???

2001-03-18 Thread krollin



This is an article based on @Stake's recent postings to this group.  You can
read these postings and many, many replies in this forum's archives:

 

Some titles to search for:

  @stake Advisory: Palm OS Password Lockout Bypass (A030101-1)
  @stake Advisory: PalmOS Password Retrieval and Decoding (A092600-1)
  @stake Advisory: 
  @stake ridiculousness

-- Keith Rollin
-- Palm OS Emulator engineer





- - <[EMAIL PROTECTED]> on 03/17/2001 03:52:56 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  - - <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Misinformed???



Hi,

  I came across this article recently.. as developers, pl. send comments to
[EMAIL PROTECTED]

BRgds,

Aristotle.

-- Article --
"Palm PDA threat to network security"

Networks could be vulnerable because passwords don't protect data held on Palm
PDAs. A back door in the Palm OS allows anyone with developer tools to access
information with the tap of a stylus. Palm's debugging program can be
exploited by anyone ready to read the Palm OS developer's manual online and
hitch up a PC to a Palm.

SOURCE: vnunet
http://www.vnunet.com/News/1119214



Get free email and a permanent address at http://www.netaddress.com/?N=1

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





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



Re: Sony Clie ROM?

2001-03-16 Thread krollin



> Heck, is it even compatible with the emulator given the 320x320 resolution?

Palm's version of the Palm OS Emulator does not emulate any Sony devices.

Sony has a version that emulates the Clie devices they released months ago.  I
don't know if they have one supporting any devices they may have announced
recently.

-- Keith Rollin
-- Palm OS Emulator engineer






"Jason Partyka" <[EMAIL PROTECTED]> on 03/16/2001 07:22:07 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Jason Partyka" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Sony Clie ROM?



Does anyone know if the ROM is available for the Sony Clie? I looked through the
archives and the Palm developer site and found nothing.

Heck, is it even compatible with the emulator given the 320x320 resolution?

-Jason




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



Re: Another Emulator Feature Request...

2001-03-16 Thread krollin



> > What's wrong with sound emulation?
>
> I did make several direct emails reporting the sound problem, but again, a
> different thread.

Ah, I see it now.  "Cannot interrupt note playing" on 3/8.  A very short thread
between you and you.  Oh, wait, there are two more on 3/12.  You and Jay Hong.

Honestly, I didn't read those postings.  There are just too many coming across
my desk every day.  I can't read them all, so I need to skim by subject.  There
was nothing in the title to indicate that this was an emulator problem, so I
skipped it.  I would also offer the defense that it was posted to this forum and
not the emulator forum.

As for what's wrong with sound emulation, yes, you've hit upon some
deficiencies.  The main deficiency is that I'm no sound expert.  Certainly not
on all three platforms that Poser runs on.  Neither am I a hardware expert,
serial expert, graphics expert, TCP expert, USB expert, UI expert, Unix expert,
or any of the myriad other things I've had to dive into in order to make Poser
the far-reaching utility it is today.  By which I'm saying that I'm already
stretched pretty thin in other areas that devoting major amounts of time to
sound is not practical (I'm definitely not saying that since I was able to pick
up those other abilities that picking up sound programming would be a snap!).

That's one of the reasons why Poser is Open Source.  If there are Sound experts
out there, I whole-heartedly encourage them to help out with the areas that I'm
thin on.  In fact, the Windows sound emulation was provided by a 3rd party
developer.  I then did the Mac part (stealing code from the Mac Simulator
libraries), and another chap here did the UNIX part.

FWIW: here is some background on sound emulation.  As Jay says, sound is not
emulated at a hardware level.  Trying to do that is just not feasible.  On the
Dragonball, sound is created by tweaking the PWM at certain rates and times.
Because emulated speed is not the same as on a real device, you'd get different
sounds if Poser were to try to trigger off of the PWM tweaking.  Therefore,
Poser instead patches SndDoCmd, translating the parameters into something that
sort-of kind-of make sense in the host API.

> > What do you mean by the emulating missing when it needs to update
> > the screen?

> Under Windows 98SE, it sometimes does not update the screen image at all
> when the image changes, or updates scattered parts of the
> image, when the background changes.  I honestly couldn't tell you a pattern, >
because I haven't really found one.  For example, if I
> simply turn the power on and off, usually it works fully, sometimes it
> redraws part of the screen, and sometimes it misses it.  But
> you can always see what's really on the screen by dragging the entire
> emulator off the desktop and then back on, forcing a WM_PAINT
> message.  What this says to me is that the emulator is always updating its
> internal 2x image buffer (could be updating it very, very
> fast), but is not always telling windows to update the buffer to the
> screen[extrapolation again, but I add it to help visualize
> the problem I'm describing]

I definitely haven't seen this problem.  At least, not in a couple of years,
when I thought I fixed the last update problems.

FWIW, here is some background on Poser's screen updating.  For the most part,
Poser attempts incremental updating.  It keeps track of where the LCD buffer is
in emulated RAM, and keeps track of write accesses to that range of RAM,
recording the highest and lowest modified addresses.  This all occurs in a
thread used solely for emulation (I call this the CPU thread).  Then, every 1/10
of a second, the UI thread wakes up and performs idle-time activities.  One of
these activities is updating the host display.  The UI thread halts the CPU
thread, and then examines the hardware registers and the recorded highest and
lowest modified LCD buffer addresses.  From this information, it determines
which LCD rows need to be updated, and then updates them.  When it's done, it
resets the highest- and lowest-address variables and restarts the CPU thread.

>From this, you can see that there's really no "internal 2x image buffer".  Poser
takes the LCD buffer as established and used by the emulated Dragonball (or SED)
hardware, converts that to a Window DIB, and then copies that DIB to the host
HWND.

The next parts of your e-mail aren't really organized in a way that I can hammer
out long explanations in a logical order, so instead I'll just insert small
comments here and there.

> What I was suggesting was to
> redraw 100% of the current Palm screen memory onto the Windows screen so
> many times per second, so that I can see what's going on at
> a higher frame rate.

I'm not sure that a higher frame rate will help.  10 fps is pretty fast as it
is.  Going to, say, 20 fps won't give you time to examine what's going on on the
screen (unless your ability to focus on the task at hand is far greater than I
give most h

Re: global variables

2001-03-15 Thread krollin



> Can I initialize them?  Since the event
> handling architecture in PalmOS does not allow for including call data in
> event handlers, it is pretty difficult to get around using global
variables.

I'm curious... Not being much of a Palm programmer, perhaps the answer is
obvious, but which launch codes result in the application entering an event
loop?  The obvious one -- sysAppLaunchCmdNormalLaunch -- supports globals.
Which of the ones that doesn't support globals would lead an application to
eventually enter an event handler?

-- Keith Rollin
-- Palm OS Emulator engineer






"Ben Combee" <[EMAIL PROTECTED]> on 03/15/2001 06:41:29 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ben Combee" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: global variables



> I am having a hard time understanding the restrictions on access to global
> variables in the PalmOS environment.  The various documents I have read
> state that global variables are not available for certain launch codes.
> Does this mean the variables themselves are not accessible, or have they
> merely not been initialized?

Typically on the Palm, global variables are stored in a region on the heap
which is pointed to by the A5 register.  In a launch situation where you
don't have global access, the A5 register is already is use storing the
global pointer for the active application.  This region that A5 points to
also has some system data, so changing it to point to a "local" global pool
for the sublaunched program would affect system stability.

> Can I initialize them?  Since the event
> handling architecture in PalmOS does not allow for including call data in
> event handlers, it is pretty difficult to get around using global
variables.

The usual method is to use features, which can be used like globals --
allocate dynamic space for a structure with all your "global" data, then
store the pointer in a feature which you can retrieve using an API call in
any subroutines which need them.

--
Ben Combee
Veriprise Wireless 



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





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



Re: Another Emulator Feature Request...

2001-03-15 Thread krollin



> This is a cosmetic request and should be lower in priority than issues
> like sound emulation.

What's wrong with sound emulation?

> At least under windows, updating the emulator screen is given VERY low
> priority.  So on modern PCs, we have the ironic situation that our code
> runs 5 times faster than normal, yet we didn't see what happened.  Also,
> the emulator often misses when it needs to update the screen.

Jeff, you really have this unhelpful habit of throwing out comments without
explaining yourself.  What do you mean by the emulating missing when it needs to
update the screen?  I know of no problems here.  If you are seeing problems,
then you really should report them instead of making allusive remarks about
them.

> When I
> try it on a real device, the whole process runs much slower, but the
> screen update speed is so fast it makes the device looks like a
> supercomputer.
>
> I propose the following "15 minute" solution:  Let the user specify a
> frame rate in which the Emulator will update it's current screen
> continuously whether it needs to or not.  If you set this to 2 fps, you
> solve the problem of the screen thinking it doesn't need to update.

*If* there is a problem here, then your suggestion is not the right solution for
it, so I don't view this as a reason for adding an FPS throttle.

> If
> you set this to 60 fps and your PC is fast enough, you get Palm-speed
> graphics, along with the bonus of slowing the execution speed itself
> down to closer to real world speeds.

*If* running faster than an actual device is a problem, then your suggestion is
not the right solution for it.  So again I don't view this as a reason for
adding an FPS throttle.

-- Keith Rollin
-- Palm OS Emulator engineer



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



Re: Millisecond delay

2001-03-14 Thread krollin



> I know, but a value of (about) 1200 causes a delay of one tick, according to
> the underlying delay loop.

I feel compelled to remind everyone that the given value is highly platform
dependent.  If you're going to use Alan's technique, then be sure that you run
his calibration routine every time your application starts up, rather than once
and hardcoding the resulting value (such as 1200).  We've got devices running at
16MHz, 20MHz, and 33MHz, each with different RAM wait states.  The number of
loop iterations will be different for each one.

By the way, I'm curious...what are the reasons and uses for millisecond timing?

-- Keith Rollin
-- Palm OS Emulator engineer






"Alan Ingleby" <[EMAIL PROTECTED]> on 03/14/2001 02:47:11 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Alan Ingleby" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Millisecond delay



I know, but a value of (about) 1200 causes a delay of one tick, according to
the underlying delay loop.  It doesn't take too much math to work out which
value would cause a delay of 1 ms.  i.e.: If TicksPerSecond = 100,
millisecond delay is 120, if TicksPerSecond is 60, millisecond delay = 72.

Regards,

Alan Ingleby
Systems Developer
ProfitLink Consulting Pty Ltd
309 Burwood Road
Hawthorn
Victoria 3122
Australia
"HowY" <[EMAIL PROTECTED]> wrote in message
news:42297@palm-dev-forum...
>
> But a tick is 1/100th of a second...
>
> not a millisecond
>





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



Re: Program crash when run on the real device

2001-03-14 Thread krollin



> Another example of the day for emulator differences, when running a IIIc on
the emulator, your application gets useful
> frmUpdateEvents to know when it has to repaint part of its window.  On a real
IIIc, you don't get Update events.

No...that's likely a ROM difference, not an emulator/device difference.  Debug
ROMs (in 3.5 and later, I think) -- which are typically used with the Emulator
-- post update events instead of saving the background.  Release ROMs found in
devices try to save the background if they can, obviating the update events.

-- Keith Rollin
-- Palm OS Emulator engineer




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



Re: Is use of Palm emulator skins for marketing legal?

2001-03-09 Thread krollin



The answer I gave in:

 

is still the best I have.

-- Keith Rollin
-- Palm OS Emulator engineer





DIAMOND JEFF <[EMAIL PROTECTED]> on 03/09/2001 07:54:29 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  DIAMOND JEFF <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Is use of Palm emulator skins for marketing legal?



This is not a developer question, but I didn't know where to best direct
it.

What I wanted to know was, if I want to show my application as an
animated gif, but show it running on the screen of a Palm image (for
advertising), can I legally appropriate one of Palm's official skins or
do I have to scan my own?

Thanks!
- Jeff




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



RE: PalmOS CreatorID down?

2001-03-08 Thread krollin



> Yes, but with so much talent, how could you just sit idly by when
> disaster struck? :)

If it's the last thing David's ever done, it's site "idly"!  :-)

-- Keith






"Richard Burmeister" <[EMAIL PROTECTED]> on 03/08/2001 03:42:52 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Richard Burmeister" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  RE: PalmOS CreatorID down?



> From: David Fedor
> Did I ever mention that I'm not a network or
> system admin? Really, that's not what they pay me for. Sigh.
>

Yes, but with so much talent, how could you just sit idly by when disaster
struck? :)





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



Re: Is is possible to hook a RESET beforehand?

2001-03-08 Thread krollin



> My goal is to have my App get its databases into a safe state before the
> reset occurs and the current information is lost.

I think that the general approach is to make sure that your application is never
too far from a consistant state.  A reset can occur at any time if someone
sticks a pin in the back of the device.  When that happens, there is NO warning.
The hardware is reset, the program counter is re-initialized, and the device
boots.

-- Keith Rollin
-- Palm OS Emulator engineer






DIAMOND JEFF <[EMAIL PROTECTED]> on 03/08/2001 12:02:12 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  DIAMOND JEFF <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Is is possible to hook a RESET beforehand?



I realize that the app receives a sysAppLaunchCmdSystemReset AFTER a
soft reset has taken place.

But is there any method to detect that a reset is occuring before it
actually happens?  (App RESET notification)

For example. right before the power goes out, the app gets a
vchrPowerOff or vchrAutoOff event.
Anything like this for a RESET?

My goal is to have my App get its databases into a safe state before the
reset occurs and the current information is lost.

Thanks!
- Jeff





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



Re: Crazy pose error with multi segment app...

2001-03-06 Thread krollin



I'm guessing that he's trying to call code in a segment other than his main
segment from his sysAppLaunchCmdSystemReset handler.

-- Keith Rollin
-- Palm OS Emulator engineer






"Ben Combee" <[EMAIL PROTECTED]> on 03/06/2001 07:12:55 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ben Combee" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Crazy pose error with multi segment app...



<[EMAIL PROTECTED]> wrote in message
news:41767@palm-dev-forum...
>
>
> I reconfigured my application to be a multi segment app. It works OK
> in POSE, but when I halt my app with the Codewarrier debugger, POSE
> displays this message:
>
>   is attempting to change the embedded program counter to
>  0X8003A5EC. This address is invalid because it is in neither RAM or ROM.
>
> Does anyone have any idea what could be causing this to happen? I must
> restart POSE, which is a pain...

0x800 series addresses are usually handles that haven't been locked and
dereferenced.  At this point, do you actually have the CW debugger stopped?
If so, it may be good to open a console window, do a "hd 0", and try to find
out to which handle this corresponds -- then you can follow its chain to
memory and get a better clue as to why you're failing.

--
Ben Combee
Veriprise Wireless 




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



Re: java and POSE ....

2001-03-05 Thread krollin



Please search the archives for "kvm null".  You'll find:

 
 
 

-- Keith Rollin
-- Palm OS Emulator engineer





"Ron DeAngelis" <[EMAIL PROTECTED]> on 03/05/2001 01:17:22 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ron DeAngelis" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  java and POSE 



I have downloaded and installed POSE on Windows 2000. Also, I am able to run
Color KVM or KVMutil within POSE without any problems.  But, running "any"
java apps produces the following message:
KVM1.0 reports MemoryMgr.c Line 3527. MemMove to Null.

Looks like a seg vio.

This problem exists with both Palm IIIc  Rom image and PalmOS Debug Rom
Image.
I noticed that the max heap size is 31 kb.  On my palm its 223kb.

any thoughts?





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



Re: Urgent!!! What time is it?

2001-03-01 Thread krollin



Why don't you look at the clock on the wall...er, floor?

-- Keith






"Scott Johnson (Bellevue)" <[EMAIL PROTECTED]> on 03/01/2001 11:46:18 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Scott Johnson (Bellevue)" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Urgent!!!  What time is it?



What time is it?  Only answers within the next 5 minutes will be useful!

:-)

-slj-





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



Re: Numeric strings

2001-02-27 Thread krollin



> using TxtCharIsDigit() on each individual
> would probably slow down the application.

Did you *try* it?  Before optimizing, try measuring the effect operations have
on your application.  In this case, since TxtCharIsDigit is merely a macro that
performs a bitwise "and" and a test against zero, I seriously doubt that your
application's performance will be impacted.

You can check the whole string with something like the following (untested)
code:

str = FldGetTextPtr (fld);
while (*str)
{
 WChar curChar;
 str += TxtGetNextChar(str, 0, &curChar);
 if (!TxtCharIsDigit(curChar))
 {
  FrmAlert(AlarmInvalidAlert);
  return(false);
 }
}

OK, so TxtGetNextChar is *not* a macro.  But I still doubt that the time it
takes will be noticable.

-- Keith Rollin
-- Palm OS Emulator engineer


Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Nicolas Zeitlin" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Numeric strings



I need to constantly check wether a a string is numeric. The string might be
as much as 20 characters long, and using TxtCharIsDigit() on each individual
would probably slow down the application. I'd like a function, or a
combination of them, that would check wether a whole string is numeric.


Thanks a lot,

Nicolas Zeitlin




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



Re: I broke debugging somehow, gdb, Pose

2001-02-27 Thread krollin



> So, does anyone out there regularly run multiple copies of POSE at once?

This may be a more common occurence in the future.  The next public release of
Poser will support the ability to redirect serial communications over a TCP
connection.  Thus, you can run two versions of Poser and have them exchange data
with each other -- even beam to each other (by using Shortcut-S to switch IR
transmission over the serial port, but *not* using Shortcut-T to put IR into
loopback mode).

-- Keith Rollin
-- Palm OS Emulator engineer





Warren Young <[EMAIL PROTECTED]> on 02/25/2001 07:57:00 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Warren Young <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: I broke debugging somehow, gdb, Pose



[EMAIL PROTECTED] wrote:
>
> > What in the world did I do to break this?
>
> Beats me.  Turn on High- and Low-level debugger logging, do the same thing

Sorry for taking so long to get back to you on this, but in my copious
weekend hacking time, I did finally figure out what was going wrong.
There was another copy of POSE running in the background, unbeknownst to
me.  Since this machine has been up for about 2 months continuously now,
there's no telling when it started or what caused it to lose its X
window but still remain running in the background.  The background copy
of POSE had the debugger ports open, so POSE couldn't bind() to the
port, and gdb was connecting to the wrong copy of POSE.

The bind() call in SocketMessaging.cpp must have been failing on the
second invocation of POSE, but this will only cause an optional log
message.  I wonder if this is a case where the user needs to be warned
in a message box.  Normally, that bind() should succeed every time.  (If
another program is using the ports, and it's not another copy of POSE,
then you just need to change the debugger port in your preferences.)

So, does anyone out there regularly run multiple copies of POSE at
once?  If so, promoting the bind() failure to a popup warning would be
annoying, without some additional infrastructure like a semaphore that
the first copy of POSE creates, and subsequent copies check to see if
another copy of POSE is running.
--
= Warren Young -- Maintainer of the Palm OS Programmer's FAQ at:
= http://www.cyberport.com/~tangent/palm/faq/
=
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

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





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



Re: Forum problems

2001-02-27 Thread krollin



Please feel free to send postings like this to the list owner, as outlined on:

 

She doesn't normally read this forum, so direct mail is best.

-- Keith Rollin
-- Palm OS Emulator engineer






"Dave Lippincott" <[EMAIL PROTECTED]> on 02/27/2001 11:49:46 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Dave Lippincott" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Forum problems



What's up with the forum lately?  Sometimes it takes days for posts to
appear if at all.  Can someone give the server a light tap with a large
hammer?




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



Re: Code0 resource format

2001-02-26 Thread krollin



It should be the same as the Mac's:

 

-- Keith





[EMAIL PROTECTED] (Carpathia) on 02/25/2001 01:37:16 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED] (Carpathia)


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Code0 resource format



Can anyone please direct me to where I could find information on the Code0
resource format ?

Thankyou

Carpathia




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



Re: Stack

2001-02-24 Thread krollin



You are getting NULL handle errors because you are passing NULL handles to
functions that don't accept NULL handles.  You should determine why you are
passing NULL handles to those functions.  Don't *guess* that it's because of a
stack overflow problem (a condition easily and immediately detected when running
under the Palm OS Emulator).  Use a debugger and determine exactly why you are
passing a NULL handle to the function.  It could simply be that you tried
allocating too large a buffer with MemHandleNew and it failed.

-- Keith Rollin
-- Palm OS Emulator engineer






Herman Badenhorst <[EMAIL PROTECTED]> on 02/22/2001 08:44:14 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Herman Badenhorst <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Stack



*
http://oasis.palm.com/dev/kb/papers/1134.cfm

Don't overfill the stack

Allocating large numbers of local variables (or extremely large ones) can
result in hard-to-debug heap corruption. The stack is only about 2k; be
stingy with stack-based variables!

*

I'm getting Null handle errors, can i maybe be because i'm overfilling the
stack with these local variables?


  Boolean handled = false;
  FormPtr frm;
  FormPtr *frmNew;

  ControlPtr ctl;
  Boolean vFound = false;
  Boolean blnPrevious = false;
  Boolean blnNext = false;
  _VoucherRecord vVoucherRecord;
  _DynamicVouchers_Value vDynamicVoucherRecord;
  _DynamicVouchers_Value_ID vRecordTypeID;
  char vVoucher[80];
  char vVoucherTypeQty[20];
  char vNewRecord[20];
  char vNewRecord1[20];
  static char vVoucherTypeID[15];
  char vNewRecordID[15];
  static char TempQty[5];
  static char vVoucherValue[10];
  char vStrTotalSold[5];

  int vTotal;

  static int vButtonCount;

  int VoucherQtyL = 0;

  int vcount;
  int i,x,y,k,l;


Regards,


--
Herman Badenhorst

"Life is God's gift to you.
The way you live your life is your gift to God.
Make it a fantastic one."

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





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



Re: strange error when drawing a slider

2001-02-21 Thread krollin



> The only workaround is to provide a background bitmap of exactly the right
> width, or not to test on debug ROMs.  Or perhaps a new version of Poser
> could suppress error dialogs with this text.  Keith?

Yeah, awright...the next externally released version of Poser will squelch this
message if it's displayed when it shouldn't.

By the way, another way around the The Case of the Erroneous Error is to patch
ErrDisplayFileLineMsg, check the message being passed in, and return
fatalDoNothing if it's the one you don't want to see.  That's pretty much what
Poser does...

But John's suggestion sounds more fun... :-)  (Ack! Aaron! Get away from my
keyboard!)

-- Keith Rollin
-- Palm OS Emulator engineer






John Marshall <[EMAIL PROTECTED]> on 02/14/2001 09:48:55 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  John Marshall <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: strange error when drawing a slider



John Cundall <[EMAIL PROTECTED]> wrote:
> When using the following code in the FrmOpenEvent handler for my app, I
> get a run-time error dialog from POSE saying "Control.c, Line:1707,
> Background must be at least half as wide as slider":
[...]
> The slider is 80x15 pixels. I haven't specified a background bitmap in
> the slider resource (using Constructor), so [...] the default background
> bitmap will be used.
[...]
> It only happens with the debug runs - the code runs fine on non-debug
> ROMs.

That's so amusing.  I noticed this bug only yesterday.  I've never seen any
other references to it.  Such a coincidence.

If you use a background bitmap which is not exactly the same width as your
slider, the OS will cover the whole slider by tiling it in a limited way:
it renders it twice -- once at the left, and once starting half way along.

To ensure that that covers the whole slider without gaps, debug ROMs check
that your bitmap is at least half the width of the slider.  Unfortunately,
the test is the wrong way around and it gives you the error when your
bitmap *is* wide enough instead of when it's too narrow.

There's actually nothing wrong with your program.  You only need to worry
if you *don't* get the error on a debug ROM.  :-)

The only workaround is to provide a background bitmap of exactly the right
width, or not to test on debug ROMs.  Or perhaps a new version of Poser
could suppress error dialogs with this text.  Keith?

Of course, as an academic exercise, you might like to search the debug ROM
file for "Background must be at least half as wide as slider" and find the
particular byte in the vicinity that is wrong.  Yeah, that might be an
interesting exercise...  :-)

John

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





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



Re: POSE Suggestion

2001-02-21 Thread krollin



> > Also - you can go ahead and code this yourself if you wish, as POSE
> > is GPL'd.
>
> I realize that, but since I didn't have the time to take to do it right now,
> I thought that perhaps the suggestion would inspire others to make the
> change and try and get it incorporated into future versions..

It might help you in your decision making to know where Poser is right now, and
the general path it's taking.  Poser seems to be hitting releases about every 3
months now.  It's around three months since the last release, and so I'm due to
release a new one soon.  So even if someone where to add the feature you
requested and sent it to me, it is too late to make it into this release, and
would have to wait three months for the next release.

If you think you might need this feature before then, and think you might be
able to scrape enough time together to do it, then you might want to take that
path.  If you then sent that change back to me, then *you* would be the one
people thanked whenever they used that feature!

-- Keith Rollin
-- Palm OS Emulator engineer



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



Re: ScrDriverNew.c Line:499, Invalid Params

2001-02-19 Thread krollin



Yes, it appears that 320 is a limit.  But that seems to be only for compressed
bitmaps.  I haven't been following this thread, so I didn't see if that was what
you were using.  But compressing bitmaps works with a fixed-size 40 byte buffer,
so that's where the limit comes from.

-- Keith Rollin
-- Palm OS Emulator engineer






Chad Harrison <[EMAIL PROTECTED]> on 02/19/2001 12:45:58 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Chad Harrison <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: ScrDriverNew.c Line:499, Invalid Params





OK, after many attempts at figuring out what is going on... it seems
that on 3.0 and 3.1 I get the ScrDriverNew.c Line:499, Invalid Params
error when trying to draw to an offscreen windows when the bitmap is
larger than 320 wide. I can use just about any height, so far. I
tried 320 X 320, and that worked fine. I tried 320 X 500 and that
worked fine. But if I try 321 X 320, I get the error.

so, is this a limitation of drawing the bitmap, or the
offscreenwindow? what if I use two images, and draw them next to
eachother to get the final desired width??

thanks for all of the suggestions people have given so far...




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



Re: POSE Suggestion

2001-02-19 Thread krollin



> A suggestion to those with the power to do such things...

That would be you (as well as every other developer on this forum)!


> Sorry if this is the wrong forum for this comment...

You could post it to emulator-forum, or tools-forum.


> I could get slammed if there is an easy solution to this...

Only if you marked your e-mail "Urgent!!! Mother's Last Dying Wish!!!  Baby
Needs a New Pair of Shoes!!!"

-- Keith Rollin
-- Palm OS Emulator engineer






"Bradly J. Barton" <[EMAIL PROTECTED]> on 02/19/2001 12:40:36 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Bradly J. Barton" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  POSE Suggestion



A suggestion to those with the power to do such things.. I would really love
to see the ability in POSE to change the "Palm's" time settings without
changing the host computer's settings.

Sorry if this is the wrong forum for this comment, but I figured by posting
such a comment here I could get slammed if there is an easy solution to
this.. how can you pass up that kind of opportunity? :)




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



Re: DmWriteCheck failed

2001-02-19 Thread krollin



1. Call DmWriteCheck yourself to see what error code it returned.  It can return
dmErrNotValidRecord, dmErrWriteOutOfBounds, or errNone. Determining what it
thinks the problem is might help.

2. If it returns dmErrNotValidRecord, the pointer you're passing in to
DmWriteCheck is invalid.  This could mean that DmGetRecord failed.  Perhaps the
record is busy or deleted.  You should check the returned handle to see if it's
NULL, and call DmGetLastErr to find out what the error was.

3. If it returns dmErrWriteOutOfBounds, that would mean that the record size is
too small, which in turn would mean the DmResizeRecord failed for some reason.

-- Keith






hymanho <[EMAIL PROTECTED]> on 02/19/2001 12:01:10 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  hymanho <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  DmWriteCheck failed



Hello,

I have a big problem for my palm program. in my program, I let user input
two field and save the value into the database.

but it always show "DmWrite:DmWriteCheck failed" when I insert a longer value
than before into the database. how can I handle this?

following is my code:

Err SaveUserProfile(Char *UserID, Char *Passwd)
{
 Char *ProductID, *tmp="";
 Err error;
 DmOpenRef dbRef;
 Char  *pMypointer, *pCurrPos;
 int numRecs=0, indx=0, SerialLen=0;
 MemHandle   recH;
 MemPtrrecP;

 tmp = GetSerialNum(&SerialLen);
 ProductID = new char[SerialLen];
 StrNCopy(ProductID, tmp, SerialLen);

 error = CheckOrgeDB();
 if ( error >= 0 )
 {
  dbRef = OpenDBByName(DBNAME,MODE);
  if (dbRef)
  {
   numRecs = DmNumRecords(dbRef);
   pMypointer = (Char *)MemPtrNew(500);
   pCurrPos  = pMypointer;

   StrCopy(pCurrPos, UserID);
   pCurrPos += StrLen(UserID) + 1;

   StrCopy(pCurrPos, Passwd);
   pCurrPos += StrLen(Passwd) + 1;

   StrCopy(pCurrPos, ProductID);
   pCurrPos += StrLen(ProductID) + 1;

   if ( numRecs > 0 )
   {
int fsize = pCurrPos - pMypointer;

DmResizeRecord( dbRef, 0, (pCurrPos - pMypointer));
recH = DmGetRecord( dbRef, 0 );
recP = MemHandleLock(recH);
error = DmWrite (recP, 0 , pMypointer , (pCurrPos -
pMypointer));

if (error)
 FrmAlert(Profile_WriteRec_Alert);

MemHandleUnlock(recH);
DmReleaseRecord( dbRef, 0, true);
profile_data_modify = false;
   } else{
 recH = DmNewRecord(dbRef,0,(pCurrPos-pMypointer));
 recP = MemHandleLock(recH);
 indx = 0;
 error = DmWrite (recP, 0 , pMypointer , (pCurrPos -
pMypointer));
 if (error)
  FrmAlert(Profile_InsertRec_Alert);

 MemHandleUnlock(recH);
 DmReleaseRecord( dbRef, 0, true);
 profile_data_modify = false;
   }

   MemPtrFree(pMypointer );
   DmCloseDatabase(dbRef);
  }
 }
 return 1;
}

Best regard

Hyman He
[EMAIL PROTECTED]



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



Re: Dynamic buttons

2001-02-18 Thread krollin



> what function must i use if i want to know the ID of the dynamic button
> created by the ctlNewControl function?

It's the value you passed for the second parameter to the function.  It's not
clear from your question why your program would know the ID when it called
CtlNewControl but then wouldn't know it later.  If remembering the ID you passed
to CtlNewControl isn't good enough for you, you might want to read the
documentation on FrmGetObjectId.

-- Keith



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



Re: Hmm, the puzzle

2001-02-18 Thread krollin



Dmitry,

I'm curious...how do you pass parameters to the functions you are calling?  How
are the types and values specified, and how are they pushed onto the stack?

That aside, I think that you can do the following to call your functions:

void CallTrap (UInt16 trapWord)
{
 // Write a small code stub that invokes the Palm OS function
 // and then returns.

 UInt16code[3];

 code[0] = 0x4E4F;   // TRAP $F opcode
 code[1] = trapWord; // System function selector
 code[2] = 0x4E75;   // RTS opcode

 // Get a pointer to the code we created, and cast it as a function pointer.

 typedef void (*FnPtr) (void);
 FnPtr fn = (FnPtr) &code[0];

 // Call the "function" we created.

 fn();
}

-- Keith Rollin
-- Palm OS Emulator engineer





Dmitry Yakimov <[EMAIL PROTECTED]> on 02/17/2001 04:40:39 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Dmitry Yakimov <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Hmm, the puzzle



Hello Palm,

  Try to imagine - I have got some data in some resource.
  This data is 2-bytes words and they mean trap codes to call palmAPI.
  Then in code I need to write a cycle, that get this numbers from the
  resource and call palmAPI functions with this numbers.

  Motorola did not make command trap reg, and I'm confused :(
  And palm do not allow me for example to compile trap #, and
  then, before of each call change # because it is protected
  storage and dwWrite works too long.

  What may I do? Please help if you know something - it is live
  important question for me.

--
Best regards,
 Dmitry Yakimov




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



RE: tree

2001-02-15 Thread krollin



If by "predefined control...to create a tree", he means "some code that someone
else wrote that displays hierarchical information in a tree-like format", there
are such beasts.  For instance, source code for one implementation is on
.

If by "predefined" he means "one from Palm", and "tree" he means the data
structures and routines to create and maintain the hierarchy, then the answer is
no.

-- Keith Rollin
-- Palm OS Emulator engineer






Aaron Ardiri <[EMAIL PROTECTED]> on 02/15/2001 08:27:27 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Aaron Ardiri <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  RE: tree



> > I am using Code Warrior. Is there any predefined control I can
> > use to create a tree?
>
> No

  maybe i have had too much computer screen today, but.. i laughed
  like hell when i saw this - good one richard! it beats the common
  "blah blah blah.. no.. blah blah blah" style comment

  heh

// az
[EMAIL PROTECTED]
http://www.ardiri.com/<--- free games!


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





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



Re: Transferring a prc

2001-02-14 Thread krollin



> You should instead use ExgDbRead, part of the exchange manager.  This isn't
> documented in the 3.5 documentation...

Huh?  It's in the Palm OS Reference.  Page 884 or 912, depending on the version
you have.

-- Keith Rollin
-- Palm OS Emulator engineer




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



Re: SysTicksPerSecond()

2001-02-13 Thread krollin



> Should I anticipate that the current batch
> of palms (all of the III, V, and VII series with OS 3.0 to 3.5) are
> 100 ticks per second?  Can I count on 100 ticks being exactly 1 second?

No...you should count on SysTicksPerSecond() number of ticks per second.

> I notice that ticks per second on the emulator is useless.  my 500mhz
> WinDoze box runs about 5 times as fast as my IIIc.

Yeah, calculating time under the Emulator is tricky.  See the forum archives for
previous discussions on this.

-- Keith Rollin
-- Palm OS Emulator engineer






Shannon Lowery <[EMAIL PROTECTED]> on 02/13/2001 06:45:04 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Shannon Lowery <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  SysTicksPerSecond()



Hi all-

I notice on my Palm III, Palm IIIc and Palm VIIx, they all register 100
ticks per second.  I would have expected different values since they
all
have different processors.  Should I anticipate that the current batch
of palms (all of the III, V, and VII series with OS 3.0 to 3.5) are
100 ticks per second?  Can I count on 100 ticks being exactly 1 second?
for timing animations?

I notice that ticks per second on the emulator is useless.  my 500mhz
WinDoze box runs about 5 times as fast as my IIIc.

Thanks for the help.

Cheers, Ted
ted at elowery dot net



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



Re: sysAppLaunchCmdSyncNotify

2001-02-13 Thread krollin



Gary,

You're remembering something else. Receiving a sysAppLaunchCmdSyncNotify LAUNCH
COMMAND has nothing to do with notification or events.

-- Keith Rollin
-- Palm OS Emulator engineer






"Gary Miller" <[EMAIL PROTECTED]> on 02/13/2001 10:19:31 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Gary Miller" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: sysAppLaunchCmdSyncNotify



I remember something about having to register your app to receive
notification of events.

"Chad Harrison" <[EMAIL PROTECTED]> wrote in message
news:39403@palm-dev-forum...
>
> for some reason, the sysAppLaunchCmdSyncNotify doesnt seem to be getting
> called inside my PilotMain, after my app gets installed.
>
> from the reference, it seems like it should,
>
> "This launch code is sent only to applications whose databases were
> changed during the HotSync operation. (Installing the application database
> itself is considered a change.) "






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



Re: sysAppLaunchCmdSyncNotify

2001-02-13 Thread krollin



> Make sure your OS version target is high enough.. in other words,
> sysAppLaunchCmdSyncNotify didn't exist in older OS's .. I don't have it in
> front of me, but I seem to recall this is an OS 3.3 or 3.5 addition.

No...sysAppLaunchCmdSyncNotify has always been implemented.  Take a look at the
header file...it's launch code #3!

-- Keith Rollin
-- Palm OS Emulator engineer







"Bradly J. Barton" <[EMAIL PROTECTED]> on 02/12/2001 09:58:23 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Bradly J. Barton" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: sysAppLaunchCmdSyncNotify



Make sure your OS version target is high enough.. in other words,
sysAppLaunchCmdSyncNotify didn't exist in older OS's .. I don't have it in
front of me, but I seem to recall this is an OS 3.3 or 3.5 addition.

--
Bradly J. Barton - [EMAIL PROTECTED]
Jenies Technologies Incorporated
(972) 602-1835
http://www.JTI.net
http://PalmInHand.com

- Original Message -
From: "Chad Harrison" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, February 12, 2001 10:27 PM
Subject: sysAppLaunchCmdSyncNotify


> for some reason, the sysAppLaunchCmdSyncNotify doesnt seem to be getting
> called inside my PilotMain, after my app gets installed.
>
> from the reference, it seems like it should,
>
> "This launch code is sent only to applications whose databases were
> changed during the HotSync operation. (Installing the application database
> itself is considered a change.) "
>
>
> my code is like:
>
> UInt32 PilotMain(UInt16 cmd, Ptr, UInt16)
> {
>
> ...some stuff...
>
> if(cmd == sysAppLaunchCmdSyncNotify)
> {
>
> ...more stuff...
> }
>
>
> }



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



Re: Emulator, cool. Install tool, not.

2001-02-12 Thread krollin



Hmmm...I wouldn't have thought that their being zero would be the problem.

Checking...

OK, this is goofy.  In *some* versions of HotSync, it is considered an error for
the creation date to be more recent than the modification date.  And in *some*
versions of HotSync, it is considered an error for the creation date to be zero.

I recently added a (non-fatal) check in Poser for the first condition.  I'll add
one for the second as well.  When installing a file with header data that is not
technically incorrect but that could cause HotSync to complain anyway, I'll put
up a warning.

-- Keith Rollin
-- Palm OS Emulator engineer






Lee Fyock <[EMAIL PROTECTED]> on 02/12/2001 06:02:30 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Lee Fyock <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Emulator, cool. Install tool, not.



Keith said:

>The last time I looked into this, the problem with the .prc file I was
>sent was
>that the embedded creation date was more recent than the embedded
>modification
>date.  HotSync checks for that, but Poser doesn't.

That was it -- the creation and modification dates were being initialized
to 0.

Thanks!
Lee





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



Re: Serial port: Palm vs Visor

2001-02-11 Thread krollin



I hadn't heard the bit about mapping serial operations to the springboard.
However, there was one change I had to make to the Palm OS Emulator's ROM
Transfer tool (actually, Handspring made this change, not me):

On Visor Standard and Deluxe, there is a thread looking for a keyboard attached
to the serial port.  If you want to use the serial port, you have to disable
this thread first.

 //   If on Handspring device, disable the keyboard
 // thread before opening the serial library.

 if (!FtrGet ('hsEx', 0, &ftrValue))
  HsExtKeyboardEnable (false);

On Platinum, there's something else going on.  When I call SrmOpen, I get error
0x2000.  I can't find this documented anywhere (the Palm headers show 0x2000 to
be an Activation application error code), and haven't had a chance to talk with
Handspring about this yet.

I haven't tried Prism, yet.

-- Keith Rollin
-- Palm OS Emulator engineer






"John McCalla" <[EMAIL PROTECTED]> on 02/11/2001 06:58:37 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "John McCalla" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Serial port: Palm vs Visor




"Mike Montalvo" <[EMAIL PROTECTED]> wrote in message
news:39157@palm-dev-forum...
>
> Can anyone point me to a resource that explains how to write code that is
> compatible with the Palm serial port and the Handspring serial port?  Or
at
> least what the difference is?  I've read a bunch of PDFs on the Handspring
> site to no avail.  My software works fine on a Palm , but doesn't work on
a
> handspring with a serial cradle.
>

I read somewhere that the serial port gets mapped automatically on the
springboard slot (for modem springboards, I gather).  This was true for the
Visor / Visor deluxe, and may have changed on the newer models.  I can't
remember where I read this, nor can I remember if there was a way to work
around this problem (i.e. opening a serial port on the cradle interface).

I realize that this information isn't very useful.  Maybe someone else can
fill in the details?

John.

---
John McCalla
[EMAIL PROTECTED]



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



Re: ShlPrintf bus error

2001-02-11 Thread krollin



> "long int" is a guaranteed 4-byte value.
> "short int" is a guaranteed 2-byte value.

Richard,

This is not quite correct (or, at best, is ambiguous).  From my favorite C
manual ("C: A Reference Manual", by Harbison and Steele, 4th edition):

"The C language does not specify the range of integers that the integral types
will represent, except to say that type 'int' may not be smaller than 'short'
and 'long' may not be smaller than 'int'.  Many implementations represent
characters in 8 bits, type 'short' in 16 bits, and type 'long' in 32 bits, with
type 'int' using either 16 or 32 bits depending on the implementation.  ISO C
requires implementations to use at least these widths."

So, the sizes can be larger in any compliant compiler, and may be smaller in a
non-compliant (pre-ISO) compiler.

-- Keith






"Richard M. Hartman" <[EMAIL PROTECTED]> on 02/10/2001 12:39:26 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Richard M. Hartman" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: ShlPrintf bus error





Steve Orens <[EMAIL PROTECTED]> wrote in message news:38949@palm-dev-forum...
...
> Well, it looks like that helped. I switched from using %ld to %d and it
> doesn't crash anymore.
>
> I guess I have always assumed that it was safe to print to use %ld (on
other
> platforms, I've been able to inter-change %ld and %d with no
consequences).
> Guess I will need to change my asssumption!

"int" is a tricky thing in C.

"long int" is a guaranteed 4-byte value.
"short int" is a guaranteed 2-byte value.

But "int" (unadorned by modifier) is the value that is most "natural" to the
processor.

--
-Richard M. Hartman

186,000 mi/sec: not just a good idea, it's the LAW!



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





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



Re: Global Variables

2001-02-09 Thread krollin



> Is there a rule as to when and when not to access them?

Yes, there is.  And it's well documented.  See, for example, page 57 of the
"Palm OS Programmer's Companion" that comes with SDK 3.5 (I found this by
opening the document and search for "globals").

You can find the same text at:

 

-- Keith Rollin
-- Palm OS Emulator engineer






"Mike Lyle" <[EMAIL PROTECTED]> on 02/09/2001 06:32:07 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Mike Lyle" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Global Variables



Keith,
Thanks for the reply.  I guess I'm accessing global variables at the wrong
time.
Is there a rule as to when and when not to access them?

Thanks,
Mike Lyle

- Original Message -
From: <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 6:02 PM
Subject: Re: Global Variables


>
>
> > I always assumed that Palm deprecates the use of globals generally,
because
> > of the warnings generated by POSE.
>
> No.  Poser only warns when an application appears to be attempting to
access
> globals when they don't exist.  It doesn't not warn during normal,
accepted
> accesses.
>
> -- Keith Rollin
> -- Palm OS Emulator engineer
>
>
>
>
>
>
> "Philip Sheard" <[EMAIL PROTECTED]> on 02/09/2001 03:54:56 PM
>
> Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
>
> Sent by:  "Philip Sheard" <[EMAIL PROTECTED]>
>
>
> To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
> cc:(Keith Rollin/US/PALM)
> Subject:  Re: Global Variables
>
>
>
> > As a new palm developer coming from the Windows environment, do you
> realize that
> > not having global variables is a condition that exists only a small
> fraction of
> > the time?  For normal application execution, you have full access to
> global
> > variables.
> >
> > Or are you talking about one of those other cases where globals really
> aren't
> > available?
>
> I always assumed that Palm deprecates the use of globals generally,
because
> of the warnings generated by POSE.
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please
> see http://www.palmos.com/dev/tech/support/forums/
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


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





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



Re: Global Variables

2001-02-09 Thread krollin



> I always assumed that Palm deprecates the use of globals generally, because
> of the warnings generated by POSE.

No.  Poser only warns when an application appears to be attempting to access
globals when they don't exist.  It doesn't not warn during normal, accepted
accesses.

-- Keith Rollin
-- Palm OS Emulator engineer






"Philip Sheard" <[EMAIL PROTECTED]> on 02/09/2001 03:54:56 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Philip Sheard" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Global Variables



> As a new palm developer coming from the Windows environment, do you
realize that
> not having global variables is a condition that exists only a small
fraction of
> the time?  For normal application execution, you have full access to
global
> variables.
>
> Or are you talking about one of those other cases where globals really
aren't
> available?

I always assumed that Palm deprecates the use of globals generally, because
of the warnings generated by POSE.


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





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



Re: Global Variables

2001-02-09 Thread krollin



As a new palm developer coming from the Windows environment, do you realize that
not having global variables is a condition that exists only a small fraction of
the time?  For normal application execution, you have full access to global
variables.

Or are you talking about one of those other cases where globals really aren't
available?

-- Keith






"Mike Lyle" <[EMAIL PROTECTED]> on 02/09/2001 03:28:21 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Mike Lyle" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Global Variables



As a new palm developer coming from the Windows environment I find not
having global variables a real problem.  Does anyone have a work around
for variables that are required by several procedures?

Thanks,
Mike Lyle






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



Re: NULL error or Reading into Low Memory after list selection

2001-02-09 Thread krollin



Well, if you want the answer to your question, you have a way to get it without
having to post questions to forums and hope that some other developer will
correctly guess why a program he's never seen is crashing.  Set up your
development system to debug with the emulator, and get the direct answer to your
question.

-- Keith Rollin
-- Palm OS Emulator engineer






"Timothy Astle" <[EMAIL PROTECTED]> on 02/09/2001 03:20:23 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Timothy Astle" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: NULL error or Reading into Low Memory after list selection



If that's the case, then I'm confused...why don't you click on the Debug
> button in the dialog and be shown exactly where the problem is?
>
> -- Keith Rollin
> -- Palm OS Emulator engineer
>

Unfortunately, when I click debug it isn't doing a thing.  I don't have it
set up to do debugging on the emulator.  I usually use my Palm device.

+
Timothy D. Astle
Embedded Systems Programmer
ALT Group Inc.
+




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



Re: "Bus Error" AFTER killing running app in debugging mode - Please help !!!!!

2001-02-09 Thread krollin



If it's right after killing your application the the device is rebooting, then
perhaps the problem is because your application is not correctly handling the
"reset" launch code sent to applications at that time.

-- Keith






Van Nguyen <[EMAIL PROTECTED]> on 02/09/2001 01:10:57 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Van Nguyen <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  "Bus Error" AFTER killing running app in debugging mode - Please help
  !



Greetings,

I am using CW6 and Emulator 3.0a8 with
palmos351-en-m100-dbg.rom file to run and debug my
application.

I know that I must have done something incorrectly in
my program because I got a bus error right after I
kill the running app.  The error dialog comes up with
Debug, Reset options.  However, I can not click on
Debug because it is really no program there anymore
for me to see where this happens.  I have read the
archive from the forum, and have tried some of the
recommendations such as

- Check the string declaration ... give rooms for it
- Make sure to call the FrmDrawForm function first
- Make sure that strings are null-terminated
- Look at CtlSetLabel as someone suggested

I still have the "Bus Error" problem right after I
killed the program.  I do not really know what to do
because there is really nothing to debug after this
point.

I also rearrange my code, add more segments to make
sure that I don't exceed the jump limitation.  This
does not help.  There is only 1 function in my code
considered long, I split that, then the problem goes
away.  However, if I add 3 more lines of code in the
program, then the bug happens again.

Would you have suggestions that I can try?
I really appreciate any information you can pass
along.
Thank you!



=
Best regards,

Van Nguyen.






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



Re: Emulator, cool. Install tool, not.

2001-02-09 Thread krollin



The last time I looked into this, the problem with the .prc file I was sent was
that the embedded creation date was more recent than the embedded modification
date.  HotSync checks for that, but Poser doesn't.

-- Keith Rollin
-- Palm OS Emulator engineer






Lee Fyock <[EMAIL PROTECTED]> on 02/09/2001 01:25:18 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Lee Fyock <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Emulator, cool.  Install tool, not.



I've an odd problem.  I'm building my own .pdb files (and have been for
years, without problems).  I'm now porting the pdb-builder to another
language and have run into something weird.

If I drop the built .pdb file onto the Emulator, it loads fine and I can
use it without problem in the creating application.

However, if I double-click it (on a Mac) to install it, the HotSync
Manager displays a dialog saying "This file does not appear to be a valid
Palm file." If I use the "Add to List" button to navigate to the .pdb
file, it's not even shown in the list of possible files!  That means to
me that there's some relatively inexpensive check that the HotSync
Manager is doing that the Emulator doesn't do.

If I drop the .pdb into the "Files to install" folder and attempt a
HotSync, I get a failure in the log with the 4114 error.

Before I get into the pain of step-by-step comparison of the two programs
and their output, does anyone know what check the HotSync Manager might
be doing, and therefore what area I may be incorrectly writing?

Thanks!
Lee






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



Re: NULL error or Reading into Low Memory after list selection

2001-02-09 Thread krollin



> Does anyone know where I should look for this problem?

You say "...it gives me a NULL error or a Low Mem error".  From this, I assume
that you're using the Palm OS Emulator for development, since debugging on an
actual device or using the simulator library on the Mac won't generate this
error.  If that's the case, then I'm confused...why don't you click on the Debug
button in the dialog and be shown exactly where the problem is?

-- Keith Rollin
-- Palm OS Emulator engineer






"Timothy Astle" <[EMAIL PROTECTED]> on 02/09/2001 01:21:39 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Timothy Astle" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  NULL error or Reading into Low Memory after list selection



I'm using a callback to populate a list from a database.  It's pretty much a
match of the CodeWarrior Tutorial in Chapter 8.  *I think*

My list is drawn, the correct items are in it, but whenever I select an item
from the list, it gives me a NULL error or a Low Mem error.  I read in past
newsgroup postings that this can be due to not setting the Pop-Up trigger
label, so I'm trying that.  (No luck so far)

Does anyone know where I should look for this problem?  I'm unable to do my
normal debugging until I'm sent my Palm replacement next week :-(

The following is a snippet from my event handler, just incase this is my
problem.

case lstSelectEvent:
   // Get pointer to List
   lst = GetObjectPtr(NfoGeneralVehicleNumberList);

   // Get the current index in the list
   tblPvnoCurRecord = LstGetSelection(lst);

   // If it exists... Set the new label for the trigger.
   CtlSetLabel(GetObjectPtr(NfoGeneralVehicleNumberPopTrigger),
LstGetSelectionText(lst, tblPvnoCurRecord));

   handled = true;
   break;


+
Timothy D. Astle
Embedded Systems Programmer
ALT Group Inc.
+






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



Re: ShlPrintf bus error

2001-02-09 Thread krollin



Well, what is "money"?  (And no, I don't mean that in a philosphical sense.)
You say it's "non NULL".  Does that mean it's a pointer?  If so, then why are
you printing it with %ld?  Is it really an integer?  If so, is it a plain old
"int"?  If so, then that's a two-byte value, and you're trying to print it as a

4-byte value, skewing up the varargs parsing.

Other than that, I'm out of guesses.

-- Keith Rollin
-- Palm OS Emulator engineer






Steve Orens <[EMAIL PROTECTED]> on 02/09/2001 12:48:01 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Steve Orens <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  ShlPrintf bus error



greetings,

I am getting a bus error when I execute the following line of code...

ShlPrintf("money: $%ld, name: %s\n", money, object->GetName());

both money and object->GetName() are valid and non NULL. in fact, other
combinations of this command work just fine (just the %ld, several %ld, just
the %s).

Is there some problem with logging integers and strings to the console
window in the same function?

in general, is there more documentation on using the Console window for
printing out debug information programmatically? In ShellCmd.h there are
functions that would appear to help, but there are no comments and I can't
find any documentation on that part of the Console window. Just looking for
some additional info.

thanks,
steve





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



Re: Compression

2001-02-08 Thread krollin



I don't recall it being mandatory in the standard zlib, so I wouldn't think it
would be necessary in the Palm version.

-- Keith Rollin
-- Palm OS Emulator engineer






Warren Young <[EMAIL PROTECTED]> on 02/08/2001 05:19:57 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>


Sent by:  Warren Young <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Compression



SVBN MURTHY wrote:
>
>zs.zalloc = (alloc_func)0;

Are you sure you're not supposed to set this data member to a "malloc"
type function?  Having never used ZLib myself, that's just a guess.
--
= Warren Young -- Maintainer of the Palm OS Programmer's FAQ at:
= http://www.cyberport.com/~tangent/palm/faq/





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



Re: Debug serial application

2001-02-07 Thread krollin



> If I use POSE, as it is just software emulator,

No...it's a *hardware* emulator.

> it don't have a physical serial port which allow me to feed it data.

No, but it runs on a host computer that does.

If you read the documentation that comes with the Emulator, you wouldn't be
asking these questions.

-- Keith Rollin
-- Palm OS Emulator engineer






"SH Luk" <[EMAIL PROTECTED]> on 02/07/2001 03:22:28 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "SH Luk" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Debug serial application



I am developing an application which using the serial interface (HotSync) to
connect my deivce . I would like to know how can I deubg my application as
well as enable the serial communication. If I use POSE, as it is just
software emulator, it don't have a physical serial port which allow me to
feed it data. If I debug with the actual Visor with CodeWarrior, it is
already sit on the cradle so that I can't plug in my device. So by what mean
I can debug my application to see if it can response to the serial interface
correct or not?
Looking forward to your kindly advise.

Tristan






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



Re: Menu Icons in Post 3.5

2001-02-06 Thread krollin



Yes, that was the Palm OS version in which that feature was added.  Did you see
the section starting on page 102 of the Palm OS Programmer's companion?  I found
it just by looking up Menus in the Table of Contents.  It seems relevent to what
you want to do.

There's also the information starting on page 94 of the Palm OS Reference.

Or perhaps you just need to use the system-defined command numbers for your menu
items, if you're not doing that:

// System Menu Bar and Menus
#define sysEditMenuID   1
#define sysEditMenuUndoCmd  1
#define sysEditMenuCutCmd   10001
#define sysEditMenuCopyCmd  10002
#define sysEditMenuPasteCmd10003
#define sysEditMenuSelectAllCmd10004
#define sysEditMenuSeparator   10005
#define sysEditMenuKeyboardCmd 10006
#define sysEditMenuGraffitiCmd 10007

But I honestly don't know where using these is documented. But they've been
mentioned here in the past:

 
 
 

The last two are from two Palm OS engineers, who should know what they're
talking about.  The middle one even talks about using those menu item numbers in
conjunction with the Palm OS 3.5 command bar.

-- Keith Rollin
-- Palm OS Emulator engineer






"Bradly J. Barton" <[EMAIL PROTECTED]> on 02/06/2001 09:28:08 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Bradly J. Barton" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Menu Icons in Post 3.5



I can't seem to locate the information I am seeking in the knowledge base..
I want to say it was OS 3.5 that introduced the little menu box that pops up
when the user makes the menu stroke.. in that box are sometimes icons like
Paste, Undo, etc... How do I make these work with the Cut, Paste, etc menu
items in my own menus? Right now, if I choose Copy from my menu, I can paste
what was copied using my Paste item or by making the menu stroke and the
shortcut (P). But if I click the Paste icon in the menu box that pops up, it
won't paste what I copied... what is going on here?




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



Re: WinScreenMode

2001-02-06 Thread krollin



> Am I mistaken or isn't this the definition for WinScreenMode:

Yes, it is.  So why are you trying to pass "true" for the parameter typed as a
"Boolean*"?

As for "ScreenDepth", why are you declaring it as an "int" when the function
clearly wants the address of a "UInt32"?

And why are you passing 6 parameters to a function that clearly takes 5?

-- Keith






"Ender Wiggin" <[EMAIL PROTECTED]> on 02/06/2001 08:10:38 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ender Wiggin" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  WinScreenMode



I get this error when trying to debug my program

Error   : cannot convert
'int *' to
'unsigned char *'
Lord.cpp line 150
WinScreenMode(winScreenModeSet,NULL,NULL,NULL,&ScreenDepth,true);

I defined ScreenDepth like this:
int ScreenDepth;

Am I mistaken or isn't this the definition for WinScreenMode:
WinScreenMode(WinScreenModeOperation operation,
UInt32 *widthP, UInt32 *heightP, UInt32 *depthP,
Boolean *enableColorP);


--
Thanks in advance
--
Nikue Harlley
Veni Vidi Vici



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





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



Re: Error: NULL string passed....

2001-02-06 Thread krollin



> A error message comes up. It says... "..."

It also includes a Debug and Reset button.  Why don't you use the Debug button
and get the answers to all your questions?

-- Keith





S KAR <[EMAIL PROTECTED]> on 02/06/2001 04:22:47 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  S KAR <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Error: NULL string passed



I made this  application which creates/opens a DB.
When I load the application for the first time, or
just delete the created Db( not my appln.) in my
emulator (OS 3.5). A error message comes up. It says,"
1) App1.0 has read directly from memory location zero
(NULL). 
2. App1.0 reports StringMgr.c, Line:65, NULL string
passed. 
Pressing this the application opens and the DB is
created, but doesnt work properly.

Can any one of you help me with this. Like why and

when this error creeps in. And whats my mistake.
Thanx to all
Su





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



Re: Help! how to work around event queue full?

2001-02-05 Thread krollin



I can think of three approaches.  There could be others.

1. No one can enter text into 8 fields simultaneously, so there's no need to
have 8 fields.  Instead, have one field, and move it to where you need it as you
need it.  The Table Manager takes this approach with editable fields.  See how
it's used in the Address Book sample.

2. If you really need 8 fields, initialize them one at a time at idle time.
That is, open the form and set a flag saying that the first field needs to be
initialized.  At idle time, if that flag is set, initialize that field and set
the flag to indicate that the second field needs to be initialized.  Continue
doing this until all fields are initialized.

3. Read the documentation.  I only just figured that one out.  For FldInsert, it
says: "This function sets the field's dirty attribute and posts a
fldChangedEvent to the event queue. If you call this function repeatedly, you
may overflow the event queue with fldChangedEvents. An alternative is to remove
the text handle from the field, change the text, and then set the field's handle
again. See FldGetTextHandle for a code example."

-- Keith






"Avi Manor" <[EMAIL PROTECTED]> on 02/05/2001 02:20:46 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Avi Manor" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Help! how to work around event queue full?



I'm getting "Event.c line 283 event queue full" when ever trying to
fieldInsert more then about 8 fields. I see other people wanted to know
about the same thing but I could not find a practical answer.
Can any body help?





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



Re: I broke debugging somehow, gdb, Pose

2001-02-05 Thread krollin



> What in the world did I do to break this?

Beats me.  Turn on High- and Low-level debugger logging, do the same thing
again, quit Poser (this flushes the log file), and examine the log file (it will
be written to Log0001.txt or something like that in your $POSER_DIR or $HOME
directory).  See if there's any connection to a debugger, or if any debugger
packets get exchanged.

-- Keith Rollin
-- Palm OS Emulator engineer






Warren Young <[EMAIL PROTECTED]> on 02/04/2001 10:31:06 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Warren Young <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  I broke debugging somehow, gdb, Pose



Somehow in the last few months, I managed to break something which now
prevents me from debugging with Pose and gdb.  (I'm fuzzy on this since
the last time I used the debugger was in October sometime.)

I've tried everything: searching the archives, reinstalling PRC-Tools,
upgrading to pose 3.0a8, downgrading back to 3.0a7, creating new
sessions in the debugger, building with -g on the compiler and linker
command lines, etc.  This is all on Red Hat Linux 6.2, with gcc 2.95.2.
I've tried both prc-tools 2.0 and 2.0.90.

I can see that my PRC file size goes up by 108 bytes when I build with
-g.  I load the PRC file into Pose, start GDB with the COFF executable,
type "target pilot localhost:6414" (or 2000), click on the program in
the Launcher, and the program runs, without breaking on PilotMain.  I
can say "break PilotMain", and it tells me it added the breakpoint, but
still it refuses to stop.

What in the world did I do to break this?
--
= Warren -- ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

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





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



Re: Crc16CalcBlock

2001-02-02 Thread krollin



AFAIK, Crc16CalcBlock is standard (it uses the standard polynomial) and works.

 UInt16 checksum;
 checksum = Crc16CalcBlock(buffer, bufLen, 0);

-- Keith






[EMAIL PROTECTED] on 02/02/2001 08:59:11 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Crc16CalcBlock



Does anyone know details about Crc16CalcBlock?
I need to calculate the CRC-16 for the Direct Connect Communications protocol.
The Crc16CalcBlock value I receive is not correct.  I have researched the
Painless Guide to CRC Error Detection and can create a correct CRC from there,
but would like to use the Palm function to reduce overhead.  Can the Crc
polynomial and bit direction be set by me when using this function?

Thanks
Sandi Southard






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



Re: Consider providing higher speed legal screen access...

2001-02-02 Thread krollin



Why do you use WinCopyRectangle?  Why not use WinScreenLock and WinScreenUnlock?
Granted, those calls aren't in pre-3.5 systems, but then, neither will your
"copy buffer to screen function".

-- Keith Rollin
-- Palm OS Emulator engineer






DIAMOND JEFF <[EMAIL PROTECTED]> on 02/02/2001 12:00:16 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  DIAMOND JEFF <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Consider providing higher speed legal screen access...



It has been my experience that the single greatest cause of slow speed
in a function is GENERALITY.  Many OSes, for example, Windows and BeOS,
have seen fit to give developers a set of non-general performance
operations for graphics, because even a one gigahertz desktop can't
compensate for the generality required of formal OS calls.

For example, Palm could offer a performance "copy buffer to screen
function" that ASSUMES:

-> An entire screen copy (or at least a screen-WIDE rect copy)
-> suitable memory alignment for maximum transfer speed
-> * Buffer is in EXACTLY the same format as the screen, including pitch
(rowbytes)

I see no reason why such a function should be any slower than my illegal
code.

Then, if Palm is further worried about potential errors if the user's
buffer really doesn't match, Palm could add robyustness and control with
a function like CreateScreenBufferBitmap, which would ensure that the
screen matches.  If the screen changes, a single compare would then
suffice to head off the BLiT.

It wouldn't take very many non-general, performance functions to give a
lot of legal power to game developers.  Currently, I've found that my
unoptimized C code is eight times faster than WinCopyRectangle, and I
can only assume that's because my function is not general, but designed
with the above assumptions.



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





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



Re: Anyone know how to protect the registration?

2001-02-02 Thread krollin



SysGetROMToken returns the address of the token, not the token itself.  So you
can validate the address of the token.  For instance, if it's in RAM, then you
may want to consider it tainted.

-- Keith Rollin
-- Palm OS Emulator engineer






"James Luk" <[EMAIL PROTECTED]> on 02/02/2001 02:05:32 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "James Luk" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Anyone know how to protect the registration?



Dear all,

I have developed a palm application use the SysGetRomToken to get the
rom id as the identifier. But some-one has made the software to trap the
SysGetRomToken to crack my application.

Do anyone can help me to solve this problem?

Thanks!






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



Re: StrChr...

2001-02-01 Thread krollin



I'm certainly no Text Manager expert (I probably don't even rate "novice!), but
looking at the TextMgr.h header, the solution I'd probably take is to call
TxtFindString, passing in a one-character string instead of the char that StrChr
takes.

Or I might continually call TxtGetNextChar and test the returned char. But I
think the former woud be easier and faster.

-- Keith






Paul Nevai <[EMAIL PROTECTED]> on 01/31/2001 05:04:11 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Paul Nevai <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  StrChr...



Please look at the code of StrChr () in StringMgr.c [I can't quote here].  It
seems to me that when it returns (Char *)str, it may not be the correct
location in a multi-byte environment.

What is the right way to do a StrChr () job in a possibly multi-byte
environment? Should I use StrChr () or a Text Manager function for that job
or should I create a custom routine? Best regards, Paul

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





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



Re: GCC Compiler Bug? (Or am I just losing my mind?)

2001-02-01 Thread krollin



Igor Mozolevsky writes:
>Thomas Ward writes:
>>Ah, now that WOULD surprise me. Tell me, O Wise One, what is the name of the
>>Palm OS function that does string-to-double conversion?
>
>Now that I'm up, FplAtoF(),  see SDK documentation, O apparently not so
>wise one.

FplAtoF converts from a string to a "FloatType".  However, that's in the "old"
Floating Point Manager, the header to which I don't think Palm even ships any
more.  Perhaps Igor means FlpAtoF, which converts from a string to a
"FlpDouble".

I think that an FlpDouble can be converted to a double using the FlpCompDouble
type.  That is:

 double myDouble;
 FlpDouble myFlpDouble;
 FlpCompDouble myConverter;

 myFlpDouble = FlpAtoF("1.234");
 myConverter.fd = myFlpDouble;
 myDouble = myConverter.d;

-- Keith Rollin
-- Palm OS Emulator engineer



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



Re: Support response time

2001-02-01 Thread krollin



Well, this certainly doesn't explain Dave's "lack of response since June"
experience, but -- as developers have requested -- many of the Development
support engineers are in Europe and Asia for the next few weeks giving encore
performances of PalmSource.  I don't know what the expected response time is,
but it's sure to be severely impacted.

-- Keith Rollin
-- Palm OS Emulator engineer






"Robert McKenzie" <[EMAIL PROTECTED]> on 01/29/2001 10:30:08 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Robert McKenzie" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Support response time



Anyone know what the current expected response time for technical
submissions to Palm development support it?  I submitted a query
and received an automated response on 16 January, but since then
have heard nothing but loud silence...

-bob mckenzie
<[EMAIL PROTECTED]>




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



Re: ExpenseDB.PDB AppInfo area length different on MAC and x86 ?

2001-01-31 Thread krollin



I don't have any backed up Expense databases on my Mac, so I can't see if
there's anything going on with Mac HotSync. But looking at the ExpDB.h source
file, and looking at the default database used to initialize Expense the first
time it is run (for both Palm OS 2.0 and 4.0), I can confirm that it's 392 bytes
long.  I don't know where 512 bytes would be coming from.

-- Keith






[EMAIL PROTECTED] on 01/31/2001 12:58:13 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  ExpenseDB.PDB AppInfo area length different on MAC and x86 ?





Hi all,

I wrote some Java classes to dump the ExpenseDB.pdb to a csv file.
I develop on WindowsNT using Pose 3.0a8.
On x86 Plattform the AppInfo area is 392 bytes long.
One of my cutomers uses MAC and send me a ExpenseDB.PDB with an 512 Bytes long
AppInfo (made some lenght checks, so the application failed with an exception).

So, is there some general difference between x86 and MAC regarding to the
AppInfo.
Is the AppInfo fixed to 512 Bytes on MAC ?

Kind Regards

Juergen Schwister




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



Re: Setting List Attributes

2001-01-30 Thread krollin



> Won't (and shouldn't) POSE complain about that?

Not if that's the only way to set a flag that users should be able to set.

Poser has only just (in the last few days) had the ability to check for accesses
to certain dynamic data structures (specifically, windows, forms, and form
objects).  But when making those checks, I allow for direct accesses when
there's no API available to do the same thing.

-- Keith Rollin
-- Palm OS Emulator engineer




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



Re: Setting List Attributes

2001-01-30 Thread krollin



Keep in mind that I'm not an authority on this, but I don't see that the
"hasScrollbar" bit is supported.  Yes, there's mention of it in the SDK
documents, but I think the tech writer just filled in a description for a field
that's not supported. There are a few checks of "hasScrollbar" in the sources,
but nothing that looks really functional.  For instance, there's nothing to
create a scrollbar if "hasScrollBar" is true.

As for "search", the only place I could find it being set is in the Expense
application, where it's done directly:

 // zzz API routine.
 lst->attr.search = true;

-- Keith






Steve Mann <[EMAIL PROTECTED]> on 01/30/2001 05:54:26 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Steve Mann <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Setting List Attributes



Does anyone know of a "legal" (by not directly accessing the data
structure) way to set the hasScrollBar and search attributes of a
list? You can't do it in Constructor, you can't do it by dynamically
creating a list with LstNewList, and there is no API to get and set
list attributes like you can with fields. I'm stumped. Any
suggestions would be welcome.

Regards,
Steve Mann




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



Re: GCC Compiler Bug? (Or am I just losing my mind?)

2001-01-30 Thread krollin



> ... Good point... Nevertheless, ato*() and strto*() wouldn't exist if you
> could just simply type-cast...

You're talking about converting strings to and from integral values, Igor.  The
original question was about converting integral values to and from other
integral values.  There are no, say, itof or ftoi functions, so implicit of
explicit type conversion needs to be performed.

-- Keith Rollin
-- Palm OS Emulator engineer






Igor Mozolevsky <[EMAIL PROTECTED]> on 01/30/2001 06:14:07 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Igor Mozolevsky <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: GCC Compiler Bug? (Or am I just losing my mind?)



At 18:09 30/01/2001 -0800, you wrote:


> > This is what I was talking about A better approach would be to use
> > proper library transforms instead of type-casting...
>
>Is what you are talking about is that the last few values in your printout
>should be "4" instead of "-48"?  Perhaps if you took the bugs out of your
>program, it would work better. "S[10] = '4';" is incorrect.  It's
>assigning '4'
>to the 11th element of a 10 element array.  Try assigning it to S[0].
>
>-- Keith Rollin
>-- Palm OS Emulator engineer

... Good point... Nevertheless, ato*() and strto*() wouldn't exist if you
could just simply type-cast...


Igor M-)


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





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



Re: GCC Compiler Bug? (Or am I just losing my mind?)

2001-01-30 Thread krollin



> This is what I was talking about A better approach would be to use
> proper library transforms instead of type-casting...

Is what you are talking about is that the last few values in your printout
should be "4" instead of "-48"?  Perhaps if you took the bugs out of your
program, it would work better. "S[10] = '4';" is incorrect.  It's assigning '4'
to the 11th element of a 10 element array.  Try assigning it to S[0].

-- Keith Rollin
-- Palm OS Emulator engineer






Igor Mozolevsky <[EMAIL PROTECTED]> on 01/30/2001 05:57:05 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Igor Mozolevsky <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: GCC Compiler Bug? (Or am I just losing my mind?)



At 17:11 30/01/2001 -0800, you wrote:
>Instead, this integral value of 4 is cast via (double) into a double
>value.  The
>string "s" is not converted!  Just the result of the expression (s[0] - '0').
>
>-- Keith Rollin
>-- Palm OS Emulator engineer

Incidentally,

#include 

char S[10];
char SS[10];
char SSS[10];

int main(void)
{

  S[10] = '4';

  memset(SSS, 0, 10);
  memset(SS, 0, 10);

  (unsigned int) (SS[0]) = (S[0]-'0');

  memcpy((void*)SSS, (void*)SS, sizeof(S[0]-'0'));


printf("sizeof(double):%d\nsizeof((S[0]-'0')):%d\nsizeof(char):%d\n",sizeof(double),sizeof((S[0]-'0')),sizeof(char));

  printf("%lf\n", (double)SSS[0]);
  printf("%lf\n", (double)(S[0]-'0'));
  printf("%d\n",(int)((double)(S[0]-'0')));
  return 0;
}
#gcc...
# ./a.out
sizeof(double):8
sizeof((S[0]-'0')):4
sizeof(char):1
-48.00
-48.00
-48
#

This is what I was talking about A better approach would be to use
proper library transforms instead of type-casting...

Igor M-)



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



Re: GCC Compiler Bug? (Or am I just losing my mind?)

2001-01-30 Thread krollin



Igor,

You need to take another look at what's going on.  The first part of what you
say is correct:

> First thing that is wrong with the code, is that the compiler does _not_
> guarantee that allocated space will be zeroed, that is, char s[10] may
> actually contain 'A7z91msbaO' instead of \x0 times ten. So, line s[0]='4'
> just replaces the 'A' with the '4'. Thus the new version of s{10} would be
> '47z91msbaO' .

However, you start going wrong here:

> Lets subtract '0' from s[0], we get '\x4A7z91msbaO' where
> \x4 is one character.

When you say "we get...", that's not what you get.  What you get is an integral
value (char or integer, I don't care which at the moment) equal to 4.  This
subtraction operation does not affect what's in the "s" array.

Instead, this integral value of 4 is cast via (double) into a double value.  The
string "s" is not converted!  Just the result of the expression (s[0] - '0').

-- Keith Rollin
-- Palm OS Emulator engineer






Igor Mozolevsky <[EMAIL PROTECTED]> on 01/30/2001 05:00:34 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Igor Mozolevsky <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: GCC Compiler Bug? (Or am I just losing my mind?)



At 16:21 30/01/2001 -0800, you wrote:


> > You cannot simply typecast between two incompatible types!!! Have you heard
> > of stol() or stod() or whatevet they're called... Can't remeber now, my
> > mind is on /^perl$/o at the moment...
>
>A little too much so, I think.  There are no invalid casts in Thomas's code.
>Converting chars to doubles is just fine, as is converting doubles to long
>integers.
>
>-- Keith Rollin
>-- Palm OS Emulator engineer

Ok, I'll explain...

 > char s[10];
 > double d;

 > s[0] = '4';
 > d = (double) (s[0] - '0');

 > StrCopy(s, "4");
 > d = (double) (s[0] - '0');

First thing that is wrong with the code, is that the compiler does _not_
guarantee that allocated space will be zeroed, that is, char s[10] may
actually contain 'A7z91msbaO' instead of \x0 times ten. So, line s[0]='4'
just replaces the 'A' with the '4'. Thus the new version of s{10} would be
'47z91msbaO' . Lets subtract '0' from s[0], we get '\x4A7z91msbaO' where
\x4 is one character. Now type-casting '\x47z91msbaO' is doing to give
quite a lengthy double Same goest for StrCopy, now you'd just get
'\x4\0z91msbaO', still quite a value! Second issue is alignment, I am not
sure about Palm architecture, but most machines prefer to have integers
aligned at 2- or 4- byte boundary... Whilst the compiler (gcc) does not
give any warning about the first one, the second one can be switched on
using -Wcast-align, which is _not_ a subset of -Wall. Generally assuming
that whatever you allocate is going to be automatically zeroed is not a
good practice.

Have fun,

Igor M-)





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



Re: GCC Compiler Bug? (Or am I just losing my mind?)

2001-01-30 Thread krollin



> I don't know what changed (compiler? Win98 vs WinMe?) or what
> I can change in my code to make it work.

You could follow John Marshall's advice in his reply to your posting.

-- Keith Rollin
-- Palm OS Emulator engineer






"Thomas Ward" <[EMAIL PROTECTED]> on 01/30/2001 04:44:16 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Thomas Ward" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: GCC Compiler Bug? (Or am I just losing my mind?)



>> You cannot simply typecast between two incompatible types!!! Have you
heard
>> of stol() or stod() or whatevet they're called... Can't remeber now, my
>> mind is on /^perl$/o at the moment...
>
> A little too much so, I think.  There are no invalid casts in Thomas's
code.
> Converting chars to doubles is just fine, as is converting doubles to long
> integers.
>
> -- Keith Rollin
> -- Palm OS Emulator engineer

Whew, I'm glad to hear that :-) I tried every kind of cast I could think of.
The REALLY strange thing is that I am 99 44/100% sure that this exact code
used to work. I don't know what changed (compiler? Win98 vs WinMe?) or what
I can change in my code to make it work.

Tom




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



Re: GCC Compiler Bug? (Or am I just losing my mind?)

2001-01-30 Thread krollin



> You cannot simply typecast between two incompatible types!!! Have you heard
> of stol() or stod() or whatevet they're called... Can't remeber now, my
> mind is on /^perl$/o at the moment...

A little too much so, I think.  There are no invalid casts in Thomas's code.
Converting chars to doubles is just fine, as is converting doubles to long
integers.

-- Keith Rollin
-- Palm OS Emulator engineer






Igor Mozolevsky <[EMAIL PROTECTED]> on 01/30/2001 03:47:40 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Igor Mozolevsky <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: GCC Compiler Bug? (Or am I just losing my mind?)



At 13:56 30/01/2001 -0500, you wrote:
>Hi,
>
>I've found some very strange behavior in my code, and I've distilled the
>problem down into these few lines of code:
>
>char s[10];
>double   d;
>
>s[0] = '4';
>d = (double) (s[0] - '0');
>HostTraceOutputTL(appErrorClass, "Number is %ld", (Int32) d);
>
>StrCopy(s, "4");
>d = (double) (s[0] - '0');
>HostTraceOutputTL(appErrorClass, "Number is %ld", (Int32) d);
>
>The output from these statements is:
>
>Number is 4
>Number is 0
>
>How can the results be different? I've tried every kind of cast and
>intermediate variable I could think of. Whether s is char or unsigned char
>makes no difference either.

You cannot simply typecast between two incompatible types!!! Have you heard
of stol() or stod() or whatevet they're called... Can't remeber now, my
mind is on /^perl$/o at the moment...


Igor M-)





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



Re: NetLibReceive, I am getting the "netErrParam Err".

2001-01-30 Thread krollin



Dude...you want us to figure out why you're getting a netErrParamErr, yet you
don't even show us your parameters???

I know that one thing is wrong: you're lying to NetLibReceive with regards to
the fromLenP parameter.  It wants a _pointer_ to a UInt16.  You're passing in
just a UInt16!  Just because you cast it to a UInt* doesn't make it a UInt16*.

-- Keith Rollin
-- Palm OS Emulator engineer






"Alex R" <[EMAIL PROTECTED]> on 01/30/2001 06:03:58 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Alex R" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  NetLibReceive, I am getting the "netErrParam Err".



Hello All,

When I debug using the emulator, the NetLibReceive call returns a
netErrParam error. The code below works fine on the actual device.

/

SWord  recv;
short  SocketReceiveErr;
CharPtr msg;

MemSet(msg,size,'\0');
recv = NetLibReceive(NetLibOpenRef,theSocket,msg, size,0,
(NetSocketAddrType *)&ForeignAddrType,
 (unsigned short
*)sizeof(ForeignAddrType),-1,&SocketReceiveErr);

/

Any help will be much appreciated.


Alex


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





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



Re: stack overflow??

2001-01-29 Thread krollin



> #define NAME_SIZE  25
> #define TITLE_SIZE 25
> #define DETAIL_SIZE 1000
> #define RECORD_SIZE (NAME_SIZE + TITLE_SIZE + DETAIL_SIZE + 3)
>
>
> typedef struct{
>char name[NAME_SIZE + 1];
>char title[TITLE_SIZE + 1];
>char detail[DETAIL_SIZE + 1];
> }TestType;


This is a poor way to get the size of a record.  Just use:

 #define RECORD_SIZE (sizeof(TestType))


> ...
> this is where I think the "writting directly to unallocated chunk"
> happens.

Why don't you just click on the Debug button in the error dialog and remove all
doubt as to where it happens?

-- Keith Rollin
-- Palm OS Emulator engineer




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



Re: Databse access performance...

2001-01-26 Thread krollin



I don't see DmReleaseRecord calling MemHandleSize.  I see DmReleaseResource
calling it.  Is that the function you're calling?

I DO see DmReleaseRecord calling MemPtrSize.  But in both of these cases, the
memory manager calls are being made only in debug ROMs.  You might want to do
your timing tests on release ROMs in order to get a more accurate profile.

-- Keith






DIAMOND JEFF <[EMAIL PROTECTED]> on 01/26/2001 12:38:57 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  DIAMOND JEFF <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Databse access performance...



Well, the POSE profiler said DmReleaseRecord takes about 5,000 cycles and
DmGetResourceIndex takes about 4,000 cycles. But that's 3
times slower than I get from straight ticks timing - could all that slow down be
due to running the POSE profiler?  Or the way
TimGetTicks works?

It seems the slowest thing is DmReleaseRecord's calling MemHandleSize, which is
really surprising, since I wouldn't have thought
MemHandleSize would be so mammoth.  Look how much you instantly learn about the
PalmOS from a profile dump!

Well, in any case, I appreciate all your help and the bottom line is that record
access takes at least thousands of cycles vs none
for feature memory or dynamic chunks.




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



Re: Detecting INetLib using Features

2001-01-26 Thread krollin



Ben,

First of all, I have no idea why the sample suggests that you check for the
feature first.  There's even a knowledgebase article that makes the same
suggestion, again with no reason. Also, the function in INetLow that checks for
the version feature is straight out of the Activation application on Palm VIIs.
So there's a lot of consistancy for taking that approach, but with absolutely no
explanation.

Second, I have no idea why INetLib would not be installed under some
circumstances.  That library is installed in a Palm OS function called
SysUILaunch, which is part of the boot-up sequence. I see that occuring in Palm
OS 3.2 and 4.0 -- I imagine that in between versions install it, too.

-- Keith





"Ben Combee" <[EMAIL PROTECTED]> on 01/25/2001 04:16:07 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ben Combee" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Detecting INetLib using Features



I'm using code to detect the existance of the Internet Library based
partially on the detection code in the INetLow example.  This looks for the
inetLibFtrCreator/inetFtrNumVersion feature, aka 'inet', index 0.  This
works always on the Palm VII/VIIx.  However, on my Omnisky/Prism combo, this
often fails to work.  It seems that whatever code that OS has that registers
this feature isn't always executed.

Has anyone else seen this?  Should I just abandon this method and go
strictly based on loading the "INET.LIB" shared library, or would the
unregistered feature indicate I'd have other problems invoking INetLib.  Oh,
if anyone else is trying to develop for the Prism/Omnisky combo, are you
also have big stability problems?

--
Ben Combee
Veriprise Wireless 



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





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



Re: Dynamic Heap Size..?

2001-01-25 Thread krollin



> Check out the Programmer's Companion on the PalmOS web site

And while you're there, click on the link to "Writing Robust Code" and read the
part under "Use dynamic heap space frugally".

I'm not really sure how knowing the answer to Alan's question will help anyone
write more robust software, so I'm kind of worried that the wrong solution is
being taken to a problem. If you're working in a constrained environment like
the Palm OS dynamic heap, it's wrong to ask "OK, just how much heap is there?"
My feeling is the right question is: "How little of the dynamic heap can I take
up, and how should my application react when it can't get that room?" Because,
when it comes down to it, knowing how much room is supposed to be in the heap is
just theory. In practice, you could have more, you could have less.  And
(heh...I started my sentence with a conjunction...William Forrester would be
proud...), as Alan found out, not all of that heap space is contiguous.  It
could be highly fragmented. So knowing how much space should be there or is
there really doesn't buy you anything.  You have to take the conditions as they
are and react accordingly.

Of course, I'm just speaking from a lofty Theory Chair myself.  If anyone has
Practical Hammer to hit me over the head with, please feel free to go ahead and
pummel me with Reality.  :-)

-- Keith Rollin
-- Palm OS Emulator engineer






"B. Cameron Lesiuk" <[EMAIL PROTECTED]> on 01/24/2001 08:23:27 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "B. Cameron Lesiuk" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Dynamic Heap Size..?



Check out the Programmer's Companion on the PalmOS web site

http://www.palmos.com/dev/tech/docs/palmos/Memory.html

You'll want to read the whole thing.
The chart you're looking for is near the very bottom.
-Cam

Alan Ingleby wrote:

> A) Is there a way to programmatically determine the Dynamic Heap size?
> B) Is these a chart which shows the Dynamic Heaps sizes for OS3.5 when
> installed on different machines, with different amounts of RAM?
>
> The reason I ask is that my program barfs when running on POSE due to
> insufficient dynamic heap under OS3.5 EZ ROM with 1 meg of RAM, but DOESN'T
> when running the OS3.5 Color EZ ROM on 1 Meg of RAM.
>
> Regards,
>
> Alan Ingleby






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



RE: How to test for valid pointers?

2001-01-24 Thread krollin




I would like to elaborate on what Danny just posted:

> You are expected to keep track of the chunks of
> memory that you allocate so that you don't have dangling pointers or leaked
> chunks.

Bobby is correct: there is no MemIsValidPtr() function.  If you want to know if
a pointer is valid, you need to first keep track of all of your calls to
MemPtrNew, MemHandleNew, et al, and enter the results into a list (and remove
them on the corresponding Free calls). Later, to check for validity, walk that
list, seeing if your test 32-bit value is on the list.

Bonus: if you have such a list, you can also use it for memory leak detection.

-- Keith Rollin
-- Palm OS Emulator engineer






"Bobby Williams" <[EMAIL PROTECTED]> on 01/24/2001 02:28:03 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Bobby Williams" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  RE: How to test for valid pointers?



Wow, tough crowd!  Not to be defensive, but I don't think my question was
silly at all.  Perhaps the wording could of been improved, but it's a valid,
non-trivial request for information.  Isn't this one of the purposes of this
list?  There is no MemIsValidPtr()-type of function, and would rather not
make assumptions based upon a given value.  That  is, I would like to be
able to test a given address for validity before riding off the deep end.
People tend not to like applications that causes your device to reset.
Given the level of expertise on this list, I was hoping that there was
someone who has already faces this particual problem.  Obviously, testing
for NULL is not adequate.

BTW, thanks to those who did respond.



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



Re: POSE bug? - Dying like a log

2001-01-22 Thread krollin



> This a bug?

Yes, this is a bug.  I finally found it just after PalmSource and was able to
fix it.  (David Fedor had reported it *before* PalmSource, but I wasn't able to
reproduce it at the time, and it eventually "went away" on his).

I'm waiting for some Poser modifications to be submitted from our France office,
which is where the work to transmit serial data over a TCP socket is being done.
After that, I hope to do a couple weeks of testing and then post Poser 3.0a9
that fixes this problem.

-- Keith Rollin
-- Palm OS Emulator engineer






"Chris DiPierro" <[EMAIL PROTECTED]> on 01/22/2001 08:33:38 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Chris DiPierro" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  POSE bug? - Dying like a log



In Windows, if I have PalmDebugger running.

Then start POSE v3.08a (because it crashed previously).

If I then type 'att'

I'll get: "Applications" 3.5 is attempting to change the emulated program
counter to 0x13001006 .

If I hit reset, I get "Unhandled exception caught in WinMain. Dying like a
log ..."

This a bug?





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



Re: Object Id corrupted

2001-01-18 Thread krollin



Folks,

I wanted to update everyone on a problem that was posted here back on Jan. 9,
2001.  The original thread is below.  I just wanted to post the solution because
it looks like this is a "gotcha" that could mess up other people.

In his application, Michael's form had a table object.  This table object had
custom load and draw functions.  In the custom load function, he was calling a
function like the following:

static void NoUnderline(FieldPtr fld)
{
 FieldAttrPtr attrP;

 FldGetAttributes(fld, attrP);
 attrP->underlined = noUnderline;
 FldSetAttributes(fld, attrP);
}

The documentation is admittedly ambiguous for FldGetAttributes.  And the
interface for FldSetAttributes furthers the confusion.  But the fact is that the
pointer being passed in needs to be a valid pointer.  The documentation kind of
implies that attrP somehow gets initialized by FldGetAttributes.  But that can't
be; C can't do that with the interface provided.  Thus, with the uninitialized
pointer, FldGetAttributes was corrupting memory by storing the attributes in a
random memory location.  As it turns out, the memory location happened to be in
the form object Michael was seeing corrupted.

Instead, the function should look like:

static void NoUnderline(FieldPtr fld)
{
 FieldAttrType attr;

 FldGetAttributes(fld, &attr);
 attr.underlined = noUnderline;
 FldSetAttributes(fld, &attr);
}

Anyway, I just thought I'd pass that on.  There's no problem with FrmDrawForm
corrupting forms or objects, as Michael was suspecting.

-- Keith Rollin
-- Palm OS Emulator engineer






[EMAIL PROTECTED] on 01/09/2001 06:49:22 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Object Id corrupted





Michael,

You might want to try narrowing down the problem.  Myself, I started with the
Starter application from the 3.5 SDK.  I added your FrmPToObjP function, added
the calls to FrmPToObjP around the call to FrmDrawForm, added a few objects to
the Main form, and ran the resulting application.  It ran just fine.  I was
using Palm OS 3.0 on a Palm III (running under the Palm OS Emulator 3.0a8).

I'm pretty sure that if FrmDrawForm could *easily* cause corruption, people
would have seen it by now.  Therefore, it seems to me that the problem is
probably with your form or application.  If you could try narrowing down the
problem (perhaps by removing your custom routines or incrementally removing
objects from your form), we could find out what it is.

Of course, anyone accessing "formP->numObjects" directly instead of calling
"FrmGetNumberOfObjects(formP)" deserves what they get...  :-)

-- Keith Rollin
-- Palm OS Emulator engineer






"Michael Klinglesmith" <[EMAIL PROTECTED]> on 01/09/2001
04:59:36 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Michael Klinglesmith" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Object Id corrupted



The symptom of this bug is a "Object not in form" error when I call

objectIndex = FrmGetObjectIndex(formP, objectId);

I have checked in the debugger and the formP is valid and points to the
correct form and the objectId is also correct.

Here's the interesting part.  The call works before I call FrmDrawForm, and
fails after FrmDrawForm.  FrmDrawForm is corrupting the object.  The code
below shows how I verified this.  I used the codewarrior debugger and got a
list of the objects in the form.  Before FrmDrawForm the objects have the
correct ID's after FrmDrawForm the objects are corrupted.  (I also set a
breakpoint at my first custom load call back procedure since I have a table
in this form, and the memory is corrupted before any of my custom code is
executed).

Any Ideas?

Thanks,
Michael Klinglesmith

Here is a code snippet where the error occurs:

   tableP = FrmPToObjP(FrmGetActiveForm(), RecallMainTable);
   FrmDrawForm ( frmP);
   tableP = FrmPToObjP(FrmGetActiveForm(), RecallMainTable);


And here is my FrmPToObjP:

void* FrmPToObjP (FormPtr formP, UInt16 objectId)
{
  UInt16 objectIndex;
  ControlPtr objectP;
  FormObjListType objectList[50];  // Make the object list viewable in
CodeWarrior debugger.
  UInt16 i,imax=50;

  if (formP->numObjects < imax) imax = formP->numObjects;

  for (i=0;iobjects[i];
  }

  objectIndex = FrmGetObjectIndex(formP, objectId);
  objectP =  FrmGetObjectPtr(formP, objectIndex) ;
  return objectP;
}



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





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



Re: Getting hd 0 in PalmDebugger to report app symbols?

2001-01-18 Thread krollin



> For instance, in the "start" column, what's a '-' vs. a '*' before
> the address?

'-' means that the chunk is movable
'*' menas that the chunk can be movable but is currently locked
'' means that the chunk is non-moveable (created with MemPtrNew)
' ' means that the chunk is free

> What's an 'M' vs. 'm' in flags?

Hmmm...this appears to indicate the same information.

'F' chunk is free
'f' chunk is not free
'M' chunk is movable (zero lockcount)
'm' chunk is not movable (non-zero lockcount)

-- Keith Rollin
-- Palm OS Emulator engineer



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



Re: Getting hd 0 in PalmDebugger to report app symbols?

2001-01-18 Thread krollin



> The owner and lck column labels are reversed...

I believe this is only a problem on Windows.

-- Keith Rollin
-- Palm OS Emulator engineer






"Ben Combee" <[EMAIL PROTECTED]> on 01/18/2001 10:57:25 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ben Combee" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Getting hd 0 in PalmDebugger to report app symbols?



> The problem is that even in this guide, while it lists 'hd' as a command,
it
> doesn't really elaborate on what it returns.
>
> What's owner #15? (most of my chunks are owned by #15)

The owner and lck column labels are reversed -- a lock of 15 indicates
memory allocated by MemPtrNew().

--
Ben Combee
Veriprise Wireless 




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



Re: odd behaviour in pose

2001-01-17 Thread krollin



> > If I were faced with the same problem, I'd be working to find out why r and
> > bounds are apparently incorrect.  I wouldn't want to shoot blindly by
replacing
> > seemingly unrelated libraries.
>
> Indeed, which is why I was loathe to copy any libraries around. Trouble is I
> wouldn't know where to start to find out why the values get set incorrectly

Well, the way I would go around it may not work for everyone.  But it's what I
would do, and it usually results in getting the problem solved.

So your callback routine is being passed values that you think are incorrect.
Does gdb debug at the assembly level?  I will assume that it does.  If not, you
may want to work with a different debugger.  PalmDebugger works at the assembly
level, but that runs only one Mac and Windows.  There's another debugger out
there called "debuffer".  That one runs only on Mac and Windows as well (though
the author only maintains the Windows version, and the Mac version is lagging
behind), but the source code is provided, so you can port it to Unix.  I did the
Mac port, and it only took about a day.

Using the assembly-level information, I'd look at the parameters on the stack.
The prototype for the table callback function is:

void TableDrawItemFuncType(void *tableP, Int16 row, Int16 column,
   RectangleType *bounds);

Using my knowledge of how parameters are passed on the stack, I'd know that the
stack looked like this after the LINK statement at the beginning of my callback
function was executed:

 | previous stack |
 |contents|
 ++  <- A6 + 20
 | rP |
 ++  <- A6 + 16
 | col|
 ++  <- A6 + 14
 | row|
 ++  <- A6 + 12
 | tbl|
 ++  <- A6 + 8
 | return address |
 ++  <- A6 + 4
 | old A6 |
 ++  <- register A6 points here

I could then find the value of A6, and then dump memory from that location,
examining the values pushed onto the stack.

If the memory location containing "row" contained the correct row number, than
I'd know that the problem was in my callback function.  I would then try to
examine the code to see what went wrong.

If the memory location containing "row" contained zero when it shouldn't, then
I'd know that the Table Manager pushed the wrong value on the stack.  I'd then
try to figure out why.  At that point, I'd probably start tracing execution at
the assembly level.  The Table Manager obviously should be in some sort of
nested loop, iterating over rows and columns, calling your callback function for
each one.  The question is, why does the "row" loop variable appear as zero on
the stack?

So, I'd start tracing at the assembly level, using my reading knowledge of 68K
assembly along with the posted source code for the Table Manager.  I'd start
with putting a breakpoint in my callback routine.  Once I found that the "row"
value on the stack wasn't what I thought it would be, I'd single-step until I
got the RTS at the end of my callback.  I'd then continue to single-step back
into the Table Manager routines, and attempt to match the assembly code with the
source code.  I'd find out what memory locations or registers contained "row"
and "col" and see if they contained the expected value.  If not, then I'd try to
find out why not.

By the way, I should also say that I would make sure that my statement of the
problem is correct.  For instance, I'd check to make sure that the number of
rows and columns in the table isn't set to zero for some reason.  After all,
that would explain why only zero was passed to your callback routines.

Anyway, that's how I'd approach it.  I'd make hypotheses, get more information,
determine causes, test assumptions, etc.

Hope this helps,

-- Keith Rollin
-- Palm OS Emulator engineer







Simon Drabble <[EMAIL PROTECTED]> on 01/17/2001 03:00:11 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Simon Drabble <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: odd behaviour in pose



On Wed, 17 Jan 2001 [EMAIL PROTECTED] wrote:

>
>
> I've never heard of anything like this.  The problem seems so "odd", as you
> appropriately put it. That's the only difference you see?  And everything else
> is the same?  You're using the same ROM image?  You're emulating the same
device

The only difference is in the rendering of tables. Forms without tables render
fine.

> with the same RAM size?  Is the 'pose' binary the same -- or was it compiled
> separately on the two machines?  If the latter, was the same compiler used?
> Could there be some code generation problem?

Same binary (I copied it over), but was also happening with a freshly-compiled
binary on the troublesome machine. Same rom image, mem size, and emulated
machine.

>
> If I were fac

Re: odd behaviour in pose

2001-01-17 Thread krollin



I've never heard of anything like this.  The problem seems so "odd", as you
appropriately put it. That's the only difference you see?  And everything else
is the same?  You're using the same ROM image?  You're emulating the same device
with the same RAM size?  Is the 'pose' binary the same -- or was it compiled
separately on the two machines?  If the latter, was the same compiler used?
Could there be some code generation problem?

If I were faced with the same problem, I'd be working to find out why r and
bounds are apparently incorrect.  I wouldn't want to shoot blindly by replacing
seemingly unrelated libraries.

-- Keith Rollin
-- Palm OS Emulator engineer






Simon Drabble <[EMAIL PROTECTED]> on 01/17/2001 07:11:21 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Simon Drabble <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  odd behaviour in pose



Running pose on my home Linux box (Suse 6.4, kernel 2.2.14) I have no problems
(well, except those caused by my code :) ).

Running on an almost identical machine (identical except for the X server &
libX11) pose does not get the row & bounds parameters correctly in table draw
data callbacks:

static void DrawMainTableItem(VoidPtr table, Word r, Word c, RectanglePtr
bounds)

Stepping through my code in gdb, r is always 0 and bounds always the top row
of the table -- I have multiple tables on different forms using different
callbacks, and the values are always the same. Also for table load data
callbacks.

Not sure what might be causing this, although the near-identicality of the
two machines tends to point the finger at X somehow being at fault.

Has anyone else encountered this? is there a fix? I guess I could copy over
the relevant X server and libraries but I'm only willing to do this if
absolutely necessary.


Simon.






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



Re: Getting hd 0 in PalmDebugger to report app symbols?

2001-01-17 Thread krollin



> How do I get hd 0 to report symbols for my app? I've compiled the app with
> debug symbols on, but when I do an hd 0 there's basically just a stream of
> alloced chunks aside from a few that happen to be identified as handles to
> various DBs and forms, etc.

You can't.  The two (displaying chunks and displaying function names) have
nothing to do with each other.  You're question is like asking "How can I get
dir 0 to report symbols for my app?"

What problem are you trying to solve?

-- Keith Rollin
-- Palm OS Emulator engineer



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



Re: PalmOS_Startup.c, Line: 91

2001-01-16 Thread krollin



> However when the same testcase is
> executed on Palm V (2MB) with either PalmOS 3.5.0 or PalmOS 3.5.2 (both are
> upgrades from 3.2) launching the application crushes Palm with "FatalAlert
> PalmOS_Startup.c, Line: 91, Error launching application."

The runtime source code is included with CodeWarrior, so you can look at
PalmOS_Startup.c for yourself.  There, you'll see that the message on line 91 is
displayed when the call to SysAppStartup fails.

There's only one reason for SysAppStartup to fail: it can't get enough memory
for the application's global variables.  You can sign up for and download the
Palm OS source code to verify that for yourself.

I could imagine that the reason for your other application failures is also
because of an impacted dynamic heap. But you only say that "a problem" occurred,
so it's diffucult to speculate further.

-- Keith Rollin
-- Palm OS Emulator engineer






"M. Contchek" <[EMAIL PROTECTED]> on 01/16/2001 10:30:58 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "M. Contchek" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  PalmOS_Startup.c, Line: 91



We are testing a new wireless application. In a specific testcase a wireless
connection is established manually by starting Minstrel wireless modem.
Next, our application is lunched.  Everything works fine on PalmVx (8MB)
with originally installed PalmOS 3.5.0. However when the same testcase is
executed on Palm V (2MB) with either PalmOS 3.5.0 or PalmOS 3.5.2 (both are
upgrades from 3.2) launching the application crushes Palm with "FatalAlert
PalmOS_Startup.c, Line: 91, Error launching application." Also, on both Palm
Vs we experience a problem with accessing the server after a wireless
connection is established by the application itself. We do not see those
problems on Palm Vx. What could it be a reason for this inconsistent
behavior?

I would appreciate your help.
Mike





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



Re: Works on POSE, but not in real life

2001-01-16 Thread krollin



> dmErrResourceNotFound is the error which is returned.  I have tried it
> using POSER with my device ROM and again it works great.  But in situ
> (the device), it fails.

OK...on your device, what do you have installed?  Do you have any Hacks or
applications installed that might be patching traps?  Perhaps that's what's
getting in your way.

-- Keith Rollin
-- Palm OS Emulator engineer




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



Re: How to see real disassembled code in Code Warrior

2001-01-16 Thread krollin



What code generation model do you have set?  Is is the Large Model?  According
to the Targeting Palm OS documentation:

Smart Model
---
When one function calls another function and the linker is sure they're in the
same segment, this model uses relative addressing (a 16-bit address). Otherwise,
it uses absolute addressing (a 32-bit address).

Small Model
---
This model uses relative addressing (a 16-bit address) for all function calls.
Small Model is best for small code resources and applications (under 32K), or
for code resources and applications in which all segments are under 32K.

Large Model
---
This model uses absolute addressing (a 32-bit address) for all function calls.
Large Model is useful when you have a source file that generates more than 32K
of code, or when the linker generates an out-of-range link error.

I found these descriptions to be accurate in my limited testing here.  I wrote a
small program that called two functions: one in the same segment (actually, the
same translation unit) and another in a different segment.  Compiling for Smart
Model, the far function generated the long instruction sequence, and the near
function used just a JSR.  Compiling for the Large Model, both calls used the
long sequence.

Functions in the same segment but different translation unit will also generate
the long sequence.

You can check the resulting (linked) object code by using CodeWarrior to Debug
your application.  Put a breakpoint on the code in question, run your
application to that point, switch the debugger over to Assembly or Mixed mode,
and examine the result.

-- Keith Rollin
-- Palm OS Emulator engineer








Ioi Lam <[EMAIL PROTECTED]> on 01/16/2001 06:46:51 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Ioi Lam <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  How to see real disassembled code in Code Warrior



Hi,

I am looking at the "disassemble" view of a file, which makes a function
call foo(param). CW gives me the same output regardless of which segment
the foo() function is at. I though if foo() lives in a different segment
than the caller, wouldn't the instructions be different?

foo(param);
TraceMethodExit(thisMethod);
move.la2,-(a7)
pea   *+16   ; 0x0b4c
pea   *+6; 0x0b46
addi.linvokeNativeFunction,(a7)
rts

Is there a way to look at the assembler code after the final link stage?

Thanks!

- Ioi Lam





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



Re: Works on POSE, but not in real life

2001-01-16 Thread krollin



> For some bizarre reason, this code which opens, or creates and then opens -
> a database works great on POSE, all ROM versions, but fails in real devices.
> I have (want) two databases and on the second run through this function, it
> finds the database (which doesn't exist) and then fails to open it becuase
> it cant find the resource.

Matt,

I can verify that your code snippet appears to work on Poser.  I can't say for
sure, since I had to modify your snippet in order to get it to compile.

What error code is DmOpenDatabase returning?  dmErrResourceNotFound?  If so,
then that totally doesn't make sense to me (that error code is returned only
from DmGetResource and DmGet1Resource).  But then, neither does DmFindDatabase
working if the database doesn't exist.

When you say "all ROM versions", does that include a ROM downloaded from your
"real device"?  Could this be a problem that shows up in a Release ROM but not a
Debug ROM?

-- Keith Rollin
-- Palm OS Emulator engineer



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



Re: NetLibReceive not returning on POSE

2001-01-16 Thread krollin



How long are you waiting for it to return?  With NetLib Redirection turned on,
NetLibReceive calls are mapped to a WinSock "recv" call.  That function doesn't
accept timeout values, and so the function may not be timing out as quickly as
you're expecting.

-- Keith Rollin
-- Palm OS Emulator engineer





Thomas Paska <[EMAIL PROTECTED]> on 01/16/2001 02:48:00 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Thomas Paska <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  NetLibReceive not returning on POSE



I have some code that runs fine on the Palm device, but hangs on the
NetLibReceive call in the POSE.  POSE has "Redirect NetLib calls to host
TCP/IP" set and CodeWarrior has "Use TCP/IP Sockets" set.  I'm developing on
NT.

Are there any other setting I might be missing that would cause this
problem?

Thanks
Tom Paska




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



Re: PDB Format [ NextRecordListID ]

2001-01-16 Thread krollin



Prashant,

The authority on whether or not to support that field would be someone in
Development Support.

Whether or not to support that field is kind of tricky right now.  Some Palm
software supports it, and some doesn't.  So even we are not consistant in that
respect.

But right now, there is no good reason to support it.  You only need that field
if you have more than 64K records in your database.  Since the Data Manager
doesn't support more than that number of records, there's no reasons to have
that many in your database.

This limitation may, of course, change in the future. But for right now, you
don't have to worry about it.

-- Keith Rollin
-- Palm OS Emulator engineer






[EMAIL PROTECTED] on 01/16/2001 02:57:41 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: PDB Format [ NextRecordListID ]






I did not get any response for this mail earlier, so i am sending it again,
maybe it was missed :)

-@-@-@-@-@-@-@-

I don't know whether to call it a BUG or an unsupported FEATURE, but the
Palm Devices also does not seem to like NextRecordListID.

The database I used was...

00: 61 54 65 73 74 5F 46 6F  72 5F 4E 65 78 74 52 65 aTest_For_NextRe
10: 63 6F 72 64 4C 69 73 74  49 44 00 00 00 00 00 00 cordListID..
20: 80 00 00 01 B0 88 23 AD  B0 88 23 AD B0 88 23 AD ..#...#...#.
30: 00 00 00 01 00 00 00 00  00 00 00 00 64 61 74 61 data
40: 78 70 73 67 00 00 00 00  00 00 00 75 00 02 00 00 xpsg...u
50: 00 60 00 00 00 00 00 00  00 6B 00 00 00 00 00 00 .`...k..
60: 4A 6F 68 6E 20 46 69 72  73 74 4A 6F 68 6E 20 46 John FirstJohn F
70: 69 72 73 74 00 00 00 00  00 01 00 00 00 73 00 00 irst.s..
80: 00 00 00 00 4A 6F 68 6E  20 46 69 72 73 74 00 00 John First..

2 Records in FirstList, 1 record in Second List. After sync, the
applications in the device see only 2 records, whereas after exporting the
database back from the device, the database is compeletely intact as above.
So the HotSync Manager, MUST be working fine, but somewhere the APIs must
be ignoring the NextRecordListID.

Can anybody explain this behavior ?
This takes me back to the question :
Is it worth the effort to make the application "NextRecordListID"
compatible ?

Regards,
Prashant Gupta




[EMAIL PROTECTED] on 01/11/2001 06:30:37 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(bcc: Gupta Prashant-SWD-ITIL-UB/Itilmail)

Subject:  Re: PDB Format [ NextRecordListID ]






That field is not supported by the Emulator.  It being supported would mean
that
you could install more than 64K number of records, which the Database
Manager
API doesn't support.

At least, I think it doesn't.  I've seen posting from people saying they
had
databases with 70,000+ records in them, but it's not clear to me how they
can
access all those records when DmGetRecord takes a UInt16 as an index...

-- Keith Rollin
-- Palm OS Emulator engineer






[EMAIL PROTECTED] on 01/11/2001 03:24:21 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  PDB Format [ NextRecordListID ]







I am trying to use NextRecordListID in my application, but the emulator
rejects the PDB saying the NextRecordListID is not Zero.
Is NextRecordListID not supported in Emulator only or is it just a
foresight, and the Palm OS as of now does not support NextRecordListID ?
I mean is it worth the effort to make the application "NextRecordListID"
compatible ?

Regards,
Prashant Gupta




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









_

Visit http://www.PalmGreetings.com The Most Happening and
The first & only Mobile greeting site.
* Send & Receive e-cards using your Hand held/Palm top/WAP Phone
* Pleasure viewing animated cards on your device
* Unleash your creativity by creating your own cards



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





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



Re: Find how many locks?

2001-01-15 Thread krollin



Matt,

Or just call MemHandleLockCount from within the application.  I guess which
approach you take all depends on what you're really trying to do.

-- Keith






"Ben Combee" <[EMAIL PROTECTED]> on 01/15/2001 02:21:26 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Ben Combee" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Find how many locks?



"Matt Mason" <[EMAIL PROTECTED]> wrote in message
news:35892@palm-dev-forum...
>
> Any way to determine what the lock count on a record or handle is?

Note the handle ID, then open a console window and type "hd 0".  Now, find
the handle in the list and look at its count.  This also lets you get to the
data the handle points to by copying the first address into a memory view
window.

--
Ben Combee
Veriprise Wireless 




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



Re: Palm swag? (off-topic, sorry!)

2001-01-14 Thread krollin



> Next Palmsource in CambridgeUK okay guys?

There's one in Amsterdam at the end of the month...that's at least close than
Santa Clara, California.

 

Tell your boss you'll drive there... :-)

-- Keith



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



Re: Pose 3.0a8 build problem with Redhat 7.0

2001-01-14 Thread krollin



> Has anyone else done this?

If by "done this" you mean "gotten a compilation error", sure, lots of people.
For instance, see:

 

You might want to keep in mind the warning in:

 

And take the suggestion in:

 

-- Keith Rollin
-- Palm OS Emulator engineer






Jeff Mock <[EMAIL PROTECTED]> on 01/14/2001 04:50:43 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Jeff Mock <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Pose 3.0a8 build problem with Redhat 7.0



I'm having trouble building Pose on redhat 7.0 (GCC 2.96).  The
compile line for MetaMemory.cpp dies with a compiler error as
follows:

../SrcShared/UAE/newcpu.h: In function `void
MetaMemory::GWH_ExamineChunk (const EmPalmChunk &,
MetaMemory::WhatHappenedData &)':
../SrcShared/UAE/newcpu.h:225: Internal compiler error in
fix_lexical_addr, at function.c:5320
Please submit a full bug report.
See http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[1]: *** [MetaMemory.o] Error 1
make[1]: Leaving directory `/home/jeff/pose/Emulator_Src_3.0a8/BuildUnix'
make: *** [all-recursive] Error 1
[jeff@sticky BuildUnix]$

Has anyone else done this?

jeff




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



Re: Washed-out look.

2001-01-14 Thread krollin



Assuming that you're seeing this only when emulating a VZ-based device, this was
covered a couple of times on the emulator-forum already. See:

 

-- Keith Rollin
-- Palm OS Emulator engineer






"Alan Ingleby" <[EMAIL PROTECTED]> on 01/14/2001 04:47:22 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Alan Ingleby" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Washed-out look.



My color bitmaps look "washed out" in Pose when running OS4.0.  Any ideas?

Regards,

Alan Ingleby
Systems Developer
ProfitLink Consulting Pty Ltd
309 Burwood Road
Hawthorn
Victoria 3122




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



Re: custom sysTraps

2001-01-13 Thread krollin



About the closest you can get is with "shared libraries".  These use a
SysTrap-like mechanism when being invoked.

I don't know where the best documentation for shared libraries is, or where the
best sample code is.  But probably the most popular shared library is MathLib.
You can find it and its source code at:

 

There's also a link there to another page talking about shared libraries, what
they are, and how to create them.  I haven't read it over too closely, but while
I suspect its quite old (like, three years old), on the surface it seems OK.
It's gcc-based, so you may have to hunt around if you want anything
CodeWarrior-specific. You can also find out about shared libraries in the
KnowledgeBase:

 

-- Keith Rollin
-- Palm OS Emulator engineer






Paul Nevai <[EMAIL PROTECTED]> on 01/13/2001 04:54:05 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Paul Nevai <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  custom sysTraps



Can I create custom sysTraps? If yes, then where can I get an example to see
how to do it? Thanks! Best regards, Paul





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



RE: pdb vs. prc format

2001-01-12 Thread krollin



I posted a response to this yesterday with the URL to the documentation. You can
find it in the archives on 

-- Keith Rollin
-- Palm OS Emulator engineer






Symmetry Development <[EMAIL PROTECTED]> on 01/12/2001 12:47:48
PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Symmetry Development <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  RE: pdb vs. prc format



No I know the high level difference. I was wondering how the actual
structures between the pdb and the prc are different in C. From what I
can tell they look the same (same fields etc) but I would think that
there has to be a difference. Is this documented anywhere?

Thanks,
Daniel Schultz
Symmetry Software, Inc.
[EMAIL PROTECTED]





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



Re: POSE Hotsync Lockup

2001-01-12 Thread krollin



Scott,

I haven't heard of any similar problems.  And without more information about
your setup (platform you're running on, device you're emulating, ROM you're
using, method for connection to HotSync, reason for not using 3.0a8, etc.) so
that I can try reproducing this here, I'm afraid that I can't be of much help to
you.

-- Keith Rollin
-- Palm OS Emulator engineer






[EMAIL PROTECTED] on 01/12/2001 09:25:07 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  POSE Hotsync Lockup



I have trying to use the POSE Emulator 3.0a7 and if I Hotsync two times in a
row the Emulator locks up. Does any body have any suggestions on how to fix
this problem. I sure I have one of the setting wrong but the first hotsync
works just fine. Thanks in advance.

Scott D. Schell
St. Jude Medical
Corporate IT
eCommerce Development
(651) 415.7057 (office)
(612) 910.0211 (cell)
 mailto:[EMAIL PROTECTED] (e-mail)






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



Re: Palm swag? (off-topic, sorry!)

2001-01-12 Thread krollin



> I'd love to go but, unfortunately, I've been unable to justify the price of
> entry, so to speak (registration + air fare + hotel + food == $)
> Maybe next year...

Weren't you listening?  If you spend all that $, you get *FREE* stuff!
:-)

-- Keith



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



Re: How to enlarge the application stack size?

2001-01-11 Thread krollin



Yes...just search the Knowledgebase for "pref stack".  Or you can take the
approach of reducing the amount of stack that you're using.

-- Keith Rollin
-- Palm OS Emulator engineer





"Edward Ye" <[EMAIL PROTECTED]> on 01/11/2001 08:30:22 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Edward Ye" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  How to enlarge the application stack size?



Hi,all.
My application always overflow stack on Emulator.
I know by default the application stack size of Palm OS 3.0 is 4K . Can I
enlarge it with code?
Thanks.

Rgs.

Edward






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



Re: POSE 3.0a7 - Mac - BUG report

2001-01-11 Thread krollin



> ...POSE itself is defective.

Correction: Poser 3.0a7 is defective.  Poser 3.0a8 (posted a month ago, and
announced twice in emulator-forum) doesn't have this problem.

-- Keith Rollin
-- Palm OS Emulator engineer






Paul Nevai <[EMAIL PROTECTED]> on 01/11/2001 05:00:35 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Paul Nevai <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  POSE 3.0a7 - Mac - BUG report



POSE 3.0a7 on the Mac...

Open up a new memo in Memo Pad, type "a" and select the letter from right to
left so that the arrow cursor goes just beyond the left edge of the screen as
you finish the selection process.  Try to delete "a" by using the delete key
or by typing it over. I won't work.  This is just a simple illustration of a
much more severe problem.

[my setup: beige PowerPC G3 tower with OS 9.04 with 512Mb RAM].

Best regards, Paul

P.S. It took me a couple of weeks of frustration to figure out that it was
NOT my LapTopHack which caused the problem but POSE itself is defective.

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





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



Re: Palm OS Emulator - SOS

2001-01-11 Thread krollin



It was working properly the last time I checked (a few hours ago). I was told of
the problem by another developer, who has since told me that it now works for
him, too.

-- Keith Rollin
-- Palm OS Emulator engineer





Paul Nevai <[EMAIL PROTECTED]> on 01/11/2001 04:29:43 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Paul Nevai <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Palm OS Emulator - SOS



Can someone please e-mail me the Mac version of Palm OS Emulator 3.0a8 ASAP?
I have a defective version and the Palm link at
http://www.palmos.com/dev/tech/tools/emulator/ is incorrect [it sends you
emulator-mac.sit but it contains Emulator 3.0a8 (Src)]. Thanks. Best regards,
Paul

P.S. I was told that Palm will fix the link soon.




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



Re: pdb vs. prc format question.

2001-01-11 Thread krollin




 

-- Keith





Symmetry Development <[EMAIL PROTECTED]> on 01/11/2001 01:38:58
PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Symmetry Development <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  pdb vs. prc format question.



What is the difference between these 2 formats (pdb and prc) if any. I
have found very little info on the web concerning the format could
someone tell me or point me to some good information?

Thanks,
Daniel Schultz
Symmetry Software, Inc.
[EMAIL PROTECTED]



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



Re: PDB Format [ NextRecordListID ]

2001-01-11 Thread krollin



That field is not supported by the Emulator.  It being supported would mean that
you could install more than 64K number of records, which the Database Manager
API doesn't support.

At least, I think it doesn't.  I've seen posting from people saying they had
databases with 70,000+ records in them, but it's not clear to me how they can
access all those records when DmGetRecord takes a UInt16 as an index...

-- Keith Rollin
-- Palm OS Emulator engineer






[EMAIL PROTECTED] on 01/11/2001 03:24:21 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  PDB Format [ NextRecordListID ]







I am trying to use NextRecordListID in my application, but the emulator
rejects the PDB saying the NextRecordListID is not Zero.
Is NextRecordListID not supported in Emulator only or is it just a
foresight, and the Palm OS as of now does not support NextRecordListID ?
I mean is it worth the effort to make the application "NextRecordListID"
compatible ?

Regards,
Prashant Gupta




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



Re: Fatal error when I'm trying to create multiple databases

2001-01-11 Thread krollin



Fabrice,

Your problem is not clear to me.  If I take your posted source code and execute
it, it will crash because of the first call to DmNumRecords.  If I change the
code to call DmNumRecords after the databases exist and run it again, it runs
just fine.

-- Keith Rollin
-- Palm OS Emulator engineer






"Fabrice Meichtry" <[EMAIL PROTECTED]> on 01/11/2001 02:54:37
AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Fabrice Meichtry" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:(Keith Rollin/US/PALM)
Subject:  Re: Fatal error when I'm trying to create multiple databases



Firs thanks for your answer..

I have tried but the problem when I call more than one time DmNumRecords
because the DmOpenRef is OK. Maybe I should do someting just after to have
used the DmNumRecords but why ??


<[EMAIL PROTECTED]> wrote in message news:35537@palm-dev-forum...
>
>
>
> Fabrice,
>
> Running your program under Palm OS Emulator and using a debugger, the
problem
> was obvious.  When I ran it, I got an error message saying that low-memory
was
> being accessed.  Clicking on the Debug button in the dialog and breaking
into
> the debugger, I saw that the access was made in the first call
DmNumRecords.
> Using the debugger to look at the calling function, I saw that
DmNumRecords was
> being called with commandeDB and that commandeDB was NULL.
>
> So...you shouldn't call DmNumRecords with an invalid DmOpenRef.
>
> -- Keith Rollin
> -- Palm OS Emulator engineer
>
>
>
>
>
>
> "Fabrice Meichtry" <[EMAIL PROTECTED]> on 01/11/2001
02:22:30
> AM
>
> Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
>
> Sent by:  "Fabrice Meichtry" <[EMAIL PROTECTED]>
>
>
> To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
> cc:(Keith Rollin/US/PALM)
> Subject:  Fatal error when I'm trying to create multiple databases
>
>
>
> Hello,
>
> I have a problem when I'm trying to create more than one database in my
> application. When I have one it's working fine but when I try to create
one

> more, I get a FATAL ERROR.. Someone know of this problem ??
>
> Thx
>
> Here my code :
>
>
>

> ***
>
>
> #define DM_CARDNO0
>
> #define DM_DBNAME"CommandeDB"
> #define DM_DBTYPE'Comm'
> #define DM_DBCREATOR 'Firs'
>
> #define DM_DBNAMEF   "FinalCommandeDB"
> #define DM_DBTYPEF'Fina'
> #define DM_DBCREATORF 'Firs'
>
>
> #define DM_DBNAMEA"ArticleDB"
> #define DM_DBTYPEA'Arti'
> #define DM_DBCREATORA  'Firs'
>
> //My appStart
>
>
>   commandeDB = DmOpenDatabaseByTypeCreator(DM_DBTYPE, DM_DBCREATOR,
> dmModeReadWrite) ;
>   numRecords = DmNumRecords(commandeDB) ;
>
>
>if (!commandeDB)
> {
> err = DmCreateDatabase(DM_CARDNO, DM_DBNAME, DM_DBCREATOR, DM_DBTYPE,
> false) ;
>
> if (err)
>  return err ;
>
> commandeDB = DmOpenDatabaseByTypeCreator(DM_DBTYPE, DM_DBCREATOR,
> dmModeReadWrite) ;
>
> if(!commandeDB)
>  return DmGetLastErr() ;
> }
>
>articleDB = DmOpenDatabaseByTypeCreator(DM_DBTYPEA, DM_DBCREATORA,
> dmModeReadWrite) ;
>   numRecordsA = DmNumRecords(articleDB) ;
>
>
>if (!articleDB)
> {
> err2 = DmCreateDatabase(DM_CARDNO, DM_DBNAMEA, DM_DBCREATORA,
> DM_DBTYPEA, false) ;
>
> if (err2)
>  return err2 ;
>
> articleDB = DmOpenDatabaseByTypeCreator(DM_DBTYPEA, DM_DBCREATORA,
> dmModeReadWrite) ;
>
> if(!articleDB)
>  return DmGetLastErr() ;
> }
>  saveArticleRecord() ;
>
>
>
>
>
>



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





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



  1   2   3   4   5   >