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 - SetFore() and forms
Page 1 of 1

PostPosted: Tue Mar 12, 2002 1:02 am
by WauloK
Howdy, Joe.

As you suggested in an email, I removed graph_on() and substituted redrawing forms.

I have a problem in that when I change to the PocketC form (1500) then change back again to (3000), it loses the SetFore() value. This is not such a problem as I have added to my code a variable to hold the current foreground colour (color).
But, once I have changed forms to the PocketC one and back again, I then use SetFore(color) but it does nothing.

about(int color) { // I tried passing color to about() in hope that would fix it, but putting the "SetFore()" here or where the routine returns to makes no difference
sleep(1000); // Otherwise CopyBuf copies the graffiti shortcut bar ( /About ). This sleep waits until the shortcut bar disappears.
CopyBuf(1,0);
Fctl(DRAW,1500);
title("About");
bitmap(10,26,"0f07c01ff03ff87ffc7ffcfc7ef83ef83ef83ef83e8822882288228822f83e50145014000050148aa2");
textattr(2,1,0);
textalign(11);
text(80,25,"Iron filings v2.0");
text(80,45,"by Jason Oakley");
textattr(0,1,0);
text(80,60,"Freeware");
//blah blah graphics and text displayed

textalign(00);
Fctl(DRAW,3000);
CopyBuf(0,1); // Return the previous form screen
text(80,80,color); // This was a test line which never gets executed (or it does and the text() appears somewhere not visible?
SetFore(color); // This also does not happen.
}


If I use:
about(); SetFore(color); break;

The "SetFore(color)" never happens.

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!

PostPosted: Tue Mar 12, 2002 2:31 am
by jstadolnik
Every time a form is switched the color settings get reset. To what I don't exactly know, but usually not to thier previous settings.

Anyhow, I cannot seem to replicate the problem. Below is my test code.

Note that SetFore() returns the previous color setting. This may be useful in debugging the problem.

Joe

----

//colorbug.c
library "PToolboxLib"
include "Fctl.h"
main() {
Form(3000,"Main Form");
Button(3001,0,10,140,0,0,"Switch");
Fctl(DRAW,3000);
SetFore(119);
line(1,0,0,159,159);
while(Fevent(1) != 3001);
CopyBuf(1,0);
Fctl(DRAW,1500);
title("Graphics window");
line(1,0,159,159,0);
while(event(1) != 2);
Fctl(DRAW,3000);
CopyBuf(0,1);
SetFore(101);
line(1,40,0,119,159);
while(Fevent(1) != 3001);
}

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm

PostPosted: Tue Mar 12, 2002 2:57 am
by WauloK
Sadly, I cannot re-create it with your test code either.
I will have to try and figure it out.
tnx

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!