Page 1 of 1

Compatibility with 1.7

Posted: Wed Sep 14, 2016 6:37 am
by Ivan Denisov
Robert wrote:I am porting some of my files to 1.7, which is quite a big job. It is surprising how often I made the "IN" to "VAR" error, which is now being detected!

One immediate problem is I can't get CpcDropDown to work. Am I missing something obvious, or is there a problem here? It compiles fine.

Re: Compatibility with 1.7

Posted: Wed Sep 14, 2016 8:26 am
by Zinn
here is the solution about CpcDropDown:

Add two times the line
Dialog.Call("CpcDropDown.MakeDropDowns", "", res);

1. Module Std/Mod/MenuTool.odc in the procedure UdateAllMenu

Code: Select all

	PROCEDURE UpdateAllMenus*;
		VAR view: Views.View; t: TextModels.Model; s: TextMappers.Scanner;
			loc: Files.Locator; res: INTEGER;
	BEGIN
		InitNotifier;
		loc := Files.dir.This(sysDir); IF loc = NIL THEN RETURN END;
		loc := loc.This(rsrcDir); IF loc = NIL THEN RETURN END;
		view := Views.OldView(loc, menuFile);
		IF (view # NIL) & (view IS TextViews.View) THEN
			t := view(TextViews.View).ThisModel();
			IF t # NIL THEN
				s.ConnectTo(t); Scan(s);
				noerr := TRUE; showerr := TRUE; gen := FALSE; ParseMenus(s, view, loc, menuFile);
				IF noerr THEN
					s.SetPos(0); Scan(s); gen := TRUE;
					HostMenus.DeleteAll; ParseMenus(s, NIL, NIL, ""); HostMenus.InitMenus;
					Dialog.Call("CpcDropDown.MakeDropDowns", "", res);
				ELSE
					Dialog.ShowMsg("errors detected in menu file");
				END
			END
		ELSE Dialog.ShowMsg("cannot open menu file")
		END;
		includes := NIL
	END UpdateAllMenus;
2. Module System/Mod/Config.odc in the procedure Setup

Code: Select all

		...
		OleData.Register("", "OleData.ExportPicture", "METAFILEPICT", "", {});

		Dialog.Call("CpcDropDown.MakeDropDowns", "", res);
		Dialog.Call("ToolbarStd.PutToolbar", "", res);
		Dialog.Call("StdLog.Open", "", res)
	END Setup;
and it works.

- Helmut

Re: Compatibility with 1.7

Posted: Wed Sep 14, 2016 6:45 pm
by Robert
Zinn wrote:Here is the solution about CpcDropDown:

Add two times the line Dialog.Call("CpcDropDown.MakeDropDowns", "", res);
...
and it works.
Thanks. It works for me too.

I should have read the Quick-Start! The last time I read it was probably 2004.

Actually I am not very happy about your suggested change to the Module StdMenuTool; the suggestion in the Quick-Start that this line is added to the Dev Menu item seems to be better than altering a standard source code (Mod) file. (Except for System/Mod/Config, which one expects to customise to suit your own configuration). Is there a reason to alter this Mod file?

Re: Compatibility with 1.7

Posted: Thu Sep 15, 2016 5:33 am
by Zinn
Robert wrote:Actually I am not very happy about your suggested change to the Module StdMenuTool ...
… but you prefer to search the whole day, why the menu is not working.
Robert wrote: Is there a reason to alter this Mod file?
Yes, to make it more user friendly. How to explain novice user the menu is not working after “Info -> Update Menus”. You have to execute an additional command (which one?) or leave BlackBox and restart it for using the menus again. Even expert user may not remember this.

When my proposal has not been discarded this discussion would not exist.
- Helmut

Re: Compatibility with 1.7

Posted: Thu Sep 15, 2016 6:32 am
by Ivan Denisov
Zinn wrote:When my proposal has not been discarded this discussion would not exist.
It is strange to assume the existence of any concrete extensions in the universal framework. It is not good design idea.

Re: Compatibility with 1.7

Posted: Thu Sep 15, 2016 11:41 am
by Zinn
Somebody would like to have this kind of extension to the menu and somebody not. So what? You haven't to install CpcDropDown if you don't like it. When it isn't allow to do such kind of extension then I have to withdraw also this subsystem.
- Helmut

Re: Compatibility with 1.7

Posted: Thu Sep 15, 2016 4:15 pm
by Ivan Denisov
Zinn wrote:Somebody would like to have this kind of extension to the menu and somebody not. So what? You haven't to install CpcDropDown if you don't like it. When it isn't allow to do such kind of extension then I have to withdraw also this subsystem.
Strange logic. We can think about some hook for menus update. But it should not be related to any specific extension.

Re: Compatibility with 1.7

Posted: Sat Sep 17, 2016 10:15 am
by Josef Templ
Can somebody summarize what the problem with CpcDropDown is?
I mean, "explain" the problem, not repeating the required source changes.

I am also using CpcDropDown but did not experience any problems when migrating to 1.7.

- Josef

Re: Compatibility with 1.7

Posted: Sat Sep 17, 2016 3:21 pm
by Robert
Josef Templ wrote:Can somebody summarize what the problem with CpcDropDown is?
There is no problem with CpcDropDown.

I had a problem because I had not installed it properly (as described in its "Quick-Start"). I was in the process of copying my files into 1.7, and in the intermediate state that some updated Menus wanted to use it, but I had not yet updated the Menu that enabled it, there was an apparent problem.