Cell based NSTableView(NSOutlineView)'s selection is not filled up with selection color in 10.14 Mojave beta - nstableview

I have a macOS App build which has a NSOutlineView. It's cell based.
Build in Xcode 10 beta and run in 10.13 High Sierra, the selection is fine.
Build in Xcode 10 beta and run in 10.14 Mojave, the selection is not stable.
I run PXSourceList Example and results are the same.
In this picture, first I select 'AudioBooks', then I select 'Movies'. But 'Movies' is not filled up with selection background color.

I am seeing the same thing with view-based NSOutlineview in Majove. Seems selection is totally screwed up and crashes (I think in sourceList it draws the selection using an outside process in Quartz server).
Steps to reproduce:
1) use a NSTabviewcontroller,
2) place a NSOutlineview in source-list mode in each tab.
3) select in tab-1, change to tab-2, and try to select something.
Selection is now no longer visible at all. If you go back to tab-1, also the selection there is non-functional.
If you make another window active, and then make your app active again, then the selection is drawn again.
All of this works fine in High Sierra, but fails in all Mojave betas.

Related

Can't select multiple cells in Jupyterlab notebook

I cannot select multiple (adjacent) cells (in order to e.g. delete them)
I have tried
Shift +up/down arrows
Shift + J/K
Both of the above in both Edit mode and Command mode
Running a javascript keyboard tester to make sure shift J/K not being intercepted
Windows on-screen keyboard for shift +up/down/J/K
Online searching for same symptoms
Question: any ideas why this is happening and how to resolve it or how to perform a more detailed investigation/diagnosis?
Environment: Windows-10 Home 64-bit 20H2; Jupyterlab 3.0.5; Python 3.8.6 | packaged by conda-forge | (default, Dec 26 2020, 04:30:06) [MSC v.1916 64 bit (AMD64)]; IPython 7.18.1
Browsers tested Chrome, Opera, Edge (Chrome has security extensions, all disabled/allowing localhost, but Edge is vanilla and behaved exactly the same)
Starting jupyterlab from Anaconda Navigator launcher
The problem is not with selection per se, as all selection actions failed (e.g. select all cells from menu), but rather with the display
The CSS value for var(--jp-notebook-multiselected-color) was #e3f2fd - invisibly faint on my monitor; it was declared in the index.css file as "md-blue-50" (Google's Material Design blue) but the colour displayed did not match an online sample of md-blue-50 (so I guess the value for md-blue-50 declared elsewhere was not found).
The issue was identified by switching to to dark mode, where selection highlighting was clearly present.
Solution (because I can't find the source of the md-blue-50 value) was simply to use Stylebot to override the background color - in fact, using Stylebot scoped to localhost is better for me because I don't have to fix the css in every installation of jupyterlab in every Python environment.
try to open the jupyter-lab from the cmd, type this command :
jupyter notebook
it will open the same lab you can open via anaconda. then all of shortcuts will work as usual

SciLab -> problem with graphics -> black window

I tried to use Xcos for any basic simulation, but I obtained a blank/black window, instead the graph.
https://drive.google.com/file/d/1AN78dFcH6eYs5ajpmGj4qtqH40smoghc
I was thinking that maybe I use wrong elements, but after running example from help I saw the same - black window.
At the end I tried to use simple "plot([1,2],[1,2]);" - the same.
https://drive.google.com/file/d/1sKexRkM8ZFB2DsqWEpShiFGgKhViXxCk
I tried to restart computer and to install older version (5.5.2 instead of 6.1.0) -> without changes.
System: Windows (I'm sorry) 7, 32 bit (yes, I used 32-bit instalation).
I have so far no idea of what can procude such a behaviour;
Can you try the following sequence of instructions:
f=gcf(); //what is the color of the xindow?
f.background=5;// does the window background changes (red)?
gca().background=5;// does the drawing area background changes(red)?

Snapshoting a workspace in WM: layout and programs which are opened

I was wondering if it was possible to snapshot a workspace, i.e. save state not only of the layout but also of the windows which were opened.
Why do I need this?
Because I switch between different workflows. I may program for a while and then I may want to switch to a different activity, then switch back again to programming. On the average I have up to 7 windows on my workspace.
I need to save RAM for (freeze and lag)-less workflow.
I want to be able to close workspace 1, switch to another - workspace 2, then restore workspace 1 from the point when I had left it.
This should be totally manual, so I still can work on multiple workspaces. I have to control whether I want to close and restore previous workspace session.
When I restore the workspace, it should be just like I had left it, given that I hadn't changed the files or deleted programs that were opened.
Can this be done at all or at least some part of it with any WM?
Is this a stupid idea?
Does not running a graphical UI saves me RAM (how much)? - so maybe the windows should not be killed when closed, but rather run in the background (daemon), like in Tmux.
Earlier I tried i3 and Awesome(briefly). The biggest struggle was the toolbar, manual set up of volume, brightness, language switching control and proper fonts (on Arch Linux), I didn't fully succeed in setting my environment(I skimmed through wikis) so I fled.
Is it easier to set up Awesome in this respect?
Currently I use Cinnamon+Debian, and I'm almost happy with it.
I'd like to use touchpad less and therefore ask for advice.
I'll try to set WM up on VM first for painless transition.
I've done something similar before in i3-wm. I created a keybind to a bash script in my path that opens four terminator terminals on an empty screen. It uses the i3 command i3-msg to tell the window manager how the behavior of the next window opened will change. Here is my script:
terminator # opens terminal, change to the terminal that you use
i3-msg split h # tells i3 that the next window should split screen vertically
terminator # opens terminal
i3-msg split v # tells i3 that next window should split current one horizontally
terminator # opens terminal
i3-msg focus left # Changes selected window to the left one
i3-msg split v # tells i3 that the next window should split screen vertically
terminator
You should be able to take the i3-msg command and use it to control how windows of your applications open.
This is a quick, hacky solution, but it does work.
I hope this was able to help!
phylo

How can I run multiple lines of code in R

I have just switched from windows 7 to windows 10 on my pc.
When I was still using windows 7, using the combination CTRL+R or CTRL+ENTER would run the line of code that I was in. Moreover, if the code continued on one or more lines below or started above my current line, it would run the entire section without me having to select it.
After switching to windows 10, the same combinations will only run the line of code that I am currently in, or the piece of code that is selected by me. To give an example:
#Tryout
for(i in 1:3){
print(i)
}
This code would normally run at once without having to select it, even when I would start in the first line (#Tryout). Now, if I don't select, I will need to use CTRL+R or CTRL+ENTER three times to go through this code and I have to start in the correct line. Starting in the line #Tryout will not run any part of the code but will only result in the line #Tryout being shown in the console.
I'm not good with computers (in your answers please pretend to be adressing a five-year-old) so I had one of my colleagues look at it who's our expert on R. Here are the findings:
The problem occurs in both RStudio as the standalone version of R.
I'm using R version 3.3.2, the same as before the windows update. Switching to version 3.5 didn't solve the problem.
I have other colleagues also using R 3.3 in combination with windows 10 for whom this problem does not occur.
Going to Tools-Global Options-Code and checking the box of 'Focus console after executing from source' doesn't help
When we went to 'Modify Keyboard Shortcuts', the name attached to the shortcut (CTRL+R or CTRL+ENTER) was the same as it was for other colleagues for which the function does run all lines in a command: 'Run Current Line or Selection'
The problem is not preventing me from using R, but it is tedious and I hope someone can help me to solve it.
Thanks so much for reading!
Click on header Tools, then Global Options..., then Code, then Ctrl + Enter Executes and choose Multi-line R statement
#M Waz & #Just Burfi: I know I can select the code and then run it, that works fine. But I don't want to have to manually select the code all the time.
#Clemsang: your answer puzzled me for a moment because I didn't have the CTRL + Enter Executes that you were referring to. I went back to my colleague who had the bright idea to check the version of RStudio that I was using.
As it turns out, I was using an old version (0.99.903). Now that I've installed a newer version (1.1.463), running the code works as before! I also have the CTRL + Enter Executes now.

Why and when is the R stop button greyed out?

I have a long calculation running (for days). I can stop it and restart it as desired, as I can save the output and start from where I left off, but I would appreciate the option of doing so without quitting (or force quitting) R, i.e. by just pressing the red stop button in the GUI. However this seems to be impossible in some instances of running the exact same calculation (or sort of calculation): the stop button is greyed out. I would like to know if there's a criterion determining when and why this happens, and a solution to avoid the force quit option.
I'm running R version 3.0.1 (GUI Cocoa 1.61) on a Mac OS 10.7.5,
Thanks

Resources