Re: how to read txt file by line,include search string,find string,read str in file

2003-08-12 Thread Alan Ingleby
Andy,

This is a C question not a PalmOS question.

I suggest you post to a C newsgroup, or do a few Google searches on
processing text files in C.

Alan

"Andy yuan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> thank you!
>
> _
> ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:  http://messenger.msn.com/cn
>
>
>



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


Re: Okay to use DmWrite() on ordinary memory?

2003-08-12 Thread Paul Johnson
Care to name em please ?


Regards,
Paul Johnson
Applewood House
www.applewoodhouse.com


- Original Message -
From: "Aaron Ardiri" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, August 12, 2003 8:12 AM
Subject: Re: Okay to use DmWrite() on ordinary memory?


> > > hey, i responsed cause you mentioned me :) not to nit-pick you :) *g*
> >
> > That's OK.  I was just having a bad morning.  I'm all better now I've
> > got my caffeine fix.
>
> *g* - some idiot woke me up at 8:30am..
>
> > You do have to admit though, that many of the posts that go into this
> > forum consist of minor corrections to previous people's posts.  Not
> > that there's anything wrong with that.. I'm just insecure. :-)
>
> yeah, it started getting bad in 2000 :) then, a few more forums spawned
> up (experts etc) - to reduce the signal/noise ratio :) there is a lot
> of information in those lists that should be made public, a lot of
> questions/reasons why things are the way they are could be answered
> easily then :)
>
> ---
> Aaron Ardiri[EMAIL PROTECTED]
> CEO - CTO   +46 70 656 1143
> Mobile Wizardry  http://www.mobilewizardry.com/
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


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


RE: CW9, Linker error: PalmRez error: could not open file...,

2003-08-12 Thread Kaloyan Donev
Make shared library with your resource. Compile it. Then include prc
file in your new project. Codewarrior will automaticaly merge resources
from shared library in the new project.

Pozdravi,
Kaloyan Donev

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of George
VS
Sent: Monday, August 11, 2003 17:38
To: Palm Developer Forum
Subject: CW9, Linker error: PalmRez error: could not open file...,


Hi group,

I have .R resource I want to reuse in my new PalmOS app.
I have created a "Convert Resources" (MacOS Merge) target as documented.

But, I get this error when I build the project:
Link Error: PalmRez Error: Could not open file: resources.tmp in
"resources.tmp"; line 1 # Col: 1

The file "resources.tmp" is created, but size is 0 ?!?

This issue occur each time .R file is to be rebuild and there are other
projects open in same CW app instance. More over on some machines this
occurs always! Any suggestions?

Thanks,
George VS ([EMAIL PROTECTED])



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



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


Bitmap Information

2003-08-12 Thread Ken
Hi,

I found a message that had the following:

"BitmapRsrcDR1, which is available in dev seeding area, contain
everything you dreamed to know about bitmaps ( and much more :)"

I looked in the seeding area and did not find it. 

Does anyone know where to look in the seeding area?

Thanks,
Ken

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


Re: Programmatic Category creation

2003-08-12 Thread ThuNguyet Nguyen
Hi there,

> I am working on an application which wants to store data in the user's To-Do
> list, in a predetermined category.  I can't find example code for how to
> programmatically create a Category which does not exist (if there's an open
> slot, otherwise use Unfiled), and to apply that new Category to the new
> items.  
>
Check the memopad tutorial. If you have a category associated with the database in 
your program,
add the interfaces and the code as in the Memopad program (assign the category for 
each records,
etc...) then the part "programmatically create a Category which does not exist" will 
be done by
the system. You don't need to write code to do it. Try the tutorial and you know what 
I mean.
Well, the tuorial goes with CW 8, you can download the trial version from MW website.
http://www.metrowerks.com/MW/download/default.asp

Hope that helps.

tnn


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

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


a dbID question

2003-08-12 Thread Paul Nevai
I can't figure this out...

If I have a DB on the Palm which I do not change at all, then can the dbID of
it change? Under what circumstances? Assume that DmSetDatabaseInfo() has NOT
been used on the DB. 

If DmSetDatabaseInfo() is used on another DB, can it affect the dbID of my
DB?

BTW, for the dbID, see databaseID[...].baseID in DataMgr.c.

/PaulN

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


clipping and WinDrawChars()

2003-08-12 Thread Todd Niec
I asked this before but didn't get a response.  So here goes again.

Does WinDrawChars() limit the output to the current clipping rectangle?
It seems like it should, but unless I am making a mistake in setting the
clipping rectangle, the text is going outside of the rectangle.

thanks 

todd niec

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


Re: Okay to use DmWrite() on ordinary memory?

2003-08-12 Thread James
Aaron Ardiri wrote:
>
> this is what i would recommend as well :) 
>
> #define myMemMove(a,b,c,d) \
>   MemPtrDataStorage((a)) ? DmWrite((a),(b),(c),(d)) \
>  : MemMove((a)+(b),(c),(d))
> 
> kill the { } and ; *g* not needed, and, always () around your 
> arguments, for safety :) you here it doesn't matter with a+b, 
> but, with a*b, it would:

You neglected to enclose the ?: expression in parentheses.  For example,
consider:

#define FOO(a, b, c) \
(a) ? (b) : (c)

int x;
x = 4 * FOO(1, 2, 3);

The value of x is now 2, not 8 as one would expect.


Alan Ingleby wrote:
>
> #define SafeUlgyDmWrite(a,b,c,d)
> {MemPtrDataStorage(a)?DmWrite(a,b,c,d):MemMove(a+b,c,d);} 

As Aaron already pointed out, the braces are totally unnecessary.  Furthermore,
the following would generate a syntax error:

if (condition)
SafeUglyDmWrite(a, b, c, d);
else
/* ... */

If you do need to use braces in macros, you need to enclose them in a do-while
block:

#define BAR(x, y) \
do\
{ \
/* ... */ \
} while (0) /* semicolon intentionally omitted */


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

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


Fw: MemHandleSize - MemHandleResize

2003-08-12 Thread rguevara

-- Forwarded Message ---
From: "rguevara" <[EMAIL PROTECTED]>
To: "Forum PALM (PalmOS)" <[EMAIL PROTECTED]>,"Forum PALM
(Yahoo)" 
Sent: Fri, 8 Aug 2003 10:35:28 -0300
Subject: MemHandleSize - MemHandleResize

I have some questions about those functions:

MemHandleSize work over one chunk unlocked?
if i do: recordH = DmGetRecord(PedidosDB, NuevoIndice);
and later:
length=(MemHandleSize(registroH)
+StrLen(item.items[gcantitems-1].codigo)+1
+sizeof(item.items[gcantitems-1].cantidad)
+sizeof(item.items[gcantitems-1].precio));

i get:  (1.0) called SysFatalAlert with the message:
"MemoryMgr.c, Line:4359, Free handle"

and (continue) i get:
(1.0) just read from memory location 0x0144,
 causing a bus error.
(reset)
¿?

if later MemHandleResize work with this handle without problems in other
case

--
Open WebMail Project (http://openwebmail.org)
--- End of Forwarded Message ---


--
Open WebMail Project (http://openwebmail.org)

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


NetLibClose problem

2003-08-12 Thread Khaki Wizard
Hi,

I'm using Net library to connect to an HTTP server.
But when I call NetLibClose, it returns 0xF009, which
is not an error code for Net library.

Anyboday knows what is it?

Thanks,

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

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


Re: Strange issue

2003-08-12 Thread Engi
On Thursday, August 07, 2003 8:28 AM [GMT+1=CET],
Engi <[EMAIL PROTECTED]> wrote:

> On Thursday, August 07, 2003 1:48 AM [GMT+1=CET],
> Alan Ingleby <[EMAIL PROTECTED]> wrote:
> 
>> "Engi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>>> When my records don't have any note, all is fine.
>>> But if I add a note, all the characters which are drawed after the
>>> note indicator are weird.
>> 
>> How are you drawing the note icon?
> 
> In fact, my value column have textTableItem style when there is no
> note and textWithNoteTableItem style when there is a note.

> In this case, the note indicator is shown by the system.

It was my problem : system changes font to draw note indicator.
I just added FntSetFont(stdFont) and bug disappear 

Thanks to Alan who put me on this direction ...<>-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Similar Utility to palmdump

2003-08-12 Thread Ben Combee
At 09:59 AM 8/6/2003, [EMAIL PROTECTED] wrote:
Hey all...

Anyone have any fancy-smancy UNIX utilities that dump out ONLY the
records from a pdb? As in, without header info and all that fun stuff...
par can be used to do that.

http://www.djw.org/product/palm/par/

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

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


Re: Okay to use DmWrite() on ordinary memory?

2003-08-12 Thread Keith Rollin
At 1:16 PM +1000 8/12/03, Alan Ingleby wrote:

Alan Ingleby wrote:
 > ...nitpicking the responses
That's all very well Alan, but as all good dictionaries state... nit-picking
should actually be hyphenated.  Furthermore... [SNIP]

Actually,  has "nitpick", but not "nit-pick". 
Even so, don't worry.  Even if "nit-picking" is considered correct by 
some, according to Knuth 
(), "nit-picking" will 
eventually become "nitpicking".  :-)

-- Keith

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


Re: Memory Management

2003-08-12 Thread Steve K
Good call.

Works fine now.

Thanks again.

Steve K

"Arye Schreiber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> You should not be calling MemHandleFree(recH), as to the fact that the
data
> is in DB form. You should not be freeing it at all just releasing it.
> LionScribe
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Steve K
> Sent: Monday, August 11, 2003 7:58 PM
> To: Palm Developer Forum
> Subject: Re: Memory Management
>
>
> Sorry, tabbing, got alittle screwy, and I added an extra } on accident.
> This is better.
>
> static void foo(FormType *frmP)
> {
>  FrmSetTitle(frmP, "Test");
>
>  Err error;
>  MemHandle recH;
>  char* test;
>
>  LocalID dbId = DmFindDatabase(cardNo, "barDB");
>  gDatabase = DmOpenDatabase(cardNo, dbId, dmModeReadOnly);
>  recH = DmGetRecord(gDatabase, 0);
>
>  if(recH) {
>  test = (char*) MemHandleLock(recH);
>  MemHandleUnlock(recH);
>  }
>  MemHandleFree(recH);
>  DmReleaseRecord(gDatabase, 0, false);
>  error = DmCloseDatabase(gDatabase);
> }
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
>
>



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


Re: Recomnd 16-Bit editor/converter?

2003-08-12 Thread Aaron Ardiri
>   > you want 5-6-5 for palmos :)
> 
> lol, I know, I saw that as soon as my own msg popped up in my email
> client and I just KNEW someone would have to point it out.  =P

that is what we are here for.

>   > why not just work in 24 bit, and, then let pilrc/other convert it
>   > to the 5-6-5 format :)
>
> It can't be that easy, besides, I have tried a couple things, i.e.
> Constructor converts it such that it functions, but the colors are all
> wrong. Adding the 4th BITMAP line in the RCP file:
> BITMAPFAMILYEX ID ULHome
> BEGIN
> BITMAP "ULHome1bppD1.bmp" BPP 1 DENSITY 1
> BITMAP "ULHome8bppD1.bmp" BPP 8 DENSITY 1
> BITMAP "ULHome8bppD2.bmp" BPP 8 DENSITY 2 TRANSPARENTINDEX 211
> BITMAP "ULHome24bppD2.bmp" BPP 16 DENSITY 2 //<<--- Doesn't like
> this!
> END
> 
> Causes CW9 to have a fatal crash when it tries to compile and either
> disappears completely or throws me into MS's C++ debugger! (I hate it
> when that happens...)
> I must be doing something out of sequence, so what procedure would you
> recommend?

sounds like a bug in pilrc that ships with CWr9 :) could be bug in
pilrc in general :) ben might be able to send you the latest beta 
and test this out

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


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