How assistant model works in swift? - swift

I build a new class called StaticCellTableViewController. Now I want to connect some element from the Main.storyboard to it. But I can't have these two windows side by side.
I go the StaticCellTableViewController and click assistant. It gives me two StaticCellTableViewController windows.
I try to click assistant in the Main.storyboard window. It gives me another class like this.
But I want the Main.storyboard window and the StaticCellTableViewController class side by side so I can drag elements to it. How can I do that?

You do not need Assistant any more. Don’t use it. Editor panes can now contain anything.
So open two normal editor panes. Click in one pane. Click your view controller in the navigator. Click in the other pane. Click your storyboard in the navigator. Done.

Related

Adding New Components in WindowBuilder Design View

At risk of this being a trivial question, I need to know how to add more components (in the components explorer) in WindowBuilder for Eclipse Juno. I'm taking a dive and trying learn how to add a GUI to one of my personal projects. Right now all I have mustered up is just a JFrame that has a button that launches my program in the console with a little notification saying so. But what I am thinking about having is a "Start up Window" with just some stuff and button or something that says Enter application or something. So then I want a new window to pop up as a "Run Window". I have created a new JFrame as a "run window" and hide/set visibility of "startWindow" to false and get the result I want. But I want to be able to edit this new JFrame in the design window along with the default JFrame I started with.
Is there a way to do this? I tried right-clicking in the components window in the design view and it doesn't do anything. I also tried right-click the object from the project explorer and couldn't find anything. Am I missing something? Is this even possible?
The question seems to have 2 parts, so I will try to answer both of them.
1) Adding components directly in the components explorer
The only thing you could do, to get new components into there via right-click is "Surround with". For example you have a JPanel, right-click on it and click "Surround with...". You could try and put a JScrollPanel in there, so you can scroll your JPanel.
But the usual way to add components is by the "Palette", it contains a lot of components, that you can drag&drop into either the components-explorer or directly into your app Window -> Show View -> Palette.
2) Showing a certain window
If I understand this correctly, you want to show one window, click on a button and then show another window which has the same size etc. like the one before.
Setting the visibility for the first window to false and the second does work.
But under certain circumstances it's easier to use CardLayout.
Imagine a stack of cards, you can see only the first card. Then you click a button and now see the second card and so on.
See this: https://docs.oracle.com/javase/tutorial/uiswing/layout/card.html
for information and examples.

GNAT GPS Project Explorer View is Missing

I am using GNAT GPS version 6.0.1 in Windows 7. For some unknown reason, the Project View pane that is on the left side of the main window has disappeared when I use the debugger. I can't find any menu or preference options that control whether this pane is visible.
Update--
I should point out that this is the pane with the tabs along the left side rather than along the top. I can show a similar pane with projects listed by splitting the main window, but its tabs are along the top. Also, Its behavior is different form the one with tabs on the left side. Double-clicking on a file name, for example, should open the file in the main window. Using a split window. this opens the file in the window that is showing the projects.
End of Update --
I can select Project -> Project View from the toolbar, and I get a Project View as one tab in the main window (along with the source files that I am working with).
Can someone tell me how to control whether the left-hand pane is visible and how to make sure the Project View has a tab in that pane?
Also, when I look at Window -> Perspective, I see that the Default perspective is selected when I'm not using the debugger and the Debug perspective is selected when I am using the debugger. Switching from the Debug perspective to the Default perspective while I am running the debugger does bring back the left-hand pane, but my debug tab and the Debugger Data window disappear. Can I fix the Debug perspective so the left-hand pane is part of its configuration by deffault?
By the way, in this version, there is no Show View option in the toolbar menus.
This can be opened with /Project/Project View or /Tools/Views/Project.
To put the tabs to the left instead of the top, right click on the tab and select the Tabs Location item. You can also use drag-and-drop (from a tab) to move windows around, in particular to move the Project view to the left of your desktop.
That said, the simplest might be to remove the file $HOME/.gps/perspectives6.xml to restart from the default desktop.

Is it possible to make Interface Builder in XCode to create a backing IBAction automatically?

Must be using wrong keywords in search because I can't find any answer to this.
I don't use much of a Visual Studio to build UIs but I do remember that double click on UI component event (like Button OnClick) automatically creates a hander method in supporting C# class.
So is there maybe a magical combination of keys or clicks to achieve the same effect in XCode IB?
In xcode open your nib(xib) file, switch the xcode to the 'Assistant Editor' mode. Select .h(header) file of your class on the right side of the editor. Select your button in the interface, and by holding the button with the right mouse button drag it to the .h(header) file, you will see the line drawn between your button and header, when the right end of the line is in right place on the header, release the right button of the mouse. Now you should see the menu for creating IBOutlet and IBActions. On the top of the menu you can choose between creating IBOutlet or IBAction, choose action and name your method and hit enter. That's it :) Good luck!

Hide Eclipse Menu Bar (auto-hide)

I'm trying to hide Eclipse menu bar to save some screen real estate. I found I can do this using perspectives but that would permanently take out the menu from that perspective. The behavior that I want to get is something along of auto-hide, so that the menu remains hidden until I hit ALT+F for example or any other ALT key combo.
Is there's a setting or a plugin that can do this?
Thanks!
This is just a work around. Create two perspectives.
First one named - With Menu.
Second one named - Without Menu.
In the "Without Menu" perspective remove all menu items and Save.
To create the effect of hiding and showing, switch between perspectives by using
Ctrl+F8.
Theres a fast view option- just right click the tab and select Fast View. It'll bring the entire window down to the eclipse taskbar. You can recover the window by just clicking on it's icon.
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=56119
Have a look here Is there a Macro Recorder for Eclipse? You could set up the macro so respond to ALT+F possibly.

In Xcode4, the new interface builder says "no selection"

I am using the xcode 4.02 for iPhone programming. In the new interface builder, when I click a button (or any other GUI-element) and go to the "attributes inspector" it says "no selection". For a while I thought I could solve the problem by saving the nib-file, but it does not always work.
How can I solve this problem?
There seems to be a bug in Attributes Inspector in Xcode 4. When this happens to me I usually do this:
Switch to another (non IB) file in the current tab
Launch a new Tab (cmd T)
Open the original IB file in this new tab
The Attributes Inspector will magically show in the new tab.
I just had to close the assistant editor and the debug area and then it magically showed up. If you don't have the assistant editor open then all you need to do is open it, then close it again. That should fix it too.
If you don't know what the assistant editor is I have highlighted it in red:
Xcode 7.2
Do you open the inspector window by clicking the 3 button in the views group? Once you do that the attribute inspector is shown on the left and you can now open the nib files and select any gui element.
Does it work if you click the GUI element after making the attributes inspector visible?