How to create a package using the browser in Pharo? - pharo

For a newbie in Pharo, how to create a package? The MOOC exercise says "Using the Browser create a package," but how?

You'll find an answer at 3.2 Creating a new Package in Pharo by Example:
From the World menu, open a System Browser. Right-click on an existing
package in the Package pane and select Add package... from the menu.
However, the tools change frequently. It's sometimes New package. Here's what it looks like (today) in three different versions of Pharo:
Pharo 8
Pharo 7
Pharo 6
To open Nautilus, you have to left-click first, then choose System Browser:

And the classical way is to just define a new class and type in the package name you want in the definition.

Related

How to do "File in" in Pharo 6.1?

Wanting to migrate my small project from Pharo 5 to Pharo 6.1, and I happily found the File Out option when I right-clicked on my package and its classes. I saw it generates text files for those artifacts in my image directory (I'm running on Windows). So far, so good.
However, I looked everywhere for a menu to import these files back into Pharo 6.1 (right-clicked on the package list, etc.) to no avail. How does one do a File In (the opposite of File Out)?
World menu > Tools > File Browser > (locate your changes file) + right-click > Changelist browser
The easiest way to file code in, is to just drag and drop the file onto the Pharo window. A dialog appears to ask you how you want to proceed.

Sublime Text 3 doesnot show color scheme when opened Visualforce page

I am using Sublime Text-3 version 3.0 build 3143. I have connected to Salesforce using MavensMate and opened the VF Page, but dont see any color when Opened the VisualForce Page in Sublime Text. How to fixed this issue ??
VisualForce isn't something that Sublime supports out of the box, so in order to have things like syntax highlighting, you'll need to install a package that adds that support in.
The de-facto repository of third party add-on packages is Package Control, and doing a search reveals that there is a VisualForce package available.
The description for the package mentions that it provides syntax highlighting for .page files. Assuming that's the kind of file you're trying to open (I'm not familiar with VisualForce at all), this is probably what you want.
In particular, the content represented in your image appears like the following for me once this package is installed (except that I have elided what appears to be an extraneous </apex:outputText> after the email_us label):
For what it's worth, the package also includes completions to make creating such files easier.
Since you mentioned in comments that you're a little unclear on the process, here's a step by step set of instructions on how to get set up for this with Sublime Text 3143.
If you haven't already done so, you need to install Package Control. If it's not installed, the commands in the next step won't be available.
There are official installation instructions for this, but in your build of Sublime Text you can also select Tools > Install Package Control... from the menu or Install Package Control from the Command Palette in order to do the same thing.
If that menu item is not visible in your menu/command palette, then Package Control is already installed; the command is hidden if it's not needed.
Open the Command Palette with Tools > Command Palette or the appropriate key binding for your operation system (visible in that menu entry), then select the command Package Control: Install Package.
This will download the list of all packages and present them to you in a list; it may take a moment to download the whole thing. You'll see a spinner in the status line of the window to tell you the operation is in progress.
When the list of packages appears, select the VisualForce package from the list of packages; you can find it quicker by entering visual to filter the package list down.
Once this is done, the package will be installed; during the installation there will be a spinner in the status line to tell you, and the status line will briefly say that the package was installed once it's done, but it goes quick so if you blink you might miss it.
With the package now installed, you should be able to close your file and open it again to have the appropriate syntax applied to it.
You can also select Set Syntax: VisualForce from the command palette or select View > Syntax > VisualForce from the menu in order to manually set the syntax in the current file to the VisualForce syntax.
You'll need to do this for example when you create a new file since the default syntax is Plain Text and the appropriate syntax won't get set until you save the file with an appropriate extension first otherwise.

How to add gvim icon to openwith menu

I have installed gvim in windows 7. When I right click on a file, I get list of editor to be opened with. I see a icon for notepad++, 7zip and beyond compare, but not for vim. it is tough to search "Edit with Vim" in the big list. Is it possible to add icon to "Edit with Vim". I tried setting ICON in registry to gvim.exe path, but that didn't work
I am currently having a crack at coding this up "for real" (but no success yet).
In the meantime, here's what I did on my machine as a sort of workaround:
Create a new text file and call it (for example) vim.reg
and paste this into the file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim]
"Icon"="\"C:\\Program Files (x86)\\Vim\\vim74\\gvim.exe\""
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim\command]
#="\"C:\\Program Files (x86)\\Vim\\vim74\\gvim.exe\" \"%1\""
and then right-click on the file and select Merge.
Or just manually add those keys directly in RegEdit if you're comfortable with that.
You may need to restart Explorer.exe (eg. log out and back in) for it to take effect.
This will add a new "Edit with vim" entry, with the icon, to the context menu for every filetype.
If you want it only for text files, for example, then change the two occurrences of "*" in the file to "txtfile".
The other vim context menu entries (eg. open with existing vim session) will not be affected - they will still not have icons.
UPDATE:
From the bug report that Christian mentioned, it looks like someone else has now implemented this, in version 7.4.724.
Vim.org reports that the currently release is 7.4.729, so it should include that.
The only trouble is that the Windows binaries available for download from the site are from 2013.
But vim.org also suggests a way to get the latest version, precompiled for Windows:
For the latest version with all patches included see Cream below.
These versions are unofficial, but the download number is high and
complaints are few.
And
For an unofficial version that does include all the latest patches and
optionally a bit more: Cream.
The "one-click installer" mentioned includes the Cream changes.
For the "real Vim" use the "without Cream" version listed further down.
As far as I know, this is not possible yet. There is a whishlist bug that requests this feature, but no one has contributed code yet.

Install just TortoiseMerge software and context menu items

I really love the TortoiseSvn diff software. I can download them standalone as a zip, but I really love when iI can select two files and then right click and from context menu click on "diff in tortoise". Is there any way I can install just this tool? I don't want the whole SVN suite.
http://tortoisesvn.net/downloads.html
Here is standalone TortoiseMerge: http://tortoisesvn.net/TortoiseMerge.html
You can't, sorry. Yes, you can!
According to this forum thread (from June, 2011, so pretty much over three years old), written by Stefan Küng, an author of TortoiseSVN, starting from version 1.7 of TSVN, TortoiseMerge does not ship as standalone.
You can go to Tools folder on TortoiseSVN's site at SF and get TortoiseDiff-1.6.7.zip file from there. It still quite outdated (see above notice), but certainly it is a standalone version of TortoiseMerge.
I needed something similar (just a standalone app to make diff files) and was able to copy the following out of the Tortoise install directory (C:\Program Files\TortoiseSVN\bin\) to make TortoiseMerge work on its own (similar to the accepted answer's suggestion). Maybe extract them from the full installer if you don't have it installed already?
TortoiseMerge.exe
libsvn_tsvn.dll
libapr_tsvn.dll
libaprutil_tsvn.dll
vcruntime140.dll
intl3_tsvn.dll
libsasl.dll
mfc140u.dll
msvcp140.dll
As far as the context-menu entry:
How add context menu item to Windows Explorer for folders and probably needing multiple "%" placeholders (e.g. myprogrampath\path\path\executable.exe %1 %2)
https://www.howtogeek.com/howto/windows-vista/add-any-application-to-the-desktop-right-click-menu-in-vista/
Instead of context menu items, a good workaround is to put it in the SendTo folder

Xcode 4 Data Model Versioning bug?

Installed Xcode 4 and it all seems fine... except, when I try to add versioning to a Core Data model. In the instructions it says I should select the data model in the navigator and then "Choose Editor > Convert to Versioned Model." Well, the "Editor" menu does not have an item "Convert to Versioned Model"!!! Skipping this step crashes Xcode 4. Also, I can't believe that there is no support for Xcode 4 now that it is a pay product!
First select your xcdatamodeld file and go to the Editor Menu and select the Add Model Version option.
After you create your new version select again the xcdatamodeld file and be sure you have the Utilities sidebar shown and select the first icon, the File Inspector one. You will have a Versioned Data Model option.
Hope that was what you were looking for.
There are currently several issues with the core data model editor in Xcode 4. I highly recommend installing Xcode 3 next to Xcode 4 and doing all of your model work in Xcode 3 until these issues are addressed.
I also recommend filing a feedback so that you can add your voice to this issue.
I had the same issue with xcode 4.5. And after some time I have resolved it:
Move my test.xcdatamodel file to the root in the project navigator.
Highlight file in a new location and select Editor -> Add Model Version...
And xcode automatically creates *.xcdatamodeld with two files : 'test 2.xcdatamodel' and 'test.xcdatamodel'. And 'test 2.xcdatamodel' is marked as current version.

Resources