Yes, it is possible. See the docs for NSAttributedString for details.
There was also an example of how to make hyperlinks, the link to that
sample code, i suppose, must be there, too.
Best regards,
Timofey
On Jul 30, 2009, at 1:53 PM, Rick Mann wrote:
I need to render short sentences in my
Well, you could have two different menu items doing the same thing and
having the two shortcuts.
On Jul 27, 2009, at 11:38 AM, Oleg Krupnov wrote:
I'd like the Go Back command in my app to be triggered by both Cmd+[
and Cmd+- (left arrow) keyboard shortcuts. How do I do that?
I am aware of
Thank you all for your replies.
I really didn't have any order by clause.
But, unfortunately, I can't test it on my iMac right now.
On Jun 11, 2009, at 6:30 PM, Gregory Weston wrote:
Timofey wrote:
I've written the alfa of my first app on the Mac which works in an
acceptable manner on my
Hello.
I've written the alfa of my first app on the Mac which works in an
acceptable manner on my macbook. But when i run it on my iMac, it
returns different results for the in seemingly the same conditions.
The application is a dictionary. As the user types a word into the
searchfield,
Hello.
I installed another version of MacOS X in a separate partition of my
hard disc. And now whenever i start the computer, it boots from that
partition by default (unless i press option to select the partition to
boot from this time). How can i permanently change the primary boot
TextEdit doesn't render quite a lot of things in doc files, such as
footnotes, headers/footers, comments and lots of other things.
I've tried to find a library that would do that, but failed.
If you do find anything like that (or reinvent it for that
matter ;) ), please, let me know as well.
Hello.
Suppose, I have an app that, for example, works with a database. It
can write to the db, it can select things. There is a class that works
with the database, a class that controls that class and a class that
interacts with the gui. And, of course, there is some testing code in
all
I once used the IP-to-country database for my site.
It was a free-to-download-and-use csv consisting of ip ranges and
countries, to which they correspond. It can easily be used to create
an sqlite database.
Check out http://ip-to-country.webhosting.info.
But there are no Cocoa libs for
Hello.
I am about to get involved in a project on porting a windows program
into MacOS. The original program is written in C++ with limited use of
windows-specific libraries, and its owner wants the code that will
result from that project to be compilable both under Windows and MacOS
Hi there.
Here is a C++ constructor that is said to work on Windows (i.e., the
guy who wrote it says it works on Win), but doesn't work on Mac. Is
there a way to fix it, except by replacing it with a copy method?
Cbyte1::Cbyte1 (Cbyte1 val) {
m_size = val.m_size;
if
Hello.
I have subclassed NSTextView and I am using that subclass as a field
editor for an NSTextField. On certain events in the field editor, i
need to take certain actions again in the field editor, and as of now
i have to use delegate methods in the TextField's delegate to call
methods
Hello.
I need to have a tableView with about 2 million rows, and that figure
may actually be bigger. But the table looks awfully bad in that case:
you get artifacts when scrolling, the text in the rows does not
coincide with the alternate bluish and white stripes, and if you click
on a
It looks like, if you want to change the case of a particular letter
(say, all occurrences, letter a), you will have to iterate through
all the chars in your textView, check if they are as, if they are
upper or lower case, and change their case accordingly.
That is, if I understood your
Hello.
It's a very funny thing. And i do hope i am not bonkers. But the
following code works fine until i delete the line with NSLog().
In the latter case it just returns an empty array. Are there any sane
reasons why that can happen?
- (NSArray *) selectWordsBeginningWith:(NSString
be.
On Apr 29, 2009, at 4:32 PM, Graham Cox wrote:
On 29/04/2009, at 10:05 PM, Тимофей Даньшин wrote:
NSArray *ret = [mutableRet copy];
// NSLog(@The number of items to be returned is: %i, [ret count]);
[mutableRet release];
return ret;
I don't see why your
Hello again.
In short, i get an error calling the same synchronized singleton
DatabaseManager from different threads.
Here is what I am actually doing. As I was writing earlier, i am
writing a dictionary application that is supposed to show translations
for words from the database. In
:
Тимофей Даньшин wrote:
In short, i get an error calling the same synchronized singleton
DatabaseManager from different threads.
Are you sure your database accesses are synchronized (i.e. thread-
safe)? I see nothing in the posted code that uses @synchronized or
any other locking mechanism
Hm...
That really works! Thanks a lot.
Putting the bodies of those methods in @synchronized(self) blocks helped
Thanks a lot again.
On Apr 29, 2009, at 11:33 PM, Greg Guerin wrote:
Тимофей Даньшин wrote:
The DatabaseManager is synchronized. If any class is to communicate
with the db
Hello.
As I wrote earlier, in my application a user can open a database or
create a new one, and then perform some tasks, the results of which
are stored in the said database.
However, a strange thing happens: when the user _creates_ a database,
everything is stored as hoped. But when
Hello.
A foreword:
In my application I need to allow the user to create a database. So i
display a dialogue panel, collect all the necessary information about
the db to be created and create a DatabaseInfo object. Then i pass
that DatabaseInfo object to the DatabaseCreator to actually
But I might suggest you've omitted a couple of options. Would it be,
for example, particularly evil if your DatabaseInfo object include a
createDatabase method?
Well, not exactly, i suppose. The point is that i create DatabaseInfo
either before creating a new database or after opening an
Hello.
In my application, I have the need to store strings with non-latin
characters in a SQLite database.
But when I insert them, they become corrupt.
When i bind the string to the prepared statement, i do make sure it is
in UTF-8:
sqlite3_bind_text(sentence_insert_statement, 1, [string
is that i am able to add non-latin strings to it
by reading sql files from SQLite in Terminal...
Best regards, Timofey.
On Apr 6, 2009, at 2:31 PM, Тимофей Даньшин wrote:
When I insert non-latin strings into my SQLite3 database, they turn
into some weird sets of characters (as I select
the cString just to give it a try?
On Apr 7, 2009, at 9:12 PM, Keary Suska wrote:
On Apr 7, 2009, at 10:39 AM, Тимофей Даньшин wrote:
On Apr 7, 2009, at 8:14 PM, Keary Suska wrote:
Are you properly encoding your C strings with -
cStringUsingEncoding:?
Yes, I think so.
At present, I am using
.
And if you could give me a hint on how to safely get unicode chars at
a given position of a string, I'd be even more grateful :)
Timofey.
On Apr 7, 2009, at 10:23 PM, Greg Guerin wrote:
Тимофей Даньшин wrote:
To be on the safe side, i make a local copy of the method's input
string.
Maybe
Hello.
When I insert non-latin strings into my SQLite3 database, they turn
into some weird sets of characters (as I select those strings later in
Terminal), and the fields, which contain those strings, become
unusable by my application.
I googled for it for quite a bit, but everywhere it
Hello.
I would like to be able to intercept double clicks on the text in an
NSTextView even if the text is not a link and is not in an
NSTextAttachmentCell. I did try to do this by implementing the
textView: willChangeSelectionFromCharacterRange: toCharacterRange and
comparing the
Hello.
I have a class called TableMaker. And i import its header in the
header of another class. The funny thing is that every once in a while
the app fails to build, XCode pointing to the line TableMaker
*tableMaker; in that other header file as the cause of the failure.
If i comment out
Yes, that cleared it. Thank you a lot.
Could you, please, tell me, where i can read more about circular
includes and what the ways of dealing with them are? It seems rather
an odd thing after Java.
On Mar 30, 2009, at 3:25 AM, Stephen J. Butler wrote:
2009/3/29 Тимофей Даньшин ok5.ad
Hi. I'm new to the field of KVC/KVO, but I want to master it.
Are there any standard tests to check whether my objects are KVC/KVO
compliant? And are there, perhaps, simpler and less profound
explanations of that subject, than the ones on the Apple site?
Thank you for your attention and
Hi.
Does anybody know how to make totally custom windows, such as the
control window in DVD Player or the minimized iTunes window?
As i said in the subject -- I am just curious.
Timofey.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
On Mar 21, 2009, at 5:38 AM, has wrote:
On Mar 21, 2009, at 1:06 AM, Тимофей Даньшин wrote:
On Mar 21, 2009, at 3:34 AM, has wrote:
Is it at all possible to have an application send actions to a
particular AppleScript script,
Yes. See NSAppleScript/OSAKit/Carbon OSA APIs. There's
elements.
On Mar 21, 2009, at 7:28 PM, has wrote:
On Mar 21, 2009, at 12:09 PM, Тимофей Даньшин wrote:
Well, I'm writing a translation memory application, which is a
program that grabs sentence by sentence from a given text (that
needs translating), asks the user to translate that sentence
Hello.
Is it at all possible to have an application send actions to a
particular AppleScript script, or set that script as a delegate of
that application or to have an AppleScript as a means of communication
between two applications (one of which is mine, and the other isn't)?
Thank you
Hello.
Are there any instructions out there for creating new Xcode projects
in an existing SVN repository on Google Code from within Xcode? For
the only way i could find was to create an empty project in Xcode,
then commit it to the repository from a command line and then create a
new
Hello.
I have got a method that is an IBAction, and it works quite all right,
it reaches its final curly bracket, but then the whole application
crushes for some reason. But the words [Session started... etc] in the
log appear about three lines before the phrase Finished adding to the
Could you, please, expand on that? Am I using too much memory? Am I
not releasing objects correctly? I am really at my wit's end...
On Mar 20, 2009, at 12:12 AM, mm w wrote:
memory
2009/3/19 Тимофей Даньшин ok5.ad...@gmail.com:
Hello.
I have got a method that is an IBAction, and it works
, are there any manuals on reading these stacktraces?
On Mar 20, 2009, at 1:36 AM, Shawn Erickson wrote:
2009/3/19 Тимофей Даньшин ok5.ad...@gmail.com:
2009-03-19 23:47:28.204 Untitled[16510:10b] The splitString is 'dra'
[Session started at 2009-03-19 23:47:28 +0300.]
2009-03-19 23:47:28.207
Hi all.
In my application I have to search for strings closest matching a
given string. So, for example, if the given string is Hello. Would
you like some oranges, I need to find Hello. Would you like some
lemons or Hello. Would you want some oranges (if they are in the
database), and
Hello.
I am writing a method for searching for the longest common substring.
The idea is to store the pieces of that LCS in an NSMutableDictionary
with TMIntWrappers as keys and NSMutableStrings as values.
Now, TMIntWrapper is the class i created for wrapping ints into
objects. It stores an
Hello.
Are there any abstractions in Cocoa to open and handle Exel and
PowerPoint files?
Thank you.
Timofey.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the
Hi all!
I have a potentially large database with attributedStrings. Is there a
way to somehow get the Spotllight find the closest matches to another
string, or do i have to write the search engine myself?
Thank you.
Timofey.
___
Cocoa-dev
Hello.
In my NSDocument-based application I use a number of my own attributes
to the NSTextStorage in that document.
The funny thing is when i set the cursor to the desired point and
begin typing, one of those attributes gets broken, i.e. the range
containing the text that i type in doesn't
43 matches
Mail list logo