Re: newbie question (SOLVED)

2011-03-18 Thread Luca Ciciriello
Sorry for this question. I've find out how to solve my problem in apple documentation. At my first reading I'd missed it. Luca. On Mar 18, 2011, at 4:17 PM, Luca Ciciriello wrote: > Hi All. Im' new in Cocoa and Cocoa touch programming. > My question is: How can I make the keyboard disappear whe

newbie question

2011-03-18 Thread Luca Ciciriello
Hi All. Im' new in Cocoa and Cocoa touch programming. My question is: How can I make the keyboard disappear when I use a UITextView conroller? In my class I've a Text field and a Text view controller and in my declaration I'v added the delegates: now In the case of UITextField I've used the met

Re: Newbie Question re: callback signatures

2010-06-04 Thread Quincey Morris
On Jun 4, 2010, at 13:03, Brad Stone wrote: > How do I create the callback method? I don't understand what the signature > is telling me. I have > canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: in my > NSDocument and I want to set up the callback method. When I create a method

Newbie Question re: callback signatures

2010-06-04 Thread Brad Stone
How do I create the callback method? I don't understand what the signature is telling me. I have canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: in my NSDocument and I want to set up the callback method. When I create a method as below it never fires. I must just not be readin

Newbie question for Video Streaming

2010-04-29 Thread Gustavo Pizano
Hello, Im looking into the dark depths of the API, because I need to stream some video and audio over http, I was reading the HTTP Live Streaming Overview and there its says: "All devices running iPhone OS 3.0 and later include built-in client software." I was asking my friend google, and found

Re: newbie question - number of lines a text string wraps to

2010-04-20 Thread Jens Alfke
On Apr 19, 2010, at 11:55 AM, Paul J. Ascenzo wrote: > I'm looking to find out how many lines a given string of text will wrap to in > a given NSTextField. in other words, once I know the string and the size of > the field it is going into, how do I find out how many lines the system will > wr

newbie question - number of lines a text string wraps to

2010-04-20 Thread Paul J. Ascenzo
Hello all! If this question doesn't belong on this list, please let me know, and I'll try elsewhere - thanks! WHAT I NEED: I'm looking to find out how many lines a given string of text will wrap to in a given NSTextField. in other words, once I know the string and the size of the field it

Re: newbie question -views and MCV model

2010-01-15 Thread Alexander Spohr
Am 15.01.2010 um 05:57 schrieb Martin Beroiz: > My problem is with the controller. I subclassed NSViewController (with the > name FilterBankViewController) and tried to bind the class with the file's > owner. But I noticed that in IB I cannot do that, actually the bind tab says > it's "Not App

newbie question -views and MCV model

2010-01-14 Thread Martin Beroiz
Hello all, i have a very noob question about the MCV model to display a data file in a view. I'm trying to implement Model-Controller-View. So, so far I created a class called FilterBank that will contain all the data to be plotted plus a method to init from a file. Then I included one instanc

Re: very newbie question

2009-10-01 Thread Jens Alfke
On Oct 1, 2009, at 2:39 PM, Manuel Grau wrote: I have my own controller classes for each view. The problem is that my IBAction method that receives button event is in fourthViewController, so I can't acces fields in the other views to get the values I need. So, which is the usual way to do

very newbie question

2009-10-01 Thread Manuel Grau
Hi. I'm a very newbie iphone and cocoa developer coming from j2ee world. I'm creating an application with four screens using a TabBar. The fourth view has a button wich uses UITextfields values from all the views to calculate something ans show the result in a UITextfield in the fourth view

Re: Newbie question - core data

2009-09-14 Thread Stamenkovic Florijan
Darren, On Sep 14, 2009, at 09:11, Darren Wheatley wrote: Hi, I'm learning Cocoa / Objective-C. Right now I'm trying to build a simple Core Data application. I've built a helper app to read in CSV and populate an XML core data store. That works fine. I have seen lots of examples of bin

Newbie question - core data

2009-09-14 Thread Darren Wheatley
Hi, I'm learning Cocoa / Objective-C. Right now I'm trying to build a simple Core Data application. I've built a helper app to read in CSV and populate an XML core data store. That works fine. I have seen lots of examples of binding a view to core data entities so that the contents of t

Re: IB connections - newbie question

2009-08-07 Thread Aidan Bahta
On Aug 5, 2009, at 10:34 PM, Greg Guerin wrote: Oftenwrong Soong wrote: I am making a NSDocument based app. In the NIB for the document window, I need to create a connection to a "global" data object (think singleton). This "global" data is used when creating the document, but isn't part

Re: IB connections - newbie question

2009-08-05 Thread Greg Guerin
Oftenwrong Soong wrote: I am making a NSDocument based app. In the NIB for the document window, I need to create a connection to a "global" data object (think singleton). This "global" data is used when creating the document, but isn't part of the document. Normally I'd make a connection

IB connections - newbie question

2009-08-05 Thread Oftenwrong Soong
Hi all, I am making a NSDocument based app. In the NIB for the document window, I need to create a connection to a "global" data object (think singleton). This "global" data is used when creating the document, but isn't part of the document. Normally I'd make a connection by dragging a NSObjec

[SOLVED] Re: Newbie question on listing out detailed items

2009-05-23 Thread Stamenkovic Florijan
Graham, Jason, Thanks for your replies. What I want: a listout of items, each of which presents info and a number of controls. Typical example: Safari's downloads window. ... Any pointers to documentation on how to deal with this would be very appreciated. Perhaps I am simply using the wr

Re: Newbie question on listing out detailed items

2009-05-22 Thread Jason Foreman
On May 22, 2009, at 5:33 PM, Stamenkovic Florijan wrote: What I want: a listout of items, each of which presents info and a number of controls. Typical example: Safari's downloads window. ... Any pointers to documentation on how to deal with this would be very appreciated. Perhaps I am si

Re: Newbie question on listing out detailed items

2009-05-22 Thread Graham Cox
On 23/05/2009, at 8:33 AM, Stamenkovic Florijan wrote: NSTableView does not seem to be of much help. It accepts an NSCell as means of rendering, but if I understand it correctly, an NSCell can't contain subviews nor subcells, and is therefore of little use. Any pointers to documentation on

Newbie question on listing out detailed items

2009-05-22 Thread Stamenkovic Florijan
Hi all, Maybe this has been answered before, if so I am sorry to pollute. I've googled the archives, looked through CocoaDev, went through the documentation, and was not able to figure this out. Also I must say that I am a complete beginner in Cocoa. I just finished Aaron Hillegass's book

Re: Newbie question about non-document-based app

2009-05-04 Thread Graham Cox
On 05/05/2009, at 8:36 AM, Chris Goedde wrote: Hi, I have a simple question about my non-document-based app. It's a computer simulation of a physical system, and I've implemented file saving and loading to save the state of the system. Works great except for one thing. If I double-click

Newbie question about non-document-based app

2009-05-04 Thread Chris Goedde
Hi, I have a simple question about my non-document-based app. It's a computer simulation of a physical system, and I've implemented file saving and loading to save the state of the system. Works great except for one thing. If I double-click one of the save files in the Finder, my app laun

Newbie question: Cocoa threads within RubyCocoa

2009-04-05 Thread Arcadio Rubio García
Hi all, I'm trying to build a simple Cocoa GUI that acts as an observer to my Ruby text application and reports progress in a window (with a progress bar, etc). I'm using RubyCocoa for creating the GUI, but I guess anyone who does not know Ruby or RubyCocoa might be still able to answer m

(Almost)Newbie Question: Implementing / use a free available source code editor

2009-02-23 Thread Hans Stimul
Dear all, I am very new in Cocoa/ObjC development. I am software developer for more/less 7 years - but I did mostly web stuff and so I implemented the most with languages like java, php5(oop - as far as possible), ruby (on rails) or python. At the college, I did a lot of C/C++ development. So

Re: newbie question on creating .png files

2009-02-13 Thread Steven Spencer
To get a NSBitmapImageRep from a NSImage, have a look at the Reducer sample code at location : http://developer.apple.com/samplecode/Reducer/listing16.html file : ImageReducer.m routine : BitmapImageRepFromNSImage at the end of the file. - Steve > > >On 12.02.2009, at 17:14, Jean-Daniel Dup

Re: newbie question on creating .png files

2009-02-12 Thread David Duncan
On Feb 12, 2009, at 8:28 AM, Felix Franz wrote: You can create a new NSBitmapImageRep using the TIFFRepresentation and use representationUsingType:properties: to get the PNG-data: NSData* TIFFData = [img TIFFRepresentation]; NSBitmapImageRep* bitmapImageRep = [NSBitmapImageRep imag

Re: newbie question on creating .png files

2009-02-12 Thread Felix Franz
On 12.02.2009, at 17:14, Jean-Daniel Dupas wrote: Unfortunately, I don't think you can save an NSImage as a PNG (it only supports the TIFFRepresentation method). You can create a new NSBitmapImageRep using the TIFFRepresentation and use representationUsingType:properties: to get the P

Re: newbie question on creating .png files

2009-02-12 Thread Jean-Daniel Dupas
Le 12 févr. 09 à 16:31, Smith, Steven (MCP) a écrit : Hi folks, I'm relatively new to Cocoa and need some direction on creating .png files. I need to create 365 png files (one for each day of the year) to be used as tags by other folks (eg "JAN01.png" "JAN2.png"..."DEC31.png"). I think

newbie question on creating .png files

2009-02-12 Thread Smith, Steven (MCP)
Hi folks, I'm relatively new to Cocoa and need some direction on creating .png files. I need to create 365 png files (one for each day of the year) to be used as tags by other folks (eg "JAN01.png" "JAN2.png"..."DEC31.png"). I think I understand the draw/graphics concept, but I've been unable to

Newbie question.

2009-01-29 Thread WP Becker
Forgive the clueless newbie question if it's been asked and answered previously. I am new to the Cocoa development platform, and have not seen what I'm looking for. So I hope I can get good pointers from this list. I am developing an app that is console driven, but not the stand

newbie question, core data app startup

2008-12-29 Thread Chris Benedict
Hello, I'm working on a Core Data Application with a custom atomic store for encrypting the persistent storage file. I believe I finally was able to get the atomic store working however my problem now is that I need to be able to use a user supplied password as an option when initializin

Re: Newbie Question: implementing a stack

2008-12-20 Thread Michael Ash
On Sat, Dec 20, 2008 at 6:52 PM, Steve Wetzel wrote: > I do see your point Graham but what I am trying to understand is how to work > with the stack if I don't copy the object to put on it. If I simply push > the pointer on the stack, it seems that I have to make a lot of objects in > the code th

Re: Newbie Question: implementing a stack

2008-12-20 Thread Graham Cox
On 21 Dec 2008, at 10:52 am, Steve Wetzel wrote: I guess can simply assign the pointer, but if I do, it seems to me I will need an NSMutableArray to hold myObj1... myObj10 (or more). If I do that, what benefit is the stack? I don't really follow your argument. Presumably you decided you

Re: Newbie Question: implementing a stack

2008-12-20 Thread Steve Wetzel
On Dec 20, 2008, at Dec 20:12:08 AM, Graham Cox wrote: On 20 Dec 2008, at 4:52 pm, Graham Cox wrote: On 20 Dec 2008, at 3:15 pm, Steve Wetzel wrote: Regarding memory management - does it make more sense to copy the object to be pushed from within the Stack object rather then copying it

Re: Newbie Question: implementing a stack

2008-12-20 Thread Dave DeLong
Sorry to jump in to this a little late, but a guy in our CocoaHeads group wrote a framework as part of his Master's thesis work. It's a datastructure framework and contains a bunch of datastructures not available (publicly) in Cocoa, such as stacks, queues, dequeues, avl/ rb/aa-trees, treap

Re: Newbie Question: implementing a stack

2008-12-19 Thread Graham Cox
On 20 Dec 2008, at 4:52 pm, Graham Cox wrote: On 20 Dec 2008, at 3:15 pm, Steve Wetzel wrote: Regarding memory management - does it make more sense to copy the object to be pushed from within the Stack object rather then copying it externally before the push call? I am thinking that it

Re: Newbie Question: implementing a stack

2008-12-19 Thread Graham Cox
On 20 Dec 2008, at 3:15 pm, Steve Wetzel wrote: Regarding memory management - does it make more sense to copy the object to be pushed from within the Stack object rather then copying it externally before the push call? I am thinking that it does because then that object is encapsulated wh

Re: Newbie Question: implementing a stack

2008-12-19 Thread Steve Wetzel
On Dec 19, 2008, at Dec 19:6:31 PM, Ricky Sharp wrote: On Dec 19, 2008, at 1:22 PM, Steve Wetzel wrote: I am new to this list and new to mac programming as well. I am working on implementing a stack as a category of NSMutableArray. I want this stack to be able to store objects. This is

Re: Newbie Question: implementing a stack

2008-12-19 Thread Ricky Sharp
On Dec 19, 2008, at 1:22 PM, Steve Wetzel wrote: I am new to this list and new to mac programming as well. I am working on implementing a stack as a category of NSMutableArray. I want this stack to be able to store objects. This is what I have so far: // // Stack.h // Stack implemen

Newbie Question: implementing a stack

2008-12-19 Thread Steve Wetzel
Hi All, I am new to this list and new to mac programming as well. I am working on implementing a stack as a category of NSMutableArray. I want this stack to be able to store objects. This is what I have so far: // // Stack.h // Stack implements a basic stack object in an NSMutableArr

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-14 Thread Gustavo Pizano
Hello, yes in fact, that was what I did, I set up a NSImage instance variable so once dragged to the other View I just used the info of the NSImage to recreate the layer. Thanks for your help On 14.12.2008, at 0:06, Michael Ash wrote: On Sat, Dec 13, 2008 at 5:02 AM, Gustavo Pizano wro

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-13 Thread Michael Ash
On Sat, Dec 13, 2008 at 5:02 AM, Gustavo Pizano wrote: > Hi, I tried to encode the CAlayer, but when decoding, all the info of the > layer its lost. > dunno what happened, the other info of the object it's good. Could be that CALayer doesn't support NSCoding very well. This would be kind of stran

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-13 Thread Gustavo Pizano
Hi, I tried to encode the CAlayer, but when decoding, all the info of the layer its lost. dunno what happened, the other info of the object it's good. G On 13.12.2008, at 6:16, Michael Ash wrote: On Fri, Dec 12, 2008 at 3:43 PM, Gustavo Pizano wrote: Hello. I want to send the following an

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-12 Thread Gustavo Pizano
On 13.12.2008, at 6:16, Michael Ash wrote: When you get to an object, you can simply encode it using [coder encodeObject:obj forKey:@"key"]. Of course obj must implement NSCoding as well, otherwise this will not work. For your own classes, you'll need to implement NSCoding for everything that w

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-12 Thread Michael Ash
On Fri, Dec 12, 2008 at 3:43 PM, Gustavo Pizano wrote: > Hello. I want to send the following an object in a drag-n-drop operation, so > I need to transform it to a NSData > > so I have this object > > @interface Ship : NSObject { > >int size; >int impacts; >ShipLocation *

Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-12 Thread Gustavo Pizano
Hello. I want to send the following an object in a drag-n-drop operation, so I need to transform it to a NSData so I have this object @interface Ship : NSObject { int size; int impacts; ShipLocation * location; CALayer * shipImageLayer; } now

Re: Newbie question: Object as input arguments

2008-11-26 Thread
- -- 3.5 BAYES_99 BODY: Bayesian spam probability is 99 to 100% [score: 1.] De: Ken Thomases <[EMAIL PROTECTED]> Fecha: 27 de noviembre de 2008 01:57:03 GMT+01:00 Para: "Jose A.

Re: Newbie question: Object as input arguments

2008-11-26 Thread Ken Thomases
On Nov 25, 2008, at 2:14 AM, Jose A. Guerrero-Colón wrote: Imagine that we have a cocoa application, "App_A" which create an object with information introduced by the user (the object is rather ellaborated and complex). At the very last point of this application, I would like to pass that o

Newbie question: Object as input arguments

2008-11-26 Thread Jose A. Guerrero-Colón
Hello List, I'm in my baby steps on Cocoa Development, Objective C in particular. My question is in regard the following situation: Imagine that we have a cocoa application, "App_A" which create an object with information introduced by the user (the object is rather ellaborated and compl

Re: a newbie question

2008-11-15 Thread Ken Thomases
So far, nobody that I've seen has pointed out the specific error in the code: On Nov 10, 2008, at 9:00 PM, Michael wrote: Fraction *myFraction; myFraction= [Fraction alloc]; myFraction= [Fraction init]; /* ??? */ You are calling init on the class Fraction, not on

Re: a newbie question

2008-11-11 Thread Michael de Haan
Paul...thank you for that info. I was not aware there is a specific OBJ-C mailing list, but will go there, for a few chapters, at any rate!! :-) Michael. On Nov 11, 2008, at 12:44 PM, Paul Bruneau wrote: On Nov 11, 2008, at 3:16 PM, Etienne Guérard wrote: Maybe it's an illustrative exam

Re: a newbie question

2008-11-11 Thread Paul Bruneau
On Nov 11, 2008, at 3:16 PM, Etienne Guérard wrote: Maybe it's an illustrative example, not a real one. Anyway you'd better stick to NSObject. Object is used to implement the metaclass class hierachy inside the ObjC runtime. You normally don't play with it. ;) It is a real example, but it i

Re: RE : RE : a newbie question

2008-11-11 Thread Michael de Haan
On Nov 11, 2008, at 12:16 PM, Etienne Guérard wrote: Maybe it's an illustrative example, not a real one. Anyway you'd better stick to NSObject. Object is used to implement the metaclass class hierachy inside the ObjC runtime. You normally don't play with it. ;) thanks for your input. I a

RE : RE : a newbie question

2008-11-11 Thread Etienne Guérard
e la part de Michael de Haan Date: mar. 11/11/2008 19:32 À: cocoa-dev@lists.apple.com Objet : Re: RE : a newbie question On Nov 11, 2008, at 9:21 AM, Etienne Guérard wrote: > You should derive your classes from NSObject, not from Object. > You normally don't have to #include . >

Re: RE : a newbie question

2008-11-11 Thread Michael de Haan
On Nov 11, 2008, at 9:21 AM, Etienne Guérard wrote: You should derive your classes from NSObject, not from Object. You normally don't have to #include . Where did you find such an example? It is from Steve Kochan's book ...which is basically an introduction to Objective C. The alloc

RE : a newbie question

2008-11-11 Thread Etienne Guérard
You should derive your classes from NSObject, not from Object. You normally don't have to #include . Where did you find such an example? The alloc method basically does a calloc of the appropriate instance size. The init method of NSObject does nothing. It's good practive to always call an init me

a newbie question

2008-11-11 Thread Michael
I am working from one of the numerous books in Obj C. My question, which I have asked at another list, is about the method init. Firstly, here is the code, stripped somewhat of irrelevant ( hopefully ) code. /* #import */ #import #import @interface Fraction : Object {

Re: interface builder and nsarraycontroller binding newbie question

2008-10-30 Thread Ashley Clark
Hi! On Oct 29, 2008, at 9:43 AM, Bob Henkel wrote: Hello, What I want to do now is invoke a method on the object I have selected in nstableview by clicking a third button labeled Random Salary which will call the method giveRandomSalary that I created in my Employee class. The job of this

interface builder and nsarraycontroller binding newbie question

2008-10-29 Thread Bob Henkel
Hello, I'm pretty new to the OSX and really new to Cocoa. With the disclaimer aside For one my first learning projects I started to follow a tutorial that has me making use of a nsarraycontroller in IB and using bindings to bind an nsarraycontroller to a Employee class I created. CLASS Empl

Re: newbie question: tangential compiler errors

2008-10-15 Thread JB
I unchecked "Precompile Prefix Header" in the new target's build settings (per Chris's comments) and it compiles without error now. Thanks! JB On Mon, Oct 13, 2008 at 8:07 PM, Chris Hanson <[EMAIL PROTECTED]> wrote: > On Oct 13, 2008, at 12:42 PM, JB wrote: > > I've added Apple's sample LoginIt

Re: newbie question: tangential compiler errors

2008-10-13 Thread Chris Hanson
On Oct 13, 2008, at 12:42 PM, JB wrote: I've added Apple's sample LoginItemsAE class to autolaunch an app I've built for Tiger and Leopard. However, the app fails to compile when I add "LoginItemsAE.c" to the app target, throwing over 3000 "syntax" and "conflicting types" errors here: AppKit

Re: newbie question: tangential compiler errors

2008-10-13 Thread Michael Ash
On Mon, Oct 13, 2008 at 3:42 PM, JB <[EMAIL PROTECTED]> wrote: > Hi all, > > I've added Apple's sample LoginItemsAE class to autolaunch an app I've built > for Tiger and Leopard. However, the app fails to compile when I add > "LoginItemsAE.c" to the app target, throwing over 3000 "syntax" and > "c

newbie question: tangential compiler errors

2008-10-13 Thread JB
Hi all, I've added Apple's sample LoginItemsAE class to autolaunch an app I've built for Tiger and Leopard. However, the app fails to compile when I add "LoginItemsAE.c" to the app target, throwing over 3000 "syntax" and "conflicting types" errors here: AppKit.h > Foundation.h > NSObjCRuntime.h

Re: Bindings - newbie question

2008-09-02 Thread Oleg Krupnov
I have read the following thread: http://www.cocoabuilder.com/archive/message/cocoa/2008/6/27/211362 (the useful part of it) and mostly figured out the matter myself and coped to make my code work. I will now briefly set forth my understanding and appreciate if some more experienced colleague prove

Re: Bindings - newbie question

2008-09-01 Thread Quincey Morris
On Sep 1, 2008, at 22:25, Oleg Krupnov wrote: What I do: From within MyDocument's windowControllerDidLoadNib message: [myController bind: @"currMode" toObject: self withKeyPath:@"currMode" options:nil]; I do not override bind, unbind etc. of MyController relying on the default implementatio

Bindings - newbie question

2008-09-01 Thread Oleg Krupnov
I have two objects: a MyDocument (NSDocument subclass) and a custom MyController controller (NSObject subclass). In the MyDocument there is "currMode" property. The controller class also has the currMode property. I want these two properties to be bound to each other two-way, so that when either of

Re: Newbie question: What does "no-op" mean?

2008-09-01 Thread Andy Lee
On Aug 30, 2008, at 10:31 PM, Jon Davis wrote: So do no-ops exist solely for the sake of being there for convention, i.e. "do this if you're implemented, ignore if not"? I'd adjust two things about your wording. First, a no-op method *is* implemented. It has an implementation that happens

Re: Newbie question: What does "no-op" mean?

2008-09-01 Thread Dale Jensen
On Aug 30, 2008, at 9:31 PM, Jon Davis wrote: So do no-ops exist solely for the sake of being there for convention, i.e. "do this if you're implemented, ignore if not"? In this case, that's what it's being used for. Initially (back when we coded in assembly language,) NOP was most often u

Re: Newbie question: What does "no-op" mean?

2008-08-30 Thread Jon Davis
So do no-ops exist solely for the sake of being there for convention, i.e. "do this if you're implemented, ignore if not"? Jon On Aug 30, 2008, at 7:13 PM, Steven Noyes wrote: No operation. This is used to indicate a method or instruction that performs nothing. Steven On Aug 30, 2008,

Re: Newbie question: What does "no-op" mean?

2008-08-30 Thread Steven Noyes
No operation. This is used to indicate a method or instruction that performs nothing. Steven On Aug 30, 2008, at 7:59 PM, Jon Davis wrote: See subject; I'm just discovering Cocoa and documentation such as that surrounding NSAutoReleasePool's release function is described as "a no-op". Wh

Newbie question: What does "no-op" mean?

2008-08-30 Thread Jon Davis
See subject; I'm just discovering Cocoa and documentation such as that surrounding NSAutoReleasePool's release function is described as "a no- op". What does "no-op" mean, and where can I find it discussed? Thanks, Jon ___ Cocoa-dev mailing list (Co

Re: Newbie question re Xcode on Leopard

2008-08-21 Thread Kiel Gillard
Hi Paul, Hope you're enjoying Cocoa ;-) As you probably noticed, the Classes tab has been removed in Interface Builder 3 (the Leopard Interface Builder). The projects header files are automagically synced with the xib. To instansiate your custom class; 1) Drag an Object (plain blue cube) from the

Re: Newbie Question on "self"

2008-08-11 Thread Charles Steinman
--- On Mon, 8/11/08, Scott Ribe <[EMAIL PROTECTED]> wrote: > > Using dot-syntax calls getters and setters. You would > get exactly the same > > behavior by calling self.myString = anotherString. > > That assumes Objective-C 2. The code in question was using properties with synthesized accessors.

Re: Newbie Question on "self"

2008-08-11 Thread Scott Ribe
> Using dot-syntax calls getters and setters. You would get exactly the same > behavior by calling self.myString = anotherString. That assumes Objective-C 2. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-

Re: Newbie Question on "self"

2008-08-11 Thread Charles Steinman
--- On Mon, 8/11/08, Todd Heberlein <[EMAIL PROTECTED]> wrote: > Well, you don't need the "self" prefix, but > you may want to look at > using "setters" and "getters". It would > look like this > > @interface MyThingy : NSObject { > ... > NSString* myString; > ... > }; >

Re: Newbie Question on "self"

2008-08-11 Thread Gregory Weston
Matt Keyes wrote: Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" i.e. this.m_sMyString = "this is my string"; In Objective-C, this doesn't seem as clear to me (or at least it doesn't compil

Re: Newbie Question on "self"

2008-08-11 Thread Todd Heberlein
- (id)initWithString:(NSString *) string { self.myString = [[NSString alloc] initWithString:string]; } Well, you don't need the "self" prefix, but you may want to look at using "setters" and "getters". It would look like this @interface MyThingy : NSObject { ... NSString*

RE: Newbie Question on "self"

2008-08-11 Thread Matt Keyes
Thanks y'all... in all the Obj-C examples I've read, I've never seen the -> operator used. I should have thought to check! (since in C++ it would be this->whatever). Thanks again, Matt > Date: Mon, 11 Aug 2008 11:05:55 -0700 > Subject: Re: Newbie Question on &quo

Re: Newbie Question on "self"

2008-08-11 Thread Matt Neuburg
On Mon, 11 Aug 2008 17:47:59 +, Matt Keyes <[EMAIL PROTECTED]> said: >Hello again, > >In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" > >i.e. this.m_sMyString = "this is my string"; > >In Objective-C, this does

Re: Newbie Question on "self"

2008-08-11 Thread Jonathan Hess
On Aug 11, 2008, at 10:47 AM, Matt Keyes wrote: Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" i.e. this.m_sMyString = "this is my string"; In Objective-C, this doesn't seem as clear to me (

Re: Newbie Question on "self"

2008-08-11 Thread I. Savant
> In Objective-C, this doesn't seem as clear to me (or at least it doesn't > compile). For example: > > - (id)initWithString:(NSString *) string { >self.myString = [[NSString alloc] initWithString:string]; > } > > Produces an error: > > error: request for member 'myString' in something not a

Newbie Question on "self"

2008-08-11 Thread Matt Keyes
Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" i.e. this.m_sMyString = "this is my string"; In Objective-C, this doesn't seem as clear to me (or at least it doesn't compile). For example: - (id

Re: newbie question: NSURLConnection delegation and "method instance"

2008-07-20 Thread Dmitri Goutnik
On Jul 20, 2008, at 11:43 PM, JB Ashton wrote: Hi all, I'm struggling with "receivedData is declared as a method instance elsewhere" in this explanation of NSURLConnection delegation: http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html Wh

Re: newbie question: NSURLConnection delegation and "method instance"

2008-07-20 Thread Scott Anguish
receivedData should be an instance variable of the class that contains the code in Listing 1 - Creating a connection using NSURLConnection. often an instance of that class is also used as the delegate (which is what this example code is assuming) the code for these snippets really needs to

newbie question: NSURLConnection delegation and "method instance"

2008-07-20 Thread JB Ashton
Hi all, I'm struggling with "receivedData is declared as a method instance elsewhere" in this explanation of NSURLConnection delegation: http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html When I declare the receivedData as NSMutableData in t

Re: Such a newbie question that I'm embarrassed to ask it :-)

2008-07-10 Thread Chris Suter
On 11/07/2008, at 12:36 PM, Dale Jensen wrote: I have the need to modify a menu item title, so I: a) Added a tag to the menu item in IB (selected the menu item, then went to the first "tab" of the Inspector, and added a number in the "Tag" field. I tried both 99 and 1). b) Added this cod

Such a newbie question that I'm embarrassed to ask it :-)

2008-07-10 Thread Dale Jensen
I have the need to modify a menu item title, so I: a) Added a tag to the menu item in IB (selected the menu item, then went to the first "tab" of the Inspector, and added a number in the "Tag" field. I tried both 99 and 1). b) Added this code to my function: NSMenu *mainMenu = [NSApp ma

RE: Newbie question: Timers

2008-07-01 Thread Matthew Youney
Thanks, I will have to investigate further about how exactly to implement this. Again, thanks for your help, Matt -Original Message- From: Daniel Richman [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 5:46 PM To: Matthew Youney Cc: Cocoa Subject: Re: Newbie question: Timers Use

Re: Newbie question: Timers

2008-06-30 Thread j o a r
On Jun 30, 2008, at 2:36 PM, Matthew Youney wrote: In the VS environment, there is a “timer” control that can be dropped onto a form, and will generate timer events every X milliseconds. How would I impliment similar functionality in Cocoa, or what would you gurus suggest that I look int

Re: Newbie question: Timers

2008-06-30 Thread Daniel Richman
Use this: NSTimer *myTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 // number of seconds as double target:self // targer selector:@selector(checkTimer:) // selector to call (parameter is the timer) userInfo:nil // I don't use any user info repeats:YES]; // whether the timer repeats or is o

Newbie question: Timers

2008-06-30 Thread Matthew Youney
Hello everyone: I have another question that is based on my Microsoft background (yes I am ashamed). In the VS environment, there is a “timer” control that can be dropped onto a form, and will generate timer events every X milliseconds. How would I impliment similar functionality in Cocoa, or wha

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-27 Thread Kai
On 27.6.2008, at 05:00, Tran Kim Bach wrote: Wow, thanks Ken a lot. About the endian issues, I have a compatible swap function to convert data to Big-endian (and vice verse). Then, I will correct big-endian issues. I may know where the problem is. When I read to your suggestion, On Fri, Jun

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-26 Thread Graham Cox
Just an aside that may or may not be relevant. In the old days, often variable-length resources and other OS types would have a struct defined for them that used a fixed field size to represent some variable length field in the real resource, for example: typedef struct { short count;

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-26 Thread Tran Kim Bach
Wow, thanks Ken a lot.About the endian issues, I have a compatible swap function to convert data to Big-endian (and vice verse). Then, I will correct big-endian issues. I may know where the problem is. When I read to your suggestion, On Fri, Jun 27, 2008 at 6:11 AM, Ken Thomases <[EMAIL PROTECTED]

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-26 Thread Ken Thomases
On Jun 25, 2008, at 9:49 PM, Tran Kim Bach wrote: On Wed, Jun 25, 2008 at 3:36 PM, Ken Thomases <[EMAIL PROTECTED]> wrote Also, in the pseudo-code you provide, the NSData objects will accumulate in the autorelease pool until some point after your "for" loop. You can try using an autorel

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-26 Thread Tran Kim Bach
> > > if((type2 =='PREC')&&([resID intValue]== 302)) > There is a typo in the above code line:It should be: if((resType1 =='PREC')&&([resID intValue]== 302)) > Regards, Bachtk ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread Tran Kim Bach
Thanks everybody for your kind helps. I'm so happy that all of you welcome me warmly here. On Wed, Jun 25, 2008 at 3:36 PM, Ken Thomases <[EMAIL PROTECTED]> wrote > > > Also, in the pseudo-code you provide, the NSData objects will accumulate in > the autorelease pool until some point after your "fo

Re: Newbie question: error in creating a NSData object using handle(Resource Management)

2008-06-25 Thread Jens Alfke
Handle dataHandle = Get1IndResource( type1, n); I hope you checked that dataHandle!=NULL and *dataHandle!=NULL. struct A_STRUCT aStruct; memcpy(& aStruct,[data bytes], [data length]); This is dangerous — if [data length] is larger than sizeof(aStruct), you've just clobbered yo

RE: Newbie question: error in creating a NSData object using handle(Resource Management)

2008-06-25 Thread Gary L. Wade
1. Have you set the resource file you're iterating over as the current resource file (UseResFile)? Make sure you save off the current resource file (CurResFile) before you do that so you can reset it once you close it. The Resource Manager is not good at keeping track of state in the way you m

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread I. Savant
> PS: In case you have more questions about old-style resource access, > you'd better take them to Apples Carbon list. People there are > probably more understanding about the need to use time proven but no > longer fancy APIs. ;-) Not that you're bitter, though ... ;-) -- I.S.

  1   2   >