How to add "Last Position" button to my tool bar in VB6 IDE - vb6

I did this before but can't remember how the heck I did it.
I want to have a button on my vb6 IDE toolbar that takes me back to the previous place I was in the code (in my "history) -- an incredibly useful feature.
I have it in my properties (right-click) menu but don't see it in the other menus from which I could drag it to the Toolbar.
Any ideas?

This should do it:
In the IDE right click an empty spot on your
menu and select Customize...
Select the Command tab in the Customize dialog
Select View from the Categories list.
On the Commands list you should see
an item called Last Position.
Drag this item to a toolbar.

#Jay's answer is right on. There are also handy shortcut keys for this feature and the related Definition feature:
Last Position: Ctl + Shift + F2
Definition: Shift + F2

In one of the toolbars in the sample applications?

Related

How would I disable the minimap in Xcode?

How do I get rid of the minimap in Xcode?
Updated for Xcode 13
Open a code file, such as *.swift, and press the second from the right button in the top right corner. Then click on Minimap:
In older versions of Xcode, this looked as follows:
in XCode 12.0.1
there are 3 ways to hide or show Minimap.
first, you can do it with the Adjust editor option (see the following image).
next way: check or uncheck Minimap from Editor(menu) -> Minimap. (like following image)
and the last way you can use ⌃⇧⌘M and show or hide Minimap.
Navigate to Adjust Editor Options (at the top right corner, to the left of the Add Editor Below button) and uncheck Minimap (or press ^⇧⌘M).
This is called minimap window which give you insight of where you're in part of whole storyboard/code. This feature was introduced in Xcode11 and is quite useful.
You can show/hide simply by using shortcut key as: cmd + shift + ctrl + M.
Alternatively, you can choose 'Adjust Editor Options' i.e multi-lined stacked icon present on top right of Xcode. Deselect Minimap from dropdown list to hide it and Select to show it.

How to more easily "update all frames" in autolayout in Xcode7?

The "Update Frames" calls are often grayed-out in Xcode
the only way I know to have it update frames to match your constraints, is, tediously select your highest-level view and than (sometimes) you can fish in the menu bar for "Selected Views"->"Update Frames". Further, "All Views"->"Update Frames" would appear to often simply not work or work in a way I can't understand.
Surely there's just a keystroke or button which updates all frames straight away to match any newly-entered constraints (such as those made using control-drag).
Note .. for 2016 you can use this very handy button, which at least brings up the same sub-menu as you can find by searching in the menu bar menu.
However it would seem (see my comments w/ ZaBlanc below) that there is perhaps actually an Xcode bug, and you CAN NOT assign a keystroke to the "All Views" items. (The ones you usually use.)
Even worse .. in Xcode 8 ...
they seem to have removed the 'update frames' option ... WTH
It's easy. Go to Preferences -> Key Bindings. Type "Update Frames" on the top. You'll see two appear. You'll want the bottom one (it will be the one without a keyboard shortcut assigned.)
Assign it to ⌘= or anything else you like.
Life changed.
Just for anyone reading, with Xcode 8.3. The popup menu command no longer exists. The menu bar command Editor -> Update Frames does work. However there's a bug, the default key binding on that does not work. If you add a custom key combo, that custom key combo does work.
AFAIK, there is no keystroke for update all frames, but here's a key tip:
If you have a misplaced views, press the yellow arrow in the document outline (the views tree to the left of canvas), press yellow triangle on any view in the list, then select update frames and check Apply to all views in container - this will update all misplaced views in the selected view controller
Additionally, you probably already know:
You can add a new constraint with Add New Constraints button in canvas bottom right and select "Update frames" option.
You can select any view by mouse-click and holding Option+Shift keys - this will show you the list of all the views, that intersects with mouse pointer. After that you can select update frames menu item on a selected misplaced view.
The same as you, I thought that it's very annoying to fix the misplaced views manually by selecting them and choose that boring option from Xcode menu. After trying hard to shorten the time to fix the layout issues, I had to admit that there is no way to call the function "Update Frames" from command line. So I ended up doing this way:
Open Xcode warnings & error inspector window
Filter all layout warnings by using the keyword "frame for"
Click on warnings to quickly locate to the misplaced views then press Command + Option + =
That's the fastest way I know. Please try it out!
You could also find more details HERE

Is there a way to create a hotkey to print a specific string in xcode?

Is there a way to create a hotkey to print a specific string in xcode?
For example if "H" is my hotkey, every time I click "H" it should paste "Hello" on my editor.
This would help when inserting standard fixed comments when coding.
Thanks in advance.
It's easy to do it with Xcode code snippets. First you need to create a content (your comment or code or both). Select your content by dragging mouse on it. Release your mouse then click again on the selected part of text for a second. While holding, your mouse cursor symbol will change to the pointer symbol - drag this content to code snippets library. Xcode will create new code snipped for you. It will be placed at the bottom of all snippets in snippets library with the name "My Code Snippet". Double click it. Then press "Edit" button. Name it in the field "Title". Write summary you want. Choose platform "All" or "iOS" or "OS X". Select add completion shortcut for example "hello" for "//hello comment". Once you've done with all changes press "Done" button. Every time you will write "hello" Xcode will show a pop up with snippet title you have created. Select it and press "Enter" key and your comment will be placed right there where you wrote "hello".
Animated gif shows how you can do this:

Keyboard shortcut for Visual Studio code editor Members and Types combos

I wonder what is the keyboard shortcut for these two combo boxs and specially the right part which list all the members of current class and is very handy for navigating a large class.
I tried to figure it out myself but I do not know the exact names to search for it.
That whole thing is called "Navigation bar" (Window.MovetoNavigationBar) and can be activated by default by pressing Ctrl + F2. There doesn't seem to be a shortcut for the right side of the navigation bar, so pressing the short cut key always takes you to the combo box on the left side. You can use Tab to jump between the combo boxes.
The keyboard shortcut is Ctrl + F2 which takes you to the left-hand combo. If you hover over each one in turn (at least in VS2k8) it shows you a tooltip which identifies the two combos as "Types" and "Members", respectively.
Pressing Tab will take you to the right-hand combo and Ctrl + ↓ will expand the combo for you.
Alternative Resharper approach #1
"Go to file member" which is "Alt+\" .
go to link for advanced features
Alternative Resharper approach #2
"Go to Next/Previous Member" with Alt+Down or Alt+Up
this one is very handy and my favorite :

Xcode find caller functions

In Xcode, how can I find all caller functions of a specific function?
Xcode 4.5 (in beta) has this functionality. when you highlight say... a function, you can check the "caller" and "callee"
edit i believe it's located at the top left of the file panel for that file... so double click on the function to highlight it, and you click on on the file panel options (the one that has the "open recent, open unsaved...etc" drop down
EDIT #2
here's a picture to clarify (since i dont know what this menu button is called):
ALSO - XCode 4.5 is no longer beta, i believe, and is actually out in public
EDIT #3
also note that this caller thing does NOT search for being called under the performSelector method, as in, the particular caller that has this performSelector won't show up if you had done something like:
[self performSelector:#selector(checkIfShouldStopMovement) withObject:nil afterDelay:0.25];
In Xcode, the quickest method is this:
Select method in code (double click or mark using your mouse cursor)
Press Ctrl+1
Select "Callers" from the pop-up menu.
This is the shortcut for going View -> Editor -> Show Related Items in Xcode's menu.
use ⌘+Ctrl+Shift+H key combination on Xcode 7 onwards.
This can also be accessed via the assistant editor, as shown in the screenshot below. Whichever method you have the insertion point in in the main editor on the left will have its callers displayed in the assistant editor. I've found this to be the best way of looking through each caller in succession, since once you have "Callers" selected, you can then select the next caller via the next pop-up menu to the right in the jump bar.
In Xcode-7 you have the functionality of getting call-heirerchy. Right-click on the function and click "Find Call Hierarchy":
image reference:
Xcode 10 upwards seems to have made it easier. Just Command Click on the function and you should see it in the drop down.
Press ⌘+Ctrl+Shift+H shortcut when a method of interests is selected (with a mouse or cursor). (as per #uiroshan 's answer)
But you can also specify any another shortcut in XCode -> Preferences -> Key Bindings
Use Find in Project as Text or as Symbol.
AFAIK, there's no equivalent to e.g. Call Hierarchy known from Eclipse or NetBeans.
Strangely the refactoring tool can detect all method calls but not the search.
So I simply use it to rename my method to a unique name (eg. reset to resetPlayer) and then use the new name in a regular textual search.
1.) Menu > Edit > Refactor... > Rename to unique name
2.) search for the new name
The functionality is available in XCode 4.4.1, see this: http://smilingfinney.blogspot.de/2012/09/method-callers-in-xcode-44.html

Resources