Mailing Lists: Apple Mailing Lists

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

No Subject



Can someone help me with a programming problem, I'm not a great programmer 
and I can muddle my way through but this has me stumped as I don't know how to 
make it work.

It has been suggested that you can start a subroutine in many ways and this 
might just be my problem so here is a little about my problem and hopefully 
someone can e-mail me and tell me how to make it work.

I am trying to locate a device on the USB chain, I know it's VendorID and 
ProductID, I have fields in a nib for text mesasges, and I use the "IBOutlet id 
textField" in my header file.

It appears that I can  do a  [textField setStringValue @"a message"]; in some 
places but not in others.

OS 10.2.8 
Project Builder 2.0.1
Component versions
PB IDE: 99.3
PB Core: 99.1
ToolSupport: 97.0
--------------------------------------------------------------------------

example of a location not working..... (errors on build)
Foo.m
--------------------------------------------------------------------------

void DeviceNotification( void *refCon, io_service_t service, natural_t 
messageType, void *messageArgument )
{
    kern_return_t   kr;
    MyPrivateData   *privateDataRef = (MyPrivateData *) refCon;
    
    if (messageType == kIOMessageServiceIsTerminated)
    {
        printf("Device 0x%08x removed.\n", service);
        [textField setStringValue @"Device was removed.\n"];

--------------------------------------------------------------------------

example of a location that works.
Foo.m
--------------------------------------------------------------------------

- (void) doIt
{
        FILE *fil = fopen("/var/flexlm/aw.dat","w+") ;
    if ([self mygethostid]){
            setupbuf(4,5000) ;
            if ([self printresult: fil major:4 minor:5000]){
                setupbuf(5,0000);
                if ([self printresult: fil major:5 minor:0000]){
                    [textField setStringValue: @"Key generated successfully!"
];
                }
            }
    }
        if (fil)
            fclose(fil);
}

--------------------------------------------------------------------------

Anyone know how to solve my problem, I invite you to correspond directly to 
me at email@hidden.

Trying to learn a new programming environment has it's ups and downs, this 
for me is a down cause it's probably something really simple
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.



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.