Welcome, Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - dimitar

Pages: [1] 2 3
Feature Requests and Feedback / Re: Undo and redo handling
« on: November 12, 2015, 10:03:16 AM »
Hi Cedric,

You can implement separate Undo/Redo stack for each input widget in JavaScript.
In the attached example I have used the TextStack library from https://github.com/azaslavsky/TextStack

The idea is to listen globally for CTRL-Z and CTRL-Y, but apply the operation on the currently focused widget.
If there is no focused widget, there won't be any undo/redo operations applied. This way you can always forward the input to Coherent GT and it will work as you want.

Here is a the gist of the sample:
Code: [Select]
<textarea class="undo-redo" id="simple" style="width: 80%; height: 40%; min-height: 240px;"></textarea>
<input class="undo-redo" type="text" />
<input class="undo-redo" type="number" />
var inputs = document.getElementsByClassName('undo-redo'),
n = inputs.length,
undos = [],
// prevent TextStack from doing undo/redo
keys = { redoKeys: [1], undoKeys: [2] };

for (var i = 0; i < n; ++i)
inputs[i].undo = new TextStack(inputs[i], keys);
document.addEventListener('keydown', function (e){
if (!(e.ctrlKey && e.target.undo)) {
if (e.keyCode == 90 || e.keyCode == 122)

} else if (e.keyCode == 89 || e.keycode == 121) {

I suggest you try Coherent GT, which will fit your needs perfectly - we have implemented an HTML UI editor powered by Coherent GT :)

You can find the Coherent Editor in the Coherent GT package, so you can take a look at it.


Hi Adrian,

Unfortunately Coherent UI on mobile doesn't have an API that notifies you when the View is about to navigate to another page.
For example on Android, there is no reliable API to detect and control the navigation of the view to another page.
Using the URLRequest event and custom logic is the only way that works on all platforms.

A algorithm that would work in most cases would be:
1. Use the extension to detect the type of the request - it is an image, javascript or css - let it go
2. Use the domain to check whether it is a CDN - CDNs mostly serve static resources
3. Use a HTTP client to prefetch the URL and get its MIME type - if it is html, then it is almost sure that it will cause the view to navigate to another page.

Since step 3 might be quite expensive, I advise you to add as many as possible fast checks that would allow to avoid it.
The only case, that I can think of, when this algorithm might not work is when a page is loading another html page via XmlHTTPRequest.



I am very sorry about the missing fix in the release.
Also here is a link for a package that will add fix this issues - https://s3.amazonaws.com/CoherentLabs/Downloads/AndroidBuild.unitypackage
 If you are using Unity 4.6, please be sure to update the Android SDK to the latest available and at least Android L.

Best regards,

.NET / Re: File Upload Page
« on: December 03, 2014, 10:40:32 AM »
Hi darryl,

There has been a mistake on our side and showing the OpenFileDialog is possible with the current release of Coherent UI .Net Controls.

Here is a snippet that shows how to show the dialog with WPF:

Code: [Select]
		private static string ToOpenFileFiler(string[] MimeTypes)
// the format for each mime type is
// type:*.ext1;*.ext2
string[] filter = new string[MimeTypes.Length];
for (var i = 0; i < MimeTypes.Length; ++i)
filter[i] = MimeTypes[i].Replace(':', '|').Replace("/*", "");

return string.Join("|", filter);

private void OpenFile(Coherent.UI.FileSelectRequest request,
  Coherent.UI.FileSelectionParams parameters)
var dialog = new Microsoft.Win32.OpenFileDialog();
if (parameters.Mode == Coherent.UI.FileSelectionMode.FSM_OpenMultipleFiles)
dialog.Multiselect = true;
dialog.Title = parameters.DialogTitle;
dialog.Filter = ToOpenFileFiler(parameters.AcceptedMIMETypes);

if (dialog.ShowDialog() == true)
foreach (var file in dialog.FileNames)

// Attached to the BrowserViewControl FileSelectRequested event
private void viewControl_FileSelectRequested(Coherent.UI.FileSelectRequest request)
var selection = request.GetFileSelectionParams();

if (selection.Mode != Coherent.UI.FileSelectionMode.FSM_SaveAs)
OpenFile(request, selection);

Properly implementing drag-and-drop requires a lot of complex logic to be implemented in the client application and we don't provide support for it.

I am sorry for the inconvenience caused by our mistake and I will send you the complete changed samples as PM.

Unreal Engine 4 / Re: YouTube stream changes (around 10 Sept. 2014)
« on: November 04, 2014, 10:50:21 AM »
Starting with Coherent UI and Coherent UI we have added support for the newer stream format used by Youtube.

To avoid using these workarounds please update your Coherent UI to the latest version.

Unreal Engine 4 / Re: Cannot activate OS X version
« on: November 04, 2014, 10:39:33 AM »

Thanks for letting us know about this issue.
I have send you PM with a link for the new package of Coherent UI for Unreal Engine 4.

Unity 3D / Re: using coherent in an application for the mac store
« on: October 06, 2014, 11:56:32 AM »
Hi hackshaven,

I have send you an email about this.

If you want to avoid recreating your project,  you can follow these steps:

1. Add C++ code to your project by the File -> Add Code to Project menu. Select None for the C++ class, you can leave it empty.
2. Choose Yes in the "Successfully added class MyClass. Would you like to edit the code now?" dialog.
3. When Visual Studio opens, close the UE4Editor.
4. Open <Game>/Source/<Game>/<Game>.Build.cs and change the
Code: [Select]
		PrivateDependencyModuleNames.AddRange(new string[] {});
Code: [Select]
		PrivateDependencyModuleNames.AddRange(new string[] { "CoherentUIPlugin", "CoherentUI", "SlateCore", "Slate" });
5. Build the solution in the "Development Editor" configuration
6. Open the project again in the Editor and package the game
7. Follow the standard steps for  packaging Coherent UI with our game.

I hope this has been helpful.

Announcements / Forum maintenance
« on: August 01, 2014, 12:18:15 AM »
Due to maintenance at our hosting provider, it is possible that the Coherent Labs forums will experience some downtime.
The downtime is expected to last no more than an hour and can happen in the following time intervals

From:03:00 on 2 August    20:00 on 1 August   
To:15:00 on 2 August08:00 on 2 August


From:03:00 on 3 August    20:00 on 2 August   
To:15:00 on 3 August08:00 on 3 August

We are sorry for any inconvenience that might be caused by this  maintenance.


Starting from release Coherent UI support Unreal Engine 4.3.0.
You can get a copy from http://coherent-labs.com/download-unreal-engine-4/.

Unreal Engine 4 / Using Coherent UI with Unreal Engine 4.2
« on: June 05, 2014, 09:21:46 AM »
If you want to use Coherent UI with Unreal Engine 4.2, get our latest release from http://coherent-labs.com/download-unreal-engine-4/

If you want to use the Coherent UI release, please read on.

You need to modify a little bit the CoUITestFPS game from the release of Coherent UI if you want to use it with Unreal Engine 4.2.

Open the CoUITestFPS\Source\CoUITestFPS\CoUITestFPS.Build.cs and add SlateCore as a new dependency by change the line from:
Code: [Select]
PrivateDependencyModuleNames.AddRange(new string[] { "CoherentUIPlugin", "CoherentUI", "Slate" });
Code: [Select]
PrivateDependencyModuleNames.AddRange(new string[] { "CoherentUIPlugin", "CoherentUI", "SlateCore", "Slate" });

Then go to CoUITestFPS, right-click on the CoUITestFPS.uproject file, choose "Switch Unreal Engine Version" and select the version of Unreal Engine 4 you want to use with Coherent UI.
After that right-click again on CoUITestFPS.uproject and run "Generate Visual Studio project files".
Open CoUITestFPS.sln and build the game.

When you open the game in the editor it might ask whether you want to upgrade it to the newer version. You can safely choose the Convert in-place option.

If the editor complains that it cannot start the game because CoherentUI cannot be loaded, open CoUITestFPS\Saved\Config\Windows\Engine.ini and add the following (if it is missing):

Code: [Select]

Once again, you can just get our latest release from http://coherent-labs.com/download-unreal-engine-4/


I do believe we have found a workaround for the issue.
Here are the steps:
  • (optional) Install CoUITestFPS in the root folder of the Unreal Engine, so that CoUITestFPS is next to Engine folder. This is necessary only if you want to start the sample directly from Visual Studio
  • Try to open the project from UE4Editor, so that you get the error for missing UE4Editor-CoherentUIPlugin.dll
  • Open the CoUITestFPS/Saved/Config/Windows/Engine.ini in a text editor and check whether the [Plugins] section is  missing. If so add the following section:
Code: [Select]

Start the UE4Editor and open the game should be working now.


Indeed there is some clash between both plugins.
We are working on finding the reason for that and I expect there will be more info soon.

Unity 3D / Re: Get the Browser Address
« on: May 07, 2014, 07:46:25 AM »
Hi Grimmy,

You are right that CoherentUIView.Page gives the initial address. You can watch for changes of the address using the FinishLoad event.
Here is a sample component that implement this:

Code: [Select]
using UnityEngine;
using System.Collections;

public class CurrentPage : MonoBehaviour {

    public string URL { get; private set; }
// Use this for initialization
void Start () {
        var view = GetComponent<CoherentUIView>();
        view.Listener.FinishLoad += Listener_FinishLoad;

    void Listener_FinishLoad(int frameId, string validatedPath, bool isMainFrame, int statusCode, Coherent.UI.HTTPHeader[] headers)
        if (isMainFrame)
            URL = validatedPath;
            Debug.Log("Changed view to:" + validatedPath);

Unreal Engine 4 / Re: Can we package a game using CoherentUI yet ?
« on: April 28, 2014, 10:39:48 AM »

Sure you can package a game using Coherent UI :)

The crash you are experiencing is probably caused by missing CoherentUI64.dll in the build game.

Please see this topic for steps how to package the game - https://forums.coherent-labs.com/index.php/topic,267.0.html

Pages: [1] 2 3