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 item
>> 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, assumi
s 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 Hasz
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
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
u
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 a
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
/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'
no,
>> the buttons disappear
>> - simulate the interface - oh no, still no buttons!
>>
>> Perhaps my first email was not concise enough...
>>
>> thanks for the help
>> Rua HM.
>>
>> On 23/11/2010, at 1:55 PM, Graham Cox wrote:
>&g
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 except
2008, at 2:38 PM, Sherm Pendley wrote:
On Thu, May 15, 2008 at 10:12 PM, Rua Haszard Morris <[EMAIL PROTECTED]
> wrote:
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 r
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 s
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:
1
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 hav
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
ne shed any light on why 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
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
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 an
NSScrollView? It's much easier than 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
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 coul
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/
http://developer.apple.com/samp
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 of
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
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'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 the
On Wed, Aug 13, 2008 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 t
Is there a way to wrap up an NSAlert, the beginSheetModalForWindow
call, and the alertDidEnd implementation, such that a caller can just
call one function which blocks until the alert is dismissed?
i.e. something like
if ([SynchronousAlert showAlertWithMessageText:@"Do you want to delete
et
On 12 May '08, at 5:18 PM, Rua Haszard Morris wrote:
Is there a way to wrap up an NSAlert, the beginSheetModalForWindow
call, and the alertDidEnd implementation, such that a caller can
just call one function which blocks until the alert is dismissed?
No, because the application cont
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 superscri
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
n Nov 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 s
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 to
ed 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
Even better... thanks for the tip. A much simpler approach...
On Nov 19, 2008, at 12:53 pm, 11(November)/19/08, Douglas Davidson
wrote:
On Nov 18, 2008, at 1:57 PM, Rua Haszard Morris wrote:
What are the different options for flipping the coordinates of the
destination view? I've
.
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
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 et
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) setUs
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
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 about
this
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 l
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 http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSNib_Class/Reference/Reference.html
40 matches
Mail list logo