Broken get_NSString() implementation?

20 views
Skip to first unread message

Gabriel Csapo

unread,
Mar 26, 2015, 3:33:09 PM3/26/15
to beeware-d...@googlegroups.com
I am working on on the tableview class and currently it seems that the implementation of get_NSString() is not returning a proper UTF8 value. 

column.headerCell.stringValue = get_NSString(heading)

is not working, it currently just defaults the field cells to "field"

Gabriel Csapo

unread,
Mar 26, 2015, 5:24:50 PM3/26/15
to beeware-d...@googlegroups.com
There is a problem with rubicon it seems, because after four hours, I tried another workaround and this is how I got it to work

column.valueForKey_(get_NSString('headerCell')).setStringValue_(get_NSString(heading))

Russell Keith-Magee

unread,
Mar 26, 2015, 7:38:26 PM3/26/15
to beeware-d...@googlegroups.com

Hrm.. I suspect there's something subtle going on, because get_NSString works in many other places.

If you're not getting a valid UTF8 value, it could be due to UTF8 encoding issues - are you using Python 2 or Python 3? 

How exactly is it failing? Is it a munged string, or a hard crash? If it's a crash, then the issue could be in reference counting - if the string is being released too early.

Can you narrow down the problem case to something simple? In particular, can you reduce the problem to something really simple that can be added as a test case in Rubicon?

(Also - just so you know: I'm based in Western Australia, which is UTC+8 - I'm not ignoring you on IRC, or waiting a long time to reply to messages :-)

Russ %-)

--
You received this message because you are subscribed to the Google Groups "Beeware Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beeware-develop...@googlegroups.com.
To post to this group, send email to beeware-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/beeware-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/beeware-developers/e6d0ac66-e7e8-41e9-b964-d92792328aee%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Gabriel Csapo

unread,
Mar 26, 2015, 8:35:51 PM3/26/15
to beeware-d...@googlegroups.com
I actually was failing to understand I was not actually accessing the headerCell, i was accessing a ghost value. 

column.valueForKey_(get_NSString('headerCell')).setStringValue_(get_NSString(heading))

this piece of code properly accesses the headerCell

Reply all
Reply to author
Forward
0 new messages