. This is probably the most straightforward fix.
There is some more info in this older post to the list:
http://www.cocoabuilder.com/archive/cocoa/236455-nstoolbaritem-with-custom-view-in-interface-builder-3-leopard.html
--Joey
On Nov 22, 2010, at 5:29 PM, Rua Haszard Morris wrote
.
On 18/11/2010, at 12:44 PM, Rua Haszard Morris wrote:
I would like to add an item to my window's toolbar that is a custom view
containing other standard views. For example a popup button and a static text
field. If possible I would like to do this in interface builder, without
implementing
/2010, at 1:55 PM, Graham Cox wrote:
On 23/11/2010, at 10:02 AM, Rua Haszard Morris wrote:
Is this not possible?
Yes, it's possible. But your question is too open-ended. What have you tried,
what doesn't perform as expected?
--Graham
I would like to add an item to my window's toolbar that is a custom view
containing other standard views. For example a popup button and a static text
field. If possible I would like to do this in interface builder, without
implementing NSToolbarDelegate.
So to clarify..
I have a window with
Hi Cocoa-dev,
I'm experimenting with using NSViews in menus, and was expecting that such
items could continue to use Cocoa-provided implementations of mouse tracking,
selecting an item and dismissing the menu, etc.
After a lot of experimentation, doc reading and googling I've managed to hook
Thanks all, itemForRow was the missing piece of the puzzle. Now this thing
makes sense..
At the time you call -selectedRowIndexes, you should then extract the items
corresponding to those indexes from your data model (e.g. using [NSArray
objectsAtIndexes:]) before the user has a chance to
are expanded, so that won't do.
I could attempt to keep track of the selection via delegate method
outlineView:shouldSelectItem: but this seems a bad idea.
Am I missing something? Surely it is possible to ask an NSOutlineView which
items are selected?
thanks
Rua Haszard Morris
I am trying to write an NSView subclass to render a multi-page printout.
What I would like is to use the page/paper size in calculating the
dimensions of each page; for example, if the printout is made up of N rows
of items, each item rendering as 60-point-tall row.
So, assuming 10 rows
I am trying to write an NSView subclass to render a multi-page printout. What I
would like is to use the page/paper size in calculating the dimensions of each
page; for example, if the printout is made up of N rows of items, each item
rendering as 60-point-tall row.
So, assuming 10 rows of
I'm baffled, this seems fundamental, I can't see how it's done!
I have a Menu in a nib file, which I need to use in a few places in
code. So I want to do something like
NSMenu* myMenu = [NSMenu menuFromNib:@MyNibFile name:@MyUsefulMenu];
Is this possible - how can this be done?
I have
Making a class with an outlet, and passing an instance of that class
as the nib's owner, is one way.
You can also use the NSNibTopLevelObjects key as described at the
bottom of
, but is ignored. I'll fill in the docs feedback form..
thanks,
Rua HM.
On 3/04/2009, at 9:56 AM, Michael Ash wrote:
On Thu, Apr 2, 2009 at 7:58 AM, Graham Cox graham@bigpond.com
wrote:
On 02/04/2009, at 12:55 PM, Rua Haszard Morris wrote:
This seems like a weird hack, and makes me think I'm going
I am using a pull-down NSPopUpButton for a little button which
displays a little menu. The menu has some commands in it, i.e. it's
not a selection menu, the title of the button just displays an icon,
no title, no indication of a current item from the menu. I am calling
(ahem, sending)
I have a dialog that has a few controls as well as a complex custom
view that itself contains other controls as subviews. The custom view
(for various good reasons) is instantiated and added as a subview in
code. A template view and NSView's replaceSubview:with is used so the
positioning
it.
thanks for all the informative suggestions,
Rua HM.
Aki
On 2008/11/19, at 14:22, Ken Ferry wrote:
On Tue, Nov 18, 2008 at 1:57 PM, Rua Haszard Morris
[EMAIL PROTECTED] wrote:
What are the different options for flipping the coordinates of the
destination view? I've tried doing it by scaling
On Nov 18, 2008, at 1:00 pm, 11(November)/18/08, Douglas Davidson wrote:
On Nov 17, 2008, at 3:50 PM, Rua Haszard Morris wrote:
I have found that NSSuperscriptAttributeName,
NSUnderlineStyleAttributeName, and NSObliquenessAttributeName
(those are the attributes that I have tested) render
19, 2008, at 9:09 am, 11(November)/19/08, Douglas Davidson wrote:
On Nov 18, 2008, at 11:53 AM, Rua Haszard Morris wrote:
I was ensuring that I am _not_ drawing in a flipped context... (!)
now, as you suggest I tried flipping the custom view (override
isFlipped) that the attributed string
Thanks for the link, you are right, I had not seen that document!
On Nov 19, 2008, at 9:33 am, 11(November)/19/08, Douglas Davidson wrote:
On Nov 18, 2008, at 12:18 PM, Rua Haszard Morris wrote:
To follow up.. below I have pasted the code that draws the text
(for my test app, as opposed
an NSView rather than draw the attributed string
manually.
thanks
Rua HM.
On Nov 19, 2008, at 9:40 am, 11(November)/19/08, Rua Haszard Morris
wrote:
Thanks for the link, you are right, I had not seen that document!
On Nov 19, 2008, at 9:33 am, 11(November)/19/08, Douglas Davidson
wrote
I have found that NSSuperscriptAttributeName,
NSUnderlineStyleAttributeName, and NSObliquenessAttributeName (those
are the attributes that I have tested) render differently when Cocoa
Text is used to draw the string. The attributes appear to be
intrepreted inverted, in that 1 for
I'd like to get an error, not just a warning, when I pass an instance
of a class to a method that takes a parameter conforming to some
protocol, and the passed object does not implement the protocol. Is
this possible? Is there a good way to set things up so an error is
generated.. or is
at 8:39 PM, Rua Haszard Morris
[EMAIL PROTECTED] wrote:
I'd like to get an error, not just a warning, when I pass an
instance of a
class to a method that takes a parameter conforming to some
protocol, and
the passed object does not implement the protocol. Is this
possible? Is
there a good way
I'm using a NSNumberFormatters in a modal dialog to validate text
fields. I want to give the user a specific and appropriate error
message if they try to OK the dialog with an invalid number in a
field. For example I want different error messages for no string
entered, non numeric string
I am trying to implement a mini-size, square bevel button that pops up
a menu, i.e. a popup button with a square appearance and mini size,
but have not found a way to achieve this.
NSPopupButton does not support square button appearance, and doesn't
support setControlSize: (though it can
On Aug 7, 2008, at 2:53 PM, Rua Haszard Morris wrote:
I am trying to implement a mini-size, square bevel button that pops
up a menu, i.e. a popup button with a square appearance and mini
size, but have not found a way to achieve this.
NSPopupButton does not support square button appearance
Can anybody point me to some good tutorials/guides for implementing
custom controls?
I've been reading the Cocoa Event Handling Guide, The reference and
accompanying conceptual guides for NSControl, NSCell, NSActionCell and
NSView, but I'm more confused than when I started.
If anyone
Can anybody point me to some good tutorials/guides for implementing
custom controls?
Do you have some objection to the examples at developer.apple.com ?
http://developer.apple.com/samplecode/Clock_Control/index.html
http://developer.apple.com/samplecode/TrackBall/
trying to fiddle about with
scrollbars yourself.
Graham
On 24 Jul 2008, at 2:15 pm, Rua Haszard Morris wrote:
I'm implementing a scrollable pane and have come across to slightly
weird issues with NSScroller, leading to me wondering whether I'm
going about this the wrong way...
1
I'm implementing a scrollable pane and have come across to slightly
weird issues with NSScroller, leading to me wondering whether I'm
going about this the wrong way...
1. The thumb proportion can only be set by
setFloatValue:knobProportion: method which is deprecated in 10.5. Is
there
I need to support arbitrary superscript, not just squared...
I should be clear:
- I initially only set superscript attribute for the characters that
are superscript, i.e. part of a larger string.
- When this attributed string was given to an NSTextField (static
non editable), the textfield
this is happening?
thanks
Rua HM.
On Jul 21, 2008, at 4:27 PM, Rua Haszard Morris wrote:
I am using NSSuperscriptAttributeName to make part of a string
displayed in an NSTextView label display as superscript (to show to
the power of 2). I may also use a smaller font attribute to make
the 2
I am using NSSuperscriptAttributeName to make part of a string
displayed in an NSTextView label display as superscript (to show to
the power of 2). I may also use a smaller font attribute to make the
2 char smaller.
My problem is that thebaseline of the text drawn in the NSTextView is
I don't believe Peter Duniho's barking up the wrong tree - he sees
room for improvement, and wants to discuss what to do to make it
happen. I.e. he appears to care about making the platform better
(probably something we all share)...
These are the main valid issues from my point of view:
2 Cocoa requires you when learning to implement things by clicking
and
dragging, which makes learning harder for some people (this is a real
annoyance to me, why can we not see/edit these connections in a
text file?
why is there so much other crap in the nib xml? etc).
The fact that you
With you 100% on all this below.
Been having trouble coming up with something useful to add to all
these discussions about Cocoa Apple Developer Documentation .. what
you said below sums a lot of it up.
These points really resonate for me:
++ explaining why _their_ API and paradigm is
I'm trying to set the action for an NSSlider in a little helper class
that is not the file's owner class associated with the window in the
nib. At runtime, I get these console messages:
*** +[SliderHelper myAction:]: unrecognized selector sent to class
0xeb74380
HIToolbox: ignoring
36 matches
Mail list logo