Set some (not all) of the config to read only?

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
PeteJ
Posts: 11
Joined: Tue Apr 26, 2016 6:35 am

Set some (not all) of the config to read only?

Post by PeteJ »

I am capturing the raw input (in C#). But I want to use the XML cfg file so that the user can configure button actions. I am using 3DxWare 10.3.0

So I want to disable editing (or the display) of the speed slider bar, and the Advanced Settings - however, I want the Buttons to be able to be edited (but not the +, -, ROT/2D buttons on a SpaceExplorer).

I know I can set all of the config to 'readonly' - but is there any way to set certain parts to readonly, and others to still be editable?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Set some (not all) of the config to read only?

Post by jwick »

Nope. Sorry. I never thought of that. I can't even think of a hack, other than resetting the file every time they change it -- which would be very unfriendly to the users.

I tend to let users do what they want. What is wrong with letting them make changes as they need?
You do have to make and distribute a RawInput cfg for your app.
PeteJ
Posts: 11
Joined: Tue Apr 26, 2016 6:35 am

Re: Set some (not all) of the config to read only?

Post by PeteJ »

I have created a cfg based on one of the files shipped with the 3DxWare installation.

Unless I am missing something, changing the speed or pressing the +,-, ROT/2D buttons will have no effect because I am reading the raw input.

I can handle the +,-, ROT/2D buttons in my code and alter the behaviour (which is why I want those buttons as read only).

But if the user changes the speed or the 'reverse direction' etc in the cfg file (eg via the UI while my app is running), it will have no effect on the data I am reading from the raw input, which is confusing to the user.
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Set some (not all) of the config to read only?

Post by jwick »

You have to tell the driver that you are using Raw Input for your app. I never found a way of figuring it out on my own.

The <Transport> element in the cfg does this. Copy the Signature from the S3DM_VIewer.xml cfg that we ship. It is a Raw Input app.

If you do this, the changes you (your users) make in the GUI will be used.

There used to be a "ReadOnly" tag for buttons, now that I think about it. I don't think it is obeyed by the GUI anymore. We got a lot of complaints about it, especially on devices that only have two buttons. We have moved in the direction of allowing the user to do what he wants.
PeteJ
Posts: 11
Joined: Tue Apr 26, 2016 6:35 am

Re: Set some (not all) of the config to read only?

Post by PeteJ »

I can't find the S3DM_VIewer.xml cfg file (I am using 3DxWare 10.3.0).

I can find other cfg files that use 'raw input' eg WSIWYG.xml - is that OK to use as a template?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Set some (not all) of the config to read only?

Post by jwick »

Sure that's fine too. <Transport>RawInput</Transport> is all you need.
PeteJ
Posts: 11
Joined: Tue Apr 26, 2016 6:35 am

Re: Set some (not all) of the config to read only?

Post by PeteJ »

Have now got it working. 'rawinput' in the cfg file does allow the GUI speed controls to work. So no need to make any of the UI read only.

Is there any documentation of these XML cfg files?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Set some (not all) of the config to read only?

Post by jwick »

Documentation? I'm your documentation. Ask away.
PeteJ
Posts: 11
Joined: Tue Apr 26, 2016 6:35 am

Re: Set some (not all) of the config to read only?

Post by PeteJ »

I've asked another question in a new topic..
Post Reply