How to replace flatCollect in Squeak 4.5? - smalltalk

I wanted to port a program from Squeak 4.4 to Squeak 4.5 but get the error message: OrderedCollection(Object)>>doesNotUnderstand:#flatCollect:.
flatCollect does not seem to be available anymore in Squeak 4.5. Does anybody know a good replacement for it?

You can simply replace all occurrences of flatCollect: with gather:.
It has basically the same functionality.

Related

DNN NavigateURL causes Warning in 9.5.1 solution in basic?

I got this warning in some very old Basic code I am managing. Web solutions are generally in C#.
Can anyone point me at an example solution in Basic please?
NavigateURL deprecated in 9.4.0 scheduled for removal in 11.0.0
You have to replace Globals.NavigateUrl with the new INavigationManager interface as it will be removed in version 11. See here.
Here are some threads in the DNN Community forum that might help:
NavigationManager
Upgrading from 9.1.1 to 9.4.4 and Globals.NavigateURL
The examples mentioned are all in C#, but it is not a question of the language but of the method/interface used. So it should be easy to translate it to VB.
I noticed the same problem.
Maybe you could try with:
Response.Redirect(PortalSettings.ActiveTab.Url) to replace NavigateURL()
Response.Redirect(EditURL()) to replace NavigateURL() with parameters

Using a 64bit SDK

I'm sorry in advance if this question is not well expressed, I am trying to achieve something quite new to me and I am a little lost.
I am trying to include a Canon SDK inside an Objective-C wrapper, I understand from this paragraph that I needed to download the 64bit SDK:
There are a few steps that need to be taken in order to use EOSFramework in a project. First, ensure that you have downloaded the latest Canon EDSDK 64bit. EOSFramework currently relies on ARC which is only supported in 64bit. Therefore you must use the 64bit version of EDSDK. Also ensure that you have compiled or downloaded the latest version of EOSFramework as a .framework file.
Incidentally, after following instructions, the errors that I'm getting while building the frameworks are related to 64bit. Please see picture attached:
Can someone point out a way for me to figure this out?
I'm not sure if this won't bring a problem in the long run, but I found an answer in this post: _int64 does not name a type
Following this:
It looks like you you are trying to use MSVC specific __int64 type with GCC. That does not work, use long long instead.
Can someone point out a way for me to figure this out?
You need to track down the declaration of EdsUInt64 in the SDK you have downloaded and figure out why it is not being seen by the compiler when compiling the source you've shown.
Try right-clicking on EdsUInt32 (which the compiler was happy with) and jumping to its definition. Now look around, are the 64-bit types defined in the same place? Are they inside #if constructs? If so why are the conditions not true? Etc. Do some detective work.
You can also use TextWrangler/BBEdit, or other good editor, to do quick multi-file searches over all the SDK source to find the definitions.
If you don't find the definitions then you've got the wrong version of one of the SDKs, go back to Canon and get the right one.
The solution is very unlikely to be you needing to define the type yourself. The ARC comments in particular indicate you do have Mac specific source code, Canon compile it on a Mac, so it's unlikely to be a MS or Gnu specific issue failing on a Mac etc.
Good Hunting!
HTH

wxWidgets for Ada?

In Lua-scripting I found wxWidgets (wxLua) library very useful, so I'd wanted to found binding for Ada and GNAT Programming Studio 2010 (4.4.1) - does it exist at all and maybe somebody know how to link it with GNAT?
Only one I found is wxAda, which is about 5 years old and without any hyperlinks to load it.
I'm the author of wxAda and tbh, it's a dead duck as it currently stands. I am looking at the moment at a revival by generating the source automatically.
Luke.
Well, the URL you are probably looking for is wxada.tigris.org, but it says right there it is incomplete. Most likely that's the best you are going to get without doing the work yourself.
From the discussion of his problems here it looks like he had solvable issues.

Objective-C in Mono

I have a .NET application, which I want to port to OSX. Up to now I used a DirectShow DLL for WebCam handling. Can I use an Objective-C DLL for Mono? How? I'm a newbie on Mac. Is there an existing (WebCam handling) solution for this? Is there a better solution?
You want to use the QTKit framework to do this, in particular you can use the QTCaptureView as a reusable NSView that you can embed in an existing window or in an application to do the actual video capturing.
I have just added support for capturing to the MonoMac bindings a few minutes ago after I saw your question, so you will need to do a little bit of work.
Steps:
Install Mono, MonoDevelop and the MonoMac addin as described here: http://mono-project.com/MonoMac
Download the latest sources for MonoMac and MacCore from Github: http://github.com/mono/maccore and http://github.com/mono/monomac
Update the MonoMac.dll to the latest version, by going into the monomac/src directory and typing "make update"
At this point you should be able to use the QTCaptureView in your MonoMac applications like any other NSView. A tutorial showing the use of the API in Objective-C is here:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/QTKitApplicationTutorial/BuildingaSimpleQTKitCaptureApplication/BuildingaSimpleQTKitCaptureApplication.html#//apple_ref/doc/uid/TP40008155-CH8-SW1
You can just use the equivalent versions in C#
I'm not sure what you mean by "an object-c dll for Mono".
Your absolute best approach is to learn the platform you're targeting and port only the logic and general architecture.
To access cameras, microphones, line-ins, etc. on Mac OS X, use QTKit (Quicktime Kit). It's mind-numbingly simple to set up a web cam view, record to files, grab frames, etc. It's built in and designed to make this sort of thing mostly drag-and-drop for developers.
MonoMac is just one alternative. There are Monobjc, CocoSharp, NObjective, MObjc / MCocoa and ObjC# (I cannot choose between them). Theese are all "bridges" between Mono and Cocoa, what mean you can use Cocoa API in Mono application. But I don't want to use the API directly. I just want a dinamically linked library, which provide me some function for WebCam handling (as I said, I did this up to this time on Windows). In other words: I need a wrapper in Mono for QTKit.
PS: If I rewrite the application in object-c that means several months, and double work in the future when the application will grow. I love object-c but I hate to work unnecessary.
I tried the accepted code in XCode, and when I tried to port to Monodevelop, several classes are missing, eg. QTCaputureSession, QTCaputreDeviceInput, CVimagebuffer.
(Sorry, I cannot edit my previous messages, this is another account.)

Is it possible to execute Objective-C programs in Windows?

I googled a lot. Some people are saying do this. Some are saying it's not possible. Install Mac OS X on a virtual machine, etc., etc.
I have a simple question.
Is it possible that I can practice Objective-C programming on a Windows 7 machine?
If yes, how? Please, if possible, provide me with a necessary link. My ultimate goal is to go for iPhone development. But right now I can't afford a MacBook.
So is it possible?
Objective-C, the language, definitely yes. At the very least, GCC (GNU Compiler Collection) compiles Objective-C just fine. You can get either Cygwin for the full POSIX-like environment, or MinGW which gives just the GNU toolchain for programming to the Win23 API
But, iPhone needs the Apple API, which is totally proprietary; if they say 'No Windows', then it's just not available for Windows
Of course the iPhone API is based on Cocoa, which is based on NextSTEP. You can get the feel of the API with OpenSTEP.
But it's not iPhone.
Yes you can compile Objective-C on Windows. But for iPhone development this question was already asked.
And there are several similar questions about iPhone development here on Stackoverflow, just search for it.
It's worth taking a look at Cocotron— that aims to implement a cross-platform Apple-compatible version of the core NeXTStep libraries, the FoundationKit and ApplicationKit. Windows included.
GCC (http://gcc.gnu.org/) can compile Objective-C.
The answer is yes, but it will probably require quite a lot of work on your part:
www.gnustep.org
www.cocotron.org
This page on StackOverflow, answer 4. It worked great in my case.
Objective C for Windows