Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: November 30 2004 at 15:39 | IP Logged
|
|
|
It looks like the web CC is not updated until it is displayed on the PH machine. Confirmation?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 30 2004 at 19:53 | IP Logged
|
|
|
Im not sure I know what you mean. With the last couple of betas, changes made to the Control Center are saved to a temporary table. Both the Web CC and the Client CC pull from this temporary table. Even if the client CC is not displayed, if changes are made to the CC, the web CC will see those changes.
Now...any changes made to the CC will not be seen until the Web page is refreshed. This would not be possible without something like an activex or java applet where a continuous connection is maintained between the client and PowerHome. I don't see myself working on this anytime soon. However, I will be working on a socket based remote Control Center. It should maintain a persistent connection to the PowerHome server and register changes to the CC as they occur. This remote Control Center will just be another program rather than browser based, however it should work over the internet without a problem.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: November 30 2004 at 22:54 | IP Logged
|
|
|
Interesting. I'll check again.
The sockets version sounds really cool.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 13 2004 at 21:21 | IP Logged
|
|
|
Even if the client CC is not displayed, if changes are made to the CC, the web CC will see those changes.
This is not true on my system. I just made changes and they did not show on the web CC until I pulled it up in PH.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 13 2004 at 22:00 | IP Logged
|
|
|
Hmmm...I just ran a test on my machine and it worked. What I did was:
1. Close the client CC as well as all open PowerHome sheets.
2. Launched Internet Explorer and brought up the web CC.
3. Launched a second instance of Internet Explorer and brought up the PH Formulas screen.
4. I typed the following formula: ph_setccbtnwidth("VOOM",1,1000) and submitted.
5. I toggled over to my first browser window and then refreshed the Control Center and the changes showed up.
Let me know if this works for you or not and what method you're using to test that is causing problems.
Thanks,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 14 2004 at 09:58 | IP Logged
|
|
|
I'll try that tonight...
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 14 2004 at 22:10 | IP Logged
|
|
|
The steps you mention work. What I'm doing is editing the CC, saving, closing out the PH Explorer and the CC, then loading the Web CC and seeing no change.
Also...
Is there any reason that you can think of that would cause button text to be truncated in the web cc, but, not in the real CC? IE and Firefox act the same way.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 17 2004 at 09:39 | IP Logged
|
|
|
Yep...you would not see a change with the above steps. You would need to run the ph_clearccchgs() function (or restart PowerHome or relaunch the client Control Center) to see the changes.
Concerning the truncation issues between the client CC and the web CC. They are two completely different animals. The client CC is using a Sybase patented technology called a datawindow. You can think of it as a Crystal Reports on steroids. Essentially, the information in the CCBUTTONS table is used to create static text controls on a freeform datawindow with a raised border. A datawindow static text control does not truncate the text.
When building the web CC, the same info in the CCBUTTONS table is used (conversion between PowerBuilder units to pixels occurs as well as others) and this info is applied to Cascading Style Sheets. At this point, the individual browsers are free to interpret the HTML and CSS as they see fit.
Not sure if that answered your question so let me know if it didnt.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 17 2004 at 10:29 | IP Logged
|
|
|
Interesting. I just need to add ph_clearccchgs() then. Would it work if I just put it at the beginning of the macro I specify to be run when the cc is opened?
The text being truncated does not seem to be following any logic; it ends up smaller than the width of the button. Can you offer any insight into this?
Thanks!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 19 2004 at 21:34 | IP Logged
|
|
|
If you have a macro that is opening the client CC and you've set Clear Changes when the CC is opened, then you wouldnt need to do anything at all. If the macro is opening the Web CC, then yes, place the ph_clearccchgs() at the beginning of the macro. This would only be necessary in order to see changes that have just been made to the CC in the Explorer since the last time changes were cleared.
Can you paste the HTML of the CC that is doing the truncation? I could look at it and get a better idea of what might be happening.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 20 2004 at 06:52 | IP Logged
|
|
|
Gotcha.
Here is the offending line...
<span class=ccbtn0 style="position:absolute; left:5px; top:242px; width:219px; height:30px; background-color:#c0c0c0; color:#000000" onclick="f_cc(3,'TEST WINAMP',0,0);">Playing • Santana, Michel</span>
The string is this...
Playing • Santana, Michelle Branch - The Game of Love • -04:14 • 00:00
The truncated length is not consistant. This one is 26 characters, another one was 27.
Thanks!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 20 2004 at 16:50 | IP Logged
|
|
|
Ok, that helps.
I checked it out and think I see the problem. The database tables for the text of the button limits the text to only 25 characters. I counted your sample and got 25 instead of 26. Not sure how it could be any greater than 25 since the database engine is pretty exacting on this. It's possible that it's interpreting some characters as escape characters that would internally be represented so that the max field length is 25 characters.
Now, how do we work around this limitation. Hmmmm...for the client CC it would not be too bad because we could use the ph_ccmodify function to do anything we want with the client Control Center. We could change the button text to whatever we want or create static text boxes that wont even respond as a button does. But, I believe your problem is with the Web CC.
The only thing that I can think of at this point is to use a PSP page. In the PSP page, you could get the HTML for the CC tab you are trying to render using one of the ph_geturl type functions. You could then parse this HTML in the PSP page and then change the text to whatever you want.
Hmmmm....I may have just thought of an easier way. You could possibly set the text of the button to be a PSP tag containing a global variable with the text of the button contained within the GV. Something like GV [CURRENTSONG] = "Playing • Santana, Michelle Branch - The Game of Love • -04:14 • 00:00" and then set the button text to be <%[CURRENTSONG]%>.
Thinking about it a little more, Im not sure how you would get the above formula interpreted unless you did some funky saving and opening.
I'll do some more thinking and see what I can come up with.
Dave.
|
Back to Top |
|
|