10月 2008

[ZT]S60 3rd FP1 SDK编译的SDK自带的例子在N73上无法正确显示程序图标

基本原因是Nokia的mifconf变了。

方法1:
找到S60 3rd MR SDK中的mifconv.exe, 用其替换3rd FP1以及之后的SDK的mifconv.exe应该可以解决图
标消失问题。
3rd FP1以及之后的SDK的mifconv.exe生成的mif文件尺寸明显小于早期版本生成的mif文件,也许Nokia修改了mif的压缩算法导致图标不能兼容。

自己琢磨出方法1后,在网络上找到了另外一种方法。
方法2:
Issue with SVG icon display on 3rd edition
From Forum Nokia Wiki

SVG(scalable vector graphics) icons sometimes do not show up on S60
3rd edition devices when built with S60 3rd edition SDK.

This problem is because of the fact that mifconv.exe compresses the
icons which the devices are unable to read.

To fix this issue,disable the SVG compression option by specifying
‘/X’ option in mifconv.exe.
Retrieved from “http://wiki.forum.nokia.com/index.php/Issue_with_SVG_icon_display_on_3rd_edition”

[ZT]怎样写参数个数可变的宏?

一种流行的技巧是用一个单独的用括弧括起来的的 “参数” 定义和调用宏, 参数在宏扩展的时候成为类似 printf() 那样的函数的整个参数列表。

#define DEBUG(args) (printf("DEBUG: "), printf args)
if(n != 0) DEBUG(("n is %d\n", n));

明显的缺陷是调用者必须记住使用一对额外的括弧。

gcc 有一个扩展可以让函数式的宏接受可变个数的参数。 但这不是标准。另一种可能的解决方案是根据参数个数使用多个宏 (DEBUG1, DEBUG2, 等等), 或者用逗号玩个这样的花招:

#define DEBUG(args) (printf("DEBUG: "), printf(args))
#define _ ,
DEBUG("i = %d" _ i);

C99 引入了对参数个数可变的函数式宏的正式支持。在宏 “原型” 的末尾加上符号 … (就像在参数可变的函数定义中), 宏定义中的伪宏 __VA_ARGS__ 就会在调用是替换成可变参数。

最后, 你总是可以使用真实的函数, 接受明确定义的可变参数。参见问题 15.415.5。如果你需要替换宏, 使用一个函数和一个非函数式宏, 如 #define printf myprintf。

参考资料: [C9X, Sec. 6.8.3, Sec. 6.8.3.1]。

RGA app in symbian tasks list

As far as I checked RGA example applications don’t appear in Symbian tasks list.
Am I missing something or it’s not supported?
Does anyone know how to fix it?

Well, N-Gage applications don’t show in the task list. Generally I think only S60 GUI applications show up there.

To hide an app:
CApaWindowGroupName has a SetHidden() method which you call with ETrue.

To make one visible you could try SetHidden(EFalse)…

I am wondering if the system considers an RGA application as a non-gui app, or whether they’re just deliberately hidden for N-Gage.

Sorcery