Bug 770 - Maemo 2.0 Porting code examples do not work
: Maemo 2.0 Porting code examples do not work
Status: RESOLVED FIXED
Product: Developer Guide
maemo.org wiki
: 2.0
: All All
: High normal with 1 vote (vote)
: ---
Assigned To: Dave Neary
: Maemo QA (deprecated)
: http://maemo.org/development/document...
:
:
:
  Show dependency tree
 
Reported: 2006-09-20 10:56 UTC by Jari Tenhunen
Modified: 2010-05-17 16:26 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Jari Tenhunen (reporter) 2006-09-20 10:56:04 UTC
There are apparently some typos and small errors in the code examples in Maemo
2.0 Porting howto. It seems that no-one bothered to check if they even compile :(

For example, under "Hibernation":

> static void program_is_topmost_notify (GObject *self,
>     GparamSpec *property_param, gpointer null)
> {
>     HildonProgram *program = HILDON_PROGRAM (self);
>     if (hildon_program_get_is_topmost (program))
>     {
>         hildon_program_set_can_hibernate (program, FALSE);
>     }
>     else
>     {
>         save_state();
>         hildon_program_set_can_hibernate (program, TRUE);
>     }
> }
> g_signal_connect (G_OBJECT (program), "notify::is-topmost",
>                   G_CALLBACK (topmost-status-notify), NULL); 

"GparamSpec" should be "GParamSpec" and the callback to connect should be
"program_is_topmost_notify" instead of "topmost-status-notify". There might be
more cases like this.

I suspect many people do copy-paste these snippets and it's irritating when the
provided examples have errors in them.
Comment 1 Jake Kunnari 2007-01-03 14:14:43 UTC
reaasigned to JP
Comment 2 Jake Kunnari 2007-04-10 15:30:21 UTC
Re-assigned to Mika.
Comment 3 Mika Luostarinen nokia 2007-04-27 15:58:21 UTC
Reassigning back to JP. This belongs to 2.0.
Comment 4 Quim Gil nokia 2007-10-12 07:30:42 UTC
JP went through cleaning of 2.x docs. JP, is this issue solved now?
Comment 5 Dave Neary maemo.org 2008-05-09 21:25:52 UTC
I cannot find the code sample quoted above in any of the 2.x docs, so I'm
closing this on the assumption that the docs have been cleaned.

I don't (yet) have a development environment to test the compilation of code
segments. If any are not compilable, please re-open, and I will get testing.
Comment 6 Andre Klapper maemo.org 2008-10-30 19:06:45 UTC
Moving Documentation component from maemo.org to Development Platform since the
bugs there refer to official developer documentation and this falls out of the
responsibility of the community.
Sorry for the noise, you can filter your bugmail by searching for this comment.
Comment 7 Andre Klapper maemo.org 2010-05-17 16:26:13 UTC
[Rearrangement of Documentation bug reports.]
Mass-moving old closed Developer Platform > Documentation tickets.
You can filter bugmail by searching for this comment.