# Mac OS X Cube Timer

#### byu

##### Member
This idea of mine has multiple parts. I've always wanted to use CCT. But my computer, doesn't have an Intel core processor, meaning I can't run the latest version of Java, therefore meaning I cannot run CCT.

So, I've been looking for an extremely flexible alternative, and stumbled across JNetCube. Works good, but the interface is too fixed for me. I can't do averages of more than 12 without turning it into a rolling average, etc.

So, I'm going to TRY to create an eloquent, flexible timer program using the Apple Xcode Developer Tools, written in Objective-C designed specifically for Mac OS X Leopard. I have the following books that I will be basing a lot of the code off of:

Programming in Objective-C (Stefan G. Kochan)
Cocoa Programming for Mac OS X Third Edition (Aaron Hillegass)
Learning Cocoa with Objective-C (James Duncan Davidson)

I have a few more, but those are the only ones specifically about Objective-C and Cocoa. If any of you Mac users are interested, I can send you a beta version that I'm working on right now.

Also, if some PC users could give a detailed list of features in CCT that are your favorites, that would be great, because I could try to implement them.

EDIT: Also, I'm looking for a neat name for a program. If you have a good one, let me know.

#### masterofthebass

eww objective-C. if you really want to be cool, do it in pyobjc I've been thinking of doing some sort of Cocoa app since I learned the basics of it, but I haven't had any good ideas. Good luck with a program like this, I'll be somewhat of an epic undertaking.

#### byu

##### Member
I'm having some very strange difficulty just getting the program to work properly. Any Cocoa users out there? I might have to go to a programming forum.

Basically, I have a XIB file with the entire interface in it, with connections to File's Owner, which is an instance of the class Controller. Controller has two instance variables, timerField and description. I have pointers in the XIB connection Controller to the interface items.

Back in the Controller class, I have implemented awakeFromNib, but it NEVER gets called. Any ideas?

#### masterofthebass

uh... that seems sort of vague for me. awakeFromNib is supposed to do what? Unless its set to one of the interface things, it won't be called.

#### byu

##### Member
awakeFromNib is supposed to be one of the first methods run (other than ones like alloc and init) for a class, and it's supposed to be done automatically.

#### masterofthebass

o well... I don't really know anything other than what i needed to make a scrambler. I got too lazy to finish it though.

#### byu

##### Member
Oh wow, I just realized that you don't connect it to the File's Owner, you create a new object...

#### JBCM627

##### Member
Why a mac-only timer? Why not just make one thats easy to port to any OS... so use a framework like Qt or something?

Wanda the Fish said:
Q: What's the difference between a Mac and an Etch-A-Sketch?
A: You don't have to shake the Mac to clear the screen.

#### tim

##### Member
I'm having some very strange difficulty just getting the program to work properly. Any Cocoa users out there? I might have to go to a programming forum.
Use MacRuby. Enough said .
btw. This might help: http://www.cocoabuilder.com/archive/message/cocoa/2005/10/6/147656.

Why not just alter JNetCube to suit your needs - it's quite well written and easily modified.
What? Have you ever looked at the source code? Four different classes with lots of duplicated code for 2x2x2 - 5x5x5 scramblers is just ugly. Adding a scrambler requires you to write a lot of code in several places.

Code:
private boolean isParallel(int thisArray, int thatArray){
if (thisArray == thatArray){
return true;
} else {
return false;
}
} // end isParallel
I don't know what's worse: the unnecessary comment at the end, the missing whitspace after the if statement, the misleading variable names or the way he made a one-liner into a five-liner.

Last edited:

#### joey

##### Member
Eww, I won't take a look at the rest of the code

(In my previous post I mentioned I used CCT on a non-intel mac, didn't know they only released an intel Java6 now, but sure you could find the PPC one somewhere)

#### byu

##### Member
My very simplistic beta (timing only, no averages yet) entitled CubeX (I couldn't think of any title, and that's what came to mind first) should be out later today, unless I run into a strange compilation error (which is very possible).

#### JTW2007

##### BattsMan
I'd love a beta for my mac! When it comes to my favorite features on CCT: Editable tags for solves, comment space, ability to use a stackmat timer, scramble display (so you can check the scramble), and lots of flexibility when it comes to color and system layout.

The cons of CCT: Not enough puzzles (no pyraminx, skewb, relays, or editable session tags), hard to make it work on my mac, not enough space in the comment box.

Anyway, this sounds like a great idea!

#### masterofthebass

The cons of CCT: Not enough puzzles (no pyraminx, skewb, relays, or editable session tags), hard to make it work on my mac, not enough space in the comment box.
I have pyraminx, skewb, clock, and other scramble plugins available if you want. The scrambling part of CCT is actually one of the best, because it allows for expansion, unlike other programs. Also, the pyraminx plugin is available on the CCT website.

#### JTW2007

##### BattsMan
I have pyraminx, skewb, clock, and other scramble plugins available if you want. The scrambling part of CCT is actually one of the best, because it allows for expansion, unlike other programs. Also, the pyraminx plugin is available on the CCT website.
That'd be awesome. I'll PM you so as not to hijack the thread.

#### masterofthebass

I'll just attach it here for everyone using mac. It seems that my .class files compiled on OS X don't transfer over to Windows users In this zip file there are 3 files that you place in the ScramblePlugins folder of your CCT folder.

#### Attachments

• 7.3 KB Views: 18

#### brunson

##### Member
Why a mac-only timer? Why not just make one thats easy to port to any OS... so use a framework like Qt or something?

Wanda the Fish said:
Q: What's the difference between a Mac and an Etch-A-Sketch?
A: You don't have to shake the Mac to clear the screen.
QT is really cool to program in. Interobject communication is been abstracted and simplified an a really awesome way.