Desktop version

Main > Forum > 1C:Enterprise Platform > Bugs and functionality requests to 1C:Enterprise platform > ClientDisplayInformation is not working

Forum

Search UsersRules
ClientDisplayInformation is not working
#1
Active user
Points:: 0
Joined:: Sep 1, 2014

ClientDisplayInformation object is not working.
Timofey please give me a solution to fix this problem.

Profile
#2
Guest
Points::
Joined::

Hello, Marius Gidu.

Please provide more details: what you are trying to do and which error message do you receive?

Profile
#3
Active user
Points:: 0
Joined:: Sep 1, 2014

I`m trying to get DPI, Width and Height of the mobile device.

Variable is not defined (ClientDisplayInformation) this is the error.

Profile
#4
Guest
Points::
Joined::

This feature was added in 1C:Enterprise platform 8.3.6. Are you sure you are using this version?

Profile
#5
Active user
Points:: 0
Joined:: Sep 1, 2014

I`m using 1C:Enterprise 8.3 (8.3.6.2100).

Profile
#6
Guest
Points::
Joined::

I suppose you are trying to use it in the incorrect way. This is the type, returned by the GetClientDisplaysInformation() function.

Please see the following example:

Code
   ClientDisplaysInformation = GetClientDisplaysInformation();
   For Each CurClientDisplaysInformation In ClientDisplaysInformation Do
      Message(CurClientDisplaysInformation.DPI)
   EndDo;

Profile
#7
Active user
Points:: 0
Joined:: Sep 1, 2014

Thanks. But the documentation offered by this site and syntax assistant of the platform are both wrong. Just read and you will see.

On site: What's new in mobile platform
Window management. The option to handle the change of mobile device display parameters is now available.
The OnChangeDisplaySettings event handler is implemented. The event occurs when the client application display parameters are changed.
The Width and Height properties of the ClientDisplayInformation object store the actual values (which depend on the screen orientation).
This feature was not provided.
The platform could not detect the changes of display parameters.
The Width and Height properties of the ClientDisplayInformation object stored constant (canonical) values.
You can handle the display size changes caused by mobile device orientation changes or by connecting the mobile device to external displays. You can create applications with better usability.


In syntax assistant:

ClientDisplayInformation
Properties:

DPI
Height
Width

Description:

Used to describe the display of the client device.

Availability:

Thin client, web-client
, server, thick client, external connection, Mobile application (client), Mobile application (server).


ClientDisplayInformation
DPI
Usage:

Read only.
Description:

Contains the display resolution (DPI).

Availability:

Thin client, web-client, server, thick client, external connection, Mobile application (client), Mobile application (server).


etc

Profile
#8
Guest
Points::
Joined::

And what do you think is wrong here?

In the description of the GetClientDisplaysInformation() function it is said that it returns an array where elements have ClientDisplayInformation type. This is what I have demonstrated in the example: traversing the array and printing the property of its items.

You don't need to create ClientDisplayInformation object, you have it returned by the function.

Profile
#9
Active user
Points:: 0
Joined:: Sep 1, 2014

Sorry i didn`t see in syntax assistant GetClientDisplaysInformation() function, but now i found it and i tried the method you provided and it works.

Thanks a lot.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.