Compatibility with 1.7

Folding menus: http://zinnamturm.eu/downloadsAC.htm#CpcDropDown

Compatibility with 1.7

Postby Ivan Denisov » Wed Sep 14, 2016 6:37 am

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.
User avatar
Ivan Denisov
 
Posts: 215
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Compatibility with 1.7

Postby Zinn » Wed Sep 14, 2016 8:26 am

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
Zinn
 
Posts: 47
Joined: Mon Nov 24, 2014 10:47 am

Re: Compatibility with 1.7

Postby Robert » Wed Sep 14, 2016 6:45 pm

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?
User avatar
Robert
 
Posts: 91
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Compatibility with 1.7

Postby Zinn » Thu Sep 15, 2016 5:33 am

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
Zinn
 
Posts: 47
Joined: Mon Nov 24, 2014 10:47 am

Re: Compatibility with 1.7

Postby Ivan Denisov » Thu Sep 15, 2016 6:32 am

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.
User avatar
Ivan Denisov
 
Posts: 215
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Compatibility with 1.7

Postby Zinn » Thu Sep 15, 2016 11:41 am

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
Zinn
 
Posts: 47
Joined: Mon Nov 24, 2014 10:47 am

Re: Compatibility with 1.7

Postby Ivan Denisov » Thu Sep 15, 2016 4:15 pm

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.
User avatar
Ivan Denisov
 
Posts: 215
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Compatibility with 1.7

Postby Josef Templ » Sat Sep 17, 2016 10:15 am

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
Josef Templ
 
Posts: 147
Joined: Tue Sep 17, 2013 6:50 am

Re: Compatibility with 1.7

Postby Robert » Sat Sep 17, 2016 3:21 pm

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.
User avatar
Robert
 
Posts: 91
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland


Return to CpcDropDown

Who is online

Users browsing this forum: No registered users and 1 guest

cron