Dis-Allowing Multiple Instances of an Application

2008-03-04 Thread ADIL SALEEM
Hi, I have made an application in Cocoa. From GUI it's multiple instances can not be launched. However, from command shell, multiple instances of the application can be launched. I want to run only one instance of my application at a time. It should not be able to create multiple ins

Problem in Mouse over

2008-03-10 Thread ADIL SALEEM
Hi, What i am trying to do is that if mouse pointer is placed over a certain button in the GUI, then the text in a text field should be changed. I have subclassed NSButton and assigned this custom class to my button. >From this class i have been able to receive mouse events and it works fine. But

Custom Shaped Buttons

2008-03-20 Thread ADIL SALEEM
Hi, I need guidance for a problem. I want to make custom shaped buttons (based on images) in my GUI. By assigning image and alternate image in IB it displays the image but the shape of the button is not exactly as the image. I want to make the button of exact shape as that of the image. For tha

Basic question about NSComboBox

2008-03-26 Thread ADIL SALEEM
I have a basic question about NSComboBox that i want to clarify. When user selects some item from the combo box and actually click on the item itself in the list then [comboBox indexOfSelectedItem] returns it's index correctly (0,1,2...) . But if the user just clicks on the dropdown button and

How to disable Energy Saving mode ?

2008-04-20 Thread ADIL SALEEM
Hi, In my application i have a requirement that computer does not go to 'sleep' mode while the application is running. So i want to disable energy saving mode from the application. How do i do that ? If it is not possible directly, is there any work around for this ? Thank you __

Another question about Disabling Energy Saving mode

2008-04-27 Thread Adil Saleem
Hi, My application requires that the system does not go to sleep mode. That can be achieved by calling UpdateSystemActivity() from an NSTimer. That prevents the system from going to sleep when my application is running. However, if user manually put computer to sleep from Apple Menu->Sleep, then

Combo Box Problem (when using data source)

2008-05-13 Thread Adil Saleem
Hi, If a combo box is using a Data Source, then how do i programatically get the number of items in that combo box ? If i use [self numberOfItemsInComboBox:myComboBox], it says *** -[NSComboBoxCell objectValueOfSelectedItem] should not be called when usesDataSource is set to YES My question is,

Maximize/Minimize other applications

2008-05-15 Thread Adil Saleem
Hi, Is there any method in Cocoa (other than Apple Script) to Maximiz/Minimize other applications ? Thanx ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

NSPasteboard Delegate

2008-05-22 Thread Adil Saleem
Hi, I am trying to set my object as delegate of NSPasteBoard. I am calling from awakeFromNib NSPasteboard *pb = [NSPasteboard generalPasteboard]; [pb setDelegate:self]; However, on running, it raises exception. There is also a warning at compile time that says NSPasteboard may not respond to m

Re: NSPasteboard Delegate

2008-05-22 Thread Adil Saleem
> #//apple_ref/doc/uid/TP40004255-SW2 > > In particular the section on "Lazy Writing". This is > about the only > time that the delegation pattern is used by > NSPasteboard. > > > hth, > > G. > > > > > > > > > > >

Package Builder Questions

2008-05-29 Thread Adil Saleem
Hi, I want some help with Package Builder. Should i ask the questions on this list or is there any separate list for that ? Thanx ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Problem in Custom Shaped Window

2008-06-30 Thread Adil Saleem
Hi,I have implemented a custom shaped window using technique described in sample code RoundTransparentWindow (make a borderless transparent window and place your image using a customview on it). It works quite fine when there are no controls on it. However, i am facing problem when i place a Co

Problem in Custom Window

2008-06-30 Thread Adil Saleem
Hi,   I have implemented a custom shaped window using technique described in sample code RoundTransparentWindow (make a borderless transparent window and place your image  using a customview on it).   It works quite fine when there are no controls on it. However, i am facing problem when i place

Help on Menu Item

2008-07-23 Thread Adil Saleem
Hi,Is it possible to make a program that appears as a menu item for all applications ? Actually i want to make a custom action which i want to appear in every application's menu (just like About, Quit etc...) or it can just appear in the Apple menu so that it is always available no matter what

Re: Help on Menu Item

2008-07-24 Thread Adil Saleem
lt;[EMAIL PROTECTED]> Subject: Re: Help on Menu Item To: [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Date: Wednesday, July 23, 2008, 11:45 PM On 23 Jul '08, at 10:19 PM, Adil Saleem wrote: > Hi,Is it possible to make a program that appears as a menu item for > all applicatio

Underlining text in Interface Builder

2008-11-04 Thread Adil Saleem
Hi, I am trying to underline a static text in Interface Builder (through fonts window), but it does not underline the text. I don't understand why. Any ideas ? Thanx ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: Underlining text in Interface Builder

2008-11-05 Thread Adil Saleem
ss On Nov 4, 2008, at 12:37 AM, Adil Saleem wrote: > Hi, > > I am trying to underline a static text in Interface Builder (through fonts window), but it does not underline the text. I don't understand why. Any ideas ? > > Thanx > > > > _

Re: Underlining text in Interface Builder

2008-11-05 Thread Adil Saleem
Builder > To: Cocoa-dev@lists.apple.com > Date: Wednesday, November 5, 2008, 9:53 AM > (Resend; I posted this yesterday but it hasn't shown up > or bounced) > > Adil Saleem wrote: > > > > I am trying to underline a static text in Interface > Builder (through

Text blurred in application

2008-11-28 Thread Adil Saleem
Hi, I am having a problem with the way my application displays text. In my application, i have some NSTextFields (static text) on a custom window of mine. But the static text is not readable when application is launched. It is too blurred. At first i thought it was because the text size is smal

Re: Text blurred in application

2008-11-28 Thread Adil Saleem
r 28, 2008, 1:54 PM > On 28 Nov 2008, at 10:06:28, Adil Saleem wrote: > > > Hi, > > > > I am having a problem with the way my application > displays text. In my application, i have some NSTextFields > (static text) on a custom window of mine. But the static > tex

Re: Text blurred in application

2008-11-29 Thread Adil Saleem
Hi, My scenario is a little different than what you have described. I don't have images on buttons. I have my custom window (which is a black colored image) and on it are the static texts. These texts are displaying blurred. Although i have not been able to figure out why is this happening, but

File Extensions Problem

2008-08-21 Thread Adil Saleem
Hi, I want to display in a tableview, list of all media files (audio, video files) present in a certain directory. Currently what i am doing is that i am getting the file names in an NSMutableArray using NSFileManager function directoryContentsAtPath I get the list, but the problem is that i

Storing Instances of a structure in a file

2008-09-21 Thread Adil Saleem
Hi,   I want to store instances of a structure in a file so that my application can retreive them and read them.(Basically they are different configuration presets for the application) I also want each instance that is stored to be unique. I know this becomes a typical database problem but i don

Re: Storing Instances of a structure in a file

2008-09-21 Thread Adil Saleem
ple.com Date: Sunday, September 21, 2008, 3:57 AM On Sun, Sep 21, 2008 at 9:13 PM, Adil Saleem <[EMAIL PROTECTED]> wrote: > Hi, > > I want to store instances of a structure in a file so that my application can retreive them and read them.(Basically they are different configuration

Very basic Bindings question

2008-09-24 Thread Adil Saleem
Hi,   I am trying to use bindings for the first time. So this is a pretty basic question.   As an example what i am trying to do is that i have a NSTextField in which user enters some numeric value. I have a int type variable in my class that is binded to the value field of this text field. I g

Problem in using NSKeyedUnarchiver for my custom class

2008-09-29 Thread Adil Saleem
Hi, I am trying to write instances of a class (subclass of NSObject) in an array and then write them to a preferences files using NSKeyedArchiver. It does so successfully. After i unarchive it using NSKeyedUnarchiver, it reads the contents in the array. It also reports correct no. of objects of

Format Specifier Problem

2008-10-16 Thread Adil Saleem
Hi, I am trying to create a string from a float. But i want only 3 digits after the decimal place. Here's my code. float a = 2.036; NSString *str = [NSString stringWithFormat:@"%3f",a]; But this does not seem to work. Everytime it creates the string it is 2.036000 instead of 2.036 What shoul

Desired Tabbing order not working

2008-10-16 Thread Adil Saleem
Hi,   There is a small problem i am having while using Interface Builder. I have multiple text fields on my window. I have specified my own sequence of nextKeyView, so that while tabbing through those text fields, it follows my desired order. I have made the required connections and it even show

Re: Desired Tabbing order not working

2008-10-17 Thread Adil Saleem
Do you happen to have the "Auto Recalculates View Loop" checkbox checked in the containing window's attributes inspector? Jon Hess On Oct 16, 2008, at 1:31 PM, Adil Saleem wrote: > Hi, > > There is a small problem i am having while using Interface Builder. > I have mu

Turning off Auto Complete feature for NSTextField

2008-10-28 Thread Adil Saleem
Hi, I am encountering a small problem. I am using a simple NSTextField in my application. This textfield is editable. When user starts entering some text, the auto complete is by default ON, so on pressing escape key a list of suggestions is displayed. I don't want this feature. How can i turn

Re: Turning off Auto Complete feature for NSTextField

2008-10-28 Thread Adil Saleem
Thank you, implementing the delegate method and returning nothing from it worked. By the way, this is pretty basic stuff. I think there should have been a line or two about it in the NSTextField documentation. Thank you. --- On Tue, 10/28/08, John Joyce <[EMAIL PROTECTED]> wrote: From: John

NSMenuItem Binding Problem

2009-03-11 Thread Adil Saleem
Hi,   I am having a little difficulty with bindings of NSMenuItem. I am binding it's value with an integer variable (as it says in the documentation online). The value 1 is supposed to set it's state ON and 0 to OFF and -1 to mixed state.   However, the problem is that the actual state of the m

Question about NSFileHandle class

2009-05-30 Thread Adil Saleem
Hi, Does the class NSFileHandle implements endianness checks or is it the responsibility of the programmer? I am using its method  - (NSData *)readDataOfLength:(NSUInteger)length I want to read binary data from files and i want it to be same every time in my application (no endianness issues)  w

Problem with Float type variable

2009-08-14 Thread Adil Saleem
Hi,   I am getting a strange error that i am unable to understand.   I have a float type variable for which i have defined the getter and setter methods. However, when i set its value from within my application, it changes the value and the setter method gets wrong value.   Example: -(float)my

Re: Problem with Float type variable

2009-08-15 Thread Adil Saleem
But why would it round 863.6 ? I mean there is only 1 digit after the decimal. It should not have the range problem with a value this small.       --- On Fri, 8/14/09, Graham Cox wrote: From: Graham Cox Subject: Re: Problem with Float type variable To: "Adil Saleem" Cc: