Forgot...here is the file loading code
bool ::LoadFromFile( string fileName, int which )
{
ifstream fin;
string temp, item;
int itemCount, i;
int lineCount = 0;
fin.open( fileName.c_str() );
if(fin)
{
while(
Is there an easy way to take input (user or file based) at runtime
and convert unicode strings such as \u8D64 (UTF8 character) or a
whole series of these to the human-readable characters they
represent?
I imagine I should be using NSScanner, but is there not some simple
function or method to
On 18/04/2009, at 7:56 AM, Quincey Morris wrote:
I notice that the current HIG recommends the use of a file format
popup in the Save dialog, when an application supports multiple
formats:
Hey everyone,
I'm working on some drag and drop stuff, and have reached an impasse.
Currently, I've got a basic master-detail view, where I can drag and
drop to rearrange the groups in the master outline view. What I'd now
like is to be able to drop items from the detail view onto one of
Hello,
The next meeting of the Amsterdam CocoaHeads will be this Wednesday,
April 22 from 7-9PM.
Location and presentation info can be found here:
http://groups.google.com/group/cocoaheads-amsterdam/browse_thread/thread/4221ef40dbf68e7d?hl=en
Hope to see you there!
Cathy
On Apr 20, 2009, at 00:16, Graham Cox wrote:
The save dialog shows the format pop-up automatically if you declare
in your info.pList that you export multiple types. Presumably it
also takes care of everything else too - you just need to set up the
pList and respond to the type passed to
On Apr 17, 2009, at 12:47 PM, Тимофей Даньшин wrote:
However, a strange thing happens: when the user _creates_ a
database, everything is stored as hoped. But when the user _opens_
an existing database, nothing is stored in it, and a new file gets
created, which name coincides with the name
On 20/04/2009, at 5:51 PM, Quincey Morris wrote:
But one annoying problem remains. When exporting files (at least in
my case) it's highly desirable for some formats to get a suffix on
the default filename (specifically, because some of the formats
require creating a folder of stuff
On Apr 18, 2009, at 5:52 PM, Dave DeLong wrote:
I've taken a look at the Drag and Drop outline view in the sample
code, and also the Drag and Drop guide in the docs, but I'm really
looking for something that could explain this step by step.
The docs *do* explain this step by step. Maybe
Hi All,
I am developing a small CD/DVD Wirting Application. There seems to
be a problem when the user leaves the app for writing DVD's sometimes
the machine goes to sleep and my application gives a Writing error. Is
there a way where we can avoid the machine from going to sleep...?
Can
On Apr 17, 2009, at 1:53 PM, Boyd Collier wrote:
Have you looked at the book Numerical Recipes in C? You can view
a copy on-line at http://www.fizyka.umk.pl/nrbook/c1-0.pdf (and
probably other places as well).
Yes, maybe I should have mentioned that. (Actually, I'm old enough
that my
Problem solved. Although predicates cannot involve transient
properties, you can follow relationships in a predicate using a key
path. Obj-C Categories to the rescue…
For example, you can write a category on NSNumber containing a method -
letterGrade. Then use this to create the
Hi everyone,
my Cocoa app (Objective-C++) works perfectly from within Xcode.
However when I double click the application in Finder it does not load
my data file.The file is a short text file which was placed next to
the executable in the buildDebug or buildRelease folders. It is
loaded
Am 19.04.2009 um 03:50 schrieb Carlos Eduardo Mello:
1. I know this is not the recommended way to open a file in a Cocoa
App, but this is just a quick utility
Your code is shorter than 2 lines Objective-C?
for use in class, so I don't wan't to change my file loading code
and deal with
On 20 Apr 2009, at 6:22 AM, Anshul jain wrote:
I am developing a small CD/DVD Wirting Application. There seems to
be a problem when the user leaves the app for writing DVD's
sometimes the machine goes to sleep and my application gives a
Writing error. Is there a way where we can avoid
On 20 Apr 2009, at 2:01 AM, Joe Yi wrote:
hello all:I have no way to get the app window 's
coordinateapplewebdata://A2B49717-8F5F-4246-991B-60F9DC323717/;coordinate
。please
show me the detail method.
thanks.
You don't provide enough information on what you want to do.
What is your target
On Apr 20, 2009, at 12:51 AM, Quincey Morris wrote:
On Apr 20, 2009, at 00:16, Graham Cox wrote:
The save dialog shows the format pop-up automatically if you
declare in your info.pList that you export multiple types.
Presumably it also takes care of everything else too - you just
need
is there easy way how to check is enabled wifi connection on mac or not? I need
to show warning's alert (when app was launched) if the wifi's connection is not
available.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not
- (BOOL) connectedToNetwork
{
// Create zero addy
struct sockaddr_in zeroAddress;
bzero(zeroAddress, sizeof(zeroAddress));
zeroAddress.sin_len = sizeof(zeroAddress);
zeroAddress.sin_family = AF_INET;
// Recover reachability flags
SCNetworkReachabilityRef
wow, very good. many thanks
___
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
I haven't been able to track this down to anything specific - it doesn't
happen with any regularity or frequency, nor does it occur anywhere on my
development machine that will allow me to track it down.
How did you come by this crash log? From the 0x48, it looks like it's
attempting to
On Sat, Apr 18, 2009 at 4:44 PM, John Joyce
dangerwillrobinsondan...@gmail.com wrote:
CFStringTransform does exactly what I wanted to do.
It even pretty gracefully handles the whole string supplied.
(no idea to how far mileage would vary with this based on supplied string
size or content...
On Apr 19, 2009, at 1:29 AM, Gerriet M. Denkmann wrote:
I have a table with two columns, labeled Key and Value bound to
myDictionaryController.key and myDictionaryController.value.
Now I want to select a row programmatically (e.g.
[ myDictionaryController selectRowWIthKey: @someKey ]; ).
Hello,
Just to be sure the HUD panel in IB3 cannot be used if the app is for tiger
correct? Is there any workaround or basically it has to be done in code? As a
note I notice all the 3rd party frameworks seem to be leopard only as well?
Thank you,
Rick
On Apr 19, 2009, at 1:44 PM, John Joyce wrote:
I didn't see it in the function documentation, but
is there a way for CFStringTransform to tell me the ranges of the
the transformations it has done in the returned string?!
That would certainly be nifty!
Take a look at the header comments.
after i run the page setup dialog (successfully), if i examine the
name of the chosen printer (via [[printInfo printer] name]) should it
reflect the printer chosen in the page setup dialog?
i'm not seeing this. in fact, i am seeing the same printer name
before and after running the page setup
On Apr 20, 2009, at 03:45, Graham Cox wrote:
You want to name a folder, say Foo, but then place files inside
called e.g. Foo_001, Foo_002 etc?
No, I mean there are, say, export formats A, B and C. Assuming the
document file name is something like 'myData.data', export format A
should
On 20 Apr 2009, at 23:05, Keary Suska wrote:
On Apr 19, 2009, at 1:29 AM, Gerriet M. Denkmann wrote:
I have a table with two columns, labeled Key and Value bound to
myDictionaryController.key and myDictionaryController.value.
Now I want to select a row programmatically (e.g.
[
Hello All,
I've been asked to look into an oddity that concerns our build team.
Our XIB files are being compiled to NIB files differently each time
even though no changes have been made.
Everything works fine, but we would expect that the if the XIB file
hasn't changed, the NIB file
On Mon, Apr 20, 2009 at 1:47 PM, Lyndsey Ferguson
lyndsey.fergu...@gmail.com wrote:
Everything works fine, but we would expect that the if the XIB file hasn't
changed, the NIB file should be an exact match every time it is created.
Where is this promised? If there's so much as one GUID in the
On 2009 Apr 20, at 04:50, Jerry Krinock wrote:
Problem solved
But there's an even better way. Upon further study of the Predicate
Programming Guide, I find that there are even more limitations to Core
Data fetches with predicates. The most troubling is that:
The Core Data SQL store
I've used parts of the GNU Scientific Library. The code for
particular functions is excellent (or at least what I've used or
looked at), but the library is very large and it took me quite a while
to separate out just the parts that I wanted to use and to make sure
that I had the needed
Is it possible to load a quartz composition on iPhone? I'm not seeing
anything in the APIs
___
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
On Mon, April 20, 2009 11:02 am, Jerry Krinock wrote:
Makes me wonder why NSFetchRequest even supports a predicate, since
its predicate has all these limitations and is supposedly more
expensive when compared to fetching all objects and then using -
[NSArray filteredArrayWithPredicate:] ? It
On Apr 20, 2009, at 2:02 PM, Jerry Krinock wrote:
A much better way appears to be to fetch all objects from the store
with no predicate and then use -[NSArray
filteredArrayWithPredicate:]. This takes only one more line of
code, solves all problems, and is supposedly cheaper too:
If you
daniel,
thanx for the response. its not clear from the documentation whether
or not the name specified for pageSizeForPaper is an internal name or
a user name.
in any case, i've solve my problem via methods i posted yesterday to
this email list.
ken
At 10:56 AM +0200 4/20/09, Daniel
On Apr 20, 2009, at 09:46, kvic...@pobox.com wrote:
after i run the page setup dialog (successfully), if i examine the
name of the chosen printer (via [[printInfo printer] name]) should
it reflect the printer chosen in the page setup dialog?
I'm pretty sure that it never worked the way
Am I missing something, or is there really not a built-in to merge two
arrays?
I can roll my own, of course, but there are so many builtins, I'd have
thought
one was lurking somewhere.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please
On 4/20/09 11:02 AM, Jerry Krinock said:
But there's an even better way. Upon further study of the Predicate
Programming Guide, I find that there are even more limitations to Core
Data fetches with predicates. The most troubling is that:
The Core Data SQL store supports only one to-many
Hey Lyndsey -
A NIB file contains many hash based unordered data structures, and
won't have a byte for byte identical representation from one save/
compile operation to the next - even when the represented interface is
identical.
Jon Hess
On Apr 20, 2009, at 10:47 AM, Lyndsey Ferguson
On Apr 20, 2009, at 11:12 AM, Gerriet M. Denkmann wrote:
NSArray *defs = ...some array... (which is bound to content of
definitionsArrayController)
NSUInteger defIndex = 0;
for( NSDictionary *aDef in defs )
{
for( NSString *defKey in aDef )
{
NSString *value =
On Apr 20, 2009, at 4:17 PM, Jonathan Hess wrote:
A NIB file contains many hash based unordered data structures, and
won't have a byte for byte identical representation from one save/
compile operation to the next - even when the represented interface
is identical.
Okay, thanks Jon,
Would NSSet cut the mustard here?
On 20 Apr 2009, at 20:54, David Scheidt wrote:
Am I missing something, or is there really not a built-in to merge
two arrays?
I can roll my own, of course, but there are so many builtins, I'd
have thought
one was lurking somewhere.
Alright, not strictly Cocoa related, but someone will surely know :)
What are the empty threads that show up in a crash report? ie Thread
22 crashed, and there's 20 threads listed in the report, but 17-21
have no stack trace. Is this a thread that hasn't started, hasn't
finished, is
I was thinking about NSSet/NSMutableSet as well, but there may be a
problem with that solution: I don't think the order of elements is
guaranteed to remain the same between adding the elements and
accessing them.
Wagner
On Apr 20, 2009, at 10:44 PM, jonat...@mugginsoft.com wrote:
Would
for the archives... i received the following off-list and it is
exactly what i was looking for.
Just an idea, why not use:
PMPrinterGetPaperList
and then loop through them all and compare what you have to:
PMPaperCreateLocalizedName
you can get the PMPrinter from:
On Apr 20, 2009, at 11:17 AM, Development wrote:
Is it possible to load a quartz composition on iPhone? I'm not
seeing anything in the APIs
Quartz Composer is not part of the iPhone SDK.
--
David Duncan
Apple DTS Animation and Printing
___
On Apr 20, 2009, at 1:44 PM, Lyndsey Ferguson wrote:
On Apr 20, 2009, at 4:17 PM, Jonathan Hess wrote:
A NIB file contains many hash based unordered data structures, and
won't have a byte for byte identical representation from one save/
compile operation to the next - even when the
Hello All,
In my NSTableView I am using NSImageCell as one column to display images.
And I have implemented my datastore method like this -
- (id) tableView: (NSTableView *)aTableView
objectValueForTableColumn: (NSTableColumn *)aTableColumn
row: (NSInteger)rowIndex
{
/* code to display other
I'm working on a project that involves translating C# code to Objective-C (so I
never have to write network protocol definitions again!).
I've run into an issue: C# (and Java) both have nested classes which is the
ability to define a new class inside of an existing class. This is a nice
I have a few questions about the subject.
1. What is the difference between tracking areas and tracking rects?
2. If I register a tracking rect, will the mouseMoved: message keep on
spamming, or will only mouseEntered: and mouseExited: be sent? If I
understood this correctly, all three are
Hi,
Does anybody know how to create new albums via Scripting Bridge in
iPhoto? Doing this in AppleScript is not difficult, but I don't get it
work via Scripting Bridge. Any ideas?
With best wishes, Stefan
___
Cocoa-dev mailing list
Hello all, I'm writing my first iPhone application and I've run into a
problem I can't seem to get a grasp on.
In short I want to parse an XML file and display a UITableView with
data from a set of XML elements. I've got all the code written for
this but whenever I try to access my array
Hi.
I'm not quite sure if I got you right but:
Am 17.04.2009 um 23:24 schrieb kvic...@pobox.com:
my app is fully recordable and scriptable. when the user changes the
page setup, i am able to successfully record it and indicate the
paper name chosen via -[NSPrintInfo localizedPaperName].
dear all,
i am new on OpenGL Framework, i dnt know to that how to display the simple 3D
image using OpenGL.
Thanks in advance.
Regards,
Fawad Shafi
_
Rediscover Hotmail®: Get quick friend updates right in your inbox.
20 apr 2009 kl. 18.15 skrev Rick C.:
Hello,
Just to be sure the HUD panel in IB3 cannot be used if the app is
for tiger correct? Is there any workaround or basically it has to
be done in code? As a note I notice all the 3rd party frameworks
seem to be leopard only as well?
Thank
Dear all,
I was fiddeling around with the NSDictionary controller to display a
dictionary of NSStrings along with its corresponding keys in a
NSTableView. It works so far, one column is bound to key the other to
value of the arranged objects, while the content of the dictionary
On Apr 19, 2009, at 15:20, Erik Österlund wrote:
1. What is the difference between tracking areas and tracking rects?
Tracking rects are available pre-Leopard. NSTrackingArea was
introduced in Leopard to fix significant problems that made tracking
rects pretty much useless for anything
On 2009 Apr 20, at 11:24, Jim Correia wrote:
On Apr 20, 2009, at 2:02 PM, Jerry Krinock wrote:
Makes me wonder why NSFetchRequest even supports a predicate, since
its predicate has all these limitations and is supposedly more
expensive when compared to fetching all objects and then using
Apr 21, 2009 kl. 12:07 AM skrev Quincey Morris:
2. If I register a tracking rect, will the mouseMoved: message keep
on spamming, or will only mouseEntered: and mouseExited: be sent?
Tracking rects have no effect on the production of mouseMoved
messages.
So is there any difference at
On 20 Apr 09, at 06:59, fawad shafi wrote:
i am new on OpenGL Framework, i dnt know to that how to display the
simple 3D image using OpenGL.
This doesn't appear to be relevant to Cocoa development, at least
until the Cocoa OpenGL views get involved. If you're just getting
started with
On Apr 20, 2009, at 16:03, Erik Österlund wrote:
So is there any difference at all between using NSPointInRect on the
mouseMoved: event instead of using tracking rects? I mean, the
events would have been sent anyway, if I understood this correctly.
Then it would also be much easier to
On Apr 18, 2009, at 7:54 PM, cocoa learner wrote:
Hello All,
In my NSTableView I am using NSImageCell as one column to display
images.
And I have implemented my datastore method like this -
- (id) tableView: (NSTableView *)aTableView
objectValueForTableColumn: (NSTableColumn *)aTableColumn
On Apr 20, 2009, at 8:01 PM, Steve Christensen wrote:
personName = @New name;
personAddr = @New addrress;
personPhoto = [[NSImage alloc] initWithContentsOfFile:
@/Volumes/Working/cocoa/Play-NSTableView/Linea.jpg];
if (personPhoto == nil)
{
You need a call to [self dealloc] here, otherwise you
On Apr 20, 2009, at 4:23 PM, Andrew Farmer wrote:
On 20 Apr 09, at 06:59, fawad shafi wrote:
i am new on OpenGL Framework, i dnt know to that how to display
the simple 3D image using OpenGL.
This doesn't appear to be relevant to Cocoa development, at least
until the Cocoa OpenGL views get
Would NSSet cut the mustard here?
NSArray allows duplicate items; NSSet does not. What do you propose
happen if one or both NSArray inputs have items that compare as equal?
Algorithmically speaking, a merge sort from two inputs into a new
output seems pretty simple. Simply choose the
On Apr 20, 2009, at 5:32 PM, Greg Guerin wrote:
Would NSSet cut the mustard here?
NSArray allows duplicate items; NSSet does not. What do you propose
happen if one or both NSArray inputs have items that compare as equal?
Algorithmically speaking, a merge sort from two inputs into a
On 20 Apr 09, at 06:59, fawad shafi wrote:
i am new on OpenGL Framework, i dnt know to that how to display the
simple 3D image using OpenGL.
On Mon, Apr 20, 2009 at 5:27 PM, Steve Christensen puns...@mac.com wrote:
...and subscribe to the mac-opengl mailing list, which is also a better
place
On Apr 20, 2009, at 8:39 PM, Jonathan Hess wrote:
On Apr 20, 2009, at 5:32 PM, Greg Guerin wrote:
Would NSSet cut the mustard here?
NSArray allows duplicate items; NSSet does not. What do you
propose happen if one or both NSArray inputs have items that
compare as equal?
On Apr 20, 2009, at 12:30 AM, Phil Dokas wrote:
PDPage* newPage = [[PDPage alloc] initWithID:[idAttr intValue]
andTitle:titleAttr];
In the -initWithID:andTitle: method are you sure you are copying the
title?
--Nathan
___
Cocoa-dev
What happens when you run it in the debugger, you say this is your
first iPhone application if you are new to using a debugger then you
really need to learn how to use that, it will make finding bugs like
this a lot easier, for example you can break just before you add an
object to you
I have two cocoa applications which have the functionality I want to use.
Are there any easy way to combine them together. Thanks!
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the
Hi All,
I am developing a small Application to perform a Task. Which can
drain lot of battery(in Laptops).
IOKit provides the APIs to get the battery status but i was not able
to find the Notification which can notify the application when the
battery is Low.
So I want to get the
Thank you Tim...just wanted to be sure I wasn't overlooking anything...
Much appreciated,
Rick
From: Cocoa Dev co...@relindor.org
To: Rick C. jo_p...@yahoo.com
Cc: cocoa-dev@lists.apple.com
Sent: Tuesday, April 21, 2009 2:04:21 AM
Subject: Re: hud panel
74 matches
Mail list logo