Profound UI API's

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
DaveLClarkI
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:

Profound UI API's

Post by DaveLClarkI »

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(...);
Scott Klement
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

Post by Scott Klement »

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...
DaveLClarkI
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

Post by DaveLClarkI »

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:

Code: Select all

function getObj(...)
{
  ...
}
For an enhancement, you can make that API available from the "pui" object, as a method, as follows:

Code: Select all

pui.getObj = getObj;
No muss, no fuss, and the same function becomes a method by the same name. I look forward to it. ;-)
User avatar
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

Post by David »

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.
DaveLClarkI
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

Post by DaveLClarkI »

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.
Ideally, yes, I agree; but, as you said, not backwards compatible by itself. ;-)
Scott Klement
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

Post by Scott Klement »

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!
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests