Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - I'm going outside to sit in the snow for a while!

I'm going outside to sit in the snow for a while!

Discuss PocketC for Palm OS (including Desktop Edition)

Postby Mikael on Mon Jan 26, 2004 8:20 pm

Can somebody please explain why the following snippet works:

SetBuffers(){
SetDepth(8);
graph_on();
hookhard(1);
//Setup buffers
OpenBmpDb("TestBmps");
SetDrawBuf(1);
SetDrawBuf(2);
ClearBuf();
FastBmp(0,0,3000);//background
SetDrawBuf(0);//get ready to copy
ClearBuf();
CopyBuf(0,2);//copy background to buf 0
SetDrawBuf(1); //get ready to draw
ClearBuf();
CopyBuf(1,2);
TransBmp(x,y,36,37);//object in ready position
CopyBuf(0,1);
leftOn=true;
atStart=true;
Draw();//move object according to user input
}

along with this one:

SetBuffers(){
int Load;
SetDepth(8);
OpenBmpDb("TestBmps");
Load=Fctl(LOAD,4000);//form
Fctl(DRAW,4000);
alert(Load);
//Setup buffers
hookhard(1);
//blah blah

but not this one:

SetBuffers(){
SetDepth(8);
OpenBmpDb("TestBmps");
Fctl(LOAD,4000);//form
Fctl(DRAW,4000);
//Setup buffers
hookhard(1);
//blah blah

When I say they work I mean the bitmap called in TransBmp is pasted - whereas in the last example, it appears for a split second before disappearing. I'm basically trying to substitute my own form for the graphics form but can't work out why the third example is a dead duck.


I'm going outside to sit in the snow for a while - it might clear my head!

thanks in advance,

Mikael :(
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Tue Jan 27, 2004 12:19 am

Under the hood Fctl LOAD and Form() both call graph_on() first if a user hasn't done so aleady (the forms clean up right is this doesn't occur). This automatic calling of graph_on() happens once per "run" though, and only if the user hasn't done so already.

If there is a bug in the Fctl LOAD command which is causing graph_on() to not be called, you might see the effect you are observing. Try putting a graph_on() call before your Fctl(LOAD,4000) line and see what happens.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Mikael on Tue Jan 27, 2004 2:53 am

Sorry Joe,

graph_on() had no effect, though the following did:

SetBuffers(){
int Load, Load2;
SetDepth(8);
OpenBmpDb("TestBmps");
Load=Fctl(LOAD,4000);
Load2=Fctl(DRAW,4000);
Load=Load2;

I've no idea why this useless assignment did the trick.

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Tue Jan 27, 2004 3:04 am

Are you using PocketC v6.5? If so, I suspect something flaky is going on with this new version, as adding variable assignments should have no effect.

If this is the case, I would swing this by Jeremy and see what he says (dewey@orbworks.com).

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Mikael on Tue Jan 27, 2004 4:15 pm

I am using v6.5. I've just put the relevant code into a test app - just to make sure that it wasn't a false alarm or that some other part of the app was causing the problem and have got the same result.
I'll pass it on as suggested.

Thanks,

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron