Does MadCap.OpenHelp() function have default values?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Does MadCap.OpenHelp() function have default values?

Post by chuck_agari »

In the doc for CSH, the MadCap.OpenHelp() function is described as having 4 parameters: ID, Skin Name, Search String, and First Pick Search String Value. And the examples pretty much all look like this:

MadCap.OpenHelp('Welcome', null, null, null )
MadCap.OpenHelp(1000, null, null, null )
MadCap.OpenHelp('Company/Employees.htm', null, null, null )

Yes, there are a few example that also use another parameter or two to demonstrate the concepts. However...

I'm thinking that for most users in most scenarios, the help calls will look exactly like above, with the last 3 parameters unused and not needed, yet the developers having to enter null, null, null every. Single. Time.

In looking at https://developer.mozilla.org/en-US/doc ... parameters, I see that JavaScript does provide a capability to provide defaults, which would be overridden if the parameter is defined in the function call. I don't see anything about this in the docs, so I assume the function is not defined like that. But I'm thinking it'd work better if the function definition looked something like this:

function OpenHelp(ID=null, SkinName=null, SearchString=null, FirstPickSearchStringValue=null) {
.
.
.
}

That way, in the above examples, developers could writer this code:

MadCap.OpenHelp('Welcome')
MadCap.OpenHelp(1000)
MadCap.OpenHelp('Company/Employees.htm')

Which to me is a LOT cleaner and simpler. What say ye MadCap devs?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Does MadCap.OpenHelp() function have default values?

Post by ChoccieMuffin »

As this is a peer support forum, your suggestion might not get seen by Madcap developers, so can I suggest that you click the "Feature requests" link in my signature and send it to them that way?

And welcome to the forums, if nobody has said that already. :)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Does MadCap.OpenHelp() function have default values?

Post by chuck_agari »

ChoccieMuffin wrote:As this is a peer support forum, your suggestion might not get seen by Madcap developers, so can I suggest that you click the "Feature requests" link in my signature and send it to them that way?

And welcome to the forums, if nobody has said that already. :)
Certainly this is true that this is a "peer support" forum. However, I have worked at several companies that have similar forums, and as employees were were at least encouraged, if not required, to monitor, and even contribute, especially as it was the company itself hosting the forums, as is the case here. I do not think it unreasonable to expect a similar expectation of attention here--or at least have the belief that non-participation and non-monitoring is an abdication.

I don't know the details of their source code, so I don't know if this would be a feature request, as in, changing the funciton's signature, or merely a documentation bug, in that the function can do this, but it is undocumented. And unless someone is capable of decompiling the Flare source code, the question is one only members of the Flare development team can answer.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Does MadCap.OpenHelp() function have default values?

Post by ChoccieMuffin »

chuck_agari wrote:
ChoccieMuffin wrote:As this is a peer support forum, your suggestion might not get seen by Madcap developers, so can I suggest that you click the "Feature requests" link in my signature and send it to them that way?

And welcome to the forums, if nobody has said that already. :)
Certainly this is true that this is a "peer support" forum. However, I have worked at several companies that have similar forums, and as employees were were at least encouraged, if not required, to monitor, and even contribute, especially as it was the company itself hosting the forums, as is the case here. I do not think it unreasonable to expect a similar expectation of attention here--or at least have the belief that non-participation and non-monitoring is an abdication.

I don't know the details of their source code, so I don't know if this would be a feature request, as in, changing the funciton's signature, or merely a documentation bug, in that the function can do this, but it is undocumented. And unless someone is capable of decompiling the Flare source code, the question is one only members of the Flare development team can answer.
I'm not getting into a discussion about whether they do or whether they should review these forums. I was just suggesting that one way to make sure your suggestion gets logged is to use the link. But that's fine if you don't feel like doing it... :roll:
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply