Is it possible to embed a TTF or OTF font file in a C++ application so that application can use it without installing it on target machine? Any thoughts are welcome. (target platforms are going to be Windows and Macintosh). Purpose: Font is a private one and should not be available to the users.
...
I have an NSImage pointer from a platform SDK, and I need to load it into Qt's QImage class. To make things easier, I can create a QImage from a CGImageRef by using QPixmap as an intermediate format, like this:
CGImageRef myImage = // ... get a CGImageRef somehow.
QImage img = QPixmap::fromMacCGImageRef(myImage).toImage();
However, I ...
I am trying to load nib at run time. I am using Button control & binding it to one method & outlet.
But problem is that when i load it run time it not display button.
Also When i click on position where i placed button in interface builder, it executes binded method. I don't understand what is happening ?
...
On Mac OS X (10.6), if I start a YouTube video download and pull the Ethernet cable for 5 or so seconds, then plug it back in, I get varying results depending on the browser. With Opera and Chrome, after I plug the cable back in the video continues to load. But with Safari and Firefox, it never does.
Using Wireshark to look at the traff...
In my Cocoa Mac app I have an instance A which contains an unordered set of instances B which in turn has an ordered set of instances C. An instance of C can only be in one instance B and B only in one A.
I would like to have an unordered set of all instances C available on instance A. I could enumerate over all instances B each time,...
I'm having trouble using os.utime to correctly set the modification time on the mac (Mac OS X 10.6.2, running Python 2.6.1 from /usr/bin/python). It's not consistent with the touch utility, and it's not consistent with the properties displayed in the Finder's "get info" window.
Consider the following command sequence. The 'created' and ...
I wanna to simulate touch event in Windows / Mac OS X or Linux (OS is not critical).
...
Hi all,
I'm trying to test my iPhone application on the device.
I have a mac computer which stores my development environment.
Right now I can only access PHP files using the http://localhost/PHPFileLocation
which does not work when I try to test my app on real device.
How do I configure apache2 to be accessible from outside?
Is it pos...
Hi,
I am trying to install Eclipse Galileo on my MacBook running OS X v10.6 (Snow Leopard) and set it up with ADT plugin. I downloaded 64-bit cocoa version of "Eclipse Galileo for JEE developers" and ADT v0.9.6 from the respective offical sites.
When I try to add this new plugin-archive in Eclipse, I get the following error:
Cann...
Hello,
I want to trigger multitouch gesture events on Mac OS X. Is there a way to do this? Mouse or keyboard events can be triggered with CGEventCreateMouseEvent and CGEventCreateKeyboardEvent. Is there similar low level function for multitouch events?
Rok
...
What's the best way to handle memory management with nested factory methods, such as in the following example?
@interface MyClass : NSObject {
int _arg;
}
+ (MyClass *) SpecialCase1;
+ (MyClass *) SpecialCase2;
+ (MyClass *) myClassWithArg:(int)arg;
- (id) initWithArg:(int)arg;
@property (nonatomic, assign) int arg;
@end
@implem...
I'm getting random crashes when creating an inferred mapping model (with Core Data's lightweight migration) within my application. By the way, I have to do it programmatically in my application while it is running.
This is how I create this model (after I have made proper currentModel and newModel objects, of course):
NSMappingModel *m...
Hi,
i'm not sure how vim's set autoread works.
The help says
"When a file has been detected to have been changed outside of Vim and it has not been changed inside of Vim, automatically read it again."
So after :set autoread
I open a file with vim, I switch to an other editor, change the file, and wait to see the changes in vim as well...
I've build a static library working nice in a Cocoa Touch environment. Now I'd like to compile it also for Cocoa.. Can I have a single XCode project with different sdk targets? Is there some resource out there able to give hints about best the practices in this (and other) sense?
...
I have the following html file that plays a wav file when the user hovers over the 'Play' anchor tag. It works perfectly on IE, Chrome, Firefox, Opera, Safari on both Windows and Mac - except for Firefox on the Mac which does not play the file.
We know the file type is supported because if the autostart attribute of the embed tag is se...
I'm working on a couple of mac products, and in order to do what I need to do, I'm using some calls to undocumented methods on Mac Classes. Like
IKImageView's
doRotate:(id)
and
PDFDocument's
(NSPrintOperation *)getPrintOperationForPrintInfo:(NSPrintInfo *)printInfo autoRotate:(BOOL)doRotate;
How common is it for Objective C pr...
I want to get the hardware address of my mac's ethernet card. In all samples I saw in include on IOKit/assert.h . Which doesn't seem to exist on my system. GCC throws an error saying he doesn't know the type IOEthernetAddress.
Is assert.h necessary for my task? It would be great if someone coud give me a working sample.
[edit] here's my ...
I know I can use the RODBC library for accessing excel (.xls) docs from within Windows, but is there something similar for the Numbers program that come with iWorks? If not, what other solutions are there for easily editing a spreadsheet (like a lookup table) and accessing it within R? I know there the is an internal R editor, but I d...
Evening,
So I've recently installed VPython on my MacBook (OS X, Snow Leopard) - and it works absolutely fine in IDLE and from the command line (interactive mode). However, eclipse has issues.
Firstly it couldn't find it (which is a bit of an issue actually with all these 'easy install' python modules - when they don't tell you where t...
I have an int* of rgb data,width, height, and scanlinestride where i would like to create an NSImage.
i have looked around and found that i need to use NSData?
what is the ideal way of doing this?
...