RubberViewsWE for Xojo Web version 1.15 20151119

I just added getTextWidth, which works just the same to enable autogrow, aka autosize (as in VB) .

Michel, have you posted the latest update with getTextHeight and getTextWidth? I downloaded the file at the link today, and I didn’t see those functions.

Sorry about that. The very latest version is now available at http://rubberviews.com/eval/RubberViewsWETrial.zip

Thank you.

Michel

Michel, I got your update, but I’m still a bit confused about how it works. I un-commented the code you have in there for gettextheight, but when I run the demo program, the ExecuteEvent event never fires. I set up a break point at that event, but it never breaks. Also, I don’t know if this is related, but if I click on just about any control on Webpage1 I get an error that says the javascript is missing a semicolon. I tried this with a couple of different browsers and always get the same error. I could post the actual error if it would help.

I am on the road, but I will try to check as soon as I get a chance.

I don’t know what is going on, but I just added a label and a button to the unencrypted project currently on the site which zip is dated 11/26/2015. In the button I placed

Sub Action() Label1.Text = "ciel si ceci se sait ces soins sont sans succès" RubberViewsWE1.getTextHeight(Label1) RubberViewsWE1.getTextWidth(Label1) End Sub

I simply uncommented the two following lines in the RubberViewsWE1.Execute event :

if Name = "textHeight" and Parameters.Ubound = 1 then msgbox Parameters(1) if Name = "textWidth" and Parameters.Ubound = 1 then msgbox Parameters(1)

When I click the button, I do get both MsgBox. No JavaScript error.

I don’t know why a dec 2015 message suddenly pops up. However, I will look into it today.

If you need I can give you a teamviewer control of my mac in order to check. Let me known.

Luciano

Hi Michel,
so, my previous post is disappeared. It was about rubberviewWe and GraffitiSuiteWeb controls incompatibility.
If I try to run a simple project with 2 controls on 1 web page and just setup rubber view control in both page events (resized and show) it crash with the classic error window “The application as encountered …” and inside the follow log :

Could not execute returned javascript: SlickGrid requires a valid container, #OSkKAVT1 does not exist in the DOM.
Source: var langdir = document.getElementsByTagName(‘body’)[0]; if(langdir) { langdir.removeAttribute(‘dir’); }
var langdir = document.getElementsByTagName(‘body’)[0]; if(langdir) { langdir.setAttribute(‘lang’,‘it’); }
var theElement = document.getElementById(‘PZe4GpEd’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.width=‘56px’;}
var theElement = document.getElementById(‘PZe4GpEd’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.height=‘56px’;}
var theElement = document.getElementById(‘PZe4GpEd’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.left=‘51px’;}
var theElement = document.getElementById(‘PZe4GpEd’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.top=‘44px’;}
var theElement = document.getElementById(‘KtWyPy10’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.width=‘144px’;}
var theElement = document.getElementById(‘KtWyPy10’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.height=‘36px’;}
var theElement = document.getElementById(‘KtWyPy10’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.left=‘971px’;}
var theElement = document.getElementById(‘KtWyPy10’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.top=‘271px’;}
RS.addClass(‘OSkKAVT1’,’_Style’);
RS.removeClass(‘OSkKAVT1’,’’);
var theElement = document.getElementById(‘OSkKAVT1’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.width=‘842px’;}
var theElement = document.getElementById(‘OSkKAVT1’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.height=‘163px’;}
var theElement = document.getElementById(‘OSkKAVT1’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.left=‘254px’;}
var theElement = document.getElementById(‘OSkKAVT1’);if (typeof(theElement) !== ‘undefined’ && theElement !== null) {theElement.style.top=‘398px’;}
window.gridOSkKAVT1_onScroll_time = 0;window.gridOSkKAVT1_renderComplete_time = 0;var columns = [];var data =
Xojo.console.error("Unhandled UnsupportedOperationException
Message: This control was not created correctly.

Stack:
WebView._AddControl%%oo
RubberViewsWE.RubberViewsWE.Constructor%%o<RubberViewsWE.RubberViewsWE>
RubberViewsWE.RubberViewsWE.!_Create%o<RubberViewsWE.RubberViewsWE>%s
WebPage1.WebPage1.Constructor%%o<WebPage1.WebPage1>
Session.Session.WebPage1%o<WebPage1.WebPage1>%o<Session.Session>
App.DefaultPage%o%o
WebSession._ExecuteEvent%%osA1v&b
WebSession._HandleEvent%%oso<_HTTPServer.HTTPRequestContext>
WebSession._HandleRequest%i4%oso<_HTTPServer.HTTPRequestContext>
WebApplication._HandleHTTPRequest%%oo<_HTTPServer.HTTPRequestContext>
_HTTPServer.HTTPRequestThread.Event_Run%%o<_HTTPServer.HTTPRequestThread>
rbframework.dylib$1183
_pthread_body
");
Xojo.comm.ajax.begin();

Hi Luciano,

I appreciate your report.

It is difficult to know what is going on with just the crash report. At first glance it appears as if SlickGrid is not completely formed, possibly when RubberViewsWE tries to resize it, but only further experiments can get to the bottom of the issue.

I sent a message to @Anthony Cyphers about your post. He may have more insight about that particular control I could not find on his site. Or is it named something else ?

You may want to comment out SizAll() in Resized, then in both Resized and Show, to see if the error still occurs. If that was the case, then it would point out for an issue in Init() which I suspect could happen when RubberViews looks at all the controls, and one is not quite finished creating. The a timer would alleviate the issue until I can build it into my class.

Sounds like GraffitiWebGrid is trying to instantiate on a DIV element that doesn’t exist. Possible causes are use of jQuery’s detach, or changing the ID of the DIV.

Michel and I are exchanging licenses so that we can try to track down this and future issues together.