Re: [FPC-Pascal] FPC Graphics options?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Zaaphod
Setting it before initgraph will serve my purposes just fine.  How is this accomplished?

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Nikolay Nikolov
Sent: Sunday, May 21, 2017 5:47 PM
To: [hidden email]
Subject: Re: [fpc-pascal] FPC Graphics options?



On 05/16/2017 02:45 PM, Nikolay Nikolov wrote:
>   Tonight I'll also add the option for changing the title bar text,
> when in windowed mode.
Implemented in r715. Note that you still cannot change the window title, after the window has been created, but at least now you can set it (in a multiplatform way) before InitGraph.

Nikolay
_______________________________________________
fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Nikolay Nikolov-2


On 05/22/2017 01:25 AM, James Richters wrote:
> Setting it before initgraph will serve my purposes just fine.  How is this accomplished?
Just set the new WindowTitle global string variable to something, before
calling InitGraph:

begin
   WindowTitle := 'window title goes here';
   InitGraph(...);

> -----Original Message-----
> From: fpc-pascal [mailto:[hidden email]] On Behalf Of Nikolay Nikolov
> Sent: Sunday, May 21, 2017 5:47 PM
> To: [hidden email]
> Subject: Re: [fpc-pascal] FPC Graphics options?
>
>
>
> On 05/16/2017 02:45 PM, Nikolay Nikolov wrote:
>>    Tonight I'll also add the option for changing the title bar text,
>> when in windowed mode.
> Implemented in r715. Note that you still cannot change the window title, after the window has been created, but at least now you can set it (in a multiplatform way) before InitGraph.
>
> Nikolay
Nikolay
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Zaaphod
I have the window title working, Thank you for that.
However I still have the same issue with non-responsive keyboard when I return to the graph window after an ALT-TAB.  I am running on windows 10 64bit - program compiled for win32.  

James

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Nikolay Nikolov
Sent: Sunday, May 21, 2017 7:00 PM
To: [hidden email]
Subject: Re: [fpc-pascal] [FPC-Pascal] FPC Graphics options?



On 05/22/2017 01:25 AM, James Richters wrote:
> Setting it before initgraph will serve my purposes just fine.  How is this accomplished?
Just set the new WindowTitle global string variable to something, before calling InitGraph:

begin
   WindowTitle := 'window title goes here';
   InitGraph(...);

> -----Original Message-----
> From: fpc-pascal [mailto:[hidden email]] On
> Behalf Of Nikolay Nikolov
> Sent: Sunday, May 21, 2017 5:47 PM
> To: [hidden email]
> Subject: Re: [fpc-pascal] FPC Graphics options?
>
>
>
> On 05/16/2017 02:45 PM, Nikolay Nikolov wrote:
>>    Tonight I'll also add the option for changing the title bar text,
>> when in windowed mode.
> Implemented in r715. Note that you still cannot change the window title, after the window has been created, but at least now you can set it (in a multiplatform way) before InitGraph.
>
> Nikolay
Nikolay
_______________________________________________
fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Nikolay Nikolov-2


On 05/22/2017 02:21 AM, James Richters wrote:
> I have the window title working, Thank you for that.
> However I still have the same issue with non-responsive keyboard when I return to the graph window after an ALT-TAB.  I am running on windows 10 64bit - program compiled for win32.
I cannot reproduce it on my machine after the r714 fix. Can you send me
a small example program, that demonstrates the problem, as well as
detailed steps to reproduce?

Nikolay
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Zaaphod
>I cannot reproduce it on my machine after the r714 fix. Can you send me a small example program, that demonstrates the problem, as well as detailed steps to reproduce?

Here is a simple sample program that has the issue for me on both my windows 10 desktop and my windows 10 laptop, both are 64bit.
https://hastebin.com/nubonozaho.pas

This is just a little program I wrote to get the ascii codes real fast off either the console window or graphics window.  If I recall correctly, using the graph unit some of the F keys were different on the graph screen than they were in the console screen.   This makes a good sample because it shows that the graph screen is responding to the keyboard, just not with what is expected.  It also shows that the graphic window is still actually working as well.  To duplicate the issue, first show that everything works as expected by switching between the windows by clicking on them, type some keys in each window.  Esc exits the program, g, G, c, & C I use to test switching windows with windows api calls.  

To demonstrate the problem, while on the graphics window, use alt-tab from the graphics window to the console window,  the keys all work as expected in the console window, but then if you use any method to get back to the graphics window, they keys reported in the graphics window are no longer correct.   While preparing this for you I noticed that the keys reported seem to be as if alt is being held down when it is not.... and strangely, if I hold down alt and hit any key at all,   from that point on,  the graphic screen reacts normally to keystrokes.  

I will admit that I get a bit confused when it comes to manipulating units and things, but I'm fairly certain that I implemented r175 correctly.
I removed all copies of ptcgraph from my compiler paths and make sure I got a compiler error for it being not found, then put the newly compiled r175 fix in and compiled it. You can see I fixed my sample program to use Windowtitle:=Graphtitle; and that is working, so that would seem to indicate that I am really running r175.  

Thank you for the help with this, it is very much appreciated

James

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Zaaphod
In reply to this post by Zaaphod
*correction  to directory names:
Now I got an error that it could not find graphh.inc So I copied all the .inc files from J:\Programming\FPC 3.0.2\units\i386-win32\ptcpas\ptcgraph\inc  to J:\Programming\FPC 3.0.2\units\i386-win32\ptcpas\ptcgraph because I have no idea how else to make it find them.

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of James Richters
Sent: Tuesday, May 23, 2017 1:29 PM
To: 'FPC-Pascal users discussions' <[hidden email]>
Subject: Re: [fpc-pascal] FPC Graphics options?

I have done the "download snapshot" but I just don't know what to do with it now to properly integrate it into my compiler.  

Here is what I have tried to do.
First I moved everything from J:\Programming\FPC 3.0.2\units\i386-win32\graph to a temporary location so it wouldn't find the old versions of ptcgraph and ptccrt Now when I try to compile my program, I get unit ptcgraph not found... which is what I want because I want to be sure not to get the old version Then I copied the entire snapshot to into J:\Programming\FPC 3.0.2\units\i386-win32\ptcpas Now when I try to compile my program, I still get unit ptcgraph not found.
I added J:\Programming\FPC 3.0.2\units\$fpctarget\ptcpas\* to the directories Now I got an error that it could not find graphh.inc So I copied all the .inc files from J:\Programming\FPC 3.0.2\units\i386-win32\graph\inc to J:\Programming\FPC 3.0.2\units\i386-win32\graph because I have no idea how else to make it find them.
Now I can can compile successfully and run my program, but it has the same issues.
But I notice the modified file win32kbd.inc is never used.   I have even removed it temporarily and I can still compile successfully.      I did a search for win32kbd and I find win32kbdd.inc but not win32kbd.inc

That is where I am at.  I think If I could correctly apply win32kbd.inc it may work

James



-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Nikolay Nikolov
Sent: Tuesday, May 23, 2017 1:03 PM
To: [hidden email]
Subject: Re: [fpc-pascal] FPC Graphics options?



On 05/23/2017 06:09 PM, James Richters wrote:
> I think I figured out my problem, but I'm not sure how to fix it.   I was looking at the code here: https://sourceforge.net/p/ptcpas/code/714/
> And I see that the change made was to win32kbd.inc, but I don't think I'm using the updated version of it.   I think my problem is that I just compiled ptcgraph.pp and replaced ptcgraph.ppu in FPCWin\units\i386-win32\graph.... so apparently that's not the correct way to do it.    So then I tried adding the entire folder downloaded from https://sourceforge.net/projects/ptcpas/files/
But that's a fix, that's not yet released (because it needs testing), so it's in svn trunk only, and not in the release files. Get it from:

  https://sourceforge.net/p/ptcpas/code/HEAD/tree/trunk/

Either click on "Download Snapshot", or install subversion (TortoiseSVN) and checkout https://svn.code.sf.net/p/ptcpas/code/trunk

> Into a folder at FPCWin\units\i386-win32\ptcpas  then renaming the original ptccrt.ppu and ptcgraph.ppu located in FPCWin\units\i386-win32\graph but now It can't find ptcgraph, even though it's there under  FPCWin\units\i386-win32\ptcpas\ptcgraph so now I'm realizing that I'm just guessing and really don't have a clue the proper way to integrate this into my fpc compiler.
>
> Could someone please tell me the correct way I should be doing this so that the compiler will find the correct versions of all the files necessary?
>
> James
>
>
> -----Original Message-----
> From: fpc-pascal [mailto:[hidden email]] On
> Behalf Of James Richters
> Sent: Monday, May 22, 2017 7:13 PM
> To: 'FPC-Pascal users discussions' <[hidden email]>
> Subject: Re: [fpc-pascal] FPC Graphics options?
>
>> Here is a simple sample program that has the issue for me on both my windows 10 desktop and my windows 10 laptop, both are 64bit.
>> https://hastebin.com/nubonozaho.pas
> I started thinking about this, and did some more tests, and I think I have narrowed down what is really happening, but not sure how to fix it.
>
> The problem is not the ALT-tab from the graphics window,  it's ALT being pressed when the window focus changes.   CTRL is also affected, but not shift.  Try this:
> Go to Graph window,  type some letters,  see that it's working correctly,  now hold just ALT, or CTRL - switch to another window by clicking on it.  Click on console window, see letters are working correctly, now go back to graph window,  anything you press acts like ALT, or CTRL is still being pressed until you actually enter a keystroke using ALT, or CTRL.   It seems to me there is probably some flag or variable being set that the alt or ctrl key is being pressed, but is being interrupted by the window focus change, when focus is brought back, the variable is still set for ALT or CTRL being down, but neither is down anymore, but the flag cannot be cleared until a key sequence using ctrl or alt is used.  I did also notice that just hitting alt or ctrl and releasing it in the graph window clears the condition and characters are back to normal again.
>
> James
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Ewald-2
On 23/05/17 19:50, James Richters wrote:
> *correction  to directory names:
> Now I got an error that it could not find graphh.inc So I copied all the .inc files from J:\Programming\FPC 3.0.2\units\i386-win32\ptcpas\ptcgraph\inc  to J:\Programming\FPC 3.0.2\units\i386-win32\ptcpas\ptcgraph because I have no idea how else to make it find them.

Just like you now use -FuSomePath to tell the compiler where to find
units, you can use -FiSomePath to tell the compiler where to look for
include files.

See `fpc -h`, under the section "-F<x> Set file names and paths:" for a
list of other related switches.


--
Ewald
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

wkitty42
In reply to this post by Zaaphod
On 05/22/2017 05:38 PM, James Richters wrote:
>> I cannot reproduce it on my machine after the r714 fix. Can you send me a
>> small example program, that demonstrates the problem, as well as detailed
>> steps to reproduce? >
> Here is a simple sample program that has the issue for me on both my windows
> 10 desktop and my windows 10 laptop, both are 64bit. > https://hastebin.com/nubonozaho.pas

all i get is a dark blue screen there... no text or anything that i can see to
download or copy...

--
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list unless*
        *a signed and pre-paid contract is in effect with us.*
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: [FPC-Pascal] FPC Graphics options?

Zaaphod
>all i get is a dark blue screen there... no text or anything that i can see to download or copy...

That's strange.. it worked yesterday but not today, I tried to create it again with hastebin but it's not working.   here is a new link using pastebin instead
https://pastebin.com/3ARG0zQU

James

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: Tuesday, May 23, 2017 2:16 PM
To: [hidden email]
Subject: Re: [fpc-pascal] [FPC-Pascal] FPC Graphics options?

On 05/22/2017 05:38 PM, James Richters wrote:
>> I cannot reproduce it on my machine after the r714 fix. Can you send
>> me a small example program, that demonstrates the problem, as well as
>> detailed steps to reproduce? >
> Here is a simple sample program that has the issue for me on both my
> windows
> 10 desktop and my windows 10 laptop, both are 64bit. >
> https://hastebin.com/nubonozaho.pas

all i get is a dark blue screen there... no text or anything that i can see to download or copy...

--
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list unless*
        *a signed and pre-paid contract is in effect with us.* _______________________________________________
fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal