Link instances in a UML class diagram with Papyrus - papyrus

Under Papyrus 4.2.0, how can I link two instance specifications (as described here or here)?
I created a new class diagram, created two Instance Specifications, and click on the Link entry in the Edges Palette, and when hovering over my instances, the icon says “forbidden”, as when trying to use an edge on something that can’t receive that kind of edge. This is consistent with the tooltip for Link, which says: Creation of a link for comment, constraint, TimeObservation, DurationObservation.
The bug reports 432693, 468588, 444606, 432678 (all but the last fixed long ago) indicate that it is possible to link instances with Papyrus. But how?
The user guide does not mention instances or links.

You have to have two "Instance specification" (object) for example in a class diagram. The objects have to have classifiers. The two classifier have to have at least an association to each other.
Then choose "Instance Specification" tool from the "Edges" palette. Tie them together with the mouse. When the moue button released on the target object, two new window will be opened (with papyrus 4.4.0). The first window completely empty, but the second shows a list with associations between the two classifier. Choose one, and press the "OK" button. The empty window will be remained on the screen. Close the empty window. And voila link created.

Related

Pausing an animation whilst Unity UI is active

I have a two modals that I'm designing to go over my project in Unity, one for a quick tutorial and one for more information about the project, I also have an animation playing in the background.
I'd like the animation to pause whenever the modals are active and over the top of the animation, if you can't see the animation, why have it playing? Exactly.
My code so far doesn't work and I'm unsure why.
using UnityEngine;
using System.Collections;
public class ModalPauseController : MonoBehaviour
{
public GameObject tutorialModal;
public ScrubberAnimationController nac;
public void TutorialModalIsOpen()
{
if (tutorialModal.activeInHierarchy == true)
{
Debug.Log("The tutorial panel is active!!");
nac.UserClickedPauseButton();
}
}
}
nac.UserClickedPauseButton refers to another script where it pauses the animation.
So far whenever I toggle the active state of the modals, whether it be via the inspector, or in game, I no feedback in my debug.
It's quite tricky writing code like that, because if you think about it
the code itself will be not active !!!
As a rule say you have a panel "X" which is a popup or something like that - something which comes and goes.
The rule is you must have the "controller" for that thing
on some other item, not on itself!
Here's an example:
The "megabomb" is a popup sign which goes on and off. There it is on
and there it is off. There's a script which controls the megabomb on-offness.
Notice there is a "wrapper" for the megabomb item. In UI the "wrapper" is very simply an empty panel. It is invisible. Note that the wrapper always stays on.
The script goes on the wrapper - that's it.
Note that very commonly the "megabomb" item itself has a "wrapper" - a gray transparent background. So, when the popup appears, the game behind goes all gray and you have the popup over that. Don't forget in that case the gray background would be labelled "megabomb" in this example and the actual popup green (or whatever) panel would be below that. (Indeed the popup panel itself will very likely have many parts -- images, buttons, borders, etc etc.) Do not try to use the "gray background" as the "wrapper which holds the script. You need a completely separate wrapper "outside of everything" which does nothing other than hold the script.
{BTW this is yet another thing which screws up experienced-developer-who-are-new-to-Unity. Normally you'd have "some other class" run the popup, but there is "no other class" in Unity - everything is a singleton if you will, since it is an ECS system, not normal OO. You have to literally have another game object (the one labelled 'wrapper' in the example) which controls the game object in question (the one labelled 'megabombs' in the example). AND it has to be always active.}
Note - if you prefer the "controller script" can actually be anywhere else (it does not have to be on an game object "holding" the item in question). However certainly at first I encourage you to use the system of putting it as a "wrapper" as shown, it has many advantages. (Not to mention ultimately it might be a Prefab, etc etc.) Definitely do that when starting out.
It's just "one of those things they don't mention" about Unity: very often many many things in your scene will need a "wrapper" object. (The same is true for other reasons such as positioning, relative rotations, etc, too.)
BTW as I mention in a comment. If you are making a popup, it must be done with Unity.UI (ie, click "add canvas" - always remember to set to 'scale with screen size' , then click "add panel", then click "add text").

Getting the current value of a textbox in Access 2013 Custom Web App

in a List view I want a particular control (textbox) to have a red background color if it has a certain value. I have tried the following:
Click on the textbox then click the Data icon in the context sensitive controls that appear. I can then see that the name of the control is First_NameTextBox. I then click anywhere on the List view and click the Actions icon in the context controls that appear to the right of the view. I select "On Current". I then create two steps that should be executed whenever a new record is activated:
If [First_NameTextBox] = "somevalue" Then
SetProperty
Control Name [First_NameTextBox]
Property BackColor
Value #FF0000
End If
However, this turns the textbox red no matter what the value in First_NameTextBox is. How do I reference the CURRENT value of the textbox?
Conditional formatting based on a field value is not available for the List View in a Web App.
If you've built web pages (with or without a templating engine), the design limitations of Access can be frustrating.
Another kind of frustration comes from moving a form in Access from the native Access environment to a browser-based display.
I've felt the first kind of frustration, but so far I've avoided the second kind. I keep MS Access and HTML-rendered forms far away from each other.
Conditional Formatting in the List View of Access Web Apps is Available its just way harder than it should be.
Input "If Statement" under the "Current Macro" by clicking outside any text box or label then traveling to the top right of the view and you will see the Lightning bolt which allows two options, "On Load" and "On Current".
SELECT ON CURRENT
Don't forget You will need to set the control back to the original color by using the else. (also, for some reason I have to flip the Colors so where you would think red would go, Put White.
Example:
IF = "" True Then
White
Else
Red
END IF /DONT ASK ME WHY!
Summary: your Code is Sound, Just input it under the Views Current Macro Location
This is my first post, i spent DAYS looking for this information and found in the deep google somewhere so i hope this helps you.

Looking for a specific control (sketch included)

I am looking for a control many of us probably know, but I don't know it's name and don't have a real screenshot by hand, just this sketch:
In the left box one can select an operation or whatever, which then is moved to the right side. With the up/down arrows on the right, one can move this operation (or whatever kind of meaning the entry has) up or down in the order of execution.
How is this kind of control called? Or is it normally build by developers out of single controls? Is this control available in JavaFX 2? If not, I don't need exactly this control, but a control with the following features:
User can select multiple operations (duplicates allowed) out of all available operations
The user can arrange their order of execution
Thanks for any hint :-)
You need to use multiple controls to build up your interface. Use two ListViews with a MultipleSelectionModel for each (or at least the left one) and add a couple of buttons, that copy selected items from one list to the other and another couple of buttons which modify the position of selected items in the right list view by modifying the view's underlying item list.
listView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);

How can I know who calls the method in Xcode?

Does Xcode have a way to show the caller function of a method? I want to know all of the calling functions of a method in a class. A solution would be to find the method in the project, but sometimes different classes have methods with the same name - That could find us a method we're not looking for..
Many other IDEs have this capability, such as Visual C++ 2003/2005/2008,Eclipse ...
Can you do this in XCode?
Xcode 4.4 intrudced this functionality:
New Features in Xcode 4.4 (Scroll down to 'Find and Search Additions')
Move your cursor on top of the function you are interested in
Open the Assistant editor(⌃ +⌘+Enter)
On the top of the assistant editor, Select 'Callers'
You will see a list of all the function that's calling your function
Not the as effective as other IDEs, but does the job.
Yes. Set a breakpoint inside your method, then when it breaks, there are two spots to see a stack. First is in Xcode's "console" area (usually the bottom middle), there is a top-bar which may not immediately appear to be navigable, but it is a select-style UI control which has the entire stack in it. Selecting a different level shows you that scope's variables, etc. and pops your editor to that exact file (where you can mouse-over variables to see their in-memory real-time values). Second is in the left-hand area (where you normally browse files). There is another tab there (besides the file browser) for exactly this purpose. There is a slider at the bottom which controls how many "steps" in the stack you see; clicking on one has a similar affect.
For simple refactoring such as method re-naming, you can use the contextual-menu when you right-click a selected method-name, and Xcode will replace all identical selectors in your project. However, this does not address what you mentioned about different classes having methods with the same signature. It does, however, give you a very nice interface for reviewing the changes in-context and easily accepting or rejecting them one at a time.
It might be noted, however, that changing method signatures often may be a sign of poor design, and particularly if you have to do it with methods which have the same signature on different classes (which are not "siblings" and therefore should both get the rename)

Should an icon show current state or next state?

When using icon images without text captions, should the icon represent the current state or the next state? For example I have a block of text that I want to minimize / maximize or I want to toggle showing All User Records or just My Records. I'm sure there are compelling arguments for either side and know that consistency is key, but what are the arguments related to good intuitive user design?
There is neither standardization nor general human tendency on this. For example, MS Windows UX Interaction Guidelines specifies four basic kinds of toggling progressive disclosure control. Three out of four show the state-when-activated, while one shows the current state.
I believe if you test a particular approach on your users, you'll get different results depending on what you ask. If you show them a control and ask them what state the app is in, they'll tend to read the icon as if it were indicating the state. If you show them a control and ask them to change the state (where in some cases the state is already changed), they'll read the icon as if it were the state to achieve. It's precisely because of this they invented toggling buttons.
If you're lucky, users use the icon primarily for either reading the state or setting the state, and not both. Then let the icon indicate whatever the users use it for.
If they indeed use it for both reading the state and setting the state, you're basically hosed, but there are a few things you can try to minimize hosehood:
Use text in addition to or instead of an icon. When labeled with a verb (e.g., "Connect"), the control indicates the state the user gets. When labeled with an adjective or noun (e.g., "On Line"), it implies the current state.
If your lib doesn't support toggling icons, then consider using a checkbox control, if that's allowed.
If your lib doesn't support checkboxes, then consider two controls, one to set each state, where the current state is disabled. Not too good for reading the current state, but there's some precedence for this in pulldown menus.
Fiddle with graphic design or placement to make it consistent with the meaning you've chosen. For example:
Command buttons are always labeled with the action they commit, so if your icon indicates the state the user gets, then give the icon a raised appearance like a command button. If the icon indicates the current state, then give it a flat appearance.
Toolbar controls usually show the state they bring about, so put the icon at the top of the window if indicates the state the user gets. In contrast, icons in the "work area" of the window indicate objects or attributes, so icons there should show the current state. Icons at the bottom of the window (in the status bar) should also show the current state.
This has not been truly standardized. Folder icons, for example, show open folders when they are open and closed folders when they are closed. Same for disclosure triangles, etc.
However, in other contexts, this is not always true. In a movie player, the "Play" arrow shows when the movie is not playing, and it shows the pause icon when it is playing. Probably the thing to do is use your best judgment, then poll your users. If a preponderance of the people you test are confused by your icon choices, switch them around. Then test them again and see if your initial test holds up. :)
If you are just going to have one button to toggle between two states, then the button should represent the next state, because that is the action that the button will take when clicked.
You gave the example of text that is minimized/maximized. Think of any expandable tree interface you ever see in Windows. A minimized tree has a [+] next to it, because clicking the button will expand the tree. And a maximized tree has a [-] next to it for the same reason.
You could also try to make a toggle that is highlighted or "pressed down" like mihi says, but that might be more confusing.
I prefer the "next state" approach (click plus to expand, click minus to collapse).
One reason is that this is the most widely used approach, so doing anything else would confuse users (and me as well).
Another reason is that the "next state" approach looks more inviting for the user to click.
May I present Zoom's mute button:
It shows the current state, as an icon, and the action that will occur when you push the button, as text. In other words, the icon on the button is the current state and the label on the button is the new state. The current state and the new state are opposites, so the button appears to contradict itself unless you read it very carefully.
(I hate that button.)

Resources