NSForm disappearing from custom sheet - cocoa

I've made a custom sheet and it appears and disappears as necessary. However, the sheet includes an NSForm that disappears when automatic cell resizing is disabled.
When "Auto recalculate cell size" is enabled, the form appears but the form's cells are not sized properly.
Has anyone had this problem before?

The problem was with auto layout. I just disabled it for the sheet. Worked fine after that.

Related

How do I remove (not hide) UI button in Xcode?

I have a view with a lot of UI buttons. I want some of the buttons to show and some to be hidden depending on my dynamic content. This can be done with button.isHidden = true. The problem is that the layout still set its constraints to the hidden buttons which create a lot of empty space.
You can see the empty space at the bottom in the picture where the buttons are hidden. So, is it possible to make the buttons "gone" instead of hidden? In Android Studio there is a isGone code (can't remember the exact code) that not only hides the button but removes the height and width of it as well.

Xcode 7.1 - Prototype cells in storyboard not showing up

I just updated to Xcode 7.1 and I noticed that all of the prototype cells in my storyboard tableviews are showing as blank and their elements are missing. Sometimes I can see the prototype cells at the top of the tableview, but when I scroll down to view the others all the cells appear blank and white again.
Has anybody else experienced this and is there a quick fix?
Yes, I'm also experiencing this issue.
As a quick workaround, you can set the View Controller simulated size to Freeform, and make it big enough to accomodate all of your custom cells.
Select View Controller
Change its height
Changing it back to Fixed will revert it to the regular size.
Selecting the Table View and selecting the 'size inspector' icon in the 'utilities' pane and ticking the checkbox 'Preserve SuperView Margins' in the 'view' section seems to reset it.
preserve superview margins
However it's not fixing the problem, it worked fine in previous versions and I agree with #matt to file a bug report with Apple
Edited: Seems they fixed it in 7.1.1

How to make a button appear pressed in libGDX?

So I have an ImageButton that has a texture for when it's not clicked and another one for when it is.
I'd like to make it so that under certain circumstances it becomes disabled also appear as if it's clicked (displaying its "clicked" texture).
So far button.setDisabled(true) has worked wonders but it doesn't make the button appear clicked. I searched through the whole Scene2d ImageButton doc and couldn't find a single method that could do that for me. Any ideas how can I achieve it?
Try using ImageButtonStyle to set the drawables for the various states of the button. It also includes a drawable for the disabled state, which you can set to be the same drawable that you used for the checked state.
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/ImageButton.ImageButtonStyle.html

Grid inside Table or MainTable

I have one WWSD or one SDPanel with some attributes but between these attributes that are fixed inside a Table or directly in the MainTable I want put and Grid, the problem is that the Grid is not showed and when I put the grid its no more possible scroll in the WWSD or SDPanel, is like the Grid stuck the SDPanel more than the grid is not showed.
Anyone can help me to put the Grid and keep with all normally ?
Thx.
I assume you're targeting Android.
The issue is that Android does not natively support nested scrolling. Therefore, a GeneXus layout that contains a grid will disable the form's own scrolling (so that the grid can itself scroll).
There are two ways of resolving this issue:
Redesign the panel so that the form does not vertically exceed the size of the screen (thus, form scrolling is not necessary).
Set autogrow=true for the grid, which will resize to fit all items (and "push down" any other controls located below it). Since the grid will no longer need to scroll, the form's scroll will be enabled.

Using a round rect button as a badge with a counter

I'm using a view based NSOutlineView with two different views (both views are custom subclasses of NSTableCellView). In the top level view I display a badge with a counter. The counter indicates the number of entries on the lower level. The counter is implemented as a rounded rect NSButton, following Apple's SidebarDemo project.
As you can see from the images the behaviour of the button upon selection of the cell is not the behaviour you would expect. My button turns black, while in Apple's sample it turns white. I've tracked down the method that sets this particular behaviour for a button to the setHighlightsBy method:
[[self.button cell] setHighlightsBy: 0];
I use the above in the awakeFromNib method of the custom cell class. In the same awakeFromNib I also set the button's bezel:
[[self.button cell] setBezelStyle: NSInlineBezelStyle];
The bezel style works just fine, but the highlighting seems to be ignored.
Further information I can give: The outline view uses bindings to gets its contents, its highlight mode is set to "Source List".
Why is my highlighting being ignored?
Is your button set up in IB (like in the demo project)? If so, do you have the "enable" box checked in the control section of the attributes inspector? I got the behavior you're seeing if I unchecked that box.
I found the cause of the described behaviour, thanks to the suggestion made by #rdelmar in his answer. The button is bound to the Cell View using the "Argument" binding inspector.
One of the settings there is "Conditionally sets enabled", which was enabled and apparently causes auto-disabling of my button. Once you disable this setting, the problem disappears.

Resources