PE Programming for dummies

Anything QL Software or Programming Related.
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: PE Programming for dummies

Post by Andrew »

BSJR wrote:Interesting observation.
I had a quick look at the AppMan4 sources but so far cannot find anything that would cause this.
As v4 was adapted to High Colours and Resolutions it was probably not fully tested at the standard QL size.
Can you show me a screenshot of your mode 4 AppMan?
I will have a further look at the way the screen is checked in AppMan.

BSJR
The default configuration for APPMAN is to use system palette 4. In mode 4 this is not a happy choice, as black ink on black paper is rather hard to read :D :D
I have to thank Markus for telling me that I can use menuconfig on Appman to change to palette 0
Untitled-1.jpg
appman.jpg


User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: PE Programming for dummies

Post by Andrew »

Files in archive

Executables:
1. charmap1_obj - smallest size; needs ptrmemr_cde loaded on the system and Qliberator runtime (as BSJR suggested)
2. charmap2_obj - ptrmem_cde is embeded in the program ; needs QLiberator runtime loaded on the system
3. charmap3_obj - both ptrmem_cde and QLiberator runtime are embeded in the executable

Source files:
1. charmapapp_bas - source for executable 1 above
uses appendix file
2. charmapcde_bas - source for executables 2 and 3 above
uses extension+appendix file
3. char_app - appendix file - includes only the menues
4. charmap_cde - extension+appendix file - includes ptrmem_cde and all menus
5. charmap_men - main menu
6. font_men - font select/load menu
7. filelist_men - file load menu
8. extensn_men - file extension select menu
9. errormen_men - error window menu
10. minerva_fnt - Minerva font

To run the program use one of the _obj files and place Minerva_fnt in the same directory as the executable

Later Edit: attachement removed - download final version here viewtopic.php?p=45034#p45034
Last edited by Andrew on Wed Dec 29, 2021 7:24 pm, edited 1 time in total.


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: PE Programming for dummies

Post by mk79 »

BSJR wrote:
Andrew wrote:LATER EDIT:
I found out what the problem is: APPMAN will run in high color mode only if resolution is at least 640x480!
But it would not run in 512x256 High colour mode!
All other Easyptr programs work in 512x256, in all colour modes.
As I only use a BBQL, my QPC is also set to run in 512x256, hence the issue
Interesting observation.
I had a quick look at the AppMan4 sources but so far cannot find anything that would cause this.
The default height of the HC menu version is 294 pixels while the QL version has 168 pixels. I guess that's the reason.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: PE Programming for dummies

Post by dilwyn »

Thanks Andrew. Nice work - I had a quick play with this last night.

Not had time to look much at the sources, other than I saw some of the example routines I sent you in it - glad they proved to be of use.

First impressions are good. A simple to use and very useful utility which means I no longer have to look up those extended character set keypress combinations.

It starts OK if executed from Launchpad and Q-Trans, which is essential for me!

A minor issue I noticed, maybe it's something I misunderstood (with my old brain that's very possible!):

It looks like there is an issue with outline of the program. As I CTRL C between programs, Character Map seems to save more than just its own menu outline. It saves some of the background with it, and also the Move icon won't let it be moved outside of a 512x256 area in the top left of a high resolution screen.

In the image you'll see I originally had the BASIC windows in TV mode (WTV command). Then I switched to WMON mode and got both, as you'll see in the image. Looks like Character Map is saving an area of screen larger than its own menu, which I *think* must be down to having a larger outline set, or possibly another window open which is bigger than the Character Map menu. I think I became aware of this after mentioning the little issue I had with Bob's AppMan. Easyptr menus normally automatically have their outline set, equivalent to either the menu itself, or a larger area if other larger windows are open.

It's a hard thing to explain clearly. I hope you understand what I mean.
charmap1.jpg


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: PE Programming for dummies

Post by mk79 »

Andrew wrote:Files in archive
Nice app considering it's your first PE app :-)

Though there is still something wrong as the window cannot be moved freely on the screen. Just a hunch, but make sure the channel you use for your main window is the first one opened. As far as I can see you open #1 and #2 before the main one.

Cheers, Marcel


User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: PE Programming for dummies

Post by BSJR »

dilwyn wrote:... Looks like Character Map is saving an area of screen larger than its own menu, which I *think* must be down to having a larger outline set, or possibly another window open which is bigger than the Character Map menu. I think I became aware of this after mentioning the little issue I had with Bob's AppMan. Easyptr menus normally automatically have their outline set, equivalent to either the menu itself, or a larger area if other larger windows are open.
When MDRAW sets its Primary window an automatic OUTLINE is set to include all windows open for the job. Any Secondary window needs to fit inside that space. That's indeed the reason why AppMan claims the whole screen to allow viewing of any menu from the list.
As resizing with EasyPtr4 is possible there is probably less need to create full size menus because they can be resized on the fly.
I am/have been working on a version of AppMan4 without this max outline but it still needs some work.
A long time ago I updated AppMan to v4.06, which I use regularly. It was send to Jochen Merz Software but never made it into the EasyPtr4 package. This has its own mode 4 menu and doesn't use the old v3 menu.

BSJR
APM406f.zip
(28.22 KiB) Downloaded 196 times


User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: PE Programming for dummies

Post by Andrew »

dilwyn wrote: Looks like Character Map is saving an area of screen larger than its own menu, which I *think* must be down to having a larger outline set, or possibly another window open which is bigger than the Character Map menu. I think I became aware of this after mentioning the little issue I had with Bob's AppMan. Easyptr menus normally automatically have their outline set, equivalent to either the menu itself, or a larger area if other larger windows are open.
mk79 wrote: Just a hunch, but make sure the channel you use for your main window is the first one opened. As far as I can see you open #1 and #2 before the main one.
Yes, you were both perfectly right!
I learned something new today! But it's still a long road ahead, so I'll keep asking questions.
I have modified the program - now #mainch% is opened first and the program can move freely on desktop.
I also updated the archive and attached it below.

Question: I am used to run QLiberator from the command line e.g. Liberate win1_myprog_bas;"-NOLINE -OBJ win1_myprog -NAME MyProg -List win1_err_txt"
How can I pass the -WINDS option in the command line? If I add it to the parameter list then QLiberator raises an error.

Later Edit: attachement removed - download final version here viewtopic.php?p=45034#p45034
Last edited by Andrew on Wed Dec 29, 2021 7:24 pm, edited 1 time in total.


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: PE Programming for dummies

Post by tofro »

Andrew wrote: Question: I am used to run QLiberator from the command line e.g. Liberate win1_myprog_bas;"-NOLINE -OBJ win1_myprog -NAME MyProg -List win1_err_txt"
How can I pass the -WINDS option in the command line? If I add it to the parameter list then QLiberator raises an error.
That seems to be a bug (same happens here). But: You don't need to state -WINDS (because that's the default). For this reason, apparently, QLiberator only understands -NOWINDS on the command line.

If you absolutely want to, you can state a default with QLIB_USE ,,,,"0011011100" (The last "1" should be replaced wit a "0" for "-NOWINDS"


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: PE Programming for dummies

Post by Andrew »

tofro wrote: But: You don't need to state -WINDS (because that's the default). For this reason, apparently, QLiberator only understands -NOWINDS on the command line.
I should have tried -NOWINDS ! Thank you!
But instead I tried -WINDS OFF :ugeek:
I was mislead by the manual - I read it literally:
-WINDS If this option is present then a compiled program will have
channels 0, 1 and 2 already open when it starts. If the option is
off then the program must open all its own windows.


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: PE Programming for dummies

Post by pjw »

BSJR wrote:<>I am/have been working on a version of AppMan4 without this max outline but it still needs some work.
A long time ago I updated AppMan to v4.06, which I use regularly. It was send to Jochen Merz Software but never made it into the EasyPtr4 package. This has its own mode 4 menu and doesn't use the old v3 menu.

BSJR
Thanks Bob! It was getting rather long of tooth and in need of an update. Although I dont normally use AppMan these days, it is a good way of getting started with EasyPointer.


Per
dont be happy. worry
- ?
Post Reply