User Profile & Activity

Yudi Member
Page
of 259
Posted: May 19, 2016 9:11 AM

Please kindly check my response sent to your registered email account.

Posted: May 19, 2016 9:06 AM

Scenario 1

I carefully follow the steps to reproduce the reported problem in my local end by using:

  • Project: app-inventory-masterdetail
  • Crosslight NuGet package: 5.0.5000.638.
  • Android emulator: Nexus 5 (running Android 5.0.2 Lollypop)

The reported problem is not reproducible in my local end. "resultParameter.Result.ImageData" doesn't contains 0 bytes and the image picker isn't empty.

Please take a look at the attached video, Scenario1OnAndroid502.mp4, which shows the test result.


Scenario 2

I carefully test scenario 2 using the same detail as mentioned above (including the Android emulator) and I was unable to reproduce these problems below:

  • the crop app complains with "picture cannot be loaded"
  • "resultParameter.Result.ImageData" contains 0 bytes, "ThumbNailData" is null and the image picker is empty.

Please have a look at the attached video, Scenario2OnAndroid502.mp4, and feel free to let me know if there is anything that I might miss during my attempt to reproduce the problem.

Posted: May 17, 2016 8:03 AM

... This solution fails in a situation where searched node's grand parent is collapsed but its childrens are expanded. ...

Please check out the snippet of JS function below.

function FindNextNode()
{
    var tv = ISGetObject("WebTreeView1");
    var searchText = document.getElementById("txtSearch").value;
    if(searchText != "")
    {
        var node = tv.FindNextNodeByText(searchText);
        if (node != null)
        {                
            //node.Select();
            node.ExpandHierarchyAndSelect();
            node.GetElement().scrollIntoView();                
        }
        else
            alert("The search text can't be found");
    }
    else
        alert("Please fill in the search text");
}

I use this JS function to search WebTreeViewNode by text. ExpandHierarchyAndSelect() is called instead of invoking the Select() method. This method, ExpandHierarchyAndSelect(), will expands and selects nodes in a hierarchy.

After hierarchy is expanded and node get selected, invoke scrollIntoView() to scrolls the selected node element into the visible area of the browser window.

This should helps.

Posted: May 17, 2016 4:59 AM

I can set the text box value in client side of read-only WebCombo by using following snippet code:

function SetText()
{
    var comboCustomers = ISGetObject("WC_Customers");

    wc1.SetText("Ana Trujillo"); // set the WebCombo's text
        
    // required only for Bound mode, instructs the WebCombo to fetch the Value from server.
    // this method is required for Bound mode because when a new text is set,
    // the WebCombo doesn't have the related Value in client side since the data has not been loaded.
    // this method is not required for Unbound mode.
    wc1.LoadValue();
}
Posted: May 17, 2016 4:37 AM

I created a simple sample of WebCombo with OnShowDropDown client-side event. Each time OnShowDropDown JS function is invoked, it will update dvLog div element and displays: "OnShowDropDown invoked".

OnShowDropDown client-side event of WebCombo specifies the client-side function to be invoked when the result box of a combo is being shown. It will be invoked when:

  • DropDown arrow is clicked.
  • Load more data arrow

I enclosed the sample as attachment. Could you please evaluate the sample on your end and let me know if the OnShowDropDown keep invoked until you close the application or not?

Posted: May 16, 2016 7:39 AM

Hello Thomas,

The hotfix package for CROS-1060 is now available in NuGet. Based on the recent test on my local end, the reported problem is no longer persist after apply Crosslight 5.0.5000.638.

Please give it a spin and let us know how it works in your end.

Posted: May 12, 2016 9:40 AM

Sorry for the delay in sending this.

Here is what I created based on your scenario: JavaScript function is be used to create and show WebDesktopWindow. The WebDesktopWindow will load an image and use iFrame as its ContentMode. The snippet is as follow:

function AddWindow()
{
    var dm = ISGetDesktopManager();
    var wnd = dm.GetWindow("wndAboutDM");

    if (wnd == null)
    {
        wnd = new WebDesktopWindow();
        wnd.Name = "wndHTMLPage";
        wnd.ContentURL = "../Images/coverflow_images/timesquare.jpg";
        wnd.ContentMode = "UseIFrame";
        wnd.AllowMinimize = "No";
        wnd.AllowMaximize = "No";

        dm.Windows.Add(wnd);
        wnd.Show();
    }
    else
    {
        wnd.Activate();
    }
}

Next, in order to get the dimension of the image (ContentURL of WebDesktopWindow), the image will be appended to a dummy element.

function ResizeWebDesktopWindow(imgSrc, wnd)
{
    var element = document.getElementById("dummyElement");
    var elem = document.createElement("img");

    elem.src = imgSrc;
    elem.setAttribute("style", "visibility: collapse;");
    elem.addEventListener('load', function ()
    {
        var imgWidth = this.naturalWidth;
        var imgHeight = this.naturalHeight;
        wnd.ResizeTo(imgWidth, imgHeight);
               
    });

    element.appendChild(elem);
}

As you may see, the WebDesktopWindow is now resized based on the size of its content. In this simple case, is an image. Call ResizeWebDesktopWindow function after invoking Show() method, so the AddWindow() function will look like below after modified:

function AddWindow()
{
    var dm = ISGetDesktopManager();
    var wnd = dm.GetWindow("wndAboutDM");

    if (wnd == null)
    {
        wnd = new WebDesktopWindow();
        wnd.Text = "HTML Page";
        wnd.Name = "wndHTMLPage";
        wnd.ControlBoxImage = "is_webdesktop-16.gif";
        wnd.ContentURL = "../Images/coverflow_images/timesquare.jpg";
        wnd.ContentMode = "UseIFrame";
        wnd.AllowMinimize = "No";
        wnd.AllowMaximize = "No";
               
        dm.Windows.Add(wnd);
        wnd.Show();
        ResizeWebDesktopWindow("http://mywebsite/Images/coverflow_images/timesquare.jpg", wnd)
    }
    else
    {
        wnd.Activate();
    }

}

Hope this helps.

Posted: May 11, 2016 6:28 AM

Sorry for the delayed response.

Your concern related to the startup time of Android app created using Crosslight has been forwarded to Crosslight development team. The report is filed under CROS-1130.

I'll keep this thread updated with any news I heard from the team regarding the progress of CROS-1130.

Posted: May 10, 2016 9:37 AM

Hello Thomas,

Could you please perform the following and re-test the reported problem?

  1. Close all Visual Studio and Xamarin Studio
  2. Removes packages folder from the sample project.
  3. Removes bin and obj folders from the Android and Core projects.
  4. Connect the test device to development PC.
  5. Uninstall the sample app using "adb uninstall" command. In this case: "adb uninstall MyInventory.Android.Material".
  6. Using text editor software, manually update Crosslight NuGet package to Crosslight 5.0.5000.638.
  7. Open sample project in Visual Studio or Xamarin Studio.
  8. Restore NuGet packages.
  9. Re-test the issue.

Look forward to hearing back from you.

Sorry for the delay in sending this.

Build 24 is now available in WebUI Studio 2016 Update 2 which addressed this issue. Please give it a spin and let us know how it works in your end.

All times are GMT -5. The time now is 11:25 PM.
Previous Next