Greg,
The beauty in REST is its simplicity. It's simply a request to a web
server. Just like requesting a page. The response is representation
of the data requested, in a specific format (XML, json, etc) Hence,
Representational State Transfer :). If you're looking into
Hey everyone,
I'm trying to access the API of delicious. You can access a JSON list
just by using the URL http://feeds.delicious.com/v2/json/.
So I tried to access that result from within cocoa code. Here's my try:
NSURL *url = [NSURL URLWithString:@http://feeds.delicious.com/v2/
json/];
Hi,I'm trying to do the exercise on p. 195 in Hillegass (3rd Edition).I have
put this line in the AboutController.h header: IBOutlet NSWindow
*aboutWindow;And I have put these lines in AboutController.m file:-
(IBAction)showAboutPanel:(id)sender
{
if (aboutWindow == nil)
{
Hey everyone,
I'm trying to access the API of delicious. You can access a JSON list
just by using the URL http://feeds.delicious.com/v2/json/.
So I tried to access that result from within cocoa code. Here's my try:
NSURL *url = [NSURL URLWithString:@http://feeds.delicious.com/v2/
json/];
On Sun, Nov 23, 2008 at 12:45 AM, Steve Christensen [EMAIL PROTECTED] wrote:
When I click on the popup and change the selection, the result I'm seeing is
that my controller's setter method is being called, that the popup's
selected item index is being changed correctly (at least NSLog says so),
On Fri, Nov 21, 2008 at 6:19 PM, Ulai Beekam [EMAIL PROTECTED] wrote:
}Now, the about window appears great the first time I go to the menu and hit
About App. But if I close the about window, and hit the About App menu
item again, my program crashes! Any ideas why? I actually believe the crash
On Nov 22, 2008, at 4:20 PM, Bill Janssen wrote:
[I originally sent this, erroneously, to darwin-development. It's
failing in NSApplication.init(), so it belongs here. -- wcj]
What's an ASN? How does a system daemon ever get one?
I'm running a daemon, started by SystemStarter at boot time,
Thank you both for your great support. Obviously, not presently
supported does not mean it raises an exception when you try to do it
anyway (otherwise I would have noticed) -- it probably just means that
you are likely to run into quirks, which is exactly what happened to me.
But now I
Hi,
is there a way to find out if a serial comma should be used or not
(foo, bar, and baz or foo, bar and baz?) according to the users
current settings?
I've locked around in the NSLocale class but couldn't find anything.
Regards
Andreas
___
Hey everyone,
I was trying to embed an NSCollectionView in another NSCollectionView
and I am having trouble with the bindings.
The main NSCollectionView's content is bound to an NSArrayController
and I wanted to bind the embeded NSCollectionView's content to Main
Collection View Item's
On Nov 23, 2008, at 12:13 AM, Kyle Sluder wrote:
On Sun, Nov 23, 2008 at 12:45 AM, Steve Christensen
[EMAIL PROTECTED] wrote:
When I click on the popup and change the selection, the result I'm
seeing is
that my controller's setter method is being called, that the popup's
selected item
Hi guys.
I'm currently working on my own custom color picker, and it's all
going well. However, I need to replicate the magnifying function found
in a NSColorPanel. I think I've figured out how to capture mouse-
events anywhere on the screen, but I don't know how I would go about
to
I have two subviews sv1 and sv2 that I've animated by setting their
center properties inside of an animation block. This animation code is
in sv1.m and sv2.m. It all works just fine: they both move smoothly
around in the superview by choosing new centre points in a continuous
loop. It
I have not done this myself, but I understand that you can find the
actual positions of things in the middle of an animation by querying
the [ [ myView layer ] presentationLayer ]. This is a version of the
layer that has all of the current values in the middle of an
animation. As long as
On 23-Nov-08, at 9:11 , Wyatt Webb wrote:
I have not done this myself, but I understand that you can find the
actual positions of things in the middle of an animation by
querying the [ [ myView layer ] presentationLayer ]. This is a
version of the layer that has all of the current values
Now I'm getting a very odd result. In the code for a UIView I have this:
CALayer *theLayer = self.layer;
id pLayer = [theLayer presentationLayer];
The first line is fine, but for the second I get a compiler warning:
no '-presentationLayer' method found
I'm looking at
Thanks, I'll take a look at it (As soon as I've finished my
homework...).
Cheers,
Tim
23 nov 2008 kl. 18.55 skrev Kai:
Hi,
if you’re on Leopard only, you can use the new screen capturing APIs
to capture the screen area you need (look for the SonOfGrab sample
code). I’d say magnifying
Despite the compiler warning, this code:
CGRect cr = [[self.layer presentationLayer] frame];
NSLog( @%.1f %.1f, CGRectGetMidX( cr ), CGRectGetMidY( cr ) );
gives me just what I hoped for. I have the animation delegate start a
timer when the animation begins, and the timer
I would love to implement something like the default screenshot
utility for OS X does when it names its pictures.. (i.e. Picture 1,
Picture 2, Picture 3.. etc.)
I was wondering if there's already something in place to do that? If
not, I don't mind implementing it myself but I can't really
mmm I guess I'm a little slow today hehe...
something like this would probably work (pseudo-code):
cnt = 1
filename = Picture + cnt
while(file exist (filename))
cnt ++
On 23-Nov-08, at 1:45 PM, Jean-Nicolas Jolivet wrote:
I would love to implement something like the default
You're right, hadn't thought of that! Well, I'll implement it like
that for now but I'll keep an eye on this thread, see if anyone has a
better idea! :)
On 23-Nov-08, at 1:55 PM, Andrew Merenbach wrote:
Hi,
I used something pretty much identical in a program of mine, but
quickly
On Sun, Nov 23, 2008 at 10:51 AM, Steve Christensen [EMAIL PROTECTED] wrote:
- (void) setInterpolationMode:(NSInteger)mode
{
[self willChangeValueForKey:@interpolationMode];
_interpolationMode = mode;
[self didChangeValueForKey:@interpolationMode];
// set the
I'm not sure if you guys want the prefix to be Picture etc. but i
simply get a random number using rand(); and check if a file exists
with that name.
Heres a code snippet,
+ (NSString *)getUniqueNameForFile: (NSString *)aFilePath
{
// Initialise the return path
NSString
Rather than hitting the file system every time you want to check file
existence, you could cache it from -[NSFileManager
directoryContentsAtPath:]. You could run in to a race condition (if
another process creates a file between when you check the list and
when you write your file), but
On Sun, Nov 23, 2008 at 12:55 PM, Andrew Merenbach
[EMAIL PROTECTED] wrote:
I used something pretty much identical in a program of mine, but quickly
realized that, although it worked, it wasn't scalable enough -- it made me
feel a little uneasy. For instance, if you are saving a file over a
Got it. Thanks for the clarification.
-Matt
On Nov 23, 2008, at 6:29 AM, Michael Ash wrote:
On Sun, Nov 23, 2008 at 12:46 AM, Matt Long [EMAIL PROTECTED]
wrote:
Ok. This is interesting. I wrote a little code to see what might be
going
on.
Whatever was true when the AppKit release notes
On Nov 22, 2008, at 8:29 AM, mmalcolm crawford wrote:
Let me check on this one.
It seems that, for various reasons, the setView: approach is still
preferred.
mmalc
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post
Hi!
Thank you for the code, Chaitanya. Unfortunately, unless I'm missing
something, I'm not sure that it'll work in my particular case, since I
want sequential numbering, rather than random numbering; in other
words, this isn't for a unique identifier of sorts, but rather to
indicate
On Nov 23, 2008, at 11:56 AM, Kevin Gessner wrote:
Rather than hitting the file system every time you want to check
file existence, you could cache it from -[NSFileManager
directoryContentsAtPath:]. You could run in to a race condition (if
another process creates a file between when you
What is the best way to change to a different window? I have a main
window nib with a lot of controllers in it. Currently the main view is in a
scrolling window. I want to live-switch between that and a borderless
(optionally full screen) window or a resizable (non-scrolling) window.
On Sun, Nov 23, 2008 at 3:27 PM, Steve Christensen [EMAIL PROTECTED] wrote:
I'm not at all sure that my confusion is stemming from a bindings issue,
though. I've attached an archived project with both popup and pulldown menu
buttons in a window. The popup works as expected, but the pulldown
On Nov 23, 2008, at 1:02 PM, Kyle Sluder wrote:
On Sun, Nov 23, 2008 at 3:27 PM, Steve Christensen
[EMAIL PROTECTED] wrote:
I'm not at all sure that my confusion is stemming from a bindings
issue,
though. I've attached an archived project with both popup and
pulldown menu
buttons in a
On Sun, Nov 23, 2008 at 4:09 PM, Steve Christensen [EMAIL PROTECTED] wrote:
Yes, but I would expect that the current selection would be shown as checked
in the pulldown menu when the button is clicked.
I don't think selection makes sense for pull-down items. You treat
a pull-down menu like a
Hi,
Apologies in advance, as I believe this may be a very basic question, but I've
only recently started using the Cocoa XML classes. I'm using NSXMLDocument,
NSXMLNode and NSXMLElement to read and write OPML files. Everything works fine
except for one thing - I can't seem to find a way of
On Nov 23, 2008, at 1:42 PM, Adam R. Maxwell wrote:
On Nov 23, 2008, at 11:56 AM, Kevin Gessner wrote:
Rather than hitting the file system every time you want to check
file existence, you could cache it from -[NSFileManager
directoryContentsAtPath:]. You could run in to a race condition (if
On Nov 23, 2008, at 2:02 PM, Nathan Kinsinger wrote:
It didn't find the file because you forgot to update the content
array after creating the new file.
Right, I rearranged things a bit and forgot that. However, that only
matters if you create Test file (which doesn't change the case of
Hey Ulai -
Do you have a backtrace for the crash?
If you think the problem has to do with the aboutWindow outlet being
referenced after the window has been dealloced, you could nil out the
aboutWindow outlet in response to a windowDidCloseClose: delegate
method.
Jon Hess
On Nov 21,
On Nov 23, 2008, at 3:12 PM, Adam R. Maxwell wrote:
On Nov 23, 2008, at 2:02 PM, Nathan Kinsinger wrote:
It didn't find the file because you forgot to update the content
array after creating the new file.
Right, I rearranged things a bit and forgot that. However, that
only matters if you
[Removing [EMAIL PROTECTED] from the reply, because I'm not
subscribed]
Keith,
When you say that none of the options you've tried make a difference,
does that include this one?
On Nov 23, 2008, at 2:33 PM, Nathan Kinsinger wrote:
On Nov 23, 2008, at 3:12 PM, Adam R. Maxwell wrote:
On Nov 23, 2008, at 2:02 PM, Nathan Kinsinger wrote:
It didn't find the file because you forgot to update the content
array after creating the new file.
Right, I rearranged things a
On Nov 23, 2008, at 9:44 PM, Gordon Apple wrote:
What is the best way to change to a different window? I have a
main
window nib with a lot of controllers in it. Currently the main
view is in a
scrolling window. I want to live-switch between that and a borderless
(optionally full
Hi Jeff,
Thanks for the reply.
Keith,
When you say that none of the options you've tried make
a difference, does that include this one?
Hi,
Newbie questions here. I've been studying Hillegass's book and
Apple's Guides and just started to prepare for implementing my own
code. I know similar questions have been asked here recently but it I
am still confused about it. Here it is:
I am starting to write my app's GUI in
On Nov 23, 2008, at 1:14 PM, Kyle Sluder wrote:
On Sun, Nov 23, 2008 at 4:09 PM, Steve Christensen
[EMAIL PROTECTED] wrote:
Yes, but I would expect that the current selection would be shown
as checked
in the pulldown menu when the button is clicked.
I don't think selection makes sense for
On Sun, Nov 23, 2008 at 6:01 PM, Steve Christensen [EMAIL PROTECTED] wrote:
The class methods also don't make a distinction between popup and pulldown,
so I would think that the selection should still be marked in the menu
when it's visible. I'm not trying to be argumentative, just wondering if
I have added an NSTableView linked it's datasource and deletegate to the
Controller object
I have the two required procedures
I use the following to add data into the Table
NSMutableArray *schedule;
NSTableView*playlist;
NSString *filename;
NSString *length;
[schedule
On Nov 23, 2008, at 3:05 PM, Kyle Sluder wrote:
On Sun, Nov 23, 2008 at 6:01 PM, Steve Christensen
[EMAIL PROTECTED] wrote:
The class methods also don't make a distinction between popup and
pulldown,
so I would think that the selection should still be marked in
the menu
when it's visible.
On 24 Nov 2008, at 10:13 am, Barry Fawthrop wrote:
I have added an NSTableView linked it's datasource and deletegate to
the
Controller object
I have the two required procedures
I use the following to add data into the Table
NSMutableArray *schedule;
NSTableView*playlist;
NSString
Hello, what's the best way to remove html tags and javascript from a
NSString?
(I'm working on a web crawler and I'm needing a way to get the
contents of a page that doesn't have a description on it.)
Thanks,
Mr. Gecko
___
Cocoa-dev mailing list
On 24 Nov 2008, at 10:43 am, Graham Cox wrote:
[schedule addObject: [NSArray arrayWithObjects: @TIME, filename,
length, nil]];
A further comment.
While managing your data this way is OK, and may fit your application
well, I personally wouldn't do it this way.
Instead, define an object
Hello,
I'm working on an application that simulates some real physical
phenomena, some aspects of which being under the user's control, and I
need advice on implementing some multithreaded behavior to improve
responsiveness. I would like to get some advice, in particular,
regarding which
On Nov 21, 2008, at 10:26 AM, Sherm Pendley [EMAIL PROTECTED] wrote:
Have you read the MVC introduction from Apple?
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html
sherm--
So I read the MVC introduction and a
Thank You
my datasource methods are as follows:
-(int) numberOfRowsInTableView:(NsTableView *)table {
return [schedule count];
}
-(id)talbeview: (NSTableView *)table objectValueForTableColumn:
(NSTableColumn *)col: row:(int)row {
return [schedule objectAtIndex: row];
}
Can/Should I
On Nov 23, 2008, at 4:42 PM, Keith Blount wrote:
Hi Jeff,
Thanks for the reply.
Keith,
When you say that none of the options you've tried make
a difference, does that include this one?
On Nov 23, 2008, at 6:56 PM, Jeff Johnson wrote:
On Nov 23, 2008, at 4:42 PM, Keith Blount wrote:
Hi Jeff,
Thanks for the reply.
Keith,
When you say that none of the options you've tried make
a difference, does that include this one?
On Sun, Nov 23, 2008 at 7:06 PM, WT [EMAIL PROTECTED] wrote:
Hello,
I'm working on an application that simulates some real physical phenomena,
some aspects of which being under the user's control, and I need advice on
implementing some multithreaded behavior to improve responsiveness. I would
Thanks for trying... It's a shame... I have an OPML importer (no export)
working based on old code I had found based on CFXMLTreeRef, but I was hoping
to write an importer/exporter based on NSXMLDocument, and this is the one
sticking point - everything else has been trivial with the
Jean-Nicolas.
Have you considered the notion of keeping your counting data in the
user defaults? This would give you quick persistence, without having
to calculate a value using the contents of a directory. Each time
you create a new file, increment the counting data and re-store the
Hi, Douglas,
That's not a bad idea, but would this not be a problem if the prefix
(e.g., Picture) were shared by another program, such as the system's
screen-grabbing functionality? Also, if someone deliberately puts a
file on the Desktop and names it Picture 5, it could get overwritten
On 24/11/2008, at 8:02 AM, Keith Blount wrote:
Hi,
Apologies in advance, as I believe this may be a very basic
question, but I've only recently started using the Cocoa XML
classes. I'm using NSXMLDocument, NSXMLNode and NSXMLElement to read
and write OPML files. Everything works fine
I might try some of the following:
1) use the NSGlobalDomain to store the counting data.
2) implement the functionality as a service (like grab does)
3) build a small helper application and let it do all the work.
4) implement the counting data in a single file (at
On 24/11/2008, at 12:09 PM, Rob Keniger wrote:
When you create the NSXMLDocument, by doing -
initWithXMLString:options:error: or the equivalent method that takes
NSData, are you using the NSXMLNodePreserveWhitespace option?
Most of the input/output mask options for NSXMLDocument are in
Opening NSOperationQueue Class Reference I see a link:
Companion guide Threading Programming Guide
but when I click on it, Safari says:
No file exists at the address “/Developer/Documentation/DocSets/
com.apple.ADC_Reference_Library.CoreReference.docset/Contents/
On 24 Nov 2008, at 11:21 am, Barry Fawthrop wrote:
-(id)talbeview: (NSTableView *)table objectValueForTableColumn:
(NSTableColumn *)col: row:(int)row {
return [schedule objectAtIndex: row];
}
This won't work. For one thing it's completely misspelt - that might
be a mail error, but if
On Nov 23, 2008, at 7:41 PM, Keith Blount wrote:
Thanks for trying... It's a shame... I have an OPML importer (no
export) working based on old code I had found based on CFXMLTreeRef,
but I was hoping to write an importer/exporter based on
NSXMLDocument, and this is the one sticking point -
Hello,
I'm exporting an animted GIF and want to set properties like the loop
count or if a global colormap is used. It seems that I have a problem
with CGImageDestinationSetProperties. Setting the frame related
properties like the delay time for the frames works fine, but the
image
Hi All,
I'm looking to build an address book model, I've happily created many
fixed models using core data and they were perfect, I love the for-free
stuff that core data brings to the party, it all works fine when I knew in
advance what structure the model took.
I now want to build a model that
hi,
in IB, if i drag an outline view into one of the panes of
a split view, i get a view hierarchy which looks like
this:
content view
split view
custom view
scroll view
outline view
...
custom view
...
my question is, should the custom view (NSView) even
The issue is that a boolean value is not numeric, but the denotation
of truth or falsehood. If you take boolVar to represent the
proposition that Socrates is a man, then saying:
if (boolVar == YES)
is equivalent to:
if (Socrates is a man == YES)
This is obviously a correct expression -
On Sun, Nov 23, 2008 at 7:45 PM, christophe mckeon gonzalez de leon
[EMAIL PROTECTED] wrote:
my question is, should the custom view (NSView) even
be in there? is there a way to, and would i want to, replace
the custom view with the scroll view and have it be a direct
child of the split view?
In my application i have an NSTextView with custom NSTextContainer and
also a custom NSTypesetter, i have a problem with displaying HTML
stuff in the textView.
I copied and pasted the entire contents of an html page ( it was
news.google.com to be precise), it displays it fine, but whenever i
What I'm trying to do is a bit weird but, it seems to be the only way
I can think of implementing such a concept, anyway I'll do my best to
explain... so I have an abstract class (let's call it Tools)...
basically it just defines some methods/properties that the subclass
should implement
Actually, I only wanted to select a single item in the pulldown
case, the same as what correctly happens for me in the popup case.
The problem has always been that, even though the button itself is
reporting that a particular item is selected, none of the
underlying NSMenuItems' state is
On Mon, Nov 24, 2008 at 2:17 AM, Jean-Nicolas Jolivet
[EMAIL PROTECTED] wrote:
The problem is, I'm not sure how I can store those custom views and
associate them with their respective subclasses once they are instantiated.
I'm able to do it if each views are in separate nib files, that way I
mmm I guess I'll keep it one view per nib... I thought I might be
missing something obvious... could just be that it's 3am too! :)
Thanks for the reply! I'll look into the controller idea too...see
which one would fit best for what I'm trying to implement!
On 24-Nov-08, at 2:33 AM, Kyle
75 matches
Mail list logo