question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Patrick Zweekhorst commented

What is the difference between the guifocus node and the guifocusclass node?

,

HI,

I am working on some custom GUI's and I noted that some objects in the main tree have a guifocus node, some have a guifocusclass node and some have both nodes. When the object has a guifocusclass node that is the path to the property page in the view tree, but what is the use of the guifocus node in this case?

It looks to me that I don't need a guifocus node when I have a guifocusclass node, is this true or are there some differences between the two?

Thanks in advance,

Patrick

custom gui
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

anthony.johnson avatar image
3 Likes"
anthony.johnson answered Patrick Zweekhorst commented

You don't need a guifocus node. It is a relic from the past (which apparently we haven't completely cleaned up on). In very early versions of FlexSim you had two properties windows for an object: one for general properties that every object had, and one for properties specific to that type of object. Those have been merged into one window now, so there is no longer a need for guifocus.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Tanks for your explanation. I will make sure I only use the guifocusclass node

0 Likes 0 ·
Matt Long avatar image
2 Likes"
Matt Long answered Patrick Zweekhorst commented

You can use either one when it comes to properties windows for objects. It really doesn't make a difference.

The guifocusclass node is most often used when developing the actual property GUIs (or other GUIs). Defining a guifocusclass on an object will cause FlexSim him replace that object with the object found at the path defined in the guifocusclass. You'll see a whole set of guiclasses at VIEW:/guiclasses that we use for building many of the GUIs throughout FlexSim. It will instantiate a copy of the gui class, but still maintain things like variables, event functions, spatial values etc. It allows us to more easily use functionality across many different GUIs.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Tanks for your explanation. I will make sure I only use the guifocusclass node

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.