How to view the current value of hardstatus in GNU screen - gnu-screen

How do you view the current value of hardstatus (or any other screen variables for that matter)?

Related

ngx bootstrap date range picker pop up position and width

I am using ngx bootstrap date range picker in my application and it works fine except in one place which is far right to the screen. when I click the button the dates pop up but they stack on top of each other (instead of normal inline). I gave width to it and the pop up went inline but out of the screen with scroll bars.
how can I position the popup a bit to the left so it doesn't go outside the screen?

NSPopUpButton in a toolbar with fixed image similar to Pages.app UI

The toolbar in Pages (Numbers, Keynote) has a NSPopUpButton with a fixed image (irrespective of the menu that is selected). Using view debugging it turns out that this is a standard NSPopUpButton with a fixed image.
According to the NSPopUpButton docs regarding setImage:,
This method has no effect.
The image displayed in a pop up button cell is taken from the selected
menu item (in the case of a pop up menu) or from the first menu item
(in the case of a pull-down menu).
This means that this standard NSPopUpButton has non-standard behaviour.
How could this be implemented? Because setImage: has no effect, subclass the NSPopUpButtonCell and overriding -drawImage:withFrame:inView: has no effect (because it is never called).
The problem here is confusion: Pull down menus display their menu's first menu item as the image/title.
Don't use -setImage: to display a static image in a -pull down menu. Instead set the first element of the menu to be the image/title that you want to display and add the selection options as additional menu items.
#Volker is absolutely correct. This is the built-in behaviour but you set the image by setting the first element in the menu not using setImage: or setTitle:.
Example, https://github.com/danieljfarrell/Toolbar-with-Pull-Down-Menu

Adding A View To An Existing View Programatically

How can you add or replace a view within a view with code? I'm programming for OSX, not IOS.
I am using a drawer that utilizes a custom view. In the custom view I have two boxes, one with a custom set of icons that I want to stay static and another box that has the information related to that button. What I want to do is when a user clicks one of the buttons that the 2nd box view changes to reflect the info for that button.
For example, I have five buttons and the default 2nd box is "Info", if the user clicks the 2nd button in the first box view I want to change the 2nd box to be the "List" box instead while the 1st box with the buttons stays intact.
I'm not sure how this would impact constraints since while the first box is a fixed size, the 2nd box needs to be dynamic so that it fills in the "rest of the space" so that when the drawer size changes with the window size that the 2nd box is taking up the remaining real estate.
Thank you!
I have implemented such a scenario in the past using a tabless NSTabView, and an NSSegmentedControl (for the buttons). The NSTabView has it's -takeSelectedTabViewItemFromSender: action connected to the NSSegmentedControl, using Interface Builder.
In the Connections Inspector, this shows up like so:
This has the effect that the index of the selected NSTabViewItem in your NSTabView will correspond to the index of the selected segment in the NSSegmentedControl.

iOS7 tab bar custom icon height - height reduces until icon gets invisible

I implemented tab bar with custom icon sizes to match the design:
The first and the last icon sizes are reduced to fit below the circle line by setting the bar item sizes as follows:
The strange behaviour that happens only on iOS7+ is that when the user taps already active resized tab bar icon for the second time - it gets reduced in size:
And if I tap on it again - it's size is so small that it appears invisible:
This doesn't happen on iOS5 or iOS6.
Is there something that I'm doing wrong here or any right method for reducing tab bar icon size?
Hi may be this is will useful for you.Give the dimension of your tab bar items 30x30 pixels and #2x is 60x60.This is working fine for me. Image inset give the all (0,0,0,0).

How to prevent a UIView from consuming user input

I have a simple view hierarchy example.
Obviously the main view space is the primary space the user will interact with. At the bottom I have tabs that can pop up to indicate to the user where he/she is in the progression of the app. Normally, these tabs only take up the space indicated by the "Custom Tabs" rectangle at the bottom, but they can expand all the way up to fill the "Empty Space" box.
In order for the tabs to still be clickable, I had to make the tab view's frame the full rectangle containing both the "Custom Tabs" space and "Empty Space" space. What this results in is that "Empty Space" not being interactive to the user when the tabs aren't popped up, because the input is basically being consumed by that UIView, and not forwarded through the rest of the hierarchy.
I suppose the root of this problem is that both "Main View Space" and the "Empty Space + Custom Tabs" are both subviews of the main window.
Is there a way I can tell the system to forward the user input to the sibling views if the user didn't actively tap on an interactive element? For example, doing something with the touchesBegan, touchesEnded etc. methods that would indicate to the OS that this view did not use the input.
EDIT
Here's another version of the view, demonstrating the tate of one tab being open:
EDIT2
After some simple testing, it would seem that the default behavior is that the top most view gets the input first. This applies even if you have a clear UIView on top of a UITextField. The clear UIView will consume the input, preventing the UITextField from being editable
EDIT3
The way the tabs are supposed to work is the user can tap on a tab (sized as in the first picture), and then it will expand to display a thumbnail view associated with that tab (as in the second picture). The user can then optionally tap the tab once more to close it, and return the size to the original picture. In order for the tab to be clickable when it is open, I have to have the containing view be basically large enough to contain all 4 tabs as if they were open. This results in a lot of empty space in the containing view. This empty space results in essentially dead input space on the screen. If there were a button in the main view space that is covered by the empty space, the user would not be able to click on it. I would like to be able to avoid that behavior, and have that button covered by the empty space still be clickable.
Rather than trying to "forward" touches, I would modify your layout so that the tab view is only as big as the tabs, and change it's .frame to be the larger rectangle in code only when you need it. For example, when a tab is clicked:
CGRect tabFrame = tabView.bounds;
tabFrame.origin.y = top_of_emptySpace;
tabFrame.size.height = height_of_emptySpace + height_of_tabView;
tabView.frame = tabFrame;
then you can add the content you need. when you need it to go away, remove the content then do :
CGRect tabFrame = tabView.bounds;
tabFrame.origin.y = top_of_tabView;
tabFrame.size.height = height_of_tabView;
tabView.frame = tabFrame;
There might be some tweaking required to make the content show up as you like, but this way, when the tabs are minimized, you won't have to do anything extra to make the main view respond to touches correctly.
Ok, this is the way I would do it:
The RootViewController has two views, its main view which takes the whole screen, the one that is added to the window. And the tab view.
Then I would add another view controller (a UINavigationController ideally) to the RootViewController and I would have its view added as a subview of the RootViewController's view.
Any change performed, such as pushing new view controller or anything, would be done to the child view controller.
That way, your tab view would always be showing. To open a tab, you could create a new view that would show on top of the tab bar using an animation or something similar.