Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Beginning programmer looking for pointers.



In short the project I want to create is an automated garden. My first attempt at automating plant care brings USB into the picture with a USB Board of Education:

http://www.parallax.com/detail.asp?product_id=28850

which will be programmed with an on board Basic stamp chip:

http://www.parallax.com/detail.asp?product_id=BS2P24-IC

That I plan on setting up to communicate with my beat up old 8600 Mac that is running 10.1.5 on Xpostfacto (It runs quite well, it just has some cosmetic faults). So far, all I have done is to create an interface in Interface Builder on my Powerbook 17", as a sort of practice, since I'm not sure how well the files transfer over from 10.3.7 to the 10.1.5. I plan on experimenting with cross-compiling, but I don't plan on relying on it. Here is the interface that I made, so far with the one USB method that I connected to the NSPopUpButton(Item 1), which I believe I have correctly connected, so that the method will fire when the PopUpButton is selected on USBPort, sending the message to NSObjectController. My only trouble is I have very little idea what to put in the code section of:


- (IBAction)USBDeviceOpen:(id)sender
{
}

I have an idea that i should say

if (id == something)
{
return kIOReturnExclusiveAccess;
}
else if (id == something else )
{
return kIOReturnError;
}
else
return kIOReturnSuccess;

But I'm not too sure that I'm using the right USB method to start out with in the first place, and I'm not too sure about what to use in the conditionals, and I'm not too sure about what order to put the statements. Am I supposed to know the id's from what I am making the program for? Thanks for any response.




Dustin Kick

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.