Best approach to release app customized for the specific app-store

2013-04-04 Thread Symadept
Hi,

My app shall exhibit its features depending upon the app-store the app is
downloaded from but not from the phone's language/region settings.

I quickly thought of an approach:
*1. Prepackaged Approach:*
Maintain a single code base but plugin the features specific to the region
thereby generating multiple apps built with region-specific name and
bundle-id.
*Rational:*

   - The reason behind thinking of having region-specific app name and
   bundle-id is because the limitation that I can't have same app uploaded on
   the app-store for various subset of regions.
   - If it is possible then I am good. But if not then I have to go for
   Region-specific app-name and bundle-id approach.

*Limitations:*
The Region-specific app-name and bundle-id has following limitations:

   - Maintaining multiple binaries would be hassle.
   - Any updates had to be tracked and pushed.

Please help me to understand on the same.

Regards
Mustafa Shaik
*
*
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Offline mobile analytics possible

2013-04-04 Thread Symadept
I have a requirement that able to upload the analytics whenever there is a
network availability. I am going through Coremetrics or Google Analytics.
Do these support offline caching the requests that can be uploaded in the
next availability of the network. If not can anyone suggest other
frameworks?


Any info is highly appreciated.


Regards

mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


On tapping Status bar scrolls to top in UIWebView content

2011-07-11 Thread Symadept
Hi,

I am facing an issue where once I tap on Status bar, scrolls my UIWebView
content to top. How can I disable it.



Regards

symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to disable double tap on UIWebView

2011-07-11 Thread Symadept
Hi,

How can I disabe double tap on UIWebView. I tried to override touchesBegan
but it is not invoked. Any idea how can I fix this.



Regards

symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Custom crop rect box in UIImagePickerViewController

2011-07-11 Thread Symadept
Hi,

When choosing the image either through Camera or Saved Albums, there will a
Squared rectangle of height 320x320. Is it possible for me to define the
custom dimensions of this Box. I tried using overLayView. But that happens
only for Camera and above 3.1 not for Saved Album photos.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Custom crop box for UIImagePickerController

2011-07-07 Thread Symadept
Hi,
I want to resize the guide box visible in Camera or Albums app launched
using UIImagePickerViewController. Is there a way to get custom Crop rect
and Crop Box.

Looking forward for quick reply.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to enable accessibility for Screen Change

2011-04-13 Thread Symadept
Hi,
I am looking for a multiview app, if I am navigating to Page 2 from Page 1
is there a way I can enable accessibility such that, Voice Over can read as
I am transitioning to Page 2.

Glad to see your responses.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Textfield in navigation controller not responding to user taps

2011-04-04 Thread Symadept
Hi,

I am having a strange problem in implementing UITextField as a part of
leftBarItem of NavigationController.

my leftBarItem customview, UIView has UIButton and UITextFields as subViews.


{
UIButton *theButton = [UIButton buttonWithType:UIButtonTypeCustom];
[theButton setImage:[UIImage imageNamed:@button.png]
forState:UIControlStateNormal];
[theButton setImageEdgeInsets:UIEdgeInsetsMake(0.0f, 6.0f, 0.0f,
0.0f)];

theButton.frame = CGRectMake(26+15.0f, 0.0f, 26.0f, 20.0f);

[theButton addTarget:self action:@selector(buttonClicked:)
forControlEvents:UIControlEventTouchUpInside];
theButton.tag = eOVSBItemButton;

}

CustomSearchBar *searchBar = [[CustomSearchBar alloc] init];
searchBar.tag = eOVSBSearchBar;
searchBar.delegate = self;
searchBar.frame = CGRectMake(26+15+26+15.0f, -5.0f, 134, 26.0f);
[leftButtonView addSubview:searchBar];
[searchBar release];

UIBarButtonItem *leftBarButton = [[UIBarButtonItem alloc]
initWithCustomView:leftButtonView];
rootNavController.navigationBar.topItem.leftBarButtonItem = leftBarButton;

Button responds properly but on Tap SearchBar wont gets activated. If I
implement the same searchbar in anyother view, on tap cursor starts
blinking. What am I missing here?

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


UITableViewCell Red Button tap crashes app

2010-07-30 Thread Symadept
Hi,

I have a table with one section of style UITableViewCellEditingStyleDelete.
Once I click on the - button, it changes to vertical and my app crashes.
Here is the stack trace

#0  0x32043cd0 in GSEventGetType ()
#1  0x30b7109c in
-[UITableViewCellDeleteConfirmationControl(UITableViewCellDeleteConfirmationControlStatic)
_interceptEvent:] ()
#2  0x309a41bc in -[UIView(Geometry) hitTest:withEvent:] ()

#20 0x3050e47e in __NSFireTimer ()
#21 0x30254a0e in CFRunLoopRunSpecific ()
#22 0x3025416a in CFRunLoopRunInMode ()
#23 0x320452a4 in GSEventRunModal ()
#24 0x308f037c in -[UIApplication _run] ()
#25 0x308eea94 in UIApplicationMain ()
#26 0x23c0 in main (argc=1, argv=0x255c) at
/Users/user/dev/mpsrepos/finance/Trunk_Latest/trunk/main.m:17

Any idea regarding this.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: [MEET] CocoaHeads-NYC tonight - NSOperation

2010-03-11 Thread Symadept
Hi Andy,

Can you please record the discussion and presentation since the people like
me non US Residents can view them. I am really looking for such topic.

Thanks  regards
Mustafa Shaik


On Fri, Mar 12, 2010 at 5:11 AM, Andy Lee ag...@mac.com wrote:

 Sorry for the two hours' notice...

 Marc van Olmen will give the talk entitled Introduction to NSOperation
 that he was unable to give last month.  I have no doubt it'll be worth the
 wait.

 As usual:

 (1) Please feel free to bring questions, code, and works in progress. We
 have a projector and we like to see code and try to help.
 (2) We'll have food and beer afterwards.
 (3) If there's a topic you'd like presented, let us know.
 (4) If *you'd* like to give a talk, let me know.

 Thursday, March 11
 6:00 - 8:00
 Downstairs at Tekserve, on 23rd between 6th and 7th
 http://tekserve.com/about/hours.php for directions and map
 Everyone's welcome. Just tell the person at the front you're there for
 CocoaHeads.

 Hope to see you there!

 --Andy
 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: RegisterEventHotKey and keylogging

2010-02-02 Thread Symadept
Hi Michael,

Basically RegisterEventHotKey registers given combination of hotkey
identified with the keycode. If it happens to be your pressing key is
registered as hotkey then you wont be able to see that. Lets say you have
registered A as hotkey in some application then either in your password or
username field you can never be able to print A and inturn fires hotkey
which may be the response of that particular app.

Hope it is clear to you.

Regards
Mustafa Shaik


On Tue, Feb 2, 2010 at 4:39 PM, Michael Vannorsdel mikev...@gmail.comwrote:

 Can RegisterEventHotKey be used to log an admin password or other
 passwords?  I accidentally hotkey'd some regular characters and had them
 trigger when typing in my admin pass on 10.5.8.
 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: [MEET] February CocoaHeads Developer Meetings

2010-02-02 Thread Symadept
Why can't it be possible in Singapore?

-Mustafa


On Fri, Jan 29, 2010 at 11:20 AM, Stephen Zyszkiewicz
st...@cocoaheads.orgwrote:

 Greetings,

 CocoaHeads is an international Cocoa programmer's group. Meetings are free
 and open to the public. We specialize in Cocoa, but everything Mac/iPhone
 programming related is welcome.

 Upcoming meetings:
 Australia
 Sydney- Thursday, February 4, 2010 18:30.

 Austria
 Wien- Thursday, February 11, 2010 19:00.

 Germany
 Frankfurt- Monday, February 1, 2010 19:30.
 Munich- Wednesday, February 10, 2010 19:00.

 Sweden
 Stockholm- Monday, February 1, 2010 19:00.

 Switzerland
 Zürich- Wednesday, February 10, 2010 19:00.

 United States
 Ann Arbor- Thursday, February 11, 2010 19:00.
 Birmingham- Thursday, February 11, 2010 19:00.
 Boulder- Tuesday, February 9, 2010 19:00.
 Colorado Springs- Thursday, February 11, 2010 19:00.
 Columbus- Tuesday, February 9, 2010 19:00.
 Denver- Tuesday, February 9, 2010 19:00.
 Des Moines- Thursday, February 11, 2010 19:00.
 Philadelphia- Thursday, February 11, 2010 19:00.
 Sacramento- Tuesday, February 2, 2010 17:00.


 Some chapters may have yet to post their meeting for next month. Meeting
 times may change. Locations and more information here:
 http://cocoaheads.org

 Also be sure to check for an NSCoder Night in your area:
 http://nscodernight.com/


 Steve
 Silicon Valley CocoaHeads___


 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


IOHIDManagerRegisterDeviceMatchingCallback called twice when device pluggedin

2009-12-22 Thread Symadept
Hi,

I am using New IOHIDManager APIs, IOHIDManagerRegisterDeviceMatchingCallback
and IOHIDManagerRegisterDeviceRemovalCallback to get notified for Pluggedin
and Removed. Whenever I pluggin the device, I found that the
DeviceMatchingCallback method called twice always. May I know what could be
the reason?

My HIDUtilities methods goes like this. and its usage is given below.

//Usage.
- (BOOL)connectHIDDeviceWithVendorId:(long)vendorID
productID:(long)productID
{
BOOL tResult = NO;
mHIDManagerRef = [HIDUtilities
createHIDManager:Handle_IOHIDDevicePluggedInCallback
inRemovalCallback:Handle_IOHIDDeviceRemovalCallback];
if(mHIDManagerRef) {
mDeviceRef = [HIDUtilities findDevice:mHIDManagerRef
vendorId:vendorID productId:productID];
tResult = (mDeviceRef != NULL);
}
return tResult;
}

+ (IOHIDManagerRef)createHIDManager:(IOHIDDeviceCallback)inPluggedInCallback
inRemovalCallback:(IOHIDDeviceCallback)inRemovalCallback
{
IOHIDManagerRef managerRef = NULL;
IOReturn tIOReturn = kIOReturnSuccess;

managerRef = IOHIDManagerCreate( kCFAllocatorDefault,
kIOHIDOptionsTypeNone );
IOHIDManagerScheduleWithRunLoop( managerRef, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode );
IOHIDManagerRegisterDeviceMatchingCallback(managerRef,
inPluggedInCallback, NULL);
IOHIDManagerRegisterDeviceRemovalCallback(managerRef, inRemovalCallback,
NULL);


tIOReturn = IOHIDManagerOpen( managerRef, kIOHIDOptionsTypeNone );

if ( kIOReturnSuccess != tIOReturn ) {
[HIDUtilities closeHIDManager:managerRef];
managerRef = NULL;
}
return managerRef;
}

+ (void)closeHIDManager:(IOHIDManagerRef)inHIDManagerRef
{
IOHIDManagerRegisterDeviceMatchingCallback( inHIDManagerRef, NULL, NULL
);
IOHIDManagerRegisterDeviceRemovalCallback( inHIDManagerRef, NULL, NULL
);
IOHIDManagerUnscheduleFromRunLoop( inHIDManagerRef, CFRunLoopGetCurrent(
), kCFRunLoopDefaultMode );
IOHIDManagerClose( inHIDManagerRef, kIOHIDOptionsTypeNone );
}

+ (IOHIDDeviceRef)findDevice:(IOHIDManagerRef)inHIDManagerRef
vendorId:(long)vendorId productId:(long)productId
{
IOHIDDeviceRef theDevice = NULL;

// setup dictionary
CFMutableDictionaryRef deviceIdentity =
CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
kCFTypeDictionaryKeyCallBacks, kCFTypeDictionaryValueCallBacks);

CFNumberRef cfVendorId = CFNumberCreate(kCFAllocatorDefault,
kCFNumberLongType, vendorId);
CFStringRef cfVendorSt = CFStringCreateWithCString(kCFAllocatorDefault,
kIOHIDVendorIDKey, kCFStringEncodingUTF8);
CFDictionaryAddValue(deviceIdentity, cfVendorSt, cfVendorId);
CFRelease(cfVendorId);
CFRelease(cfVendorSt);

CFNumberRef cfProductId = CFNumberCreate(kCFAllocatorDefault,
kCFNumberLongType, productId);
CFStringRef cfProductSt = CFStringCreateWithCString(kCFAllocatorDefault,
kIOHIDProductIDKey, kCFStringEncodingUTF8);
CFDictionaryAddValue(deviceIdentity, cfProductSt, cfProductId);
CFRelease(cfProductId);
CFRelease(cfProductSt);

//CFMutableDictionaryRef dictionary =
CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
kCFTypeDictionaryKeyCallBacks, kCFTypeDictionaryValueCallBacks);
//CFDictionaryAddValue(dictionary, CFSTR(kIOPropertyMatchKey),
deviceIdentity);


// look for devices matching criteria
IOHIDManagerSetDeviceMatching(inHIDManagerRef, deviceIdentity);
CFSetRef foundDevices = IOHIDManagerCopyDevices(inHIDManagerRef);
CFIndex foundCount = 0;
if(foundDevices) {
foundCount = CFSetGetCount(foundDevices);

NSLog(@FoundCount:[%d], foundCount);
if(foundCount  0) {

// get first matching device
IOHIDDeviceRef *deviceRefs = malloc(sizeof(IOHIDDeviceRef *) *
foundCount);
CFSetGetValues(foundDevices, (const void **)deviceRefs);
theDevice = deviceRefs[0];
CFRetain(theDevice);
free(deviceRefs);
}

CFRelease(foundDevices);
}
CFRelease(deviceIdentity);

return theDevice;
}

Regards
Mustafa Shaik
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Localization strategies?

2009-12-21 Thread Symadept
Hi Ricky,

Even in my one of the project I am doing the same. Localizable.strings
(english) version shall have all the strings in Key-Value pair format,
Hello = Hello; And you can keep the comment on top of the string /*
Welcome text */.

And you can have many IBOutlets to set the string at runtime, as you
mentioned, with NSLocalizedString(@Hello, nil). Now you generate various
language localizable.strings by Add Localization (mail me if you think you
need more info) from XCode and change the file format to UTF16. Now these
files shall still show you english. Now pass these files to Localization
team and they shall simply copy paste the other version of the string in RHS
of the corresponding files.

If you go with multiple nib files for various locale, UI maintainance will
become hectic. Hence you are in right track.

All the best.

Regards
Mustafa Shaik


On Mon, Dec 21, 2009 at 4:30 AM, Ricky Sharp rsh...@mac.com wrote:


 In getting quotes from many localization companies, I've found that some
 have different processes.  For example, one company would prefer if I just
 provide .string files.  During their QA process, they'll then run the app
 and look at everything in context.

 While generating .strings from nibs is easy to do, there's a problem in
 that there seems to be no method of putting contextual comments into a nib.
  And there's no way I would hand-edit comments in the generated .strings
 files.

 Thus, I'm wondering if it would ultimately be worth it to externalize all
 strings from my nibs and just put everything in my single .strings file.
  This will clearly involve me adding tons of IBOutlet ivars just so that at
 runtime I can set their text with NSLocalizedString APIs.

 I still plan on having separate nibs though for each language (to account
 for text bounds, font sizes, etc.)

 How have others tackled localization?

 ___
 Ricky A. Sharp mailto:rsh...@instantinteractive.com
 Instant Interactive(tm)   http://www.instantinteractive.com



 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


TexfieldCell becomes see through for Borderless Window

2009-12-10 Thread Symadept
Hi,

From the example of RoundTransparentWindow, I made my Application window to
show only the Parts drawn and the transparent parts are cleared. This works
fine. But once I create a custom TableView and click its TextfieldCell to
edit, the Cell becomes see through. Can anybody help me what would be my
mistake with this CustomWindow and CustomView? Without the Window and View
customization, my TableView works fine.

I am pasting the link for my sample here.
http://www.4shared.com/file/169581867/8e45268d/TransparentTable.html

Regards
Mustafa Shaik
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Problem with Set/Get volume of input device with single channel

2009-12-09 Thread Symadept
Hi,

I am trying to Set/Get Volume level of Input device which has only single
channel but no master channel, then it fails to retrieve the
kAudioDevicePropertyPreferredChannelsForStereo and intermittently
kAudioDevicePropertyVolumeScalar for each channel. But this works well for
Output device.

So is there any difference in setting/getting the volume of input channels?

I am pasting the downloadable link to sample.
http://www.4shared.com/file/169494513/f53ed27/VolumeManagerTest.html

Thanks in advance.

Regards
Mustafa


Tags:  MacOSX, CoreAudio, Objective C.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


TextfieldCell becomes see through in a tableview

2009-12-07 Thread Symadept
Hi,

I was writing a Custom TableView whose cells should be drawing no
background. For that I made the Textfieldcell as DrawsBackground:NO.

I have overridden TableView and TextfieldCell also. But when I click on the
textfield to modify its contents, it becomes see through. Rather I want the
textfieldcell to display the background as it does when it is not in edit
state.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSTableView able to show various controls

2009-11-29 Thread Symadept
Hi,

I want to so NSTextFieldCell in idle state for the one Column in TableView.
When this cell is clicked for editing I would like to show a NSComboBoxCell.
How can I achieve this task. I tried with all the possibilities like - (
NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(
NSTableColumn *)tableColumn row:(NSInteger)row;

But I am struck at somethings like, how will I know when a cell is ready for
editing.
How can I return the ComboBoxCell for that editing cell?

Any help, highly appreciable.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Button width should accomodate localized string

2009-11-29 Thread Symadept
Hi,

How can I scale my button or Label to be able to accomodate the localized
string?

Any clues.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Help needed on font for localized app

2009-11-29 Thread Symadept
Hi,

My client has given me a custom TTF font only for English. So my intention
is to load that TTF only for English and for other languages it should
fallback to the available System font.

I am doing the following steps:

1. Registering fonts with my app.
Copying into Resources folder and add to my project.
2. Loading the font with name.

NSMutableDictionary * aTitleAttributes = [[[NSMutableDictionary alloc]
initWithObjectsAndKeys:

   [NSFont fontWithName:CP_FONT_NAME size:[NSFont systemFontSize]],
NSFontAttributeName,

aParagraphStyle, NSParagraphStyleAttributeName,

   nil] autorelease];
my But this results into another problem, since I am loading the fonts in
this way for all the languges, my localization text looks english. Hence I
think I should have some condition like

NSFont *font = nil;
If (currentLocaleIsEnglish()) {
/// font to load my custom TTF
}
Then use [NSFont fontwithName:font ...]

So can anybody help me to realize whatever I am doing is right with
registering the font with App. If so how can I register my font only for
English version. Because for other locales this font is not available then
NSFont::fontWithName will return nil and automatically fallsback to the
SystemFont and hence my locale shall be shown properly.

Otherwise I have to have a condition like what I mentioned above, which is a
crude way of doing. If so how can I write such an API for finding
currentLocale Is English?

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How can I choose font depending upon Locale.

2009-11-27 Thread Symadept
Hi,

My client has given me a custom TTF font only for English. So my intention
is to load that TTF only for English and for other languages it should
fallback to the available System font.

I am doing the following steps:

1. Registering fonts with my app.
Copying into Resources folder and add to my project.
2. Loading the font with name.

NSMutableDictionary * aTitleAttributes = [[[NSMutableDictionary alloc]
initWithObjectsAndKeys:

   [NSFont fontWithName:CP_FONT_NAME size:[NSFont systemFontSize]],
NSFontAttributeName,

aParagraphStyle, NSParagraphStyleAttributeName,

   nil] autorelease];
my But this results into another problem, since I am loading the fonts in
this way for all the languges, my localization text looks english. Hence I
think I should have some condition like

NSFont *font = nil;
If (currentLocaleIsEnglish()) {
/// font to load my custom TTF
}
Then use [NSFont fontwithName:font ...]

So can anybody help me to realize whatever I am doing is right with
registering the font with App. If so how can I register my font only for
English version. Because for other locales this font is not available then
NSFont::fontWithName will return nil and automatically fallsback to the
SystemFont and hence my locale shall be shown properly.

Otherwise I have to have a condition like what I mentioned above, which is a
crude way of doing. If so how can I write such an API for finding
currentLocale Is English?

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: changing dock label name of my app

2009-11-26 Thread Symadept
Project= Edit Active Target

Search for MyApp in the search bar. Whereever you find MyApp-1, replace it
to MyApp.

Regards
Mustafa

On Thu, Nov 26, 2009 at 5:15 PM, Nick Rogers roger...@mac.com wrote:

 Hi,
  for some reasons, my app is named like MyApp-1.
 And I want the label over the dock icon to appear as MyApp.

 how to go about it?

 thanks,
 Nick

 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Problem with same DeviceID for input and output for Playback

2009-11-25 Thread Symadept
Hi,

I am trying use CAPlayThru (
http://developer.apple.com/mac/library/samplecode/CAPlayThrough/) example
code of Apple, to get playthru happening from my Mic to Speakers. It works
well for the device with different DeviceId for Input and Output. If the
deviceId is same, then it gives me a problem.

Can anybody help me how to handle this issue.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Problem with QTMovie

2009-11-24 Thread Symadept
Hi,

I am playing one video, .mov format in QTMovieView which takes QTMovie and I
found out after completion of the Movie my headset's sound goes completely
off. I cant hear anything in that anymore unless I unplug and plug it again.
I tested the same with other movie samples, it works fine. What could be the
possible issue with this?

mQTMovie = [[QTMovie movieNamed:@THXVideo.mov error:error] retain];
[mQTMovie setAttribute:[NSNumber numberWithBool:YES]
forKey:QTMovieLoopsAttribute];
[mQTMovieView setMovie:mQTMovie];
[mQTMovie play];

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to get notified pause when QTMovieView when clicked

2009-11-24 Thread Symadept
Hi,

I figured out that when I click on the QTMovieView, it pauses and double
clicks it plays again. How to get notified whenever the movie is paused or
played by click and double click on the QTMovieView.

I tried all the possibilities like subclassing QTMovieView and overriding
the following methods.

- (IBAction)play:(id)sender
{
NSLog(@play);
}

- (IBAction)pause:(id)sender
{
NSLog(@pause);

}

But no luck.

Any help highly appreciable.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How to get notified pause when QTMovieView when clicked

2009-11-24 Thread Symadept
Hi,
What is the notification string for Pause and Play of QTMovie?

I found out one for movieEnd. Any similar one for this.

Regards
Mustafa

On Tue, Nov 24, 2009 at 6:19 PM, Jean-Daniel Dupas
devli...@shadowlab.orgwrote:

 Le 24 nov. 2009 à 11:03, Symadept a écrit :

  Hi,
 
  I figured out that when I click on the QTMovieView, it pauses and double
  clicks it plays again. How to get notified whenever the movie is paused
 or
  played by click and double click on the QTMovieView.
 
  I tried all the possibilities like subclassing QTMovieView and overriding
  the following methods.
 
  - (IBAction)play:(id)sender
  {
 NSLog(@play);
  }
 
  - (IBAction)pause:(id)sender
  {
 NSLog(@pause);
 
  }
 
  But no luck.
 
  Any help highly appreciable.

 Listen movie notification, not view notification, especially
 QTMovieRateDidChangeNotification


 -- Jean-Daniel





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How to get notified pause when QTMovieView when clicked

2009-11-24 Thread Symadept
Hi Jean,

I fixed it using your suggestion.

Thanks alot.

Regards
Mustafa

On Tue, Nov 24, 2009 at 6:57 PM, Symadept symad...@gmail.com wrote:

 Hi,
 What is the notification string for Pause and Play of QTMovie?

 I found out one for movieEnd. Any similar one for this.

 Regards
 Mustafa


 On Tue, Nov 24, 2009 at 6:19 PM, Jean-Daniel Dupas devli...@shadowlab.org
  wrote:

 Le 24 nov. 2009 à 11:03, Symadept a écrit :

  Hi,
 
  I figured out that when I click on the QTMovieView, it pauses and double
  clicks it plays again. How to get notified whenever the movie is paused
 or
  played by click and double click on the QTMovieView.
 
  I tried all the possibilities like subclassing QTMovieView and
 overriding
  the following methods.
 
  - (IBAction)play:(id)sender
  {
 NSLog(@play);
  }
 
  - (IBAction)pause:(id)sender
  {
 NSLog(@pause);
 
  }
 
  But no luck.
 
  Any help highly appreciable.

 Listen movie notification, not view notification, especially
 QTMovieRateDidChangeNotification


 -- Jean-Daniel






___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Problem with QTMovie

2009-11-24 Thread Symadept
Hi,

Any Idea why is this happening. I tried to play file into default then there
is no issue. And when I tried to play other sample videos then it is fine.

Regards
Mustafa

On Tue, Nov 24, 2009 at 6:00 PM, Symadept symad...@gmail.com wrote:

 Hi,

 I am playing one video, .mov format in QTMovieView which takes QTMovie and
 I found out after completion of the Movie my headset's sound goes completely
 off. I cant hear anything in that anymore unless I unplug and plug it again.
 I tested the same with other movie samples, it works fine. What could be the
 possible issue with this?

 mQTMovie = [[QTMovie movieNamed:@SampleVideo.mov error:error]
 retain];
 [mQTMovie setAttribute:[NSNumber numberWithBool:YES]
 forKey:QTMovieLoopsAttribute];
 [mQTMovieView setMovie:mQTMovie];
 [mQTMovie play];

 Regards
 Mustafa


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Locale based font

2009-11-23 Thread Symadept
Hi,

I found out the way to show custom font.

1. First give information in info.plist, under the identifier, Application
fonts resource path.
2. Add this file into the Resources folder.
3. Invoke using this method. [NSFont fontWithName:CP_FONT_NAME size:11],
NSFontAttributeName,

Works fine. But what I want is to use this font file only in english locale
and in other locales it should fallback to the system fonts of the
corresponding controls.

Any pointers highly appreciable.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How can I not block hotkey from other apps

2009-11-23 Thread Symadept
Hi,

I managed to get my app support for registering hotkeys and using it. But
unfortunately if I register Cmd P as hot key in my app, no one in the system
can use this hotkey to print unless I deregister it. How can I make it not
block others.

Any pointers highly appreciable.

Target: Tiger, Leopard, Snow leopard
Reference: Carbons' RegisterEventHotKey

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Locale based font

2009-11-23 Thread Symadept
Hi Ricky,

Thank you very much for your response. But can we have any way where I can
find current locale is English, I mean all versions of English. This could
solve my issue.

Regards
Mustafa


On Mon, Nov 23, 2009 at 9:50 PM, Ricky Sharp rsh...@mac.com wrote:

 I am about to play around with something similar. In my iPhone app, I have
 some calls with boldSystemFontOfSize. But, for certain locales, it should be
 a plain font and the size may need to be tweaked.

 I then had an idea to write a static method to obtain a font style and size
 based on locale. My thought was to come up with a key for each style and
 then have a localized property list file to store the styles for each
 locale.

 Kinda like how you often have a CSS file for each locale your web site is
 localized to.

 Sent from my iPhone


 On Nov 23, 2009, at 7:00 AM, Symadept symad...@gmail.com wrote:

  Hi,

 I found out the way to show custom font.

 1. First give information in info.plist, under the identifier, Application
 fonts resource path.
 2. Add this file into the Resources folder.
 3. Invoke using this method. [NSFont fontWithName:CP_FONT_NAME size:11],
 NSFontAttributeName,

 Works fine. But what I want is to use this font file only in english
 locale
 and in other locales it should fallback to the system fonts of the
 corresponding controls.

 Any pointers highly appreciable.

 Regards
 Mustafa
 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/rsharp%40mac.com

 This email sent to rsh...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Custom background in NSTableHeaderView

2009-11-16 Thread Symadept
Hi,

I am trying to display custom image and the attributed text into the
TableHeaderview. For this I am retrieving the HeaderCell of each TableColumn
and setting its image and attributed text. Then I found out If I set image
first and then text next, only attributed text shown with the default
headerview background. If the Image is set after Text then Background image
overlaps the text.

I am overriding NSTableView and doing two things.

1. setDrawsBackground:NO
2. Invoking empty drawBackgroundInClipRect:clipRect.

Here is my code.

- (void)setColumnHeaderOf:(id)identifier image:(NSImage*)image title:(
NSString*)title

{

NSTableColumn *column=[self tableColumnWithIdentifier:identifier];

[[column headerCell] setCellAttribute:NSCellHasImageOnLeftOrBottom to:
NSImageBelow];

[[column headerCell] setImage:image];

 NSMutableAttributedString *attributedString = [[NSMutableAttributedString
alloc] initWithString:title];

 NSMutableParagraphStyle * aParagraphStyle = [[[NSMutableParagraphStyle
alloc] init] autorelease];

[aParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];

[aParagraphStyle setAlignment:NSCenterTextAlignment];

 CGFloat dividingFactor = 255.0f;

NSMutableDictionary * aTitleAttributes = [[[NSMutableDictionary alloc]
initWithObjectsAndKeys:

   [NSFont fontWithName:CP_FONT_NAME size:[NSFont systemFontSize]],
NSFontAttributeName,

   aParagraphStyle, NSParagraphStyleAttributeName,

   nil] autorelease];

[aTitleAttributes setValue:[NSColor colorWithDeviceRed:(246/dividingFactor)
green:(204/dividingFactor) blue:(37/dividingFactor) alpha:1.0f] forKey:
NSForegroundColorAttributeName];

 [attributedString addAttributes:aTitleAttributes range:NSMakeRange(0,
[attributedString length])];

 [[column headerCell] setAttributedStringValue:attributedString];

[attributedString release];

}


- (void)awakeFromNib

{

NSLog(@KBCustomTableView awakeFromNib);

[[self enclosingScrollView] setDrawsBackground:NO];

NSRect frameRect = [[self headerView] frame];

[[self headerView] setFrameSize:NSMakeSize(frameRect.size.width, 30)];

 [self setColumnHeaderOf:@Column1 image:[NSImage imageNamed:@ColHdr1]
title:@Column1];

[self setColumnHeaderOf:@Column2 image:[NSImage imageNamed:@ColHdr2]
title:@Column2];

[self setColumnHeaderOf:@Column3 image:[NSImage imageNamed:@ColHdr3]
title:@Column3];


 }



- (void)drawBackgroundInClipRect:(NSRect)clipRect

{

NSLog(@KBCustomTableView drawBackgroundInClipRect);

//[super drawBackgroundInClipRect:clipRect];

}


Thanks in advance.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to replace ComboBoxCell with TextFieldCell when not editing

2009-11-16 Thread Symadept
Hi,

I want to replace the ComboBoxCell with TextFieldCell when I am not editing
the cell and shall be replaced with ComboBoxCell when clicked on that
particular cell. Any pointers highly appreciable.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Customize NSTableHeaderView

2009-11-15 Thread Symadept
Hi,

I want to customize NSTableHeaderView to that extent that
Shall be able to show custom Image in the background.
Shall be able to show the column separator.

Any pointers highly appreciable.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Drag-Move the Transparent windowed app over the screen

2009-11-14 Thread Symadept
Hey Andrew and Dave,

You must be kidding. I never see that api anywhere ;)

-Mustafa

On Sat, Nov 14, 2009 at 3:16 PM, Andrew Farmer andf...@gmail.com wrote:

 On 12 Nov 2009, at 01:58, kirankumar wrote:
  goto attributes for your window ,enable the texture checkbox so that
  you can drag your window.

 While this does have the desired effect, there is a much more direct
 approach available (which Dave Keck has hinted at).
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Close/Minimize the app

2009-11-12 Thread Symadept
Hi,

I have fixed my problem of miniaturizing the window. It was quite cool.

NSApplication *application = [NSApplication sharedApplication];
NSWindow *keyWindow = [application keyWindow];
[keyWindow miniaturize:keyWindow];

My app has KeyWindow but not MainWindow, because my app's window is
NSBorderlessWindowMask.

Thanks alot all of you for great effort.

Regards
Mustafa

On Thu, Nov 12, 2009 at 1:23 PM, kirankumar kiran.kod...@moschip.comwrote:

  hi,


 this will help you
 keep this 3lines of code in awakeFromNib, and mpwindow is you are window
 name.


  id closeButton = [mpWindow standardWindowButton:NSWindowCloseButton ];
  [closeButton setAction:@selector(closeapp:)];
  [closeButton setTarget:self];



  - (IBAction)closeapp:(id)sender
   {
exit(0);
   }

  Regards,
 kiran
  On Nov 12, 2009, at 10:18 AM, Symadept wrote:

  Actually I wanted to hide the app when close button is closed such that
 it
  shall be active still. Which I was doing. I was basically facing the
 problem
  with Minimize the app. I don't know why the NSApp
  miniaturizeAll:selfhttp://discussions.apple.com/;
  is not functioning as expected.

  Regards
  Symadept


  On Thu, Nov 12, 2009 at 12:27 PM, Nick Zitzmann n...@chronosnet.com
 wrote:


  On Nov 11, 2009, at 8:50 PM, Symadept wrote:

   How to close/minimize the app programmatically.


  To close the app, call -[NSApplication terminate:].

   I tried the following way
  but no luck.

 [[NSApp mainWindow] performMiniaturize:nil];


  This will only miniaturize the main window, and it won't work if
  -mainWindow returns nil (e.g. the app is in the background).

[OR]
 [NSApp miniaturizeAll:self];


  Now that should minimize all of the windows, unless you somehow
  circumvented loading NSApplication.

   And close should not terminate my app, it should place an icon in the

  Dock,

  I hope it would be the same. And I know to give Dock Menu items.

  From that menuitem, if I click on Open, it shall be able to launch my

  app.

  If an app is in the Dock, it is there because the app is running, or
  because the user wants to keep it in the Dock when it is not running.
 Please
  do not programmatically add inactive applications to the Dock. Even if
 there
  was an official way of doing this, Mac OS X has a long tradition of making
  this choice opt-in instead of opt-out like on Windows.

  Nick Zitzmann
  http://www.chronosnet.com/




   ___

  Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

  Please do not post admin requests or moderator comments to the list.
  Contact the moderators at cocoa-dev-admins(at)lists.apple.com

  Help/Unsubscribe/Update your Subscription:

 http://lists.apple.com/mailman/options/cocoa-dev/kiran.koduri%40moschip.com

  This email sent to kiran.kod...@moschip.com



 --
 The information contained in this email and any attachments is confidential
 and may be subject to copyright or other intellectual property protection.
 If you are not the intended recipient, you are not authorized to use or
 disclose this information, and we request that you notify us by reply mail
 or telephone and delete the original message from your mail system.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Drag-Move the Transparent windowed app over the screen

2009-11-12 Thread Symadept
Hi,

My app's window is a BorderLess Window because of which I will not have the
Titlebar (Ref: RoundTransparentWindow of Apple examples).

Because of which I can't drag and move over the screen. Any pointers to
solve this.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Mute/Unmute audio device

2009-11-12 Thread Symadept
Hi,

I am using core audio to Set/Get the Audio device volume. With reference to
the following code

+ (float)volume:(NSString*)deviceName isInput:(BOOL)isInput{

float b_vol;

OSStatus err;

UInt32 size;

UInt32 channels[2];

float volume[2];

  AudioDeviceID device = [AudioUtils DeviceIdFor:deviceName isInput
:isInput];

NSLog(@Device:[%x] IsInput:[%d], device, isInput);

//Assume here I am getting the device id of the devices with the specific
name.


 // try set master volume (channel 0)

size = sizeof( b_vol);

err = AudioDeviceGetProperty(device, 0, isInput,
kAudioDevicePropertyVolumeScalar, size, b_vol);

NSLog(@Volume:[%f], b_vol);

if(noErr==err) return b_vol;

 // otherwise, try seperate channels

// get channel numbers

size = sizeof(channels);

err = AudioDeviceGetProperty(device, 0, isInput,
kAudioDevicePropertyPreferredChannelsForStereo, size,channels);

if(err!=noErr) NSLog(@error getting channel-numbers);

 size = sizeof(float);

err = AudioDeviceGetProperty(device, channels[0], isInput,
kAudioDevicePropertyVolumeScalar, size, volume[0]);

if(noErr!=err) NSLog(@error getting volume of channel %d,channels[0]);

err = AudioDeviceGetProperty(device, channels[1], isInput,
kAudioDevicePropertyVolumeScalar, size, volume[1]);

if(noErr!=err) NSLog(@error getting volume of channel %d,channels[1]);

 b_vol = (volume[0]+volume[1])/2.00;

NSLog(@Volumes:V1[%f] V2[%f] Final:[%f], volume[0], volume[1], b_vol);

 return  b_vol;

}

This code works fine  for getting volume. Similarly can I set the audio
device to Mute/Unmute.

Any pointers highly appreciable.
Regards
Mustafa

On Thu, Nov 12, 2009 at 12:58 PM, aranmulholl...@gmail.com wrote:

 which technology are you asking about?


 On Nov 12, 2009 2:47pm, Symadept symad...@gmail.com wrote:
  Hi,
 
  How to Mute/Unmute audio device.
 
  Regards
  Mustafa
 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Connecting up a drop down menu

2009-11-12 Thread Symadept
Hi Karen,

This is how I will do.

http://mustafashaik.blogspot.com/2009/11/dropdown-box-popup-menu.html

In this example refer to the awakeFromNib of DropDownButtonController and
the handlers that I have registered during creation of the menu-items.

Hope this is useful for you.

Happy coding!

Regards
Mustafa Shaik


On Thu, Nov 12, 2009 at 4:52 PM, Karen van Eck 
karen.van@sonoco-trident.com wrote:

 Hi,

 Please could someone point me in the direction of a tutorial or something
 that shows how to bind up a drop down menu. I've been googling, reading, but
 am just getting more and more confused.

 I am looking for something very simple and clear, which assumes nothing,
 which will show me how to get the values from my program into the drop-down,
 and the selected value back into a string.

 Thank you

 Karen

 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Drag-Move the Transparent windowed app over the screen

2009-11-12 Thread Symadept
Hi Kiran,

Excellent. Since my window is transparent and doing at runtime, I have to
mention its properties during creation.

- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle
backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag {

// Using NSBorderlessWindowMask results in a window without a title bar.

self = [super initWithContentRect:contentRect

styleMask:NSBorderlessWindowMask | NSTexturedBackgroundWindowMask

  backing:NSBackingStoreBuffered defer:NO];

if (self != nil) {

// Start with no transparency for all drawing into the window

[self setAlphaValue:1.0];

// Turn off opacity so that the parts of the window that are not
drawn into are transparent.

[self setOpaque:NO];

}

return self;

}

Thanks a million. But can you put some rational on that, how does it made it
to happen. What does it mean by Textured. Besides giving metallic background
it is doing something more. What is that and how? How it unfroze my window
from moving once I gave this property?

Hope I am putting in proper manner.

Regards
Mustafa Shaik

On Thu, Nov 12, 2009 at 5:58 PM, kirankumar kiran.kod...@moschip.comwrote:

 Hi,

 goto attributes for your window ,enable the texture checkbox so that
 you can drag your window.


 Regards,
 kiran.





 On Nov 12, 2009, at 2:09 PM, Symadept wrote:

  Hi,

 My app's window is a BorderLess Window because of which I will not
 have the Titlebar (Ref: RoundTransparentWindow of Apple examples).

 Because of which I can't drag and move over the screen. Any
 pointers to solve this.

 Regards
 symadept



 The information contained in this email and any attachments is confidential
 and may be subject to copyright or other intellectual property protection.
 If you are not the intended recipient, you are not authorized to use or
 disclose this information, and we request that you notify us by reply mail
 or telephone and delete the original message from your mail system.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Auto-scrolling view

2009-11-12 Thread Symadept
How to design Auto-scrolling view. Any pointers are highly appreciable.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to drag window without title bar

2009-11-11 Thread Symadept
Hi,

With respect to the example,
http://developer.apple.com/mac/library/samplecode/RoundTransparentWindow/

I wanted to move the window with mouse drag. How can I do that?

Regards
Symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Close/Minimize the app

2009-11-11 Thread Symadept
Hi,

How to close/minimize the app programmatically. I tried the following way
but no luck.

[[NSApp mainWindow] performMiniaturize:nil];

  [OR]
[NSApp miniaturizeAll:self];

And close should not terminate my app, it should place an icon in the Dock,
I hope it would be the same. And I know to give Dock Menu items.
From that menuitem, if I click on Open, it shall be able to launch my app.

Regards
Symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Callback for Volume change or Mute/Unmute

2009-11-11 Thread Symadept
Hi,

How to register a callback for Volume Change and Mute/Unmute of audio
device.

Regards
Symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Mute/Unmute audio device

2009-11-11 Thread Symadept
Hi,

How to Mute/Unmute audio device.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Close/Minimize the app

2009-11-11 Thread Symadept
Actually I wanted to hide the app when close button is closed such that it
shall be active still. Which I was doing. I was basically facing the problem
with Minimize the app. I don't know why the NSApp
miniaturizeAll:selfhttp://discussions.apple.com/;
is not functioning as expected.

Regards
Symadept


On Thu, Nov 12, 2009 at 12:27 PM, Nick Zitzmann n...@chronosnet.com wrote:


 On Nov 11, 2009, at 8:50 PM, Symadept wrote:

  How to close/minimize the app programmatically.

 To close the app, call -[NSApplication terminate:].

  I tried the following way
  but no luck.
 
 [[NSApp mainWindow] performMiniaturize:nil];

 This will only miniaturize the main window, and it won't work if
 -mainWindow returns nil (e.g. the app is in the background).

   [OR]
 [NSApp miniaturizeAll:self];

 Now that should minimize all of the windows, unless you somehow
 circumvented loading NSApplication.

  And close should not terminate my app, it should place an icon in the
 Dock,
  I hope it would be the same. And I know to give Dock Menu items.
  From that menuitem, if I click on Open, it shall be able to launch my
 app.

 If an app is in the Dock, it is there because the app is running, or
 because the user wants to keep it in the Dock when it is not running. Please
 do not programmatically add inactive applications to the Dock. Even if there
 was an official way of doing this, Mac OS X has a long tradition of making
 this choice opt-in instead of opt-out like on Windows.

 Nick Zitzmann
 http://www.chronosnet.com/




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Programming hot key

2009-11-03 Thread Symadept
Hi,

Anybody tell me can I program a hot key which shall not block the other apps
responding to it.

Lets say I have registered hot key Command+P for some operation for my app,
it shall not block the other apps responding to it.

How can I do this?

Regards
Symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to scroll custom view

2009-10-30 Thread Symadept
Hi,

How can I implement scrolling for the custom view.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


iPhone: How to show another view on UITableView

2009-10-30 Thread Symadept
Hi,

I wanna show another image view in the bottom of the UITableView.

Any pointers please.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How to scroll custom view

2009-10-30 Thread Symadept
Excellent.

Thanks alot.

Regards
Symadept


On Sat, Oct 31, 2009 at 11:08 AM, Dave Keck davek...@gmail.com wrote:

  How can I implement scrolling for the custom view.

 Use an NSScrollView.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSTableView weird behavior

2009-10-19 Thread Symadept
Hi,
I am implementing the functionality of the NSTableview in such a way that
once a cell is selected the background image shall be shown as some image,
HighlightedCell.png otherwise DefaultCell.png. If both the images are
solid(Opaque) coloured then there is no issue. If the DefaultCell.png
happens to be Transparent(Alpha 1.0) Coloured then the issue starts.

For your reference can refer the link,

http://www.4shared.com/file/142077560/af2d2a44/CustomTable.html

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Record and Playback immediately

2009-10-15 Thread Symadept
Hi,
I took the examples of afplay  afrecord. But it does the normal record to
completion and play to completion manner. How can I Record into buffer and
play from there. I hope instead of AFPlay, Queue based recording and playing
would help. Can anybody put some light on this example.

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Symadept
Hi Rols,
The same happened to me once. Accidently part of copy paste from header to
.m, it happened that structure. But why Objective C compiler won't give any
error for this. Really frustrating.

Regards
Mustafa


On Fri, Oct 16, 2009 at 10:32 AM, Robert Tillyard r...@atvetsystems.comwrote:

 I keep meaning to file an enhancement request for the space before ()'s, I
 have to go back and manually change every occurrence and then add spaces
 after the commas in the function arguments.

 I also prefer

 - (void)foo
 {
 }

 over

 - (void)foo {
 }

 Regards, Rob.


 On 16 Oct 2009, at 02:30, Roland King wrote:

  I'm ploughing it with you, I hate it too and spend 30 seconds every time I
 let XCode stub out a function for me moving the brace onto the correct line,
 andputtingspacesbackbetweenparanetheses,bracketsandarguments so I have a
 hope in hell of reading the code later.

 I came across that trailing ';' thing the other day purely by accident and
 couldn't believe my code actually worked.

 I think I'll take this over to XCode and ask about it.


 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Record and Playback immediately

2009-10-15 Thread Symadept
Hi Jean,
Thank you very much for your response. Similarly Cocoa dev do we have any
Macos Dev forums where I can ask this kind of questions. And I am working on
AQRecord/Play. But still I haven't figured it out how to make it
immediately.

Regards
Mustafa

On Thu, Oct 15, 2009 at 4:27 PM, Jean-Daniel Dupas
devli...@shadowlab.orgwrote:


 Le 15 oct. 2009 à 09:41, Symadept a écrit :


  Hi,
 I took the examples of afplay  afrecord. But it does the normal record to
 completion and play to completion manner. How can I Record into buffer and
 play from there. I hope instead of AFPlay, Queue based recording and
 playing
 would help. Can anybody put some light on this example.


 Cocoa-dev is not Macos-dev. This question has nothing to do with Cocoa and
 should be ask on coreaudio list.

 That said, maybe the AudioQueueTools sample code may help.

 -- Jean-Daniel





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Custom NSComboBox

2009-10-15 Thread Symadept
Hi,
Can anybody put some light on this.

Regards
Mustafa

On Wed, Oct 14, 2009 at 7:09 PM, Symadept symad...@gmail.com wrote:

 Hi, I am designing a custom NSComboBox to display the rect image as some
 ComboboxBg.png and set foreground (text) color to Red. To render image I am
 doing the following things. @interface CustomComboBoxCell : NSComboBoxCell
 { } @end @implementation CustomComboBoxCell -
 (void)drawWithFrame:(NSRect)bounds inView:(NSView *)controlView {
 NSLog(@CPProfileComboBoxCell drawWithFrame[%f %f - %f %f],
 bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
 NSRect imageRect = bounds;//[self drawingRectForBounds:bounds];//[self
 imageRectForBounds:bounds]; NSLog(@Image rect [%f %f - %f %f],
 imageRect.origin.x, imageRect.origin.y, imageRect.size.width,
 imageRect.size.height); NSImage *bgImage = [NSImage imageNamed:@ComboBox2];
 [bgImage drawInRect:imageRect fromRect:NSZeroRect
 operation:NSCompositeSourceOver fraction:1.0]; NSLog(@Image drawn); //
 Make attributes for our strings NSMutableParagraphStyle * aParagraphStyle =
 [[[NSMutableParagraphStyle alloc] init] autorelease]; [aParagraphStyle
 setLineBreakMode:NSLineBreakByTruncatingTail]; //[aParagraphStyle
 setAlignment:NSCenterTextAlignment]; // Title attributes: system font, 14pt,
 black, truncate tail NSMutableDictionary * aTitleAttributes =
 [[[NSMutableDictionary alloc] initWithObjectsAndKeys: [NSColor
 blackColor],NSForegroundColorAttributeName, [NSFont
 systemFontOfSize:21.0],NSFontAttributeName, aParagraphStyle,
 NSParagraphStyleAttributeName, nil] autorelease]; // Make a Title string
 NSString * aTitle = [self stringValue];//[NSString stringWithString:@Title];
 // get the size of the string for layout // Icon box: center the icon
 vertically inside of the inset rect NSLog(@CellFrame:[%f %f] [%f %f],
 bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
 NSRect aTitleBox = bounds; [aTitleAttributes setValue:[NSColor yellowColor]
 forKey:NSForegroundColorAttributeName]; [aTitle drawInRect:aTitleBox
 withAttributes:aTitleAttributes]; } @end And If I dont draw the string by
 myself, the chosed item will not be shown. To make the combobox to show the
 value, I have to click inside once. Can anybody help me to resolve this
 issue? Thanks in advance Regards symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Background image of CustomTableView Cells

2009-10-15 Thread Symadept
Hi,Can anybody please help me regarding this.

Regards
Symadept

On Wed, Oct 14, 2009 at 6:50 PM, Symadept symad...@gmail.com wrote:


 Hi,
 Can you help me to fix this problem.

 I am customizing my table view to show various images in the background of
 the cells accordingly as

 Selected : Font Changed to While Colour, Background image, Highlighted.png
 Deselected/Normal: Font - Black colour, Bg Image: Default.png

 I tried to override
  - (void)drawInteriorWithFrame:(NSRect)theCellFrame 
 inView:(NSView*)theControlView

  of NSCell to change the Font Color and BgImage according to the state as I
 mentioned earlier.

 Result: Once the application launched it is ok. Once I select col1 and
 select col2, my Col1 still shows the Highlighted image, infact it is
 deselected and supposed to show the Default Image. This because my Default
 image is a transparent image. Even after overlapping Default.png on
 Highlighted.png it is showing the same Highlighted.png.

 I guess what I need to do is to remove the image from the Cell before
 redrawing it. How to do I really don't know.

 Kindly look into this and help me in this regards.

  CustomTableCell

 @interface CustomTableCell : NSCell {


 }


 @end


 #import CustomTableCell.h



 @implementation CustomTableCell

 - (void)drawInteriorWithFrame:(NSRect)theCellFrame 
 inView:(NSView*)theControlView

 {

 NSLog(@CustomTableCell drawInteriorWithFrame);

 NSImage *bgImage = [NSImage imageNamed:@DefaultCell];

  // Make attributes for our strings

 NSMutableParagraphStyle * aParagraphStyle = [[[NSMutableParagraphStyle
 alloc] init] autorelease];

 [aParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];

 [aParagraphStyle setAlignment:NSCenterTextAlignment];

// Title attributes: system font, 14pt, black, truncate tail

 NSMutableDictionary * aTitleAttributes = [[[NSMutableDictionary alloc]
 initWithObjectsAndKeys:

[NSColor blackColor],NSForegroundColorAttributeName,

[NSFont systemFontOfSize:21.0],NSFontAttributeName,

aParagraphStyle, NSParagraphStyleAttributeName,

nil] autorelease];

  // Make a Title string

 NSString * aTitle = [self stringValue];

 NSLog(@CellFrame:[%f %f] [%f %f], theCellFrame.origin.x, theCellFrame.
 origin.y, theCellFrame.size.width, theCellFrame.size.height);

 NSRect anIconBox = theCellFrame;

 NSRect aTitleBox = NSMakeRect(theCellFrame.origin.x,

   theCellFrame.origin.y + theCellFrame.size.height/2-10,

   theCellFrame.size.width,

   theCellFrame.size.height);


  if( [self isHighlighted])

 {

 // if the cell is highlighted, draw the text white

 [aTitleAttributes setValue:[NSColor whiteColor] forKey:
 NSForegroundColorAttributeName];

 bgImage = [NSImage imageNamed:@FocusedCell];

 }

 else

 {

 // if the cell is not highlighted, draw the title black and the subtile
 gray

 [aTitleAttributes setValue:[NSColor orangeColor] forKey:
 NSForegroundColorAttributeName];

 }

  // Draw the icon

 [bgImage drawInRect:anIconBox fromRect:NSZeroRect operation:
 NSCompositePlusLighter fraction:1.0];

  // Draw the text

 [aTitle drawInRect:aTitleBox withAttributes:aTitleAttributes];

 }

 @end


  CustomTableView

 @interface CustomTableView : NSTableView {


 }


 @end


 #import CustomTableView.h



 @implementation CustomTableView


 - (void)awakeFromNib

 {

 NSLog(@CustomTableView awakeFromNib);

 [[self enclosingScrollView] setDrawsBackground:NO];

 }


 - (void)drawBackgroundInClipRect:(NSRect)clipRect

 {

 NSLog(@CustomTableView drawBackgroundInClipRect);

 }


 #pragma mark -

 #pragma mark Selection Highlighting


 - (id)_highlightColorForCell:(NSCell *)cell

 {

 // we need to override this to return nil

 // or we'll see the default selection rectangle when the app is running

 // in any OS before leopard

  // you can also return a color if you simply want to change the table's
 default selection color

 return nil;

 }


 @end


 Thanks in advance

 Regards
 symadept



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Simultaneous Recording and Playback

2009-10-15 Thread Symadept
Hi,
Can anyone help me how to achieve playback immediately the recorded voice
and shall be able to stop them simultaneously. I am following the
AQRecord/Play of the AudioQueueTools of CoreAudio Samples. But unable to
reach to the target. I am putting more effort on it to converge what exactly
I can do.

Thanks in advance.

Regards
Symadept


On Wed, Oct 14, 2009 at 4:21 PM, Sven co...@unlogic.co.uk wrote:

 On Tue, 13 Oct 2009, Jens Alfke wrote:


 On Oct 13, 2009, at 9:30 AM, Sven wrote:

  Thanks... I don't want to encode any audio files, I merely want to be
 able to get and set tag data. For MP3s I can use id3lib no problems, but
 that doesn't help me with AAC files. I guess if there's no way to edit tags
 via the Apple libraries (if I understand you correctly) then the only thing
 left to do is write my own.


 You can get tags via QuickTime. The problem is that changing tags, in
 general, requires re-writing the entire file. I think QuickTime could be
 used to update those tags along the way, if it were reading the file
 contents and writing them out to a new file, but I don't know nearly enough
 about the very gnarly QuickTime APIs for that.

 There is an open source project called AtomicParsely that is supposed to
 help with parsing and generating AAC metadata, but I haven't used it.

 ?Jens


 I saw AtomicParsely and they do a good job of describing the weird and
 wonderful structure of atoms in m4a's I'll have a closer look at their
 library and see what can be done. Otherwise I'll have to stick with just ID3
 support for now until I can get my head around tagging AACs

 thanks again

 ./Sven

 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com

 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/symadept%40gmail.com

 This email sent to symad...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Background image of CustomTableView Cells

2009-10-14 Thread Symadept
Hi,
Can you help me to fix this problem.

I am customizing my table view to show various images in the background of
the cells accordingly as

Selected : Font Changed to While Colour, Background image, Highlighted.png
Deselected/Normal: Font - Black colour, Bg Image: Default.png

I tried to override
 - (void)drawInteriorWithFrame:(NSRect)theCellFrame
inView:(NSView*)theControlView

 of NSCell to change the Font Color and BgImage according to the state as I
mentioned earlier.

Result: Once the application launched it is ok. Once I select col1 and
select col2, my Col1 still shows the Highlighted image, infact it is
deselected and supposed to show the Default Image. This because my Default
image is a transparent image. Even after overlapping Default.png on
Highlighted.png it is showing the same Highlighted.png.

I guess what I need to do is to remove the image from the Cell before
redrawing it. How to do I really don't know.

Kindly look into this and help me in this regards.

 CustomTableCell

@interface CustomTableCell : NSCell {


}


@end


#import CustomTableCell.h



@implementation CustomTableCell

- (void)drawInteriorWithFrame:(NSRect)theCellFrame
inView:(NSView*)theControlView

{

NSLog(@CustomTableCell drawInteriorWithFrame);

NSImage *bgImage = [NSImage imageNamed:@DefaultCell];

 // Make attributes for our strings

NSMutableParagraphStyle * aParagraphStyle = [[[NSMutableParagraphStyle alloc]
init] autorelease];

[aParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];

[aParagraphStyle setAlignment:NSCenterTextAlignment];

   // Title attributes: system font, 14pt, black, truncate tail

NSMutableDictionary * aTitleAttributes = [[[NSMutableDictionary alloc]
initWithObjectsAndKeys:

   [NSColor blackColor],NSForegroundColorAttributeName,

   [NSFont systemFontOfSize:21.0],NSFontAttributeName,

   aParagraphStyle, NSParagraphStyleAttributeName,

   nil] autorelease];

 // Make a Title string

NSString * aTitle = [self stringValue];

NSLog(@CellFrame:[%f %f] [%f %f], theCellFrame.origin.x, theCellFrame.
origin.y, theCellFrame.size.width, theCellFrame.size.height);

NSRect anIconBox = theCellFrame;

NSRect aTitleBox = NSMakeRect(theCellFrame.origin.x,

  theCellFrame.origin.y + theCellFrame.size.height/2-10,

  theCellFrame.size.width,

  theCellFrame.size.height);


 if( [self isHighlighted])

{

// if the cell is highlighted, draw the text white

[aTitleAttributes setValue:[NSColor whiteColor] forKey:
NSForegroundColorAttributeName];

bgImage = [NSImage imageNamed:@FocusedCell];

}

else

{

// if the cell is not highlighted, draw the title black and the subtile gray

[aTitleAttributes setValue:[NSColor orangeColor] forKey:
NSForegroundColorAttributeName];

}

 // Draw the icon

[bgImage drawInRect:anIconBox fromRect:NSZeroRect operation:
NSCompositePlusLighter fraction:1.0];

 // Draw the text

[aTitle drawInRect:aTitleBox withAttributes:aTitleAttributes];

}

@end


 CustomTableView

@interface CustomTableView : NSTableView {


}


@end


#import CustomTableView.h



@implementation CustomTableView


- (void)awakeFromNib

{

NSLog(@CustomTableView awakeFromNib);

[[self enclosingScrollView] setDrawsBackground:NO];

}


- (void)drawBackgroundInClipRect:(NSRect)clipRect

{

NSLog(@CustomTableView drawBackgroundInClipRect);

}


#pragma mark -

#pragma mark Selection Highlighting


- (id)_highlightColorForCell:(NSCell *)cell

{

// we need to override this to return nil

// or we'll see the default selection rectangle when the app is running

// in any OS before leopard

 // you can also return a color if you simply want to change the table's
default selection color

return nil;

}


@end


Thanks in advance

Regards
symadept
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Custom NSComboBox

2009-10-14 Thread Symadept
Hi, I am designing a custom NSComboBox to display the rect image as some
ComboboxBg.png and set foreground (text) color to Red. To render image I am
doing the following things. @interface CustomComboBoxCell : NSComboBoxCell {
} @end @implementation CustomComboBoxCell -
(void)drawWithFrame:(NSRect)bounds inView:(NSView *)controlView {
NSLog(@CPProfileComboBoxCell drawWithFrame[%f %f - %f %f],
bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
NSRect imageRect = bounds;//[self drawingRectForBounds:bounds];//[self
imageRectForBounds:bounds]; NSLog(@Image rect [%f %f - %f %f],
imageRect.origin.x, imageRect.origin.y, imageRect.size.width,
imageRect.size.height); NSImage *bgImage = [NSImage imageNamed:@ComboBox2];
[bgImage drawInRect:imageRect fromRect:NSZeroRect
operation:NSCompositeSourceOver fraction:1.0]; NSLog(@Image drawn); //
Make attributes for our strings NSMutableParagraphStyle * aParagraphStyle =
[[[NSMutableParagraphStyle alloc] init] autorelease]; [aParagraphStyle
setLineBreakMode:NSLineBreakByTruncatingTail]; //[aParagraphStyle
setAlignment:NSCenterTextAlignment]; // Title attributes: system font, 14pt,
black, truncate tail NSMutableDictionary * aTitleAttributes =
[[[NSMutableDictionary alloc] initWithObjectsAndKeys: [NSColor
blackColor],NSForegroundColorAttributeName, [NSFont
systemFontOfSize:21.0],NSFontAttributeName, aParagraphStyle,
NSParagraphStyleAttributeName, nil] autorelease]; // Make a Title string
NSString * aTitle = [self stringValue];//[NSString stringWithString:@Title];
// get the size of the string for layout // Icon box: center the icon
vertically inside of the inset rect NSLog(@CellFrame:[%f %f] [%f %f],
bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
NSRect aTitleBox = bounds; [aTitleAttributes setValue:[NSColor yellowColor]
forKey:NSForegroundColorAttributeName]; [aTitle drawInRect:aTitleBox
withAttributes:aTitleAttributes]; } @end And If I dont draw the string by
myself, the chosed item will not be shown. To make the combobox to show the
value, I have to click inside once. Can anybody help me to resolve this
issue? Thanks in advance Regards symad...@gmail.com
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How to create a control just as RGB Sphere and Alpha bar

2009-09-25 Thread Symadept
Hi Graham,
Yes. But do you have any other ways to handle this.

I want something like this


I could be able to pick the color from the spectrum band and could change
the Alpha (This I can manage to some extent, Immediately I need to handle
the picking colour from the spectrum.)

Regards
Mustafa

On Fri, Sep 25, 2009 at 1:41 PM, Graham Cox graham@bigpond.com wrote:


 On 25/09/2009, at 1:14 PM, Symadept wrote:

  Can any help me how to create a view which contains Spectrum Bar (Just as
 RGB Sphere in NSColorPanel) and an Alpha bar?



 NSImageView?

 --Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How to create a control just as RGB Sphere and Alpha bar

2009-09-25 Thread Symadept
Hi Graham,
I tried to display the RGB spectrum as an image in the view. How can I pick
particular pixel color from that image. Does it make sense?

-Mustafa

On Fri, Sep 25, 2009 at 2:29 PM, Graham Cox graham@bigpond.com wrote:

 tsk, tsk - lazy, lazy.

 http://mattgemmell.com/2008/12/08/what-have-you-tried

 http://catb.org/~esr/faqs/smart-questions.html


 C'mon, get real. No-one's going to write your code for you. If you can't
 find a free class somewhere, subclass NSView yourself. A location -- RGB
 mapping is pretty easy.

 --Graham






 On 25/09/2009, at 4:20 PM, Symadept wrote:

  Hi Graham,

 Yes. But do you have any other ways to handle this.

 I want something like this



 I could be able to pick the color from the spectrum band and could change
 the Alpha (This I can manage to some extent, Immediately I need to handle
 the picking colour from the spectrum.)

 Regards
 Mustafa



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


CustomComboboxCell not displaying the selected text

2009-09-25 Thread Symadept
Hi,
I have designed one combobox with CustomComboBoxCell set from the Interface
Builder and trying to Change the Complete rectangle with my own image using
drawWithFrame.

Once I choose the any item from the DropDownList it is not displaying the
text immediately in the Textfield of the ComboBox. But it works fine after
clicking once into the Textfield. I have pasted my code for
CustomComboBoxCell. Please help me if I am missing anything.

@interface CustomComboboxCell(private)

- (void)initializations;

@end


@implementation CustomComboboxCell(private)

- (void)initializations

{

mImage = [NSImage imageNamed:@ComboBox1];

}

@end


@implementation CustomComboboxCell


- (id)init {

NSLog(@CustomComboboxCell init);

self = [super init];

if (self != nil) {

[self initializations];

}

return self;

}


- (id)initWithCoder:(NSCoder *)aDecoder {

NSLog(@CustomComboboxCell initWithCoder);

self = [super initWithCoder:aDecoder];

[self initializations];

return self;

}


- (void) dealloc

{

[mImage release];

[super dealloc];

}


- (void)drawWithFrame:(NSRect)bounds inView:(NSView *)controlView

{

NSLog(@CustomComboboxCell drawWithFrame[%f %f - %f %f], bounds.origin.x,
bounds.origin.y, bounds.size.width, bounds.size.height);

NSRect imageRect = bounds;//[self drawingRectForBounds:bounds];//[self
imageRectForBounds:bounds];

NSLog(@Image rect [%f %f - %f %f], imageRect.origin.x, imageRect.origin.y,
imageRect.size.width, imageRect.size.height);

if (mImage != nil) {

[mImage setFlipped:[controlView isFlipped]];

[mImage drawInRect:imageRect fromRect:NSZeroRect operation:
NSCompositeSourceAtop fraction:1.0];

}

}

Thanks in advance

-Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Background application is visible when I try to display a transparent backgrounded image into my app

2009-09-24 Thread Symadept
Hi,
I am trying to display an Image whose background is transparent as a
buttoncell. Then the application background of my app or the desktop is
visible and when I clicked on it, it focuses to the visible app.

Why it is so happening.

Code goes like this.

Subclassed the NSButtonCell and tried to associate my Buttoncell from IB.

mImage = [NSImage imageNamed:@TransparentImage];


- (void)drawWithFrame:(NSRect)bounds inView:(NSView *)controlView

{

NSRect imageRect = bounds;//[self imageRectForBounds:bounds];

if (mImage != nil) {

[mImage setFlipped:[controlView isFlipped]];

[mImage drawInRect:imageRect fromRect:NSZeroRect operation:
NSCompositeSourceIn fraction:1.0];

}

}


What am I missing here.


Kindly help me in this regards.


Best regards

Mustafa Shaik
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSTableView able to display different background images

2009-09-24 Thread Symadept
Hi,

I am trying to make my NSTableView display various images for various states
of the cells.

Say, Default, Highlighted and MouseOver.

Can anybody help me how to achieve this. I know MouseOver will be pretty
difficult. Immediately I want to hit the two things first, Default 
Highlighted and Dimmed.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to create a control just as RGB Sphere and Alpha bar

2009-09-24 Thread Symadept
Hi,
Can any help me how to create a view which contains Spectrum Bar (Just as
RGB Sphere in NSColorPanel) and an Alpha bar?

Thanks in advance

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How to change the background color of dropdown list of NSComboBox

2009-09-23 Thread Symadept
Hi,
Can anybody let me know how to solve these issues?

1. How to change the color of the dropdown list of NSComboBox control
2. And I am overriding the background image of the ComboBox by DrawWithFrame
method. But once I selected the item from the list it is not shown in the
ComboBox. Once I click then it works fine. To resolve this I am drawing the
text by myself. Which is very good. But once I click inside the combobox it
displays the text bcoz of which my drawntext gets faded.

I want either of the solutions

1. Once the item is selected able to display inside the box
2. Once clicked inside the box it shouldnt be able to display the text.

Any help is highly appreciable.

Regards
Mustafa
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com