Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Custom Controls with Little Code

Custom Controls with Little Code
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2006
Status: Offline
Reply With Quote
Oct 21, 2006, 04:50 PM
 
Hey there,

I'm an AppleScript Studio developer, and I'm currently trying to design a new interface for an app of mine. I received an email from a GUI designer who offered to help, and what I received was basically a Photoshop mock-up of a finished product. The mock-up featured custom controls that behaved exactly as their standard Cocoa equivalents, but used different images as bases to create a different feel.

Is there anyone out there who could either a) tell me how to subclass the standard Cocoa controls and change their images, preferably with as little Objective-C as possible (if it can be done without any code, that would be wonderful ), and tell me how I could then access these through AppleScript Studio, or b) help develop some of the controls, I would greatly appreciate it.

If no one can do either of these, I'd appreciate a link to some info on developing Cocoa controls normally anyway, just in case I decide to move the app to Objective-C (which I may in the not too distant future).

Thanks in advance!

-Matt
     
Grizzled Veteran
Join Date: Aug 2005
Location: fairbanks AK
Status: Offline
Reply With Quote
Oct 24, 2006, 08:02 PM
 
Originally Posted by mattpat View Post

Is there anyone out there who could either a) tell me how to subclass the standard Cocoa controls and change their images, preferably with as little Objective-C as possible (if it can be done without any code, that would be wonderful )
you could try subclassing a nsscontrol and over-riding drawRect:, maybe? basically, change how it's drawn but don't change how it functions.

though, i think you're going to need to learn some Objective-C if you want to do it right.

the project sounds fun. i had the idea of doing something similar a la blender, but haven't done anything with it yet.

Originally Posted by mattpat View Post
If no one can do either of these, I'd appreciate a link to some info on developing Cocoa controls normally anyway, just in case I decide to move the app to Objective-C (which I may in the not too distant future).
from apple's developer site - Clock Control
Earth First! we'll mine the other planets later.
     
mattpat  (op)
Fresh-Faced Recruit
Join Date: Oct 2006
Status: Offline
Reply With Quote
Oct 24, 2006, 08:06 PM
 
Thanks for the advice, I'll look into that.

By the way, the project: TuneConnect (excuse the appearance, still working on a website redesign).

The version that's available for download isn't all that impressive, but v1.1 (which is in beta, and I'm just finishing up with my beta testers) is pretty awesome. If you're interested in giving it a try, or maybe even working on designing some custom controls for a later version, let me know!

-Matt
     
mattpat  (op)
Fresh-Faced Recruit
Join Date: Oct 2006
Status: Offline
Reply With Quote
Oct 28, 2006, 10:56 AM
 
Another idea... would it be possible to use this method: Rogue Amoeba - Under The Microscope

For more than just the window control? I figure if you can set a background image for each control, might be easier than I thought.

Then again, probably not.

-Matt
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:39 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2