Re: Getting bound object

2014-07-13 Thread Daniel Luis dos Santos
On 13 Jul 2014, at 21:10, Kyle Sluder k...@ksluder.com wrote: On Jul 13, 2014, at 11:24 AM, Daniel Santos daniel.d...@gmail.com wrote: Hello, I have a collection view in which I have subclassed the collection view item. In the awake from nib method I want to get the represented object

Setting a tag on NSProgressIndicator

2014-07-05 Thread Daniel Luis dos Santos
Hello all, I have the item prototype of a NSCollectionView. This prototype in declared in a NIB file along with its view. Now I want to display an image in this view, but while it is loading I want to display a circular progress indicator instead of the loaded image. I have subclassed NSView

Re: IKImageBrowserCell

2014-06-11 Thread Daniel Luis dos Santos
objects. I have done this and it works well. -- SevenBits On Monday, June 9, 2014, SevenBits sevenbitst...@gmail.com wrote: On Monday, June 9, 2014, Daniel Luis dos Santos daniel.d...@gmail.com wrote: Hello all, I have a IKImageBrowserView that I want to customise. I want to add

IKImageBrowserCell

2014-06-09 Thread Daniel Luis dos Santos
Hello all, I have a IKImageBrowserView that I want to customise. I want to add a button to each IKImageBrowser|Cell that when pushed does some action. How can I do that ? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

error details in a NSAlert

2014-04-06 Thread Daniel Luis dos Santos
Hello all, I want to display some text indicating a list of errors the user should correct before submitting data. I am using a modal NSAlert in which i set a message with a localised string from a table. I want to include the error details and for that I was setting the informativeText field

Re: error details in a NSAlert

2014-04-06 Thread Daniel Luis dos Santos
Sorry, my mistake String was empty. Conditional that populated it failed. On 06 Apr 2014, at 16:18, Scott Ribe scott_r...@elevated-dev.com wrote: On Apr 5, 2014, at 7:19 PM, Daniel Luis dos Santos daniel.d...@gmail.com wrote: I want to include the error details and for that I was setting

error details in a NSAlert

2014-04-05 Thread Daniel Luis dos Santos
Hello all, I want to display some text indicating a list of errors the user should correct before submitting data. I am using a modal NSAlert in which i set a message with a localised string from a table. I want to include the error details and for that I was setting the informativeText field

Cocoa custom text field backspace handling

2014-03-06 Thread Daniel Luis dos Santos
I am developing a custom textfield in Cocoa. To handle the backspace character I should be defining : - (void) keyUp: (NSEvent*)theEvent { [self interpretKeyEvents: [NSArray arrayWithObject: theEvent]; NSString *text = [theEvent charactersIgnoringModifiers]; [[self text]

Running an NSApplication from a test case

2014-03-04 Thread Daniel Luis dos Santos
Hello all, I have a test case where I would like to launch a UI. I have a NIB with a window that I load through code in the test case. Here goes the code : - (void)testExample { NSArray* topLevelWidgets = nil; NSBundle* theBundle = [NSBundle bundleForClass:[self class]];

Re-using the same NIB on two owners

2011-06-26 Thread Daniel Luis dos Santos
Hello, I have an application that has two windows. Each window is associated to a controller class. On one method of each class I load another NIB that has a subordinate window. That subordinate NIB has outlets and actions that should be associated to the loading class, so on the NIB I set the

Menu item enabling

2011-06-23 Thread Daniel Luis dos Santos
Hello, I have a submenu of the File menu that gets loaded with menu items on awakeFromNib(). Problem is that the method that does the menu item enabling is not being called on the submenu's items and so they are not enabled. I implemented the validateUserInterfaceItem() method in a class and

Re: Menu item enabling

2011-06-23 Thread Daniel Luis dos Santos
, 2011, at 10:17 AM, Daniel Luis dos Santos wrote: Hello, I have a submenu of the File menu that gets loaded with menu items on awakeFromNib(). Problem is that the method that does the menu item enabling is not being called on the submenu's items and so they are not enabled. I implemented

Re: Storing bundle loaded main class instances in NSArray

2009-04-09 Thread Daniel Luis dos Santos
, Daniel Luis dos Santos wrote: I expect a file manager and it tells me that it does not respond to fileExistsAtPath No you don't. According to your original post, you are complaining that calling - addObject on _instances throws this error. So does _instances point to NSFileManager or an array

Fwd: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
Sorry. Sent the original to another list Begin forwarded message: From: Daniel Luis dos Santos daniel.d...@gmail.com Date: April 8, 2009 1:02:18 PM GMT+01:00 To: Graham Cox graham@bigpond.com Cc: list Xcode-users xcode-us...@lists.apple.com Subject: Re: Storing bundle loaded main class

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
AM, Daniel Luis dos Santos wrote: The _instances mutable array is instantiated in the default init method that is called on all other init methods. It is never released. I am using an Auto release pool. The log writes ; 2009-04-08 13:56:53.189 TestRunner[2568:813] *** -[NSFileManager

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
If its outer and the code is done right, it should be disposed of when the code within it is no longer needed On Apr 8, 2009, at 3:46 PM, glenn andreas wrote: On Apr 8, 2009, at 9:34 AM, Daniel Luis dos Santos wrote: Since I am using an auto release pool that is created before anything

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
, 2009, at 7:55 AM, Daniel Luis dos Santos wrote: If its outer and the code is done right, it should be disposed of when the code within it is no longer needed That still isn't correct according to the Cocoa memory management guidelines. Thus, the general conclusion will be that something

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
I expect a file manager and it tells me that it does not respond to fileExistsAtPath On Apr 8, 2009, at 5:05 PM, Bill Bumgarner wrote: On Apr 8, 2009, at 8:48 AM, Daniel Luis dos Santos wrote: I just discovered that if I don't load the code through a bundle and link it directly

Storing bundle loaded main class instances in NSArray

2009-04-07 Thread Daniel Luis dos Santos
Hello, I have some code that loads a bundle like : [NSBundle bundleForPath: path] Then I get its main class. Then I cycle through some parameters that initialize that loaded main class and stores each new instance in a NSMutableArray. Problem is that when I do the assignment to

memory deallocation

2009-04-04 Thread Daniel Luis dos Santos
Hello, From what I know so far, memory allocated using the malloc() family of functions is freed using the free() function. Literal values such as : char *aString = some text; are automatic values and are deallocated by the compiler automatically. When I free some pointer that was

Memory allocation pattern related question

2009-03-29 Thread Daniel Luis dos Santos
Hello, I have a shared library and some client code. In the shared library I am adopting the following method signature pattern : - (int) someMethod: (aType*)someInParam anotherParam: (aType**)someOutParam; I use the return value to indicate success or failure in the execution of the

NSTimer EXC_BAD_ACCESS

2008-12-13 Thread Daniel Luis dos Santos
Hello, I have a NSTimer that is created every time I press a button. It then calls the update function successively until some amount of time passes. When I press the button again I get a EXC_BAD_ACCESS on the timer's initialization : NSTimer *timer = [NSTimer

Symbol not found error

2008-12-09 Thread Daniel Luis dos Santos
Hello, I am getting this error over and over again, whenever I do a new target in some place and then try to use it somewhere else. I have a dynamic library in a project that is used in another project. Then I added another dynamic library to the first one which is also used by the second

Time measurement

2008-12-01 Thread Daniel Luis dos Santos
Hello, Not sure I should ask this here. How do I get time measurements in milliseconds? What is the accuracy of the mac's C library implementation ? I am using the clock() function from time.h and measuring differences in seconds between the trigering of a NSTimer. The NSTimer fires

Re: NSTimer issue

2008-11-06 Thread Daniel Luis dos Santos
You already answered your own question. If you see two different values for 'self' for two objects of your view subclass then of course there are two instances. The NIB file has a window taken from the pallete, where I have dropped a button and a generic NSView both from the pallete.

NSTimer issue

2008-11-05 Thread Daniel Luis dos Santos
Hello, I have an NSView derived class where I have to do some drawing inside NSRect. When pressing a start button, a timer is created with : + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds target:(id)targetselector:(SEL)aSelector userInfo:(id)userInfo repeats:

Path handling routines

2008-10-29 Thread Daniel Luis dos Santos
Hello, Are there in the Foundation framework (or anywhere else on the Cocoa platform) path handling routines (directory extraction, path decomposition) ? Cheers ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

sizeof(unsigned long long)

2008-09-27 Thread Daniel Luis dos Santos
Hello, I have a piece of C code that generates an unsigned long long from an sequence of unsigned char's. When I do sizeof(unsigned long long) i get 8. Afterwards I try to shift each unsigned char into its position along the destination unsigned long long variable, but I get a warning from

How to call functions of a C dylib on a C++ dylib

2008-09-18 Thread Daniel Luis dos Santos
I am having trouble getting it to compile. From what I understand there must be an extern C before the inclusion of the C lib's header files. I still get a link error. Is there anything else to it ? ___ Cocoa-dev mailing list

Re: How to call functions of a C dylib on a C++ dylib

2008-09-18 Thread Daniel Luis dos Santos
Sorry, I forgot to say that I was already doing that. And it does build, my problem is in the link stage. On Sep 18, 2008, at 3:00 PM, Negm-Awad Amin wrote: Am Do,18.09.2008 um 15:55 schrieb Daniel Luis dos Santos: I am having trouble getting it to compile. From what I understand

Re: Mixing ObjC and C++ STL on same ObjC source file

2008-09-13 Thread Daniel Luis dos Santos
On Sep 12, 2008, at 11:21 AM, Daniel Luis dos Santos wrote: The problem was that in CVDisplayPipeline.h I was declaring the map as a return type of a method, but without specifying the template types (caused by my relative ignorance of C++). Now I have another problem, which I wonder

Mixing ObjC and C++ STL on same ObjC source file

2008-09-12 Thread Daniel Luis dos Santos
Hello ! I have an objective C class and want to call a method on a class in C+ +. As argument to the C++ class is a map instance of the STL. The ObjC class definition is on a file with a mm extension. I have std::map *var as a member variable of the ObjC class. When I compile the code there

Autorelease question

2008-03-13 Thread Daniel Luis dos Santos
Hello, I have the following code : if (![fileMgr fileExistsAtPath: indexFilePath]) { NSMutableDictionary *index = [[NSMutableDictionary alloc] init]; [index setObject: [NSNumber numberWithLong: DEFAULTS_BLOCKSIZE] forKey: INDEXKEY_BLOCKSIZE]; [index setObject: