Copied XCode project - help!


#1

Hi Jules,

I’m stuck!!

I’ve been trying to create a new Juce project on the Mac, based on the simplest “Hello World” demo juce_application you provide. The “original” you provide builds and runs AOK, of course. :slight_smile:

I’ve copied the project it to a different folder. I’ve modified one line in Main.cpp to change the include…juce statement, and modified the location of the Juce framework.

The code all builds OK. I run the app, and… the window is there, but doesn’t come to the top. None of the buttons in the titlebar are accessible!!!

I’ve tried this with one of my simplest projects too, and the same thing happens. My own project happens to have a combo box; I can click on the combobox drop-down, but when I hold this it causes the box to flash in and out really weirdly.

It seems to me as though, somehow, the act of copying/moving things around has somehow caused something to go badly wrong wrt event handling in Juce. I just can’t see how!!! as I haven’t changed any code.

NB this all works fine on Windows, of course.

I really hope you can give me some advice, as this is driving me potty!

Pete


#2

That doesn’t make any sense at all… Are you sure you’re not doing something like linking to an old version of juce or building with a different version of the OSX libs? Maybe if you link it as a 10.2 rather than 10.4, the windowing would behave differently?


#3

Hi Jules,

Thanks for the pointers! I fiddled round with the project files, that made no difference.

So, I copied-in the Info.plist file from the juce example project, to overwrite the copy I’d copied/modifed from elsewhere… and what works!!!

:shock:

The differences are tiny! I’ll try and figure out why that might have caused things to go wrong!!!

Pete


#4

Right - the problem was due to a mismatch in the string in Info.plist:
CFBundleExecutable
juce_application
CFBundleIconFile

And the corresponding entries in the project.pbxproj file.

That is to say, I’d changed the juce_application string in Info.plist, and hadn’t changed the corresponding entries in project.pbxproj.

This resulted in the really weird behaviour I described above.

Phew - had to fix them with vi to get it all working. :slight_smile:

Hoping this all helps somebody else!!

You know, I really hate Xcode compared to Microsoft Visual Studio. The way that project files work in the latter is hugely easier to use (as is the debugger!). Oh well. :slight_smile:

Pete


#5

Wow - that’s pretty obscure. Thanks for finding it out.

And yes, I agree about XCode, I’m also a big dev studio fan.


#6

Look, I’m not a huge Xcode fan either, but going to vi was your own call. Xcode, believe it or not, works as a text editor.

As for the plist thing, I had similar problems in Visual Studio. I had to guess infer/dig just to find what sort of resource file I needed to make an app have an icon, then edit it outside VC++ Express (yes, it really wouldn’t open it since it was a resource file, even though it’s also a text file).

It’s all what you’re comfortable with.

Bruce


#7