Hello folks,
A bit of warning, if any of you is tempted to use the incremental updates
feature of PODS 1.2 (Help/Software Updates/Find and Install) to update to the
newer versions of PODS/Eclipse that are available - DON'T!!!
Somebody else already warned that if you let the update installation process
restart Eclipse, the thing will get screwed up, so you'll have to re-install
everything. But even manual restarting isn't going to save you. :-(
You see, the new Resource Editor that comes with this update is total crap and
simply doesn't work! I already posted about this in the tools forum, but the
response was less than overwhelming, so I thought of warning the people here
too.
Basically, the .h file generation of the new Resource Editor (version 6.3.0.1)
simply doesn't work! And by that I don't mean that it doesn't generate an .h
file. No, worse, it generates an .h file that is *WRONG* and will prevent your
project from compiling! So, you'll be stuck in your development, as was I,
until I found an old copy of the Resource Editor. :-((
To illustrate the problem, let's take a minuscule resource project - an .XRD
file, containing just a single confirmation alert:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PALMOS_RESOURCE_FILE>
<FILE_PREFERENCES>
<PREFS_GENERATE_HEADER> TRUE </PREFS_GENERATE_HEADER>
<PREFS_CONSTRUCTOR_NAMES> FALSE </PREFS_CONSTRUCTOR_NAMES>
<PREFS_HEADER_FILE> "" </PREFS_HEADER_FILE>
<VARIABLE_TEMPLATE> "" </VARIABLE_TEMPLATE>
</FILE_PREFERENCES>
<ALERT_RESOURCE RESOURCE_ID="1000" COMMENT="Screw Up?">
<ALERT_TYPE> CONFIRMATION_ALERT </ALERT_TYPE>
<HELP_ID> 0 </HELP_ID>
<DEFAULT_BUTTON> 0 </DEFAULT_BUTTON>
<TITLE> "Screw Up?" </TITLE>
<MESSAGE> "Screw Up?" </MESSAGE>
<BUTTONS>
<TEXT> "Yes" </TEXT>
<TEXT> "No" </TEXT>
</BUTTONS>
</ALERT_RESOURCE>
</PALMOS_RESOURCE_FILE>
Save this in a file (e.g., Test.xrd), open the file with the Resource Editor
(version 6.3.0.1) and save it from there, in order to force the generation of
the Test.h file. The file Test.h will look like this:
// Header generated by Palm OS Resource Editor.exe 6.3.0.1
//
// Generated at 14/06/2005 09:59:32
//
// THIS IS AN AUTOMATICALLY GENERATED HEADER FILE
// DO NOT EDIT - CHANGES MADE TO THIS FILE WILL BE LOST
//
// ALERT_RESOURCE (1000) Screw Up?
#define kScrewUpAlert 1000
#define kScrewUpAlertYesButton 1000
#define kScrewUpAlertNoButton 1000
Notice how both buttons have the same ID? Good luck trying to distinguish
between them programmatically! And it doesn't happen just with confirmation
alerts - it happens all over the place; the editor generates one and the same
ID number for different objects of the same type on the forms. :-(((
BTW, if you check the "Create Constructor Names" checkbox of the project, the
generated .h file will be OK and there will be different IDs for the different
objects. Unfortunately, then the *names* of the objects will be
CodeWarrior/Constructor-style, meaning that they will have nothing to do with
the names you'd be using in your program, if it was developed with an earlier
version of PODS. (For instance, you'll get "ScrewUpYes" instead of
"kScrewUpAlertYesButton".) This option ("Create Constructor Names") is new for
this version of the Resource Editor - I guess something got screwed up when
implementing it.
I really don't understand how PalmSource could have released a program with
such a blatantly obvious bug - apparently, nobody there has ever used the thing
to produce a header file in default mode for even a single simple project,
before releasing it! :-( Even Microsoft's testing procedure is of higher
quality...
If you decide to update PODS anyway - make sure you make a backup of your old
Resource Editor first.
Regards,
Vesselin
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/