bluetooth can only be achevied by using serial comm?

2005-09-21 Thread Yuen Kwee
hi there!

i digged into some info on bluetooth. is it true that bluetooth can only be 
acheviced by using the serial comm?

i have another question. in serial comm, only 1 side of the device is allowed 
to talk (if there are 2 devices being connected)? that means it is a 
asynchornous transfer? if i want to transfer data to and fro then i will have 
to connect, send, disconnect, connect, receive, disconnect?

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


Fail to change the readonly attribute of directory

2005-09-21 Thread news.PalmOS.com
¿Õ°×Now i want to change the readonly attributes of a file. If it is a
regular file, the function VFSFileSetAttributes works well. But if it is a
directory, it returns the error 0x0502. Is there any method to change the
readonly attribute of directory? please help!

Far Ocean



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


TwoSegmentCode_Field probs

2005-09-21 Thread rci_ind
Hello All,

hope some one can advice me on the fowllowing matter:

Iam using a 2 segment code.I have a Field 1 in form A into which i eneter data 
and then i  go to a related form B and come back to the form A, i lose data in 
Field 1.

is it bocs of two segment code.

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


RE: TwoSegmentCode_Field probs

2005-09-21 Thread Grzegorz Szewc
Do you save data in form A and reload it after return from form B? If
not all data on form will be lost after calling FrmGoToForm(formB)
function. 

Regards,
Gregory
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of rci_ind
Sent: Wednesday, September 21, 2005 9:15 AM
To: Palm Developer Forum
Subject: TwoSegmentCode_Field probs

Hello All,

hope some one can advice me on the fowllowing matter:

Iam using a 2 segment code.I have a Field 1 in form A into which i
eneter data and then i  go to a related form B and come back to the form
A, i lose data in Field 1.

is it bocs of two segment code.

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

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


Re: TwoSegmentCode_Field probs

2005-09-21 Thread Logan Shaw

Grzegorz Szewc wrote:

Do you save data in form A and reload it after return from form B? If
not all data on form will be lost after calling FrmGoToForm(formB)
function. 


Right, because FrmGotoForm() closes the current form, which deallocates
the field.

If form B is always reached only through form A, and if you always return
directly to form A after form B, you could use FrmPopupForm() to bring
up form B instead.  That will leave the current form open, so that you
can use FrmReturnToForm(0) to return to form.  Since the form isn't closed
that way, your field will not be erased.

Yet another method is to use a global variable (or some other variable
that is around as long as you app is running) and store the MemHandle
in it.  When form A opens, use FrmGetTextHandle() and FrmSetTextHandle()
to replace the field's memory with your own (unlocked) handle and then
free the handle that was in the field.  Then use FldSetTextHandle() to
make the field's handle NULL right before the form closes.  That all
can be done by handling frmCloseEvent and frmOpenEvent manually and
doing the changes to the field handle in response to those events.

  - Logan

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


Like help with Preferences: Date Time

2005-09-21 Thread corry
I have been working to write a program that allows me to verify and change the 
time.
I have looked into setting the time with the time api functions but have come 
to realize that on the Treo there is the Enable Local Network Time checkbox.  
I want to be able to use sysAppLaunch to go to the time  date menu in 
Preferances.   I got the idea when I used the worldclock, the set time/date 
button in this app does this.
Could someone show me how to do this as I seem to be getting the syntax wrong.
Thanks!
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: where to start? (game + network)

2005-09-21 Thread Henk Jonas

Yuen Kwee wrote:


thanks for the reply erico and henk,

i already did 3 games for single player and released it. they are not that 
famous and fun, and they are actually my testing ground. now i think i am ready 
to do some real designing and programming a solid game.

does ppl really hate IR? cause i already have IR all thought out.
if i am into bluetooth what library should i consider and dig into? i am making 
a realtime puzzle game. using the exchange library is out of the question. any 
other options or working sample source code?

thanks



Again, I would use the serial manager as long as it 2 player. Check out 
ZDoomZ or ZQuake, both use serial manager for 2 player over BT. Would be 
very easy to add IR. Just a change of the driver.
For more players, I would go with the piconet example source. But this 
is quite more complex.


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

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

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


Re: Netlibdmreceive and dmwritecheck

2005-09-21 Thread Henk Jonas
Because, you have to use DmWrite functions to access the storage mem. 
NetReceive doesn't use them. Please read about the difference between 
dynamic and storage mem.


Regards
Henk

Troy Lokitz wrote:


but why would i get an error?

- Original Message - From: Henk Jonas [EMAIL PROTECTED]
Newsgroups: palm-dev-forum
To: Palm Developer Forum palm-dev-forum@news.palmos.com
Sent: Tuesday, September 20, 2005 4:10 PM
Subject: Re: Netlibdmreceive and dmwritecheck



Troy Lokitz wrote:

I am writing an application to pull html from a website.  For some 
reason, when i goto a particular website i get a dmwritecheck on the 
netlibdmreceive call.  Can you explain why this would happen?




Your buffer pointer is in storage mem, I guess. Means you try to 
receive directly into a database or ftrmem.


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

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

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







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

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

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


Re: TwoSegmentCode_Field probs

2005-09-21 Thread rci_ind
Thanks Logan and Grzegorz,

I would implement them and let u know the result.

can i use nested FrmPopupForm().
i mean i enterd data in Field 1 in Form Athen went to FormB on button press 
then went to FormC on button press in FormB then went back to FormA on button 
press in FormC.

I hope u understand what i mean.

reagards,
Srini

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


Re: Streamed sound recording sampling problem

2005-09-21 Thread Henk Jonas
Have you evaluate if you record the same amount of bytes in both cases? 
I can't see any difference if you write wave or raw in your callback 
function. Means, I second of raw and 1 second of wave must have the same 
size + the size of the wave header, correct? Or does you really only get 
the half amount of samples during wave?


Tom Frauenhofer wrote:

The problem is that when I am in Wave mode I get half the number of 
callbacks, and when I play the audio the speed is doubled.  it's as if 
the recorder is only recording every other byte.  To the OS it shouldn't 
know if I'm saving it to a Wave file or not.



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

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

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


RE: Fail to change the readonly attribute of directory

2005-09-21 Thread Miro Pomsar
Do you also set the directory flag when setting the attributes?
I mean to set attr on file/directory you should do:

err = VFSFileGetAttributes(fref, attr) ;
if( err!=0 )
{
err = VFSFileSetAttributes(fref, attr | vfsFileAttrReadOnly) ;
}

This way any previous attribute is preserved (hidden, system, archive).

Regards,
Miro Pomsar
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
news.PalmOS.com
Sent: Wednesday, September 21, 2005 08:45
To: Palm Developer Forum
Subject: Fail to change the readonly attribute of directory

¿Õ°×Now i want to change the readonly attributes of a file. If 
it is a regular file, the function VFSFileSetAttributes works 
well. But if it is a directory, it returns the error 0x0502. 
Is there any method to change the readonly attribute of 
directory? please help!

Far Ocean



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



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


RE: Fail to change the readonly attribute of directory

2005-09-21 Thread Miro Pomsar

One more thing you probalby already figured out is, that you have to
open the file in readwrite mode
to set attributes or dates.

Regards,
Miro Pomsar

 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
news.PalmOS.com
Sent: Wednesday, September 21, 2005 08:45
To: Palm Developer Forum
Subject: Fail to change the readonly attribute of directory

¿Õ°×Now i want to change the readonly attributes of a file. If 
it is a regular file, the function VFSFileSetAttributes works 
well. But if it is a directory, it returns the error 0x0502. 
Is there any method to change the readonly attribute of 
directory? please help!

Far Ocean



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



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


Nested_FrmPopupForm().

2005-09-21 Thread rci_ind
Hello All,

Can i use nested FrmPopupForm(). 
i mean if i enterd data in
1.Field 1 in Form A
2.then went to FormB on button press 
3.then went to FormC on button press in FormB 
4.then went back to FormA on button press in FormC. 

How should i ensure the proper closure of formB and formC?
will i still have Field1 undisturbed?

regards,
srini


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


Drawing low-density text in a Field on a high-density display

2005-09-21 Thread John Cundall
I have an application that keeps a log file, which the user can view via a Form 
with a scrolling Text Field in it. On a device like a Treo 650 with its 
double-density screen, I'd like to get the Text Field to be drawn such that it 
fits twice as much text in as on a single-density display. 
WinSetScalingMode(kTextScalingOff) seems useful here as it can tell the drawing 
routines to use low-density fonts on a high-density screen, resulting in 
smaller text. But, as I understand it I would have to call this each time the 
Field is about to be drawn, whilst keeping the other elemnts of the Form drawn 
in normal scaled mode, so that buttons, etc look right.

So, does anyone have any ideas as to how to get a Text Field in a Form to draw 
using single-density fonts on a double density display, to pack twice as much 
text in ?

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


Re: Netlibdmreceive and dmwritecheck

2005-09-21 Thread Troy Lokitz
Henk,et al.,
I'm using netlibDMreceive, not netlibreceive.  Netlibdmreceive uses storage 
mem and writes (in my case) directly to a storage buffer setup as feature 
memory.  For some reason, it fails on some calls and not on others.  It fails 
with a dmwritecheck failed error.  Another oddity is that if i reboot my 
computer or use a different computer, i won't get the error for a while, then 
it will start happening.  Any ideas?
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


WinInvertRectangle Color (Still Having Problems....)

2005-09-21 Thread Regis Daniel de Oliveira
(See my previous Post)
Thanks Logan, but, I still having problems...

If I only apply the code that you wrote, the result is the same: When i click 
on a field, i get a black backgroud whith a white foreground... 

So, i was trying to use the WinSetForeColor and WinSetBackColor functions 
before your code and the closest result i get was a blue backgroud with a white 
foregroud when selecting the item. See what i called before your code... 

WinDrawOperation saveddrawmode; 

//My code 
WinSetForeColor(UIColorGetTableEntryIndex(UIFieldText)); 
WinSetBackColor(UIColorGetTableEntryIndex(UIObjectSelectedFill)); 

//Your Code 
saveddrawmode = WinSetDrawMode (winSwap); 
WinPaintRectangle (rRow, 3); 
WinSetDrawMode (saveddrawmode); 

I was expecting a white foreground with a blue background (suppose that i 
runing using the default color theme)... 

Please!!! What i'm missing??? 

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


Hyperlinked Icon

2005-09-21 Thread xnetix
I am trying to create a Palm OS icon (for Treo 650) that is merely a hyperlink 
to a web page (to be installed on hotsynch).   

Do you know where I can find instructions on creating this?

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


Palm Resource Editor pop-up control bug?

2005-09-21 Thread Chipp Jansen
Hi all - 

In the Palm Resource Editor, I have found that the List ID property for the 
pop-up control isn't saved when entered and reverts back to 0.  

It seems to be fickle with what numbers you have set for the List ID and the 
Pop-up Control ID.

For example, I set my pop-up control ID to 1861 and my list ID to 1871.  When I 
tried to associate the pop-up with the list by putting 1871 into the List ID 
property for the pop-up control, I noticed that the editor would revert the 
List ID to 0.  Is there an internal state of Pop-up controls and Lists that is 
preventing the association to stick?

Thanks, anybody else notice this?
Chipp
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Daylight Savings Prefs

2005-09-21 Thread sberntsen
When I do a complete reset (Erase all data) on my Tunsten E, I am prompted to 
enter when I switch between Daylight Savings and Standard time. Is there a 
System Preferences call to get this information subsequently in my app? I need 
to analyze whether DST would be in effect at a given date and time. Any replies 
would be appreciated.
Steven L Berntsen
Montreal QC CA

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


Re: Streamed sound recording sampling problem

2005-09-21 Thread Tom Frauenhofer
Henk Jonas wrote:
 Have you evaluate if you record the same amount of bytes in both
 cases?
 I can't see any difference if you write wave or raw in your
 callback
 function. Means, I second of raw and 1 second of wave must have 
 the same
 size + the size of the wave header, correct? Or does you really 
 only get
 the half amount of samples during wave?

For a roughly 6-second recording the callback gets invoked approximately 60 
times in RAW mode and approximately 30 times in Wave mode.  When I play back 
the files, the RAW file is a the proper speed, but the Wave file is at double 
speed.

(And I know, it doesn't make any sense.  The only difference is that I have 
written 44 bytes to the head of the VFS file.  Really strange.)


Tom Frauenhofer, [EMAIL PROTECTED]
Palm OS® Certified Developer
http://www.beret.com
My Blog: http://tomfrauen.blogspot.com

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


Re: Streamed sound recording sampling problem

2005-09-21 Thread Logan Shaw

Tom Frauenhofer wrote:

For a roughly 6-second recording the callback gets invoked approximately
60 times in RAW mode and approximately 30 times in Wave mode.  When I play
back the files, the RAW file is a the proper speed, but the Wave file is
at double speed.

(And I know, it doesn't make any sense.  The only difference is that I
have written 44 bytes to the head of the VFS file.  Really strange.)


I haven't read all the history of your problem, but I have two questions:

1.  Do you have the correct sample rate in that WAV header?
That could cause playback at the wrong speed.

2.  If you have the correct sample rate, are you correctly marking
it as a mono file?  If you put mono sample data in and mark it
as stereo, each channel will have half the samples it should,
so it will play at double speed (and double pitch).

Not sure if those are your problem, but who knows...

  - Logan

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


Re: Streamed sound recording sampling problem

2005-09-21 Thread Henk Jonas

Hi Tom,

ok, so it looks like you only read with the half sample rate in case of 
wave, correct? I would use a debugger and check the SndStreamCreate 
call. I don't know what happens but maybe the variable of sampleRate is 
trashed somehow. With the half samplerate you would play it with double 
speed.


Henk

Tom Frauenhofer wrote:


Henk Jonas wrote:


Have you evaluate if you record the same amount of bytes in both
cases?
I can't see any difference if you write wave or raw in your
callback
function. Means, I second of raw and 1 second of wave must have 
the same
size + the size of the wave header, correct? Or does you really 
only get

the half amount of samples during wave?



For a roughly 6-second recording the callback gets invoked approximately 60 
times in RAW mode and approximately 30 times in Wave mode.  When I play back 
the files, the RAW file is a the proper speed, but the Wave file is at double 
speed.

(And I know, it doesn't make any sense.  The only difference is that I have 
written 44 bytes to the head of the VFS file.  Really strange.)


Tom Frauenhofer, [EMAIL PROTECTED]
Palm OS® Certified Developer
http://www.beret.com
My Blog: http://tomfrauen.blogspot.com




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

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

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


Re: Constructor doesn't allow me to add list items.

2005-09-21 Thread sberntsen
Selecting Edit-New Item from the menu is supposed to add an item to the list. 
If, as in my case, this menu selection is greyed out, try Ctl-K. That worked, 
and even ungreyed the menu function. Constructor is frustrating.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: Nested_FrmPopupForm().

2005-09-21 Thread Chris Tutty
From: rci_ind [EMAIL PROTECTED]
 Can i use nested FrmPopupForm(). 
(snip of 'form A, form B, form C sequence)

I don't think so but, more importantly, a form sequence
this complex is going to be difficult to debug and maintain.
It's not generally the way complex Palm interfaces do things.

 How should i ensure the proper closure of formB and formC?
 will i still have Field1 undisturbed?
 
If you need to spread your data management over several
forms you are better to isolate your data saving and loading
to a separate module and then have each form interact with 
that.  Each form then uses those routines to load the current
record (generally using an index stored in a global variable),
interacts with the user to edit the data and then saves the
fields it has modified.  In theory this means that the data
module is free to save all of the data back to the database
each time one of the forms closes, or to keep it all in 
global memeory until a final 'Save' button is hit and then
update the database record.  Your forms don't have to
manage the data themselves and so it becomes easier to 
do things such as move a field from one form to another 
or split or combine forms later on.

The data module can be built as if it was an object with get() 
and set() methods for each field.  Although C doesn't support 
object-oriented programming syntactically there's no reason 
you can't apply object-oriented design principals.

Chris Tutty


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


Re: Displaying Float Values in simple format

2005-09-21 Thread Jeff Summers
Segmentation is handled differently depending on whether you are using Code
Warrior or PODS.  I will assume PODS.
I strongly recommend the book Professional Palm OS Programming by Foster
and Bachmann.  It contained this info and has lots more. I'm a relative
newbie as well.

1. Create a file and included it in your project, called sections.def. That
file should contain 2 lines-
application {YourAppName BIGAPP}

multiple code {segment1 segment2}


2. In the PODS makefile, include the statement MULTIPLE_CODE_SECTIONS = TRUE

3. Create a header file Sections.h containing
#ifndef _SECTIONS_H
#define _SECTIONS_H
#define CODESEGMENT1 __attribute__ ((section (segment1)))
#define CODESEGMENT2 __attribute__ ((section (segment2)))
#endif

4. For each function you want in the second segment, change the definition
of the function adding the code segment to the definition like this:
void yourfunction(void) CODESEGMENT2;

If you don't declare a code segment, it will go into the first segment. 
You can declare more segments, in the same manner as above.

Jeff Summers

In your message regarding Re: Displaying Float Values in simple format
dated Wed, 21 Sep 2005 20:33:24 +0530, Dighe Jeetendra said that ...

 
 
 
 On 9/21/05, Jeff Summers [EMAIL PROTECTED] wrote: 
 I just asked the same question, and apparently there is a common routine
 called GetStringFromDouble that, although not part of the SDK, is a 
 function that has been publicly posted and is in common use.  I was
 referred to the archives for this newsgroup, but could not find it there.
 I found it in another newsgroup archive (not one of Palm's) through a 
 Google search and will post it below.
 
 Pass the routine your destination string, the floating point number, and
 the number of digits after the decimal point desired.
 
 
 // 
 // GetStringFromDouble()
 //
 //
 // Gets string from double, and rounds to the appropriate number of
 // decimal points.
 //
 // Taken from Palm Dev Forum 
 //
 //
 
 void GetStringFromDouble(Char* str, double dblNum, Int16 numFractDigits)
 
 double flpIP, zeros, round;
 Int32 remainder, longNumber; 
 Int16 i, strLen;
 Char buffer[16];
 
 str[0] = 0;
 
 if (dblNum  0.0)
 
dblNum = -dblNum;
StrCat(str, -);
 
 
 zeros = 1.0;
 for (i = 0; i  numFractDigits; i++)
 
zeros *= 10.0;
 
 round = 0.5 / zeros;
 
 dblNum += round;
 flpIP = (Int32) dblNum;
 dblNum -= flpIP;
 
 StrIToA(buffer, (Int32) flpIP);
 StrCat(str, buffer);
 strLen = (Int16) StrLen(str);
 StrCat(str, .); // put in the decimal point and terminate the string
 str[numFractDigits + strLen + 1] = '0';
 longNumber = (Int32) (dblNum * zeros); // fractional part
 
 for (i = numFractDigits + strLen; i  strLen; i--) 
 
remainder = longNumber % 10; // convert the integer part
str[i] = (Char) (remainder + 0x30);
longNumber /= 10;
 
 
 
 
 Thank's jeff the above code really helped me a lot by making some changes 
 in the parameters. 
  
 yet another issue i got after making final changes in my  Project for all 
 the Float values,i got a Segmentation problem i think so my code has 
 exceeded 32k size.
  
 Do u have some sample tips regarding Segmentation, it would really help me 
 a lot.
 Thankx 
  
  
 
 
  
  
 
  
 -- For information on using the PalmSource Developer Forums, or to 
 unsubscribe, please see http://www.palmos.com/dev/support/forums/ 


-- 

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


Re: Fail to change the readonly attribute of directory

2005-09-21 Thread news.PalmOS.com
The code is as follow:

Err resultSet;
uint32_t fileAttr;
VFSFileOpen(gSelectedVolRefNum, FilePath, vfsModeReadWrite,
fileDetails);
VFSFileGetAttributes(fileDetails, fileAttr);
resultSet = VFSFileSetAttributes(fileDetails, isReadonly ? fileAttr |
vfsFileAttrReadOnly : fileAttr  ~vfsFileAttrReadOnly);
VFSFileClose(fileDetails);

It works well if the file is a regular file ,but return error 0x0502 if the
file is directory.
Please help!

Far ocean

Miro Pomsar [EMAIL PROTECTED]  news:[EMAIL PROTECTED]

One more thing you probalby already figured out is, that you have to
open the file in readwrite mode
to set attributes or dates.

Regards,
Miro Pomsar



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
news.PalmOS.com
Sent: Wednesday, September 21, 2005 08:45
To: Palm Developer Forum
Subject: Fail to change the readonly attribute of directory

¿Õ°×Now i want to change the readonly attributes of a file. If
it is a regular file, the function VFSFileSetAttributes works
well. But if it is a directory, it returns the error 0x0502.
Is there any method to change the readonly attribute of
directory? please help!

Far Ocean



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





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


Converting an App to run ARM for the TREO

2005-09-21 Thread Michaelides, Michael
 
 Hey,

Just curious what peoples experiences are in converting apps to ARM.
Which ARM compiler do most people use?  What type of gains have people
realisticly seen? I had one of my developers try but he was having
problems we the new and deletes, he said it was not supported. 

I am kind of under the gun right now , any help will greatly be
appreciated.  I am willing to pay for conslutant if someone can help me
out with this conversion.  


Thanks,

Michael Michaelides
Vettro
Director of Platform Development
[EMAIL PROTECTED]
646-996-3702


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


Re: Fail to change the readonly attribute of directory

2005-09-21 Thread Logan Shaw

news.PalmOS.com wrote:

The code is as follow:

Err resultSet;
uint32_t fileAttr;
VFSFileOpen(gSelectedVolRefNum, FilePath, vfsModeReadWrite,
fileDetails);
VFSFileGetAttributes(fileDetails, fileAttr);
resultSet = VFSFileSetAttributes(fileDetails, isReadonly ? fileAttr |
vfsFileAttrReadOnly : fileAttr  ~vfsFileAttrReadOnly);
VFSFileClose(fileDetails);

It works well if the file is a regular file ,but return error 0x0502 if the
file is directory.


0x0502 is sysErrParamErr.  That means one of the arguments is bad.

Since both of your arguments' values come from variables that are
set by system calls (VFSFileOpen() and VFSFileGetAttributes()),
I would start by checking the return values of both those functions
to make sure they are really succeeding.  Perhaps you are not actually
able to open the directory or perhaps you are not able to get its
attributes.  Knowing the error code from these two functions might
give you helpful information.

By the way, to convert a numeric error code into its symbol (which is
more meaningful, typically), the easiest way I know of is to look
for the first byte in Incs/Core/System/ErrorBase.h.  For example,
that header says that 0x0500 is sysErrorClass.  Once you know it's
sysErrorClass, you can search all the include files for that string,
and you will find a file that contains the error class and it will
have the specific error types for that class.  For example,
Incs/Core/System/SystemMgr.h has sysErrParamErr in it, which
is defined as (sysErrorClass | 2), and thus 0x0502.

  - Logan

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


Some Debug Hints - Please!

2005-09-21 Thread Lance Drake
If nothing else - can you tell me:

1) Is there is such a thing as a 'syslog' print statement capability that can 
be implemented with the EMULATOR so I can have the executing code write things 
like You got here... which can later be reviewed after the fact ? 

2) How can I get the EMULATOR to HotSync - not the snazzy new SIMULATOR... the 
old Govt Issue Green EMULATOR?  I need to get a database file into the EMULATOR 
and cannot figure out how to move it into the mix.   

THANKS for whatever legup you can provide!   

Best Wishes, 

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


Support for 1GB SD on older Palms

2005-09-21 Thread Pat Flaherty
I ask this more as a user than developer.

Don't suppose there's any hope that there'd be an update (driver [FAT32 
presumably] and whatever else is necessary) to accomodate a 1GB SD on, in my 
case at least, not the newest Palm.  But not exactly an ancient one either - a 
T|T3?

I confess: I bought a 2 GB card without even knowing that it wouldn't work on 
my Palm.  (well not quite - looked around the Web; found someone who'd pulled 
the FAT32 driver off of a LifeDrive; got this working on my Palm; formatted my 
2 GB card on a Treo 650; and with a card reader I can write to the card; but 
cannot write to the card when it's in my T|T3 - not a great solution, but ...).

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


REPOST: Lifedrive simulator - skip presentation screen

2005-09-21 Thread Erico Franco

Is possible to configure the Lifedrive Simulator to skip that
presentation Screen? (that shows the Lifedrive logo and comes with that
nice small music).

Every time that I start the simulator it shows it again and again.

regards

Erico Franco
MicroMagic

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


Re: Some Debug Hints - Please!

2005-09-21 Thread Ben Combee

At 10:58 PM 9/21/2005, you wrote:

If nothing else - can you tell me:

1) Is there is such a thing as a 'syslog' print statement capability that 
can be implemented with the EMULATOR so I can have the executing code 
write things like You got here... which can later be reviewed after the 
fact ?


Look for the Palm Reporter utility -- it lets you log messages from the 
emulator and simulator.


2) How can I get the EMULATOR to HotSync - not the snazzy new SIMULATOR... 
the old Govt Issue Green EMULATOR?  I need to get a database file into the 
EMULATOR and cannot figure out how to move it into the mix.


Network Hotsync -- it's been discussed here many times in the past.  You 
need to be using a device ROM that has network Hotsync for this to work.


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


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


Re: Some Debug Hints - Please!

2005-09-21 Thread Logan Shaw

Lance Drake wrote:

If nothing else - can you tell me:

1) Is there is such a thing as a 'syslog' print statement capability
that can be implemented with the EMULATOR so I can have the executing
code write things like You got here... which can later be reviewed
after the fact ? 


Yes, there is.  It's called Palm Reporter:

http://www.palmos.com/dev/support/docs/devguide/UsingReporter.html

Some third-party tools that work with this system are also available here:

http://osx-palm-tools.sourceforge.net/

Although the page says it's for Mac OS X, based on the description,
the HostTraceGlue tool should let you do the same sort of debugging
calls from the real device as well.  However, it will send them
over USB, and I believe the Palm Reporter wants to communicate over
TCP, so you'll need a USB-to-TCP translator.  That page has one for
OS X and doesn't have one for Windows, but it's not impossible to
believe that Windows already has something like that available.


2) How can I get the EMULATOR to HotSync - not the snazzy new
SIMULATOR... the old Govt Issue Green EMULATOR?  I need to get
a database file into the EMULATOR and cannot figure out how to
move it into the mix.   


By far the easiest way to get a database into the Emulator is to
simply drag the file icon onto the emulator window and wait for
it to copy.

If you want to hotsync, I think the Emulator can do a network
hotsync.  To make this work, you probably need to set the hotsync
prefs on the emulated palm to try to use the network, you need
to set the prefs of the emulator app to redirect netlib calls
to host TCP/IP, and you probably need to make your PC's hotsync
manager accept network hotsync connections.

  - Logan

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


command line building for metrowerks

2005-09-21 Thread cp
is there any way I can use commandline to build my metrowerks codewarrior palm 
project ? I know cmdide.exe  does the trick. But is it possible to add new 
source/header files in this type of process ? 
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/