Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Dialog Manager to generate Maintain Code in .mnt file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Dialog Manager to generate Maintain Code in .mnt file
 Login/Join
 
Silver Member
posted
I have a need to generate a lot of identical code for all fieldnames in a stack.
For example:
Form2.T10.ReadOnly=stk_ReadOnly.T10; Form2.T10.ToolTipText=IF stk_ReadOnly.T10 EQ "0" then var_ttrw else var_ttro;
Form2.T20.ReadOnly=stk_ReadOnly.T20; Form2.T20.ToolTipText=IF stk_ReadOnly.T20 EQ "0" then var_ttrw else var_ttro;
Form2.T30.ReadOnly=stk_ReadOnly.T30; Form2.T30.ToolTipText=IF stk_ReadOnly.T30 EQ "0" then var_ttrw else var_ttro;
Form2.T40.ReadOnly=stk_ReadOnly.T40; Form2.T40.ToolTipText=IF stk_ReadOnly.T40 EQ "0" then var_ttrw else var_ttro;
F....

Normally i would code a loop in Dialog Manager and generate the fieldnames and the lines of code.
Am i rignt in suspecting that i cannot do this in an MNT file?

Regards, Mats

This message has been edited. Last edited by: Mats Sjoberg,


Mats Sundelin
Cybernetics Business Solutions AB
 
Posts: 31 | Location: Stockholm, sweden | Registered: January 19, 2005Report This Post
Virtuoso
posted Hide Post
Yes, you're absolutely right about that. The maintain parser will not recognize DM commands.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
Thanks. I created a utility that types out the code so i can cut and paste it. //Mats


Mats Sundelin
Cybernetics Business Solutions AB
 
Posts: 31 | Location: Stockholm, sweden | Registered: January 19, 2005Report This Post
Guru
posted Hide Post
Mats,

what about calling a a Focexec with the DM code which is written to a file which is readable for Maintain.

Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Platinum Member
posted Hide Post
Mats.

It looks like you want to generate code to set form properties. If so, it might be easier to do that in JavaScript, like processing an array of controls with name substitution to get the right data source for each property value. Of course all the data element would have to be part of the run-time page.


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 2003Report This Post
Silver Member
posted Hide Post
Thanks for the suggestions. I am sorry for not responding before. //Mats


Mats Sundelin
Cybernetics Business Solutions AB
 
Posts: 31 | Location: Stockholm, sweden | Registered: January 19, 2005Report This Post
Expert
posted Hide Post
You can use DM in Maintain code, but only if you are executing it, pre compiled code will not work.

But...

I think Dave is right, javascript may well be the best way.

I have in the past create a process to generate javascript and pass it back to the displayed or displaying maintain page.

It can be done.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Dialog Manager to generate Maintain Code in .mnt file

Copyright © 1996-2020 Information Builders