/5/6 Graham Cox graham@bigpond.com:
On 05/05/2011, at 11:51 PM, eveningnick eveningnick wrote:
What i need - is to stop the thread A immediately after the thread B
has been spawned by a thread A.
Hang on. Why use a thread at all? If Thread A simply calls the process B
synchronously
Hi
I have a CVPixelBuffer with some background picture.
I need to draw on this background some foreground image. I don't need
to preserve the initial CVPixelBuffer's content - i just need to add a
small foreground watermark onto that buffer.
CIImage does allow to create an image from
really really do not want to block the main thread anyway).
On May 6, 2011, at 1:10 PM, eveningnick eveningnick wrote:
I need to wait, while the image is drawn (drawRect method is actually
called by the framework) from a different thread that supplies frames.
I am drawing images just to see
the pixel format of the CVPixelBufferRef is k32BGRAPixelFormat
___
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
Hello
I am searching for the way to find a cursor's position on the screen.
I tried to use method -hotSpot of NSCursor, but it returns
sc x=-2057825613, y=0
-(IBAction)timeHandler:(id)timer {
//NSCursor *sc = [NSCursor currentSystemCursor];
NSCursor *sc = [NSCursor
Hello
I have a thread A that spawns a thread B, and should stop, waiting
before the thread B allows thread A to continue.
In Windows, in a thread A, before spawning a thread B, i would create
a synchronization Event primitive in the non signaled mode, the
spawn a thread B, and call
2011/5/5 Heath Borders heath.bord...@gmail.com:
Try NSConditionLock. Its documentation should be pretty self-explanatory.
Health,
thanks for the response.
However, i can't see how can i use NSConditionLock in my situation.
For every lock (or mutex/semaphore - which essentially is the same) i
Ken,
Thanks for a detailed response
Still not sure how would it be possible to do using NSConditionLock,
but i managed to do it using NSCondition :)
2011/5/5 Ken Thomases k...@codeweavers.com:
On May 5, 2011, at 8:51 AM, eveningnick eveningnick wrote:
2011/5/5 Heath Borders heath.bord
Hi
I am trying to find a way to display a set of images serially on
window. As far as i understood reading Apple programming guides (Core
image, OpenGL) and samples, NSOpenGLView is the optimal choice for
the task, since it offers asynchrony and delegates anything possible
to the GPU.
According
Hello
I have an application that has a shared object (which is a custom
container for elements - arrays, and which is protected by critical
sections in my code). I need to control it's lifetime - it should be
alive until the last thread finishes working. Let me try to explain it
using an example
Hi Ken,
How are you spawning your threads?
If you use Cocoa methods, then they automatically retain the object which is
the target of the selector and the argument object for the life of the
thread. So, you may be getting this automatically without realizing it. If
not, then it should be
Thanks a lot for detailed response!
___
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
Hi
Is it possible to resize a custom title-less window using any of
it's 4 corners?
I want to display a window with a hole inside (A window which looks
like a frame), and let the user to resize this frame using any of the
4 boundaries of such a frame.
Also i am wondering, if i could let the user
While what you are asking for does not sound patently unreasonable, this last
sentence should almost never be the reason to make a particular design
decision, especially when it comes to deciding to implement non-standard
controls, etc.
Your statement made me think about redesigning some
Hi Ken,
first thank you for answering this question and previous times. I am
just very unfamiliar about what can i do and what i can't drowning in
documentation that's why i'm asking so many times. I managed to
display the funky window, but the events were my problem. Thanks a
lot for the links.
Hello
I have two monitors attached to the computer, and when i click in
System Preferences/Displays Preferences on the display image
(Display arrangement tab), the screen of the clicked scematic
monitor's image monitor is being surrounded by a red frame.
How could i do something like this from my
Hi David,
thanks for the answer
I was thinking about the window. But then it has to be something with
a big hole inside. This hole ought to be transparent for mouse clicks
(so if there's something below my window, that 'something' has to be
clickable and focused, and receive keyboard input)? Is
thanks andreas, i'll look at that
___
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
Hi
I am developing a QTKit application for capturing the camera's output,
and i need to tell the user about what color modes and resolutions the
camera supports natively. QTKit itself does not provide such a
functionality - it sets up resolution automatically.
I am wondering, if there is any way
hi
i am writing a small screen video grabber and i would like to have an option
there to grab only a particular window. This window may belong to another
application, of course.
I need to somehow impact a particular window for the user, make it bold,
change it's shadow color or add some kind of a
Thank you for the answer
So i guess OpenGL is a way to go.
And with it, i have two problems:
1) how to select only a particular window to grab? Since im getting a
framebuffer contents, i am having the whole screen picture. I need to cut
out only a particular region of it - that contains a
I need to somehow impact a particular window for the user, make it bold,
change it's shadow color or add some kind of a frame around it - to remind
the user that only this particular window is being 'grabbed'.
Does WindowServer allow to perform such kind of operations on any level?
What APIs
Hello
Which way is faster to get the picture of the desktop (or some of its
windows): using CGWindow API or OpenGL?
i am trying to write a video grabber, CGWindow API seems pretty convenient
(because it allows to select which window to grab), but i am worried about
the speed, because i need to
hello
i have a kext (or, rather, 2 kexts - one built with -arch i386, another one
with -arch x86_64). They should work on both OS X 10.5 and 10.6.
i have an installing script, which looks like
if [ `uname -a | grep x86_64 | wc -l` ge 1 ]; then
cp -R 64bit.kext /Library/Extensions/
else
cp -R
thanks for detailed description of the solution
___
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
The one that comes to my mind immediately, is that if the user is
double-clicking a document in the Finder to open it, or trying to print from
the Finder, then the event for that goes to your script, not the real
application. So the script would need to pass that on.
Assuming your app
Hello
is it possible to set up the System Preferences height programmatically?
I have 3 possible NSViews of different height (but the same width),
which are displayed depending on what current settings does the user
have.
I am aware that System Preferences automatically changes the size of
its
Kyle,
thanks for the warning, i understand the problems it may cause.
but what if i was doing that, how should have i sent a message to an
object of the host application?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
Search google is not an answer, although a good suggestion. Could you please
post the solution you came up with to the list. There are many ways to skin
this cat, I think we would all benefit from your experience.
Every process that is running on a system has two user id numbers -
effective UID
Executing arbitrary scripts as root is also a potentially major security
hole. Your goal should be to do as little as possible as root (or other
elevated privileges), and with as little flexibility as possible.
Security is hard, and if you don't understand the issues, you should take a
Hi
I have an application, which is located in a bundle (like any other
cocoa app) and can be installed in a mac-way: by dragging its bundle
to /Applications (or elsewhere).
I have been asked to create an addition to this application, that
adds some functionality, but needs to be installed using
You can't do this. The Info.plist needs to refer to the main app's
binary. Instead, put your checks into the main app's startup code.
-[NSApplicationDelegate applicationDidFinishLaunching:] would be a
good place.
This will require changes to the main app.
What if i rename the Main
Hello
I am trying to write a simple uninstaller, that has to call few
root-demanding actions - stopping/unloading daemon and unloading kext.
I can do that from a script-uninstaller, like this:
#!/bin/sh
launchctl stop my.agent
launctctl -w unload /Library/LaunchAgents/my.agent.plist
sudo
Thanks Nick, i really should've googled before asking.
___
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
Thanks everyone for advices!
2011/1/4 James Bucanek subscri...@gloaming.com:
In my application, I have a special Uninstall and Quit menu item. I
shutdown and delete launchd configuration files and them move the active
components (plug-ins, helpers, ...) to the trash. I find this avoid the
Hi Nick
Thank you
I've an unusual application that is mainly located in System
Preferences (its gui part), and which can be uninstalled by clicking a
button Uninstall in that prefpane
better solution would be to programmatically press Show All button
(back in System Preferences), but that seems
- If you really want System Preferences to quit, you could use NSAppleScript
and do something like:
tell application System Preferences to quit
You can do the same using AppleEvents.
Peter, could you hint me on how to do it using AppleEvents?
Googling, i have found some references to
Hello
I am writing an application that for users convenience has a button Uninstall.
Inside, this uninstaller stops several launchd services,
kextunloads a driver, deletes this driver and services and finally
is supposed to delete itself.
In any sane operating system it is impossible (at least,
Hello
i have a daemon whose owner is wheel:root and which provides a Unix
Domain Socket where i can send/receive datagrams from my custom
Preference Pane.
The problem i have is that a socket, installed by a root-process can't
be sent by a non-root application, like System Preferences.
I guess i
Unless I'm forgetting something basic, you should be able to connect to your
daemon's socket from a non-root process if you first change the permissions
on the socket (using chmod, as if it were a file). The man page for the
unix-domain protocol family alludes to this briefly:
All
Thanks for the answers,
i enabled Garbage collection,
The problem was that i had Build for active platform checkbox
checked, i unchecked it and it started working fine
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
Hello
I am creating a system preferences applet (according to apple's
guide), but after installing (copying) its bundle into
/Library/PreferencePanes/, and clicking it (or selecting its icon in
System Preferences app), i always get the message from the subj.
My OS is running in 32 bit mode:
$ arch
interesting thing is that it works, if the project is created as a
Preference Pane, while the Bundle project (there is a recipe for
creating preference panes using Bundle xcode template) doesn't work
as needed. I matched two projects - one created as Bundle manually,
and another one generated
Hello
I a wondering, if it is possible to get the current screen position of
a text cursor (text caret) using Cocoa? It is possible to do that in
Windows system (GetCaretPos), maybe Mac allows some similar
functionality?
Thanks!
___
Cocoa-dev mailing
The text caret doesn't have a single, global position. It is really the
position of the text selection within an active text view when the selection
length is zero. If you want to know which logical characters the insertion
point is at in a given text view, that's easy to find - just get
Hi George,
What you want to do would is within another's application.
Any public hooks/APIs could be used...
In this case VB and AppleScript.
For deeper, Cocoa-based integration, you would probably need to work with
Microsoft.
Couldn't hurt to try contacting them...
The means mentioned
Hello!
I have to write an application, that should run on the background.
When the user needs, it should display some control panel. On Windows
system i would have used System tray, and an icon there - when the
user clicks on that icon, it displays some GUI. but what is the Mac's
usual practice? I
what is the difference between a process that was started by launchd and the
same process, started via terminal (without sudo command) in Mac OS 10.5?
Does the first one has some restrictions when it calls Accessibility
functions?
Here is the Preface to my problem. (i apologize that it is a
On 10.6 you can safely execute Apple scripts from a secondary thread (see
previous thread on this matter).
Well, I just checked this using an NSOperation object which executes a
script. The operation can be alternatively executed on the main thread
scheduled by the global queue [NSOperation
Hello Fritz
You are understood: You want to learn how the high-level application and
event API works by trying to recreate (or at least explain) it using
lower-level API.
You can't do it. At least not in general.
To provide the high-level functionality, Apple uses the published low-level
Hi Ken, thanks for the answer
Does the first one has some restrictions when it calls Accessibility
functions?
It may, depending on the session type. Have you set LimitLoadToSessionType
in your agent's launchd plist?
no, i haven't specified that
This Launch Agent is supposed to be
Hello Ken
If you don't have a handle on the basics, it's foolhardy to get into
advanced techniques.
I am trying to understand these techniques step by step, it is really
difficult for me when everything is hidden :(
I assume i should call a one run through the runloop manually, but how?
Hello Scott
You seem to be trying to find ways to use the frameworks in ways that are
not intended. Why are you not using NSApplicationMain in the normal way?
Just for the sake of my own understanding. There's nothing extraordinary i
am doing there, but for example, i need to delay the launch
Hello
I am trying to understand how does Run loop work.
Here is my story
(i am sorry, it is a little long, but to avoid questions why do you need
that and others i thought better to write it down
here). I also read the CFRunLoop documentation, and event processing guide
in Cocoa, but I couldn't
Thank you guys, i have written an Applescript for all that. That is
easy, and flexible :) And it can delete its own bundle, which is
important for me
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
Hello
How, using an ordinary application (started by doubleclicking from
/Applications), i could create/modify/delete that file?
Is it possible at all, according to OS X current security model?
(Leopard and Snow Leopard)
Maybe i could display a User login inbox somehow then, to let user
authorise
Hello
I need to implement a functionality like Microsoft Word does for popup
windows - display a semi transparent popup window with the alpha value
calculated by the distance from the mouse cursor to the edge of the window.
It is a requirement for me, not just a decoration to look in a neat mac
If you want the *current* mouse location at the time you decide to display
the window, use +[NSEvent mouseLocation] or -[NSWindow
mouseLocationOutsideOfEventStream].
However, it's more than possible that you should be using the mouse
location *synchronized with the application's event
Thank you guys for answer, but the problem still remains for me
HI ,
launch an applescript / shell script when uninstall button is clicked .
This should first quit the App and wait for it to terminate and then delete
the bundle and plist
Rajendran P
I'm sorry for asking such a
Hello
I have an application that creats, when installed, a bundle in
Applications and registers a .plist file for launchd in
~/Library/LaunchAgents (the agent is located in that bundle, and its
process is launched everytime the OS starts).
Thus, i can't let a user just to move bundle to the Trash
Hello
My project consists of few binaries, and i wanted to put them into one
application Bundle (thus, i placed them into ./Contents/MacOS/).
Only one of these binaries is launched when the bundle is
doubleclicked in finder (i have specified it in ExecutableFile in
bundle's Info.plist file).
Thanks Uli, it worked!
___
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:
Hello!
I am wondering, if NSTask can be replaced with low-level fork/exec
calls. Looking through forums, i often met statements that launching a
process with fork/exec is not an OS X way, especially if i am
using Cocoa framework (and i am using Cocoa!).
What i want to do - is to launch an
Hello!
What operations does the application launcher (or launch services?
who's responsible for launching bundles) when i doubleclick on a
bundle? What happens when i open a terminal and go (CD) straight
through MyApp.app/Contents/MacOS and launch the binary? Is there some
source to read about
Are you sure about that?
No, but by reading all the topics of people, who tried to launch a
simple (non bundled) binary with it, i left that idea - according to
gossips Launch Services act like Finder's doubleclick - if you
doubleclick on a binary file, it just won't work. And unfortunately on
Hello
i have an application that installs several active event taps (active
- those that can modify and filter events) into another application. I
activate them (CGEventTapEnable) and deactivate them only when my app
quits.
In some moments i find out (using application ET Testbench) that my
You create the secondary thread, install the event tap in it as usual - that
is, create a run loop source for the tap and add the source to the current
run loop returned by CFRunLoopGetCurrent() - and then, erhm, run the run loop
in a loop :-)
Something like (warning: typed in Eudora):
I have an application that has to perform a long action and while
performing it, be able to react to pressing Esc and cancel that long
operation.
That long action is a series of Applescript calls. If i perform
these calls in NSOperation's -main function the speed significantly
decreases - i guess
Hello
I have some application active (for example, finder) and its window is
a keyWindow that receives keyboard events
After i click on a free from windows part of a desktop with right
mouse button, i have a popup menu dropped down, and somehow this menu
now gets keyboard events (for example, when
2010/10/6 Dave Keck davek...@gmail.com:
Can i make a runloop run only one time through the queue, and then
return back to processing of that big file?
See CFRunLoopRunInMode(), specifically the returnAfterSourceHandled argument.
But this is for Carbon application, isn't it? I have a cocoa
Actually, by processing i mean a lot of AppleScript calls, some of
which return NSAppleEventDescriptors.
I am not sure how it is happening under the hood (if someone could
explain me...), but what i see is: i call
NSAppleEventDescriptor *resultFromScript = [myapplescript
executeAndReturnError];
Hello!
I have created a cocoa application that has unusual behavior: it has a
window (NSPanel), which does not activate the application, when it's
clicked. This window is ordered always on top of the other windows. So
it's like a tooltip window (basically it is a popup thing, that
drops down when
Hello
I have an application that transforms a very big file, and during that
operation i want to give a chance to user to press Esc and cancel this
transformation. Therefore i need to make mainRunLoop run inbetween
some phases of the file transformation.
There's an idea to create a separate
Hello!
What are all the scenarios for terminating the Cocoa application, and
can i catch the moment of quitting and do some before quit actions?
I am writing a naked cocoa application (basically for myself, to
understand what happens under the hood). So, instead of calling
NsApplicationMain, i do
I'm sorry, i guess i have posted the messages privately before,
thinking they are posted to a mailing list. I have used before only
forums and don't have enough experience with mailing lists :) Hope
this time the message will come to the right destination
Hi Jonathan
Unfortunately this doesn't
Hello
Is there a way in MacOS X to determine the position of the control on
a screen, if the application doesnt provide Accessibility object for
that control?
What am I trying to do - is to get the position of the topleft corner
of Mac:Word Page (it seems to be a View or something like that).
Hello!
Is it possible to somehow determine the text caret's absolute screen
position of a Carbon application?
(I've sent it to carbon mailing list, but seems like no one is
interested in carbon development anymore)
What am i trying to do is to display a popup list window near the text
cursor in
Hello!
I have written an application, that interacts with another
stranger-program by Applescript. The problem is that i need my
application to look like a plugin for stranger program- to display a
panel, and to be launched automatically when the Master-program starts
(and to finish, when the
Hello
I am trying to call applescript functions (from my cocoa application - using
NSAppleScript's -executeAndReturnError), to automate some operations in
Microsoft Word.
The problem is that after every Applescript call, the Word operates slower
and slower (and i guess finally it won't respond at
79 matches
Mail list logo