Re: Linker Error
I was trying to find a solution that didn't require that I purchase Visual C++. If I had VC, I'd have the MFC classes. - Original Message - From: Roger Stringer [EMAIL PROTECTED] To: Palm Developer Forum palm-dev-forum@news.palmos.com Sent: Tuesday, December 06, 2005 12:20 AM Subject: Re: Linker Error Subject: Re: Linker Error From: Ben Combee [EMAIL PROTECTED] Date: Sat, 03 Dec 2005 12:29:16 -0600 At 08:23 AM 12/3/2005, you wrote: I visited a Borland help site, and over the past few days have reached the conclusion that some of the Palm OS dlls are using MFC functions. The dll that caused the problem is Sync20.dll, which is pretty central to building a conduit. Can anyone help with items 1 or 2 of the suggestions at the end? I've been advised as follows by other Borland users: Yes, the Conduit DLLs use MFC. If you need to develop using Borland products, you should use the COM interface to the CDK and go through COM classes. Sorry. Actually very few critical classes use MFC and an alternative solution is to write a stub DLL in VC that handles those and hides them from Borland. Roger Stringer Marietta Systems, Inc. (www.rf-tp.com) -- 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/
COM Conduit Sample Code
Is there any sample code out there that illustrates how to read a database record and break it into its components using Visual Basic and COM? (This combination seems to work on my system in that I was able to get one of the basic sample application to run.) The only examples I see deal with data that appears to be strictly comprised of strings with null terminators. I have a record that is set up to include strings and integers. Thanks. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
TX Serial Port
Does anyone know if there is any documentation of the serial port behaviour on the TX? The serial port on the T5 was broken (but at least partly documented), the TX appears to behave differently but I can't find any relevant TX-specific documentation at all. -- Martin -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Linker Error
It seems to be necessary if you don't have MFC on your system based on no install of VC++, because Builder won't compile with the indicated references in the .def file. I still say that's not necessary. I can call all these things from a different language that cannot possibly be using MFC. All these calls are just calls to DLL exported routines. You can call them from any almost any programming language capable of writing software for Windows. Cheers, Jim Cooper __ Jim Cooper[EMAIL PROTECTED] Skype : jim.cooper Tabdee Ltdhttp://www.tabdee.ltd.uk TurboSync - Connecting Delphi to your Palm __ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Re: Linker Error
Hola, gracias por escribirme, te contestaré a la mayor brevedad !!! Jose -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Linker Error
Jim Cooper wrote: It seems to be necessary if you don't have MFC on your system based on no install of VC++, because Builder won't compile with the indicated references in the .def file. I still say that's not necessary. I can call all these things from a different language that cannot possibly be using MFC. All these calls are just calls to DLL exported routines. You can call them from any almost any programming language capable of writing software for Windows. Hi Jim. I've never written a conduit, or a DLL for that matter, so I don't have any direct assistance to provide to Del. But he seems to be stuck on the requirement to use a prescribed environment to get his conduit built. I always had the idea that a Palm conduit is, really, just a DLL, and that you simply need to build a windows DLL, in whatever environment, that includes the appropriate functions and headers to interpret/read/write the respective database formats, and respond to the correct system calls. What you've said suggests that my hunches are correct: Del could use any of a number of Win compilers (there are free ones out there), use the info contained within the COM information that he already has, and he's away to the races. No? Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Error in COM conduit
I am trying to adapt the COM conduit example dbsimple to read a record from a database and convert the first 10 bytes into a string in VB. I don't seem to be able to get this to work. Can anyone advise me with regard to the problem in the following? (This is no longer reading the memo database.) Thanks Private Sub btnSearch_Click() ' Handle errors On Error GoTo Handler ' Let the user know we're processing lblCount = Please wait. ' Declare the PDDatabaseQuery object Dim pDbQuery As New PDDatabaseQuery ' Declare the PDRecordAdapter object Dim pData As PDRecordAdapter ' Open the Memo database Set pData = pDbQuery.OpenRecordDatabase(gTransformer, PDDirect.PDRecordAdapter, eRead Or eWrite Or eShowSecret) ' Declare the record header and data Dim nIndex As Long Dim vUniqueId As Variant Dim nCategory As Long Dim eAttributes As ERecordAttributes Dim vData As Variant ' Declare the PDUtility object Dim pUtility As New PDUtility ' Declare the Memo string Dim TrName As String ' Declare the count of records containing the string Dim nCount As Long Dim nTest As Variant Dim Testit As Variant ' Read the first record pData.IterationIndex = 0 Testit = pData.ReadNext(nIndex, vUniqueId, nCategory, eAttributes) pUtility.ByteArrayToBSTR Testit, 0, 10, TrName ' Loop and search each Memo record for the string 'Do While Not pMemo.EOF '' Convert the Memo record to a string '' ByteArrayToBSTR returns the next offset '' We don't need it 'pUtility.ByteArrayToBSTR Testit, 0, 32767, TrName ' '' See if the search string is in the Memo record 'nTest = InStr(sMemo, txtSearch.Text) 'If VarType(nTest) vbNull And nTest 0 Then nCount = nCount + 1 ' '' Read the next record 'vData = pMemo.ReadNext(nIndex, vUniqueId, nCategory, eAttributes) 'Loop ' Prepare the result lblCount.Caption = TrName ' of Str(pMemo.RecordCount) _ ''records contained the string. ' Don't need the objects anymore Set pDbQuery = Nothing Set pData = Nothing Set pUtility = Nothing ' Normal exit Exit Sub Handler: MsgBox There was an error accessing the information. ' vbNewLine _ ' Err.Description vbNewLine _ ' Number = Hex(Err.Number) ' Don't need the objects anymore Set pDbQuery = Nothing Set pData = Nothing Set pUtility = Nothing End Sub -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Newbie Oracle - Palm Palm -- Oracle
Hi Im getting into a summer project: Im in 4 year of System engineering. I have experienced in C++ and Relational Databases(oracle). I need to develop an app for a cheap palm device. Basically the app should do the following: 1)Take info from a Desktop database(oracle). 2)Update the desktop database with new info. As I dont have any experienced programming for PALM I dont have any idea of how difficult this could be... Which are the basic things I must do for doing 1) and 2) ? -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Error in COM conduit
Scratch this request. Sorry. I had the database pointer name confused with the database name in my setup, and I hadn't configured the sync program to use the ComConduit.dll for the database I created. - Original Message - From: Del Ventruella [EMAIL PROTECTED] To: Palm Developer Forum palm-dev-forum@news.palmos.com Sent: Tuesday, December 06, 2005 11:04 AM Subject: Error in COM conduit I am trying to adapt the COM conduit example dbsimple to read a record from a database and convert the first 10 bytes into a string in VB. I don't seem to be able to get this to work. Can anyone advise me with regard to the problem in the following? (This is no longer reading the memo database.) Thanks Private Sub btnSearch_Click() ' Handle errors On Error GoTo Handler ' Let the user know we're processing lblCount = Please wait. ' Declare the PDDatabaseQuery object Dim pDbQuery As New PDDatabaseQuery ' Declare the PDRecordAdapter object Dim pData As PDRecordAdapter ' Open the Memo database Set pData = pDbQuery.OpenRecordDatabase(gTransformer, PDDirect.PDRecordAdapter, eRead Or eWrite Or eShowSecret) ' Declare the record header and data Dim nIndex As Long Dim vUniqueId As Variant Dim nCategory As Long Dim eAttributes As ERecordAttributes Dim vData As Variant ' Declare the PDUtility object Dim pUtility As New PDUtility ' Declare the Memo string Dim TrName As String ' Declare the count of records containing the string Dim nCount As Long Dim nTest As Variant Dim Testit As Variant ' Read the first record pData.IterationIndex = 0 Testit = pData.ReadNext(nIndex, vUniqueId, nCategory, eAttributes) pUtility.ByteArrayToBSTR Testit, 0, 10, TrName ' Loop and search each Memo record for the string 'Do While Not pMemo.EOF '' Convert the Memo record to a string '' ByteArrayToBSTR returns the next offset '' We don't need it 'pUtility.ByteArrayToBSTR Testit, 0, 32767, TrName ' '' See if the search string is in the Memo record 'nTest = InStr(sMemo, txtSearch.Text) 'If VarType(nTest) vbNull And nTest 0 Then nCount = nCount + 1 ' '' Read the next record 'vData = pMemo.ReadNext(nIndex, vUniqueId, nCategory, eAttributes) 'Loop ' Prepare the result lblCount.Caption = TrName ' of Str(pMemo.RecordCount) _ ''records contained the string. ' Don't need the objects anymore Set pDbQuery = Nothing Set pData = Nothing Set pUtility = Nothing ' Normal exit Exit Sub Handler: MsgBox There was an error accessing the information. ' vbNewLine _ ' Err.Description vbNewLine _ ' Number = Hex(Err.Number) ' Don't need the objects anymore Set pDbQuery = Nothing Set pData = Nothing Set pUtility = Nothing End Sub -- 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: Linker Error
I'm not exactly away to the races, but the COM dll just enabled me to access the name field of one of my records. If I can access integers and strings as easily, I may be able to complete the conduit. I think there is a point that isn't being considered here. I have never perceived myself or asserted to be a programmer who normally works with dll's at the level that some who address this forum are capable. As a result (and in part because some kind souls had tried to reassure me that conduits were, or should be, easy), I prefer to use straightforward mechanisms provided by PalmOS in an effort to achieve a goal at a level at which I can work. I posted the message that got this started because I had thought the code that someone was kind enough to send me was free from MFC references. Bob (Combee) indicated that one of the necessary dll's from PalmOS isn't, and a recent version of Borland's compiler wouldn't compile because of those references. A Borland programming group had suggested that I recompile the dll from source code for a C application rather than for C++, or get the source code and find a way around the MFC references, which seems comparable to writing this stub dll. (Would a future dll from PalmOS not potentially include MFC references that weren't in a stub dll meant to overcome MFC references in an older version of the dll?) All useful suggestions that I'm sure a more advanced programmer might have been able to apply, if they were willing to deal with creating certain complications to the development of their software and, potentially, multiple versions of a public dll, of which PalmOS would probably not approve. In the interest of keeping things simple for me while I learn how to develop a conduit, seeking out and installing other compilers based upon specific criteria, or developing a sufficient background in dll's to be able to write dll stub files, or acquiring PalmOS dll source code and compiling it for C rather than C++, are possible with time, but I'd rather find a straightforward route that is more in keeping with readily accessible and published help files and languages that PalmOS might consider supporting. Examples are very important to someone who is a beginner, like me. That put me on the COM track, and happily, VB5 is letting me access the records during a sync. It is fortunate that I did acquire this compiler years ago, as it has saved me from a level of C++ complexity that would probably have added days to my efforts. Of course, if my thinking is correct, I now have to take a byte array and, using the structure from my Palm application in CodeWarrior, convert each field in the record into a string or an int based upon the number of bytes it represents. This may well explain the reference to a COM quagmire in a prior response. Rest assured that I am always grateful for the helpful suggestions that I get here. I am quite new to C or C++ for more than engineering computations and matrix manipulation, and am simply trying to approach PalmOS programming from a perspective that is realistic for me. My sincerest thanks for all the helpful comments. - Original Message - From: Robert Moynihan [EMAIL PROTECTED] To: Palm Developer Forum palm-dev-forum@news.palmos.com Sent: Tuesday, December 06, 2005 11:15 AM Subject: Re: Linker Error Jim Cooper wrote: It seems to be necessary if you don't have MFC on your system based on no install of VC++, because Builder won't compile with the indicated references in the .def file. I still say that's not necessary. I can call all these things from a different language that cannot possibly be using MFC. All these calls are just calls to DLL exported routines. You can call them from any almost any programming language capable of writing software for Windows. Hi Jim. I've never written a conduit, or a DLL for that matter, so I don't have any direct assistance to provide to Del. But he seems to be stuck on the requirement to use a prescribed environment to get his conduit built. I always had the idea that a Palm conduit is, really, just a DLL, and that you simply need to build a windows DLL, in whatever environment, that includes the appropriate functions and headers to interpret/read/write the respective database formats, and respond to the correct system calls. What you've said suggests that my hunches are correct: Del could use any of a number of Win compilers (there are free ones out there), use the info contained within the COM information that he already has, and he's away to the races. No? Bob -- 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: Re: Linker Error
Let's see: Hi, thanks for writing to me, I will answer you (with?) greater brevity!!! (No guarantee that my high school Spanish is adequate...) Note: I posted a message to a forum that sends copies to all members. - Original Message - From: [EMAIL PROTECTED] To: Palm Developer Forum palm-dev-forum@news.palmos.com Sent: Tuesday, December 06, 2005 10:51 AM Subject: Re: Re: Linker Error Hola, gracias por escribirme, te contestaré a la mayor brevedad !!! Jose -- 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: Linker Error
Del Ventruella wrote: Rest assured that I am always grateful for the helpful suggestions that I get here. I am quite new to C or C++ for more than engineering computations and matrix manipulation, and am simply trying to approach PalmOS programming from a perspective that is realistic for me. Hi Del. I hope you didn't think that I was critisizing you in my note. I was just thinking that what you needed most was someone to reassure you that you DID have the tools necessary to get the job done. Often when someone tries something for the first time they encounter some road-blocks and it doesn't work out. Knowing that the tools are appropriate will prompt them to try harder, clean up some code, try to make sense of the previously-foreign concepts. If they KNOW that the tools will work, then it is often just a matter of persistence until the get a working solution. BUT, there is sometimes the question Is it even POSSIBLE with the tools that I'm using? What if the tools that I'm using will NEVER produce a workable solution, because they are fundamentally wrong. Given that last worry, it is very instructive for someone to lean over your shoulder and say Don't worry, you are on the right track, you'll get there. I would have liked to think that there was a hello world type sample conduit included with the COM documentation, which could be readily compiled without requiring specific build environments. That's the way that I learn start with a very basic functioning example, then build it up to do what I want. Like I said before, I haven't looked into conduits myself, so I can't offer much help. But I'm interested in the subject, so I'm following your progress. Bob -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
More Database questions?
Hello all again, I was looking at some articles about the database manager and it seems that you can give your record categories? But it was very vague about how you go about doing this? Can you sort on Categories? What function do you use to set them? Do if I set these during my application run will effect the current ones? Can I save them? Sorry for so many questions? -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
function FileOpen()
Does anyone know if the function FileOpen() is restricted to 7 ASCII characters ? thanks Drew -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Need help in getting started... just need some pointers
I am an engineering student, and I am trying to develop an application for palm pilots to make diabetics lifes a little easier... this is a free program I am going to write on a low budget. I have experience writing programs in C++, Visual Basic, Python, and I can build extensive Microsoft Access applications. I have no clue where to start on writing code for Palm OS, or what I can use... what would you recommend for me to do to start... Is my assumption correct in that I have to get a development tool that I can run on my desktop computer, and then I use some sort of a program to transfer the program I have written to the pda's. Please help me with this, it is for a good cause, and I'm really struggling in understanding what is possible, and where I actually develop the programs... is there freeware that is decent for developing programs the program will have to have some sort of GUI. Thanks a lot in advance for your responses... Jamie -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: More Database questions?
Tom wrote: I was looking at some articles about the database manager and it seems that you can give your record categories? But it was very vague about how you go about doing this? You can give each record one category. The categories are stored as part of the record's attribute byte. This byte also stores stuff like whether the record is deleted, busy, or secret. You can get the byte with DmRecordInfo(). To set the category, you must change only the bits that correspond to the category. The constant dmRectAttrCategoryMask indicates which bits those are. Once you have adjusted the value of the byte without changing non-category bits, you can update the record with DmSetRecordInfo(). I found this to be a hassle, so I wrote convenience functions to set and get the category of a record given its index and database handle. Can you sort on Categories? Sure. If you call DmQuickSort() (or DmInsertionSort() or DmFindSortPosition()), you need to pass a callback function of type DmComparF. This function is used to compare any two records and put them in the proper order. And, in addition to pointers to the records, the function you supply gets two SortRecordInfoPtr arguments. These contain the category information. So, if you want to sort based on category, you just need to take that information into account when comparing records in your comparison function. Do if I set these during my application run will effect the current ones? Can I save them? I don't understand either of those questions. :-) - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: function FileOpen()
Drew Haninger wrote: Does anyone know if the function FileOpen() is restricted to 7 ASCII characters ? It would appear so. As far as I know, a File Stream's name is just the name of the database that stores the file stream. That would mean whatever rules apply for one apply for the other. And the Data and Resource Manager documentation says, under the definition of the dmDBNameLength constant (a strange place to put this information, incidentally) that Database names must use only 7-bit ASCII characters (0x20 through 0x7E). I'm kinda surprised to see that, though. I'm not sure if people really follow that rule strictly. I would expect support for people who use languages that have accented letters (like French or Spanish) to want to put and to try to put accented characters in database names. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Need help in getting started... just need some pointers
[EMAIL PROTECTED] wrote: I am an engineering student, and I am trying to develop an application for palm pilots to make diabetics lifes a little easier... this is a free program I am going to write on a low budget. I have experience writing programs in C++, Visual Basic, Python, and I can build extensive Microsoft Access applications. I have no clue where to start on writing code for Palm OS, or what I can use... what would you recommend for me to do to start... Is my assumption correct in that I have to get a development tool that I can run on my desktop computer, and then I use some sort of a program to transfer the program I have written to the pda's. Yes, that is mostly correct. Most people write the code on a desktop computer and then use a cross-compiler to generate code for the Palm. If you then want to test it on a real Palm device, you just Hotsync it like you would any other software (that you downloaded or bought or whatever). Another alternative for transferring it to the device is to put it on an SD Card using an SD Card reader on the desktop computer, then put that SD Card in the Palm's slot and launch it from the SD Card. But that's usually more work. Another approach is to test on a simulator or emulator. Palm (the hardware company) and PalmSource (the software company) both provide simulators for current systems and I think still provide emulators for older systems. (The emulators are out of date, but they have some advantages, so some people use them.) The simulators run on Windows and they are essentially of a device's operating system and features to a Windows environment. Each new device that Palm introduces has its own simulator which mimics the features on that particular device (like screen size for example). There are a couple of advantages to testing with the simulator. One is speed, since it's very quick to transfer the app you just built onto the simulator and doesn't require a Hotsync. Another is that some of the simulator builds have extra checks in them to catch errors -- stuff like creating a button with an invalid geometry or trying to close a window that isn't open. If I were you, since you are on a budget and since you seem to be using Windows (although did not say), I would go for the PODS development environment available from PalmSource. It's relatively new, and it's not perfect, but it should be good enough for what you're doing. To get it and the other tools you'll need, you should register as a developer at both palm.com and palmsource.com. That will give you access to generic tools for the platform and tools for specific devices. The most useful documentation is the Palm OS Programmer's Companion and the Palm OS Programmer's API Reference. Both are available at http://www.palmos.com/dev/support/docs/68k_books.html . You will, by the way, want to ignore everything having to do with Protein. That's a version of the operating system that isn't released on any devices yet, so you want to write a 68k app (i.e. you want to target Garnet) since you want your software to be useful on real devices. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: More Database questions?
You can give each record one category. The categories are stored as part of the record's attribute byte. This byte also stores stuff like whether the record is deleted, busy, or secret. You can get the byte with DmRecordInfo(). To set the category, you must change only the bits that correspond to the category. The constant dmRectAttrCategoryMask indicates which bits those are. Once you have adjusted the value of the byte without changing non-category bits, you can update the record with DmSetRecordInfo(). I found this to be a hassle, so I wrote convenience functions to set and get the category of a record given its index and database handle. But how do I set the actual names? This is the part that I get confused on? So then if I have a element that I want to be in multible categories or sorted this way, I can't do? Sure. If you call DmQuickSort() (or DmInsertionSort() or DmFindSortPosition()), you need to pass a callback function of type DmComparF. This function is used to compare any two records and put them in the proper order. And, in addition to pointers to the records, the function you supply gets two SortRecordInfoPtr arguments. These contain the category information. So, if you want to sort based on category, you just need to take that information into account when comparing records in your comparison function. Well seeing that record can only be in one category doesn't this limit my sort? How about if I want to sort on Name and Type? Or something like that? How would I do this? Would I have to make a custom routine? Do if I set these during my application run will effect the current ones? Can I save them? I don't understand either of those questions. :-) Sorry I ment, If I set these categories will they overwrite the current ones? Meaning the default Palm ones? Not sure if they are used by other apps? And can I save them if they are used by other apps so that I can restore them once my app is finished? (sorry was rushing) -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: More Database questions?
Tom wrote: But how do I set the actual names? This is the part that I get confused on? I thought you meant you want to set the category for a record. How you give names to the categories depends on how you want to show them in your application. After all, the category information is just an integer, so you can associate any names with those integers in any way you like. But, the normal way to do it is to put the names in the database's AppInfo block. You can use CategoryInitialize() to set this up and then CategorySelect() to allow users to manage names of categories and select a category for an individual record. So then if I have a element that I want to be in multible categories or sorted this way, I can't do? If you want a database record to be in multiple categories, then you will have to define your own category mechanism, because the system's mechanism does not support that. Sure. If you call DmQuickSort() (or DmInsertionSort() or DmFindSortPosition()), you need to pass a callback function of type DmComparF. Well seeing that record can only be in one category doesn't this limit my sort? How about if I want to sort on Name and Type? Or something like that? If you want to sort on Name and Type, you will need to define a layout for the records that stores that information within the sequence of bytes. Then the comparison function you write will need to decode that information and determine the proper ordering for the two records based on Name and Type and whatever else. Sorry I ment, If I set these categories will they overwrite the current ones? Meaning the default Palm ones? Not sure if they are used by other apps? And can I save them if they are used by other apps so that I can restore them once my app is finished? Each database has its own set of categories. When you create a database, you don't even have to define categories for it if you don't use the categories. As I mentioned, the category names are stored in a database's AppInfo block. So whatever categories you define will be totally separate from any the system defines for its databases. Also, the default set of categories that you create when you create the category names will be determined by a resource you put in your application, so even your default set of category names is separate from what the system uses. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: function FileOpen()
so what happened to the 31 character length file names that MyDmFindDatabase() will use ? - Original Message - From: Logan Shaw [EMAIL PROTECTED] To: Palm Developer Forum palm-dev-forum@news.palmos.com Sent: Tuesday, December 06, 2005 11:08 AM Subject: Re: function FileOpen() Drew Haninger wrote: Does anyone know if the function FileOpen() is restricted to 7 ASCII characters ? It would appear so. As far as I know, a File Stream's name is just the name of the database that stores the file stream. That would mean whatever rules apply for one apply for the other. And the Data and Resource Manager documentation says, under the definition of the dmDBNameLength constant (a strange place to put this information, incidentally) that Database names must use only 7-bit ASCII characters (0x20 through 0x7E). I'm kinda surprised to see that, though. I'm not sure if people really follow that rule strictly. I would expect support for people who use languages that have accented letters (like French or Spanish) to want to put and to try to put accented characters in database names. - Logan -- 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: More Database questions?
I thought you meant you want to set the category for a record. How you give names to the categories depends on how you want to show them in your application. After all, the category information is just an integer, so you can associate any names with those integers in any way you like. But, the normal way to do it is to put the names in the database's AppInfo block. You can use CategoryInitialize() to set this up and then CategorySelect() to allow users to manage names of categories and select a category for an individual record. Thanks thats what I was looking for :-) I never understood how to add the names to the categories. If you want a database record to be in multiple categories, then you will have to define your own category mechanism, because the system's mechanism does not support that. So then basically I can't use the sort routines that Palm has built? I was just making sure because I couldn't find any function that would do this? So then I would have to do a manual search through all my records to accomplish this? Wouldn't this be slow on the Palm? If you want to sort on Name and Type, you will need to define a layout for the records that stores that information within the sequence of bytes. Then the comparison function you write will need to decode that information and determine the proper ordering for the two records based on Name and Type and whatever else. Ah gotcha! Each database has its own set of categories. When you create a database, you don't even have to define categories for it if you don't use the categories. As I mentioned, the category names are stored in a database's AppInfo block. So whatever categories you define will be totally separate from any the system defines for its databases. Also, the default set of categories that you create when you create the category names will be determined by a resource you put in your application, so even your default set of category names is separate from what the system uses. Ah nice, I should be ok with this now? Also any experience with doing a sync with this on a Linux box? Or in general? Any pointers? Thanks again for all the help!!! -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
RE: function FileOpen()
Does anyone know if the function FileOpen() is restricted to 7 ASCII characters ? U r right!!! a filename has a max length of 32 chars including the end of string char \0, in other word only names with 31 chars and each char restricted to 7 bits ASCII char another restricction using files in palm is they must not be larger than 64kb and each recor in a file or database must not be larger than 4kb if u have more questions about FileOpen, FileRead, FileWrite, etc I can help u God Save The Queen (Freddie Mercury, Brian May, Roger Taylor And Jhon Deacon) Dorian Medina -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: function FileOpen(),,,fileErrInvalidDescriptor
yes, why would FileOpen() return an error: fileErrInvalidDescriptor (fileErrorClass|11) Invalid file descriptor (FileHandle) thanks much Drew - Original Message - From: Dorian Medina Alvarez [EMAIL PROTECTED] To: palm-dev-forum@news.palmos.com Cc: [EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 1:48 PM Subject: RE: function FileOpen() Does anyone know if the function FileOpen() is restricted to 7 ASCII characters ? U r right!!! a filename has a max length of 32 chars including the end of string char \0, in other word only names with 31 chars and each char restricted to 7 bits ASCII char another restricction using files in palm is they must not be larger than 64kb and each recor in a file or database must not be larger than 4kb if u have more questions about FileOpen, FileRead, FileWrite, etc I can help u God Save The Queen (Freddie Mercury, Brian May, Roger Taylor And Jhon Deacon) Dorian Medina -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Aging screen selectively lighter gray?
Aaron Ardiri wrote: On 12/5/05, Luc Le Blanc [EMAIL PROTECTED] wrote: A user abroad tells me that on his OS 4.1 IIIxe, my application displays its forms in a lighter shade of gray than others. He also notices that with FileZ and a few apps, but says some other third party apps like GPilotS appear as dark as the built-in ones. How can this be? Selective screen fatigue??? Probably due to color - grayscale conversion. The IIIxe has 4 bit 'color', i.e. 16 shades of gray. Only if the form used black it would show up as dark as the built-in ones. All my forms are black only. The only time I use colors or grayscale (machine dependent and self adapting) is for displaying the cave map. The user says everything is lighter, even if he does not go to the map. but, are you running your application in 1bpp or 4bpp? that could be the difference between your app and the built in ones. what you could do is download a utility like toggle which sets the bit depth to non 1bpp and keeps it that way. http://www.ardiri.com/palm/toggle/ it would probably be the only thing that can explain it :) -- // Aaron Ardiri Actually, Toggle does not really keep it that way because it only sets the default bit depth. My app queries the OS for available bit depths and selects the best one. But my user tells me that by setting the display to 1bpp with Toggle, other apps suddenly turn darker, which illustrates the problem. Now, what must I do if I want to draw using gray shades in a form that also contains standard controls? I currently set the bith depth upon starting the app, assuming that by setting the bit depth to 4bpp, the interface color would remain black and not turn to a lighter gray - is this a wrong assumption? Am I supposed to explicitely set the fore/text colors to black right after I change the bit depth? On color devices like my T3, setting the bit depth seems to automatically select the right theme colors, without any other programatic intervention -- Luc Le Blanc -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Aging screen selectively lighter gray?
Actually, Toggle does not really keep it that way because it only sets the default bit depth. My app queries the OS for available bit depths and selects the best one. But my user tells me that by setting the display to 1bpp with Toggle, other apps suddenly turn darker, which illustrates the problem. Now, what must I do if I want to draw using gray shades in a form that also contains standard controls? I currently set the bith depth upon starting the app, assuming that by setting the bit depth to 4bpp, the interface color would remain black and not turn to a lighter gray - is this a wrong assumption? Am I supposed to explicitely set the fore/text colors to black right after I change the bit depth? On color devices like my T3, setting the bit depth seems to automatically select the right theme colors, without any other programatic intervention I think you're seeing a quirk in the Dragonball LCD controller used on the IIIxe. Since the LCD panel only has on and off states, it does gray by flickering the grey cells so they never turn completely on. It looks like when its in this four-level mode, it also doesn't get the black cells as fully turned on as in 1-bit mode. There's probably nothing, other than register programming of the DB LCD controller, that you could do to affect this. -- 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/