PilRC Designer

Looks better than the Constructor in CW8, but here is what happened to me:
After CW found some compilation bug, .rsc file was suddenly empty! (More
precisely, it contained 1 line "/* pilrc generated file.  Do not edit!*/".)
So I did some manipulations, the .rsc file changed from time to time and
after some 10 minutes it was restored. (I have no idea, what sequence of
actions triggered it.)
I rebuilt CW project: again some error and .rcp was again empty. (I must be
stupid that I did not backup it.) Coming back into PilRC designer, it
crashed. Error report (Access violation...) was in loop, so I had to use
task manager.
(Just as a side remark: Crashes happen too often, sometimes without saying a
word. I don't quite understand the reason. Bugs happen, but catching (at
least most of) them should be relatively easy excercise.)
There is an update to PilRC Designer that we will be posting soon that fixes a lot of problems that have been reported. This isn't a tool that we developed here at Metrowerks, and we didn't see many of these issues before releasing V9. We've been working with the developer, and there are a lot of fixes that we will be releasing very soon.

While talking about the resources ... I would need some hint how to convert
the old (CW8) build process into the new (CW9) process. (For an existing
project.) I spent quite a few hours walking through the documentation, so I
have some insight, but apparently not enough, because my trials finished
with app crashes. I suspect that the problem is in the resources. The
documentation seems to advice to continue old projects in the old way and
vice versa for new projects. But I would like to go for armlets.
You can use ARMlets with the old linker. You just need to add an extra step to your build process to pull in the ARMlet bin file as a resource. This involves adding a Rez file to your targets that build the 68K application, importing the bin file in as the appropriate resource. The .r file would be as simple as

read 'ARMC' (1) "ARMC0001.bin";

The old linker can't directly deal with .bin files, but it can still import them using this method.

-----------------------
Boolean, NULL
Under CW8 these things were known to the compiler a'priori, not so now.
I don't see how this is possible. Let me explain how these symbols get introduced into the compilation environment.

In a typical Palm OS program, the symbols for NULL and Boolean are introduced by a Palm OS header files, specifically PalmTypes.h. If you use one of the precompiled header files provided with CW9, you'll get these symbols defined appropriately.

NULL is also a standard C type, defined in stddef.h. In C++, this header is cstddef. Including the Palm OS headers doesn't usually include any standard library headers, but there is one problem, an overlap between the C++ standard library's list.h and the Palm OS header List.h. The MSL header list.h is a header that includes the STL header list, then imports its symbols into namespace std.

It is possible for an target to not handle includes properly. The easiest way is for it to have in its system access path list the path

{Compiler}CW for Palm OS Support

preceding the path

{Compiler}Palm OS Support

It is important to have both of these, but the one for Palm OS Support should appear first, to avoid this situation.

Have you figured out why these build symbols aren't in your particular targets?

-----------------------

Next thing, which I find strange, is the described bellow. (It is "C" code
and maybe the compiler is right, but I rather report it, because I am not
sure.)

For struct member definition:
struct {
    ...
    Boolean (*Read)( void *vm, void *buffer, long offset, long byte_count);
} ;

and function
    static Boolean fRead( VMObject *vm, void *buffer, long offset, long
byte_count) {}

and line
     struct.Read  = fRead ;

compiler announces error illegal implicit conversion. That's 100% OK and I
am happy.

But if the things change
    struct { long (*Tell)(); }
    long fTell( void *THIS ) { return 0;  }
    struct.Tell = fTell ;
Then the compiler is happy!  Whereby (unlike the first case) this is a
really serious programming bug.
This is because of the C programming language. Declaring a function pointer with the parameter list "()" doesn't mean that it has no parameters, but instead says that the parameters are not specified. If you were building in C++, saying "()" is equivalent to saying "(void)", but this doesn't hold for C, where old K&R style function declarations are still allowed. Remember that C syntax allows you to write

int foo()
int x;
int y;
{
return x + y;
}

Because of this, a pointer to a K&R function can point to any function that has the same return type, regardless of parameters.

Help system is to large extent incomplete, code completion appeared maybe 2
times within the week I work with CW9. I know, it's not yet ready, but from
what I could see I am not sure if it goes in the right direction.
What would be the right direction? I can talk plenty about what it attempts to do, and I've already done this on my palmoswerks.com site.

Mouse bug
(Initial state: Help window closed) 2click a word, press F1 -> mouse cursor
lost (within CW).
Grrr... this is a bug that we had with IDE 4.2.5, and I thought the IDE team had managed to fix it for this one. I'm disappointed that this has reappeared.

Armlet interface in C seems to be unsupported.
You can program ARMlets in C without problem. We just provided a nice wrapper class using C++ because the C++ language gives a useful syntax with member function calls that lets us hide the mechanism of calling through the 68K function pointer. You do not have to use PACEInterface.h/PACEInterface.cpp -- they are there as a convenience.

I created new Armlet stationary (starter.prc), renamed Application target to
debug and added new target (release). IDE never allows release run (CTRL-F5)
even if I set all settings identically to the debug target.
Did you duplicate the ARMlet target instead of the Application target? The ARMlet target cannot be run directly, since there is no debugger support for ARM code, and it needs a 68K wrapper.

This is the final state:
Debug target: Both CTRL-F5 and F5 allowed.
Release target: only F5 allowed. CTRL-F5 disallowed (both menu command and
icon button grayed). However, F7 works and the produced prc file is OK (i.e.
can be launched manually).


--------------

I make use of the occasion and add a few suggestions, which would (in my
opinion) improve CW environment.

Find text
CTRL-F should work the same way as in MS VC++; it is more productive: To
search for particular word 3 actions are needed (click, CTRL, F), whereas
current CW needs 8 actions (click, click, CTRL, INS, CTRL, F, SHIFT, INS).
It is one of the most frequent actions and I find it very annoying.
Ctrl-E will take the highlighted text and copy it directly to the find buffer. So, to find a word, I click twice on it, hit Ctrl-E, then hit F3.

Help system could react to:
1. the text selected (if any)
2. the word under cursor (otherwise)
This would again save some extra actions on the programmer's side.
It should already be doing this.

Another useful command from MS VC++ would be CTRL-]. (Searching for counter
bracket)
Control-B will highlight the entire region that is inside the current brace, and then a left or right arrow will move the cursor to the appropriate bracket. You can also control-double click on a bracket to do the same thing.

CTRL+arrow
I would prefer to keep the cursor all the time on the screen. (Same way as
MS VC++.) Current implementation (cursor gets off screen) requires an extra
click (that I usually forget and have to repeat the whole scrolling again
... frustrating).
We don't have a key mapping that acts that way right now. However, the editor has a lot of great features. Here are three of my favorites:

Ctrl-D: open a file, either the current selection or one you type yourself
Ctrl-~ (tilde): toggle between source and header file
Ctrl-' (tick): go to definition of symbol

You can find a lot more by reading the quick reference card or just looking at the commands in the "Commands and Key Bindings" dialog.

Version
Where can be found the CW version (except searching the disk files)? Version
report in About Dialog contains all but the most important item.
I kept CW8 installed and it is a bit difficult to keep track of which
version is running.
Help/About CodeWarrior/Installed Products button. Since one IDE installation can have multiple products installed into it, this dialog shows you all the products that are there, along with the version information for all the plugins. The product version is at the top of the "Installed Products" dialog.

--
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/

Reply via email to