How do I add a new package? - amber-smalltalk

How do I add a new package in the current IDE?
I do not see a button for adding a package.
This is on MSWindows 7 with Firefox 23.
To start the amber server I had opened a command window and then I navigated to the amber directory.
C:\Users\User\Documents\amber-master>bin\amber serve
Starting file server on http://127.0.0.1:4000

To create a new class in a new package add the following code snippet in the browser
Object subclass: #MyClass
instanceVariableNames: ''
package: 'MyPackage'
and hit save. This works in the very latest amber. Not in the one two weeks before.
https://github.com/amber-smalltalk/amber
5th September 2013
Addition
The new packages created will be in the amber namespace which is not recommended. To have your own name space for your amber application use these instructions Writing my first amber app. It shows the directory layout to have your own name space.
How to load amber shows how to configure amber to use your own namespace.

Related

Adding RenderWindowControl to tool box

I am trying to use Kitware ActiViz.NET. I have installed it using nuget.
But I can't seem to find RenderWindowControl on the toolbox. I have been trying to add it manually this way:
invoke "Choose Items..."
and in the following dialog click on button "Browse...",
navigate to your ActiViz.NET installation folder, browse to /bin
folder, select "Kitware.VTK.dll".
Click OK.
Now you should see in your ToolBox a new control named RenderWindowControl.
But I get "The file "C:\programfiles\activiz.net 5.8.0 Opensource Eddition\bin\kitware.vtk.DLL" is not valid".
I have tried to add the control in the code rether than the designer,and got this exception:
Could not load file or assembly 'Kitware.VTK, Version=5.8.0.607, Culture=neutral, PublicKeyToken=995c7fb9db2c1b44' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Has anyone had this problem before?
Any ideas?
For the design mode you would need to use the 32Bit version, because VS is running on 32Bit and can only load 32Bit controls.
So you could use for design time the 32Bit version and for build/release switch to the 64bit version.
But you can also add the RenderWindowControl manually.
Of course the designer will be unable to display this, so it would be
necessary to comment it out, before switching to the designer
Open your designer file e.g. Form1.Designer.cs and add the control like
private RenderWindowControl myRenderWindowControl;
private void InitalizeComponent()
{
//all other controls added by the designer
myRenderWindowControl = new RenderWindowControl();
myRenderWindowControl.SetBounds(0,0,640,480);
this.Controls.Add(this.myRenderWindowControl);
}
Adding VTK's RenderWindowControl to WPF is a little more complicated.
Assuming you installed a 64 bit VTK package, the following steps worked for me.
https://learn.microsoft.com/en-us/dotnet/framework/wpf/advanced/walkthrough-hosting-a-windows-forms-control-in-wpf
Add Project References to WindowsFormsIntegration and System.Windows.Forms
Draw a Grid on the Designer Form.
In Properties Dialog, Give it a name, then
Double Click the Loaded event.
In the loaded event handler add the code.
// Create the interop host control.
System.Windows.Forms.Integration.WindowsFormsHost host =
new System.Windows.Forms.Integration.WindowsFormsHost();
myRenderWindowControl = new RenderWindowControl();
myRenderWindowControl.SetBounds(0, 0, 30, 30); // not too big in case it disappears.
// Assign the control as the host control's child.
host.Child = myRenderWindowControl;
this.VTKGrid.Children.Add(host);

Extending the application core

I'm working on a new type of navigation window. This new window (which I've called MultiNav) is intended to allow the user navigate through video, music and images in the same window, this window has three controls that allow the user to select to content type he wants to navigate.
Everything compiles, but I'm not able to link. The reason is the project is not able to find the object code (*.o files) since I've not include my changes into the build process (./configure make).
I can tell the project is autotools generated, but I can't find any of the files configure.ac or Makefile.am.
Questions:
1 - How can I include my code into Kodi/XBMC code distribution?
2 - Which are the files I've to edit to achive this?
I managed to findout how to notify xbmc/kodi project about new windows code.
In the folder xbmc/windows there is a file called Makefile.in that's the file that has to be edited in order to add your new code (for a window).
When the whole application is compiled, the code in this folder will be compiled into a static library called windows.a. Which will be linked to the main application binary.

Deleting splash screen gets strange error VS 2013

I had a project with a splash screen. It was giving me trouble so I removed my application framework.
I.e. I did:
-Created a module to be the sub main
-In module create new() splash screen instance and main window instance to run application
-Went to project properties and disabled application framework
This worked without a problem. So I wanted to change my splash screen image, so I replaced the background image. When I did that I got this error:
"Two output file names resolved to the same output file path \obj\debug\.ACFSplashscreen.resources"
Which was weird. So I deleted that splash screen class, and decided to start clean. I still have that error. So I went into my file system and deleted that resources file. Now I have a new error saying it's unable to open it!
How can I find out what is looking for that file and fix it? Nothing in my code calls it anymore.
So as to have an "answer to your question";
Sometimes, if you delete a resource, it requires a simple clean of your project, followed by a build. This has been explained below:
From Microsoft
delete any intermediate and output files. With only the project and
component files left, new instances of the intermediate and output
files can then be built.
Hence, allowing you to 'fix' your error.

Error opening nib in xcode: Error updating Objective-C type information. Multiple types...registered with the same Objective-C name: AppDelegate

Just getting started with xamarin studio and iOS development... I'm trying to set up my development projects. When setting all this up, I had initially created a project called 'MyProject.iOS'. I later decided that I didn't want the 'p' in MyProject to be capitalized. I deleted the existing project (using finder), removed it from my existing solution, and created a new one named 'Myproject.iOS'.
Now, when I try to open the Myproject_iOSViewController.xib file to edit in xCode, I get the following error:
Error updating Objective-C type information. Multiple types (MyProject.iOS.AppDelegate and Myproject.iOS.AppDelegate) registered with the same Objective-C name: AppDelegate
Seems like something is stuck in xCode from my original project that had the same name w/ different casing. I looked in Finder and confirmed that all the old files are gone.
I believe I am experiencing the same issue that was reported here (not sure why this issue is marked as resolved): https://bugzilla.xamarin.com/show_bug.cgi?id=7550
The last commenter has a great repo and reports this solution that worked for him:
1. Close XS
2. Delete ~/Library/Caches/XamarinStudio-4.0 folder
3. Open XS : voilĂ  everything works again now !
My issue at this point is that I cannot find the ~/Library/Caches/XamarinStudio-4.0 to delete. I found a ~Library/Caches/ folder but it did not have a XamarinStudio-4.0 sub-folder in there. How can I resolve this?
I am using 4.0.9 (Build 12) of Xamarin studio.
Here is the full stack trace from the error message box that shows up when I double click the xib file:
System.ArgumentException: Multiple types (MyProject.iOS.AppDelegate and Myproject.iOS.AppDelegate) registered with the same Objective-C name: AppDelegate
at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update () [0x00118] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:98
at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update (Boolean force) [0x0000c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:72
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateTypes (IProgressMonitor monitor) [0x0003c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:476
I just had this problem. I used that post to solve it. At first I could not find the folder that is referenced. This is how I found it.
Go into finder on the Mac.
Under Favorites on the left of the screen, select the primary volume. For me that was labeled Macintosh HD.
Select Go/Go to Folder from the toolbar.
In the Go to the Folder screen that pops up type in ~/Library.
From there you can navigate to the proper directory and delete it.
Hope that helps. Best of luck.

Following Android drag and drop example, error "btn_default_pressed cannot be resolved or is not a field"

Working in min API 15, I'm trying to find how I can drag and drop one item element out of a ListView list onto a TextView above it (just to copy the text into it).
I'm trying to follow this example:
http://techdroid.kbeanie.com/2011/10/drag-and-drop-honeycombics.html
Namely these two parts...
http://code.google.com/p/myandroidwidgets/source/browse/trunk/HCDragDrop/src/com/beanie/hcsample/dragdrop/MyDragShadowBuilder.java
http://code.google.com/p/myandroidwidgets/source/browse/trunk/HCDragDrop/src/com/beanie/hcsample/dragdrop/HCDragDropActivity.java
However, I can't figure out how to fix this error
The import android.view.View.DragShadowBuilder cannot be resolved
Or if I remove the import then DragShadowBuilder gives me
DragShadowBuilder cannot be resolved to a type
I changed my minSDK And target SDK both to '15'. Should I not have access to these classes now? How can I resolve this error?
edit: I've fixed that problem- properties, android, set target. Clean, refresh. Ok.
But now I'm getting
btn_default_pressed cannot be resolved or is not a field
on
mShadow = v.getResources().getDrawable(R.drawable.btn_default_pressed);
Looks like that class came in API 11. So probably you have one of a couple problems.
You have set the SDK target in your manifest, but you haven't updated your actual SDK. If this is the case, go to the SDK Manager and get the necessary updates.
You project is still linked to a API 10 or lower jar. If this is the case go into, Project > Properties > Android and pick the correct library.
Project > Clean and restarting Eclipse can't hurt either.

Resources