I don't know if I missed it in the documentation; but, I could wish that all of the Profound UI API's were also methods of the "pui" object. To me, this makes it self-documenting that a particular function is part of the Profound UI vs. a global browser DOM function.
For example... You have the get(...) and getObj(...) API's and you have the following:
pui.click();
So, I could wish that the following were also valid. Are they?
myval = pui.get(...);
myobj = pui.getObj(...);
Profound UI API's
-
- Experienced User
- Posts: 165
- Joined: Wed Dec 11, 2013 10:40 am
- First Name: Dave
- Last Name: Clark
- Company Name: WinWholesale, Inc.
- Phone: 937-294-5331
- Address 1: 31101 Kettering Blvd.
- City: Dayton
- State / Province: Outside Canada/USA
- Zip / Postal Code: 45439
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Profound UI API's
I agree with you. I wish that all of the APIs were part of the pui object as well. Unfortunately, when this stuff first started, they did not do things that way... When more recent APIs were added, they used the "pui" object, though.
I know that recently, we added pui.set as an alias for changeElementValue(), and pui.get() as an alias for get(). So, in this case you can use them with or without the pui prefix. However, I dont think we have added an alias for getObj...
I know that recently, we added pui.set as an alias for changeElementValue(), and pui.get() as an alias for get(). So, in this case you can use them with or without the pui prefix. However, I dont think we have added an alias for getObj...
-
- Experienced User
- Posts: 165
- Joined: Wed Dec 11, 2013 10:40 am
- First Name: Dave
- Last Name: Clark
- Company Name: WinWholesale, Inc.
- Phone: 937-294-5331
- Address 1: 31101 Kettering Blvd.
- City: Dayton
- State / Province: Outside Canada/USA
- Zip / Postal Code: 45439
- Country: United States
- Contact:
Re: Profound UI API's
OK, here's an "easy" suggestion to make all of the standalone API's also available as methods -- and which is completely backwards compatible... Using getObj() as an example, you have it defined somewhere as something similar to the following:
For an enhancement, you can make that API available from the "pui" object, as a method, as follows:
No muss, no fuss, and the same function becomes a method by the same name. I look forward to it. ;-)
Code: Select all
function getObj(...)
{
...
}
Code: Select all
pui.getObj = getObj;
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Profound UI API's
This is exactly how the pui.set() / pui.get() aliases are done. We have on our 'to-do' list already (although it's not highly prioritized) to do this for ALL names that we define in the global scope. We will likely do this, rather than one or 2 APIs in a piecemeal fashion.
I would actually like to see it done in reverse manner, where all the names in the global scope 'go away' for good. For existing customers, we could perhaps define the old names in a 'backwards compat.' file that could be removed by customers who have adjusted all scripts to the new format. Or, left in place for those who have no time/desire to do it.
I would actually like to see it done in reverse manner, where all the names in the global scope 'go away' for good. For existing customers, we could perhaps define the old names in a 'backwards compat.' file that could be removed by customers who have adjusted all scripts to the new format. Or, left in place for those who have no time/desire to do it.
-
- Experienced User
- Posts: 165
- Joined: Wed Dec 11, 2013 10:40 am
- First Name: Dave
- Last Name: Clark
- Company Name: WinWholesale, Inc.
- Phone: 937-294-5331
- Address 1: 31101 Kettering Blvd.
- City: Dayton
- State / Province: Outside Canada/USA
- Zip / Postal Code: 45439
- Country: United States
- Contact:
Re: Profound UI API's
Ideally, yes, I agree; but, as you said, not backwards compatible by itself. ;-)David wrote:I would actually like to see it done in reverse manner, where all the names in the global scope 'go away' for good.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Profound UI API's
We'll definitely add your vote to this feature request, then, Dave. With WinWholesale asking for it, perhaps we can convince "the powers" to bump up the priority on this item. (Which I'd like very much.)
Thanks!
Thanks!
Who is online
Users browsing this forum: No registered users and 4 guests