I am new to Qt in general, and I have been playing with it to get to learn about it since I have to develop a very specific text editor.
I want to know if anyone could help me understand which one is better (or the most indicated) for the development of a rich text editor. I have worked before with C and C++ but Qt Widgets seems like a very step hill for the time being and I am completely new to javascript in general.
Some of the settings that I would need to implement on the text editor for better context are:
Look for the user to be always connected to internet.
Transfer and receive data from another program.
Grant read only to the opened files and then permission to write on them when a button is clicked.
Has to work on linux and windows.
Needs to look great.
My context:
So far I have done a few little applications and even a little rich text editor on Qt Widgets, but since I was having problems with the GUI implementation that I wanted, I started looking for a way to solve it and found that Qt Quick might be the solution.
I have been trying Qt Quick, and for now on looks great, but I do not know if it has the capabilities to do what I have explained before. Or if it is better to use one or another.
I decided to create a new post since the one that I found looking for something similar is from 2014.
Also, the text editor for now only needs to work on desktop, but in a future might be on other devices and embedded systems.
Suddenly (more likely after update) some of my custom keyboard shortcuts defined in keymap.cson (Edit > Keymap...) stopped working. Has anyone had the same problem?
I found a solution. Apparently, one of my plugins (emmnet) used similar keyboard shortcut to the one that I defined in keymap.cson. So to save your time, check (Edit > Preferences > Keybindings) if any of your installed plugins has a keybindings that collides with your costume one.
Additionally, if in your OS you setup multiple keyboards layouts to support different languages then, please be sure that your application uses correct layout.
I am coding in atom text editor for writing react native mobile application. I want code suggestions like when I am writing inbuilt classes of react native library. I have to write completely own, seems like I am writing code in notepad.
Atom is not hinting & autocomplete for in built methods/classes of react native while typing.
Do I need to install any plugin to get this working ?
Atom alone is not able to provide autocomplete for builtin react-native classes nor your own classes, but its plugin-architecture allows you bring this up nevertheless.
A little sidenote
Apparently the people behind atom.io changed their URL-structure. The following URLs might not work anymore. Instead of downvoting this answer everybody is invited to find out the right URLs and edit this answer with the new URLs. Don't be so destructive
First you should install "nuclide" as it comes with special features for your react native development.
Moreover you need this:
https://atom.io/packages/atom-react-native-autocomplete
There are further usefull plugins like:
https://github.com/aakashns/atom-react-native-snippets
https://atom.io/packages/react-native-components
and so on
You should use the search within the "install packages" section in Atoms preferences pane.
As a side note:
However, after working one year with Atom i switched to Microsofts Visual Studio Code which is much more performant and really brilliant with autocompletion and typehinting once you configured it the right way and installed some plugins. Checkout Google for further information. There are some usefully blog posts around this topic:
https://medium.com/react-native-training/vscode-for-react-native-526ec4a368ce
http://equimper.github.io/2017/02/25/why-i-moved-away-from-atom-to-visual-studio-code-and-my-setup/
Be prepared: the first link offers at the end(!) a fast way to setup everything from scratch with only one step.
My breakpoints have stopped working properly in the latest XCode 4 release. With no change to the project settings, the breakpoints no longer break at the line they are set.
For instance, in one function I can set a breakpoint anywhere within it's body, but the code will always break at the last line of the function.
In another instance, I can set a breakpoint anywhere in one function and the code will break at a line in the middle of a different function in the same file! Tracing through after the break shows that it did break in the wrong place and it's not just a file / debugger sync issue.
I have no idea why this has started. It did however seem to start on new breakpoints while old ones worked. Any new breakpoints I add break in the wrong place. And recently, some files now don't even break at all! I can only assume the breakpoint is so wrong it's moved into code that's not called. I have done numerous internet searches and forum searches for this problem, and although I have found people with similar issues, there was either no solution or the solution listed (rebooting device, swapping debug output, turning off optimization etc.) haven't worked for me.
It is worth mentioninig I'm mostly coding in C++ using .mm files. For the past year of development in XCode 3, and for the last few months in XCode 4 things have been fine! I have debug set up correctly. No optimization on a debug run, no dead code stripping and I'm using the LLVM compiler 2.0 with DWARD with dSYM debug file. However, changing these values makes no difference.
Please help, it's driving me mad!!
An update to this. It's started happening again on a brand new machine with a fresh Lion and xcode install. The whole editor is out of whack. Example below of the errors appearing on the wrong lines.
From what I've read all around, Xcode tend to get confused with breakpoints and the way to get rid of the out-of-sync problem is to clean the "Derived Data"; two ways of cleaning it so far I've found (instructions are valid for Xcode 4.x) :
a) go in the organiser, under the Projects, choose your project and hit that delete on the Derived Data
or
b) go in the Product menu, hold the ALT button on the keyboard and observe that the menu are changing... so the clean transform to "Clean Build Folder..."
With-in "Build Settings" under the project target change the "Optimization Level" for "Debug" to "None".
I found that this fixed the issue for me.
I have fixed this, although I haven't found the root cause.
I removed the references from the project for the files that were not working with breakpoints. I then did a full clean and went into the folders and deleted any build and temporary data. I then opened the project bundle and deleted all data except for the project file itself. I then compiled so it threw up errors due to the missing files. I then put the files back in the project.
Now, the exact same files work fine with breakpoints!
No idea why but happy it's fixed.
Have you cleaned your targets? Shift-Cmd-K.
This started happening to me after I upgraded to XCode 4. I just deleted all breakpoints, did a clean, then re-added my breakpoints. Seems to work OK now.
I have figured out why this happens now. As mentioned in one of the replies you can fix it by deleting the derived data. This will always fix the problem. The editor for some reason loses it's relationship between the source code and the markup of the code it uses to cross reference breakpoints and errors etc. Deleting the derived data forces it to recreate this.
I believe that this only happens with files using C or C++ code. Apple seem to ignore C++ developers on iOS. I know a lot of professional game developers and every single one uses C++ to write games. Apple's lack of support is annoying.
I have been struggling with Xcode 3, and decided to jump directly to Xcode 4.
However, a big problem is that there is very little support like articles, videos, and projects I can use as templates.
Does there exist support like this at all?
Can I use Xcode 3 projects as templates?
Would it be easy to work from Xcode 3 tutorials?
I have now been using it for one day. Some things in the interface designer are quite different. For example, I can't get to subviews in the tab bar control (but mostly I manage, and can follow examples).
Thanks.
I'm doing the same thing. Xcode 4 is in pre-release, so there's not much in the way of tutorials while the tools are in a semi-NDA limbo and could be changed significantly before final release.
I highly recommend reading tutorials (I'm working my way through Aaron Hillegass' books on iPhone and OSX development) that use Xcode 3, and allowing extra time for learning where to map across to the new version.
Xcode 4 is much better organised, so it can be annoying but not impossible to find what you are looking for fairly quickly.
Resources you should go to first:
WWDC10 sessions 307, 308 and 315:
Introducing Xcode 4,
Developing your app with Xcode 4, and
Using Interface Builder in Xcode 4.
Access these through the developer portal. They are the definitive Apple guide to the new design and workflow.
In the Xcode 4 Help menu, the Xcode 4 Transition guide is the second choice. I skimmed it, then kept coming back to dive into topics when they came up.
Xcode 4, despite being "released", is an absolute disaster. I would wait for at least a couple of updates (beyond 4.01) before moving to it.
Basic functionality is severely broken. Breakpoints, syntax highlighting, basic functionality in the Interface Builder IU... I don't even know where to begin.
The document management, which was the towering defect of Xcode's design up to this point, has been changed but sadly not fixed. It might even be worse.
At first I had some good impressions. Early notes:
More-sensible defaults for debugging hotkeys.
There's now "Close project" in the File menu!
You can finally set up sounds for lots of build & search events, with a GUI. Nice.
There's a drop-down that shows files that are associated with the one you're editing. This might be useful, but any convenience this might add is ruined by the fact that there's no quick "counterpart" button like there used to be. You have to dig through a menu to go from header to source or vice versa.
Tabs are upside down, extending off the toolbar (WTF). Also, the "X" to close indicator is missing from each tab unless you roll over the tab. This kind of Easter-egg UI hides information from the user and should be abolished.
The tabs don't work well for a couple of reasons. First, there can be two editing panes under one tab with different documents; the tab only shows the name of one of them. You also can't move documents between panes, which you often want to do when referring to different objects and interfaces. Visual Studio solves both of those problems easily by having separate tab groups above each editing pane and letting you drag documents between the two groups.
A second editing pane is always referred to (and indicated in the toolbar) as an "Assistant" editor even if you didn't invoke the assistant (which is bafflingly denoted by a Batman icon button).
View options are under View, where they belong, instead of being incorrectly placed under the Window menu.
If you're typing a call to a function and you're using another function call as a parameter, Xcode's auto-completion appears to automatically prefer functions whose return type matches the parameter you're filling out. EXCELLENT.
But there are bugs aplenty. So many that it's very hard to get work done at times.
One particularly infuriating bug is Xcode's failure to indicate when and where it has stopped at a breakpoint. In many instances, it will stop and pull up the source file, but there's no execution point highlighted. The editor just shows the top of the file, and nothing happens as you step through. The current line is not highlighted, and nowhere does Xcode say, "Stopped at breakpoint." It just says "running."
There's no way to sort files your files in the treeview. NONE. Xcode 3 was bad enough in not sorting them automatically, making you go and sort them over and over and over through the life of a project. Now that's not even an option. WTF?
Xcode leaves your editor window littered with error highlights and messages even after you've fixed the code and recompiled. It turns out that these errors apply to a different target, even though you never built that target and the code they're complaining about doesn't exist anymore.
Xcode will overwrite your syntax-highlighting choices for specific symbol types. You can change them again and again, and Xcode will overwrite your settings inexplicably. You can watch it happen.
THERE'S NO "BUILD" BUTTON IN THE TOOLBAR, AND YOU CAN'T ADD ONE. In fact, the toolbar is not customizable at all, and there's only a "Run" button. What if you don't want to run? Yep, you have to look up the hotkey.
What did they do with all the extra space in the toolbar? Made the project-config dropdown NARROWER. It's so small that it can't show you WTF you're working on. Meanwhile, there's a vast strip of empty space right next to it. Unbelievable.
The Xcode team tried to clean up the mess that was project settings, adding the concept of "schemes." It's mostly an improvement, but buggy. But I'm out of time for this update...
I am not sure what kind of documentation they give you with Xcode 4, however there should be something in the help menu I imagine. WWDC also had a video on Xcode 4, it was their "State of Union" address. Here is a link to the iTunes videos.
Just to add to Luke's point, it all depends on how much code you know. I am going to stick with V3 as compile errors etc are not automatically fixed and I want to learn how the code works, this is going to help in the future.
Current tutorials (mostly about V3) will help you grasp the basics of Xcode, as V4 is easier overall but understanding the basics is the most important aspect.
Localization seems to be pretty significantly broken in 4.0, with constant crashes for me.
I would wait for 4.0.2, or something..
I just switched back to 3.2.6 after I tried out XCode 4. It has so many bugs and crashes, it was too frustrating. Also its updates are not included in the normal apple updates, you have to re install the whole software via the installer. Its ridiculous! Although the git integration and drop down syntax completion is cool, I think I will wait till 4.0.3 before updating again!