Xcode11 does not allow connecting a label to an IBOutlet on a different view controller - uiviewcontroller

I have two view controllers A and B with labels and buttons on A.
xcode11 allows me to click drag from a UIButton on A over to B,
however it will not allow me to do the same for a UILabel.
Is the a way to allow this to happen?

You've misunderstood what you did. You can't make any sort of outlet or action connection between two view controllers. What you made is a segue - an action segue. You tap the button and we will push or present the second view controller. Well, fine, if that's what you wanted; but a label is not tappable, so there is no action segue possible from it. A tappable label would be a button.

Related

Servicenow Service Portal, creating a Save button for the form widget in a custom widget

I currently have a custom portal with a custom version of the form widget that doesn't have any UI Actions (OOTB inclusive).
We also have a custom widget (let's call it "actions widget") where we control all the actions we need to take in the record.
Currently I need to create a "Save" button inside the actions widget where the user, after filling the form, can click on the save button to update the record.
I am unable to find any way to make this button work. The keyboard shortcut "CTRL + S" works perfectly but I have no idea what type of functions and/or methods this shortcut calls.
If this is too complicated or not possible I can also fetch the fields one by one (there is not a lot of them) and update the record with that information.
Can you guys assist me with this?
Thank you in advance.

What is the purpose of a role when dismissing an Ionic modal?

I'm creating an ion-modal dialog, and the close button calls
this.modalCtrl.dismiss(my_data, 'close');
I added the 'close' string as a role because I've seen it in other parts of the code. It's optional, so I'm wondering, is that good practice? Is it just to comply to html roles? If that is only meant to pass some extra data back, I can't see what's so special about it and why I shouldn't just include it in 'my_data'.
Any thoughts?
Role defines the way you closed the modal, for example, you may cancel the modal so you can make the role as cancel, or you may do some functionality and submit and close modal after submit so you make the role as submit, when you listen on the modal after closing it, based on the role you can do some functionality, for example if the role was cancel, you do nothing or show message for user, and if the role was submit you view data passed from modal to your view

Yii2 wrong route like controller/controller/action

I'm facing the following problem: In a table with ordered records I want to insert a new record at a specific location or copy / move a record to another position.
In the index view I defined the additional action buttons {new} {copy} {move} in the grid view. A click onto one of them routes to a new view called select (controller/select) with a grid view of the same table with only two action buttons, {before} {after}, indicating whether the record should be placed above or below the selected record.
Clicking on one of these buttons routes to the controller action create (if formerly was selected new) or the controller action copy-move (controller/create or controller/copy-move). The controller does his job and returns to the index view with $this->redirect(['index']). This works properly.
Clicking again onto one of the action buttons in index view {new} {copy} {move} I see a strange route: controller/controller/select instead of controller/select. This behaviour stops only when I call the index view from the menu it doesn't by refreshing the browser.
Why does this happen? Is it maybe because of immediatly creating a grid view after selecting an action in a grid view before? And how to avoid this behaviour?
This is the work-flow:
call index view
click on action button {new} {copy} or {move}
create route controller/select
get the select view
in select view click on action button {before} or {after}
create route controller/copy or controller/copy-move
create a new record at the choosen position or copy / move it there
return $this->redirect(['index']) after controller has done his job
in index view again click onto action button {new} {copy} or {move}
create route controller/controller/select instead of controller/select which ends in a 404 error.
You are facing problem with relative and absolute urls. In yii2
// relative route: /index.php?r=admin%2Fpost%2Findex
echo Url::to(['post/index']);
// absolute route: /index.php?r=post%2Findex
echo Url::to(['/post/index']);
NOTE:- forward slash is required
For more information see this
Looks like I got the answer to my question. I removed all logic from the view file defining a specific action with it's route letting kartik grid view generate the url in the action section of columns. So in index.php I have three actions with an own route for each: {new} routes to new, {copy} routes to copy and {move} routes to move.
Then I did the same for select.php where the actions are {before} routing to before and {after} routing to after.
In the controller, the routes then are redirected to select action in the first case and to create action resp. copy-move action in the second case.
This seams to work properly and I don't get that wrong route anymore.
Thanks for helping.

Flex/AIR Mobile: TabbedViewNavigator selectedIndex not working

I have a Mobile Project in FB 4.6 with a TabbedViewNavigator. I have 4 buttons at the bottom, which are ViewNavigators, and act as the Tabs. For this instance, lets say the tabs are labeled, HOME, ADD, DELETE, and ABOUT. I am running into the following situation:
User presses the ADD tab.
In the ADD screen, user clicks on several links which takes them away from the ADD tab's firstView and to a new view all together. For this instance, let's say the active view is called PlayersView.
User now clicks another tab, for example HOME.
User decides to go back to the ADD tab. However, upon pressing the ADD tab, the user is taken to the last view, which in this case was the PlayersView.
How can I have the functionality changed so that upon pressing a Tab, the user is ALWAYS taken to the firstView property of that tab. As referenced above, this is not happening. I have tried creating an IndexChangeEvent listener on the tabbedNavigator and then changing the tabbedNavigator's selectedIndex, however this doesn't work.
protected function tabbedviewnavigatorapplication1_applicationCompleteHandler(event:FlexEvent):void {
this.tabbedNavigator.addEventListener(IndexChangeEvent.CHANGE,onIndexChange);
}
protected function onIndexChange(event:IndexChangeEvent):void {
this.tabbedNavigator.selectedIndex = event.newIndex;
trace(' THIS DOESN'T WORK');
}
Any help is appreciated. Thanks, in advance.
In your code, when you set
tabbedNavigator.selectedIndex
you switch between different ViewNavigators, not between different Views inside a ViewNavigator.
As I understand it, you are trying to stay within a single ViewNavigator stack and select the first View.
Let's say you have:
<s:navigators>
<s:ViewNavigator id="addSomethingNavigator" firstView="views.AddView"/>
<s:ViewNavigator id="deleteSomethingNavigator" firstView="views.DeleteView"/>
</s:navigators>
You can pop to a specific ViewNavigator's first View like so:
addSomethingNavigator.popToFirstView();

Oracle Forms : How to make a window/canvas/form the starting one

I have a school project where I have to make a small database application using Oracle Forms.
I have 4 forms in my application:
A login form
A main form
A form that is displayed after the new button is pressed on the main form
Another form that is displayed after the edit button is pressed on the main form.
I've created the forms in the mentioned way.
When I start the application, I want the login form to be the starting form. Now what starts first is the edit form (the last one created).
How can I manage that?
Thank you.
The form loads that canvas first which holds the first data block in the Object Navigator. So make sure that your login form block is first on the list.
You can also set the "First Navigation Data Block" in the Property Palette for the form to the desired block on the login form and it will display that first, overriding the first block in the other answer.