|
|
Up |
|
|
  |
Author: Germán AriasGermán Arias
Date: Jul 24, 2008 16:24
OK, the methods -(void)removeSubview: and -(void)viewWillMoveToWindow: release
the memory too, or just remove the objects from the receiver?, is there a way to
see how my app handle the memory?
|
| |
|
| |
no comments
|
|
  |
Author: Marko RiedelMarko Riedel
Date: Jul 24, 2008 12:22
Hello again,
you write "As far as I remember there is no special handling for printing in NSTableView that would switch off the header."
Are your sure? I have not looked at the source code, but there must be special code to handle tables in scroll views. The header view needs to always stay in place instead of scrolling out of sight. If you look carefully you see that that is no ordinary table view inside the scroll view. It is separated from the header, which is above the scrolling area.
Have I got this right?
Marko
+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, markoriedelde@yahoo.de |
| http://www.geocities.com/markoriedelde/index.html |
+-------------------------------------------------------------+
--- Fred Kiefer schrieb am Do, 24.7.2008:
> Von: Fred Kiefer
> Betreff: Re: NSTableView, rows in reverse order
> An: markoriedelde@yahoo.de
> CC: discuss-gnustep@gnu.org
> Datum: Donnerstag, 24. Juli 2008, 19:41
> Marko Riedel...
|
| Show full article (2.95Kb) |
|
| |
no comments
|
|
  |
Author: Marko RiedelMarko Riedel
Date: Jul 24, 2008 11:22
Hi there,
just a quick reply -- I'm in a hurry. Thanks for all your help so far.
I am definitely certain that I have the right rectangle. (I am using [table bounds].) Your suggestion re. the superview is tricky. It's a clip view inside a scroll view. It does include the header in its EPS, but it only prints the visible portion (which depends on how the user has sized tbe window).
Best regards,
+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, markoriedelde@yahoo.de |
| http://www.geocities.com/markoriedelde/index.html |
+-------------------------------------------------------------+
--- Fred Kiefer schrieb am Do, 24.7.2008:
> Von: Fred Kiefer
> Betreff: Re: NSTableView, rows in reverse order
> An: markoriedelde@yahoo.de
> CC: discuss-gnustep@gnu.org
> Datum: Donnerstag, 24. Juli 2008, 19:41
> Marko Riedel...
|
| Show full article (2.60Kb) |
|
no comments
|
|
  |
Author: Fred KieferFred Kiefer
Date: Jul 24, 2008 10:41
Marko Riedel wrote:
> thanks for your reply. I tried your suggestion and ran into a
> problem: the table does not include the table header in the data for
> dataWithEPSInsideRect: So I had to get those data separately, but I
> don't know how to merge them properly. If I just concatenate them,
> then the bounding box for the whole is wrong and the header obscures
> part of the first row.
>
Not sure why this should happen, are you certain to pass in the correct
rectangle? As far as I remember there is no special handling for
printing in NSTableView that would switch off the header.
What you could always try is to print a super view of the table, that
definitly should include everything.
|
| Show full article (1.42Kb) |
|
no comments
|
|
  |
Author: Marko RiedelMarko Riedel
Date: Jul 24, 2008 08:40
Hello there,
thanks for your reply. I tried your suggestion and ran into a problem: the table does not include the table header in the data for dataWithEPSInsideRect: So I had to get those data separately, but I don't know how to merge them properly. If I just concatenate them, then the bounding box for the whole is wrong and the header obscures part of the first row.
The previous version (the one you commented on) uses ImageMagick to create a PS file for printing. It looks like I won't be able to avoid using it after all. I could assemble the two EPS files (header + table) using Magick, but then I may as well stay with the old approach.
So I guess I will try to find out how to flip views properly so that the rows do not show up in reverse when I draw into a bitmap.
What's your take on this? Of course if I could get header + table in one EPS file, that would be very nice.
Best regards,
+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, markoriedelde@yahoo.de |
| http://www.geocities.com/markoriedelde/index.html |
-------------------------------------------------------------+
__________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com
|
| |
|
no comments
|
|
  |
Author: Charles philip ChanCharles philip Chan
Date: Jul 24, 2008 06:30
David Chisnall writes:
> I think the problem is that you are misunderstanding the Objective-C
> type system. The type of an object is a property of the object itself,
> not of the label of the object (as it is in languages like C+ +,
> modulo structural typing).
Yes. This was indeed my problem.
> You can not modify the key of an item in an NSDictionary, because that
> would alter the mappings without NSDictionary knowing that they had
> altered. When you later did objectForKey: on the dictionary,
> NSDictionary would call -hash on the key you passed in. It would then
> look in the bucket associated with this hash and fail to find the key,
> because it put the key in the bucket corresponding to the return value
> of -hash when it was entered. The documentation on NSObject tells you
> that the return value from -hash may not change when an object is in a
> collection.
Now I am clear on that.
> Looking at your code, it seems that you don't actually want to change
> the key in the dictionary, you want to change a copy of it.
Yes. This is where I misunderstood David Ayers.
|
| Show full article (1.98Kb) |
|
no comments
|
|
  |
Author: David ChisnallDavid Chisnall
Date: Jul 24, 2008 02:53
Hi,
I remember a while Andreas reported an issue when remote displaying a
GNUstep app on a platform of with different endians (or whatever the
grammatically correct variant of that phrase is). My MBP is
currently broken, so I'm back on my PowerBook and experiencing the
same issue. Using X forwarding from my (PowerPC, big-endian)
PowerBook to my ThinkPad (x86, little-endian) I get strange colours.
It seems something in the Cairo back end (I don't have any of the
others installed anymore, so I can't test if this is a local issue)
is not setting the byte order correctly.
On the plus side, apart from the blue tint, remote GNUstep
performance seems to have improved dramatically. Last time I tried
it, it was almost unusable on a local network with GigE. Now I'm
using it between two machines on an 802.11g network and it's quite
usable (enough lag that you can tell that it's not local, but not
enough to actually be irritating). Many, many thanks to whoever
fixed the latency issues. It is still redrawing a lot more than it
needs to, but this X Server doesn't implement XDamage, so it might be
a server issue.
|
| Show full article (1.16Kb) |
|
no comments
|
|
  |
Author: Helge HessHelge Hess
Date: Jul 24, 2008 01:41
On 24.07.2008, at 10:20, Charles philip Chan wrote:
>> Keys for collections are copied
^^^ ^^^^^
>> by the collection to insure they are immutable. Allowing them to be
>> mutable would break the internal hash lookups.
> I still don't understand this
...
> | Returns an array containing all the dictionary's keys that are
^^^^
>
> | associated with anObject.[1]
> `----
>
> So basically I am returning an array of the keys, and since there is
> only 1 key for the object "Album" I search for it at index zero in the
> array and return it as an NSMutableString.
Dictionary keys are never NSMutableString objects. As David says, the
NSMutableString will get copied when its used as a dictionary key.
|
| Show full article (1.49Kb) |
|
no comments
|
|
  |
Author: David ChisnallDavid Chisnall
Date: Jul 24, 2008 01:41
On 24 Jul 2008, at 09:20, Charles philip Chan wrote:
> So basically I am returning an array of the keys, and since there is
> only 1 key for the object "Album" I search for it at index zero in the
> array and return it as an NSMutableString. I then want to change the
> string to the really key for the "Album" title and search the
> dictionary
> for the object- I am not even touching the dictionary. Also
> "playingItem" is defined as mutable:
I think the problem is that you are misunderstanding the Objective-C
type system. The type of an object is a property of the object
itself, not of the label of the object (as it is in languages like C+
+, modulo structural typing).
When you insert an object into a dictionary, the key will be
immutable, the object may be mutable. When you call
allKeysForObject: you get an NSArray (immutable) containing pointers
to NSStrings (also immutable). You can not 'return it as an
NSMutableString,' you return it as an id, because that is what the
objectAtIndex: method on NSArray returns.
When you do something like this:
|
| Show full article (3.37Kb) |
|
no comments
|
|
  |
|
|
  |
Author: Charles philip ChanCharles philip Chan
Date: Jul 24, 2008 01:20
David Ayers fsfe.org> writes:
Hello David:
> I would assume that if playingItem is an NS[(Mutable)Dictionary that the
> key returned by allKeysForObject: are immutable. Keys for collections
> are copied by the collection to insure they are immutable. Allowing
> them to be mutable would break the internal hash lookups.
I still don't understand this, the method "allKeysForObject" is supposed
to:
,----
| Returns an array containing all the dictionary's keys that are
| associated with anObject.[1]
`----
So basically I am returning an array of the keys, and since there is
only 1 key for the object "Album" I search for it at index zero in the
array and return it as an NSMutableString. I then want to change the
string to the really key for the "Album" title and search the dictionary
for the object- I am not even touching the dictionary. Also
"playingItem" is defined as mutable:
|
| Show full article (1.34Kb) |
|
no comments
|
|
|
|
|
|
|